« first day (1403 days earlier)      last day (2746 days later) » 
05:00 - 15:0015:00 - 23:00

5:56 AM
@NickAlexeev The term to search for is "icon overlays".
As far as WPF is concerned, you can just use two images on top of one another. One with a bit of a margin to position it.
0
Q: Draw icon overlay image in WPF

MichaelPI build an image gallery in WPF, main window is simply a grid of images, i want to draw a zoom icon overlay at corner of image, and when user click on this icon, this icon will capture click event instead of image. I'm quite new to WPF, so please show me a good approach for this. Here is xaml f...

 
6:23 AM
morning
 
morning
 
 
1 hour later…
7:24 AM
hey, is there a nice way to create a relaycommand that both can and cannot have a parameter?
 
nicest is perhaps to split it into two types
and make the parameter command generic
 
I'm doing that now, but nice? :)
 
Reads good imo.
 
I have duplicated all the RelayCommand code (the entire class) was that what you meant?
 
Good morning
 
7:36 AM
not that much logic so perhaps not a huge smell with some duplication
but there is probably a base class in there with shared stuff
 
nope..
morning novitchi
 
@Markus are you allowing manual raising of CanExecuteChanged or delegating to CommandManager?
 
manual
 
 
3 hours later…
10:58 AM
What's the best way to do contextual commands? I have a New button on my ToolBar and I have two tabs. I want it to do something specific depending on what tab I have open.
 
11:09 AM
need some help plz. I wanted to host WPF control in winforms
anyone out there for a chat? plz
 
Just ask your question and someone will answer when they can.
 
ok. I have user control in WPF. Hosting it in Winform.
Is it possible to implement the event logic in winform?
 
Could you elaborate? What have you tried?
Since both technologies share C#, you can do whatever kind of event logic you want.
 
for example - like the code behind logic of Click event of button (button belongs to wpf control)
 
WPF Buttons have a Click event you can use.
 
11:20 AM
yes, ok. I want click event logic implementation in winForm instead of wpf.
thanks a lot
 
12:01 PM
Hi @WilliamMariager
On your question about XSD validation...
I've not done anything with that
Sorry
Is this what you're talking about? msdn.microsoft.com/en-us/library/mt693087.aspx
 
No but thanks. I just recalled someone talking about having used it.
I'm trying to setup some validation using XSD to make cleaner and more maintainable code.
/* Must use Finland special taxes */
{
    var module = (DutyFeeTaxInformationModuleType)tradeItem?.tradeItemInformation?.SingleOrDefault()?.extension?.Any?.SingleOrDefault((m) => m.GetType() == typeof(DutyFeeTaxInformationModuleType));
    if (module == null)
    {
        synkkaIsValid = false;
        synkkaTooltip.AppendLine("Must have Duty Fee Tax Information.");
    }
    else
    {
        var info = module.dutyFeeTaxInformation.SingleOrDefault();
        if (info == null)
        {
            synkkaIsValid = false;
I'm predicting code like that will get out of hand fast. :P
 
Yeah, that will quickly spin out of control
 
Yup.
And I already have full XSD specifications for all my data. So I basically just need to build an XSD schema using those specifications and run the validator.
 
Is tradeItem an XSD?
 
Well, it's a class, but I have an XSD file backing it up. The idea is I just serialize the tradeItem to XML and then validate it against various XSD schemas.
 
12:16 PM
That looks like an SO question :)
Someone out there will know how to do this more easily
 
12:34 PM
Hello Alex :D I have a .net interview in 20 mins, it includes a test. If I am allowed to use the internet then expect loads of pings lol
 
lol
I'm currently looking at an XML file that's so big Visual Studio refuses to parse it. No auto format, not syntax highlight, nothing.
 
1:03 PM
@FirstStep if you land a job using hive mind.. you'll be out of it within a month as well
 
waves
 
o/
 
@Maverik Ride that night tube yet?
 
@Maverik True. Need to trust in your own capacity
 
no Lynn, its no where near my place
 
1:04 PM
waves back from cubicle
 
bummer.. they said they're going to do three more lines.
 
its only on 2 lines and i don't know if there's a real benefit on those lines
even if they do, my side of london isn't served by underground at all
 
@WilliamMariager Dang. Can you open in Notepad++?
 
but throwing more men at the problem certainly is easier "progress"
 
1:05 PM
right.
 
my side of the london is served by overground - which is basically a cross between rail & underground
it looks like an underground train - but it runs off rails and just as infrequently
 
How often do trains come?
(30 or 10?)
 
once in 15 minutes
 
oh...
 
those are the frequent ones
then there's once in 20 and once in 30 as well
 
1:07 PM
are they generally considered to run on time?
 
yea generally
+/- 2 minutes
 
The trains in Cologne were excelllent.. 1-2 minutes off tops.
 
so missing one for any reason you have to wait a long time
thats how underground runs
during peak hours, there's one every minute almost
and it'll still be jam packed
 
all of them!
 
1:08 PM
Is that your primary mode of transportation?
(are cars even a thing, there?)
 
off peak it's upto 5 minutes per underground train
yea cars are a thing but expensive
and yea trains are how we move around generally
buses as backup but super slow cos max 30 miles an hour
though now they're very proudly lowering it to 20 miles per hour
cos.. safer boroughs .. damn the people who actually use transport for transport reasons
cars of course suffer from same limitation
 
they're expensive cos of multiple taxes & then 20-30 miles max speed
(they're cheap to buy.. expensive to hold on to & use)
 
I'm going to guess that most properties don't have garages or driveways.
 
nope
its not a thing
unless you go to richer side of the london of course
 
1:12 PM
right.
 
the very idea of property.. is amusing to me
 
owning it, you mean?
 
not in this lifetime - right now i have rent a new place..and i can't even afford rent so i'm thinking about leaving london
yea owning isn't a thing for this generation or next
people who have properties generally are either rich guys or ones who inherited (mostly this type)
 
You're strictly talking about larger cities, right?
 
i only know of london as thats where i've spent all my time
 
1:13 PM
Ah...
 
but its pretty bad all over
though london is of course the worst case scenario
 
A lot of our large cities are hitting that point. San Francisco (and most of silicon valley) is ridiculous.
NYC is too. As is anywhere near DC.
 
well its not even the worst thing.. i'd say things will start cracking soon
we're going to hit the melting point eventually and then it'd be a sight to see
 
melting point?
 
if someone like me has to consider moving out of london - you can be sure a lot of others have to consider too
anything near London right now charges London rents already
by near i mean anything in a 2 hour drive radius
which is pretty damn big
 
1:17 PM
sigh
That's nutz.
Right. I'm only 3 hours from NYC, and 1.5 hours from Philadelphia.
 
because people are willing to drive 2 hours each way, thus its essentially london as far as rents are concerned
so we'll keep pressing that and lets see just how far can london "expand"
 
If I wanted to make top dollar, I'd commute there everyday, but still live in Lancaster :)
 
ok my geography sucks so i dunno how far is lancaster
1.5 hours from phili ?
 
Yeah, it's about 129 km
 
righto well i'm doing that already while living inside london and only being 15 miles out from work
 
1:20 PM
There are trains that run lancaster -> philly though...
 
1.5 hours each way cos delays / signal failures / faulty trains are a daily commute thing
so the only way to fix the problem is to eliminate commute altogether!
 
I drive 27 mi (43 km) each way every day...
 
and thats exactly what london is doing right now
 
about 30-35 minutes of drive time.. almost all highway.
 
yea I'm all city drive with mostly 20 miles average
so we crawl a lot more in the name of safety
 
1:22 PM
that's sad :(
 
cos lets not hit that effing drunk that has no job and was drinking all night
everybody talks about safety in london.. i've never heard the impact of those safety measures on rest of the london
 
Hey, speaking of drinking... off to get that coffee now. brb.
 
yea i was wanting same xD
 
off we go, then!
 
Cocaine - a cloud platform to build PaaS infrastructure
Cocaine Dealer API Reference xD
love the name xD
 
1:25 PM
Dang, that's one heck of a name for a service
 
HAHAHAAHA
And remember, they're not functions, they're tokes.
 
Why not crack or meth then?
 
Brings a whole new meaning to asking how many lines you just did.
 
Wow
 
(thanks, I'm here all week)
 
1:26 PM
:)
 
(tip your waitresses)
 
:D
thats what i've been looking at :D
 
Stands for Configurable Omnipotent Custom Applications Integrated Network Engine
 
their "what the hell is cocaine" reads: If your startup idea is about processing terabytes of pirated video, we got data streaming and pipelining for you as well, enjoy.
 
Well, at least they're honest
 
1:38 PM
:)
these days i'm seeing what i had only heard of before
bot farms! running in Riders of Icarus
 
It's a brave new world
 
i'm guessing they're running off aws or something - they have 3 really nice names: white, pain, snaki -- appended by their instance number i think
and my god.. they farm shit 24/7 then they sell it all to npc
then.. all this gold is used to sell it to actual players
1000g (huge amount in current economy of game) for 30 USD!
and giving the way prices have gone up, i'd say they're running a pretty successful business
auction house prices expect you to have the kinda money they're selling
(the game is only 2 months old and before the bot invasion, 1g was a big amount)
 
Yep, if you have some ingenuity, you can make some serious money in this economy
 
yup
the game publishers answer is to ban the bots
cos.. its so hard to make a new account
i actually think they game publisher may be in on the botting scene cos this isn't their first game with instant bot plague
and history tells us they've never done anything serious to stop them
 
Need some advice on generating some reports and emailing them from within the WPF app...
 
1:49 PM
it took them 2 months to even acknowledge that there's a problem and that they'll ban :)
what? go to other channel!!
 
:)
 
ok ask your question and somebody will answer when they have time :P
 
It's SSRS. Blech!
Don't want to dirty up the room with such awful thing
 
@alex you here? I am allowed to use the internet :D
I just started
 
My .NET knowledge is beginner to intermediate, just to let you know
I might ask the question on the C# room. More SSRS folks there
 
1:52 PM
good luck First
please focus on the test - we're happy to help but we're not doing your homework
especially not a job test
 
Yup
I am
need to write stuff from class to xml
brb
 
^ What Maverik said
 
well at least he has an easy start
 
Yeah, had one guy send me some bizarre code one time and ask me what was wrong with it. Couldn't even tell what language it was
I've noticed the employers who list on SO do that sort of thing. Guess they get a lot of job applications and need to winnow them down
 
@Maverik have you upgraded to rx 3.0?
Not sure wtf is up with the packages
 
2:04 PM
Why "AmountNode.SetAttribute("value = \"1\"");" tells me can't take one argument :(
But this OrderNode.SetAttribute("id=\"1\"", "paid=\" 2\""); works
 
shouldn't it be AmountNode.SetAttribute("value", "1");
second one looks strange, check what the xml looks like
 
well it depends if closed element or open correct?
 
neither looks right
 
roger. On it
 
@Alex Fire away.
 
2:06 PM
poped run time error
The '=' character, hexadecimal value 0x3D, cannot be included in a name.
 
So if I want this structure: <Amount value="<VALUE>" />
I use your format?
 
worth a try I think
also for second you probably want tow calls
 
@LynnCrumbling Just spoke to someone here and got a better understanding. It wasn't so much technical, rather just understanding what the user needs :)
Thanks, though
 
OrderNode.SetAttribute("id", "1");
OrderNode.SetAttribute("paid", "2");
I usually unit test serialization stuff as it is easy to get wrong
 
2:08 PM
@Alex Ah, ok. Just found code in a book I have to create subscriptions programatically.
Wasn't sure if that's what you were looking for.
 
@JohanLarsson got it thanks working on it
 
Hmm. SSRS subscriptions?
 
What if I want open element like this?
 
These reports run locally, not on the server, so subscriptions won't work.
 
<Item>VALUE</Item>
 
2:10 PM
@Alex Ah, yeah.. that won't work :)
I'd render the report to PDF and send it out via SmtpClient.
 
Basically, we'll have a dropdown for about 15 contact people. When the user selects one and clicks Generate, it will generate the list of employees assigned to that person. Each page of the report will be a Word letter with an employee's details
I wasn't sure if it's possible in SSRS to produce multiple reports all at once. So the user can generate all 15 Word docs at once
One SSRS report will export to one document; it won't split into multiple ones
If that makes sense :)
 
@FirstStep look at the docs. VALUE isn't an attribute in that case
So you probably have to call something like ItemNode.SetValue or something, that would be my first guess.
 
I Don't see a setvalue
 
yeah, you should read the docs imo
 
I see setAttribute
I created it as an element
 
2:16 PM
We don't even know what api you are using
 
@JohanLarsson I am in the middle of a test but allowed to use the internet
 
np asking but hard to answer
 
ok I have this code on VS Windows
XmlElement OrderNode = xmlDocument.CreateElement("Order");
OrderNode.SetAttribute("paid", "<VALUE>");
OrderNode.SetAttribute("id", "VALUE");
root.AppendChild(OrderNode);

XmlElement AmountNode = xmlDocument.CreateElement("Amount");
AmountNode.SetAttribute("value", "1");
OrderNode.AppendChild(AmountNode);

XmlElement ItemChild1 = xmlDocument.CreateElement("item");
AmountNode.SetAttribute("Item", "1");
AmountNode.AppendChild(ItemChild1);

// .. add more if required

XmlElement ItemChild2 = xmlDocument.CreateElement("item");
I want it to look like this:
* <ORDERSXML company="nextep">
* <Order id="<VALUE>" paid="<VALUE>">
* <Amount value="<VALUE>" />
* <Item>VALUE</Item>
* .
* .
* .
* <Item>VALUE</Item>
* </Order>
* <Order...>
* .
* .
* .
* </Order>
* </ORDERSXML>
but it looks like this now:
 
this is the wrong time to point this out - but XElement should have been lot easier
 
-<ORDERSXML company="nextep">


-<Order id="VALUE" paid="<VALUE>">


-<Amount Item="2" value="1">

<item/>

<item/>

</Amount>

</Order>

</ORDERSXML>
 
2:18 PM
also, dont get stuck on one question - i'm sure you have other questions in there
 
@Maverik I usually use serilaization
 
internet access is a trick thing - don't expect it to solve your issues
 
I have 6 :( for one hour. 15 mins gone
 
yea leave it
 
I don't love linq-to-xml
 
2:18 PM
ok next
 
time is more important
Johan he's doing a job test - and this is his test question - can't give him a quick answer to what he doesn't already know
but i do prefer Linq2Xml - i find my much more fluent
though yes... thats the route I would have taken as well
XmlWriter.WriteObject -- done
 
@Maverik ah
 
I use that at work ..
yp
now I need to check if a word is the anagram of another word
return false / true
I am in the middle
int Str1Size = _string1.Length;
int Str2Size = _string2.Length;
bool Result = true;

if (Str1Size != Str2Size)
return false;

List<bool> temp = new List<bool>;
for(int i = 0; i < Str1Size; i++)
temp.Add(true);


for (int i = 0; i < Str1Size; i++)
{

}


return Result;
but this won't cover duplicates :(
Here is the whole thing:

public bool CheckAnagram(string _string1, string _string2)
{
int Str1Size = _string1.Length;
int Str2Size = _string2.Length;
bool Result = true;

if (Str1Size != Str2Size)
return false;

List<bool> temp = new List<bool>;
for(int i = 0; i < Str1Size; i++)
temp.Add(true);


for (int i = 0; i < Str1Size; i++)
{
if(_string1.IndexOf(_string2[i]) == -1)
{

return false;
}
}


return true;
}
Now next question :(
 
whoever wrote these questions, isn't trying to see you succeed at all 6
he's trying to find how you cope with time pressure & prioritise tasks -- don't use the internet until you've reached the end
 
I submited this :

static public bool CheckAnagram(string _string1, string _string2)
{
// This won't cover duplicated chars !!!!!!!!! Sorry
// HEre is my work:
int Str1Size = _string1.Length;
int Str2Size = _string2.Length;
bool Result = true;

if (Str1Size != Str2Size)
return false;

List<bool> temp = new List<bool>();
for(int i = 0; i < Str1Size; i++)
temp.Add(true);


for (int i = 0; i < Str1Size; i++)
{
if(_string1.IndexOf(_string2[i]) == -1)
{
return false;
}
}

return true;

// Here is a working code:
with a reference to a working code found online
 
2:31 PM
though you probably wont have time for this but i have a better solution:
I would have used a service for the purpose and offloaded the entire thing to it
 
I think you should validate inputs
perhaps:
        public static bool IsAnagram(string text, string word)
        {
            if (string.IsNullOrEmpty(text))
            {
                throw new ArgumentException($"{text} cannot be null or empty");
            }

            if (string.IsNullOrEmpty(word))
            {
                throw new ArgumentException($"{word} cannot be null or empty");
            }

            if (text.Length != word.Length)
            {
                return false;
            }

            return Enumerable.SequenceEqual(text.OrderBy(x => x), word.OrderBy(x => x));
 
unless your test explicitly forbade using webservices - this is not only technically feasible, it would have shown ingenuity
 
not perf optimal but until the profiler says it is an issue it is fine
 
anagram-solver.net/VUM <-- VUM being input - would have returned reply
all i did was 1 google
 
maybe word1 & word2 are better names idk
 
2:34 PM
or am I the only one who would have pushed it to a webservice?
of course depends on your interviewer, but if i was on the interviewing side, i would have looked favourably on usage of nugets & webservices -- its a time sensitive assignment - being resourceful is key
anyways! Mass Effect: Andromeda is coming - yay!!
I'm gonna miss the last guy
 
ummm i hope you watched the star citizen gamescom demo
 
no - not into star citizen
not a fan of its business model
I'm gonna miss Kaiden - wonder if he'll make the cut
 
time to convert you mav
 
nope
you can't - like i said, it's not to do with the game
its about the amount of money you can invest in it
and i've played enough freemium games to know when not to get sucked into this model
 
meh. so dont spend that much. i bought the game for 45 bucks, now waiting anxiously !
 
2:41 PM
:)
you'll see the problem i'm talking about soon enoguh
its not about the upfront cost
 
2:58 PM
@Maverik what if the question is, write code that will be used as a webservice to return if a word is an anagram or not? :p
write a webservice for a webservice? nahh
 
but i doubt thats the question
but the real answer is - its an interview.. nobody cares about the anagrams
how you handle yourself is what the real test is about
and yes
there's no reason why you can't webservice ontop of a webservice
 
05:00 - 15:0015:00 - 23:00

« first day (1403 days earlier)      last day (2746 days later) »