« first day (1592 days earlier)      last day (3361 days later) » 

11:02 AM
@F4z If WPF: If you just pass by reference you don't need copies. Your entire program will have knowledge of the one instance, and when it renames, everything else propagates the change (assuming you have bound on it). If WinForms: BHWHAHAHAHA gooood luck. If ASP.NET, use EF.
 
F4z
@RoelvanUden ha! winforms. But I just need to know if there is a good way to id each item so it can automatically change?
 
WinForms has no knowledge of mutations, binding, etc. You'll need to hand-code everything to propagate a simple change. It's a massive headache and you'll need to roll your own solution that accommodates your current work flow. I can't help with that. Nobody can. I recommend upgrading to WPF
 
F4z
@RoelvanUden naa. Think I'll stay in winForms. I just like it :P also I'll take my time to identify a good enough system. I just needed to know if anyone had any ideas
What If i did it in wpf. Will it be through bindings?
 
Yeah. All your views would have bound on the instance of the 'Item' and your mutation view would merely set the fields on 'Item', which causes propagation through all the bindings and thus views. You don't need to think about this 'problem' at all there.
For all intents and purposes, WPF is far superior to WinForms.
 
F4z
mainly because of the bindings i suppose
 
11:08 AM
Has anyone ever read "And Lo! The Bird!"?
 
F4z
nop
 
@F4z Not only that, but also styling, performance, resources, build-in components, visualization, hardware acceleration, and many many more possibilities. You can see WinForms as a mobile phone from 1945 (you know, the ones military used as backpacks) and WPF as a modern-day high-end smart phone. It does everything better, faster, with more possibilities.
 
F4z
@RoelvanUden interesting.
@RoelvanUden I'll see how I go with the one in Winforms. When I'm happy the way it performs in winForms ill upgrade to WPF
@RoelvanUden i have no problem with either. Just want to see how I can get through with winForms
 
Gotcha. Unfortunately, I haven't got the foggiest without building your own 'manager'-kind of thing. Tedious, to say the least.
 
F4z
@RoelvanUden It is very tedious to create things like this but once it works perfectly ohh man the satisfaction.
 
11:14 AM
@All: Hi ,My question is I have to sort the xml document based on an attribute value.How can I do it?
 
@F4z Yeah, well, I'd rather focus on the core problem instead of the facilities to deal with something simple
 
@RenjithJR "sort the xml document"?
@RenjithJR XPath?
 
11:35 AM
@F4z: If possible, you should learn WPF rather than jerking around with winforms.
winforms will become unmanageable after some time. The more devs, the more clutter, the more smell.
 
I don't have any 'professional' experience in C# / WPF. Is it worth it to get a certificate, just to show that I have a basic competency?
 
11:52 AM
People actually study for certificates? :-/
@BenjaminDiele it wouldn't hurt, certainly.
 
@Squiggle Yeah, why wouldn't they study? I think it's strange to pay money for something and then not put in any effort.
 
No, I just mean that I have never actually done certified training in the last 10 years :-/
 
Do you intend to pay for this yourself?
 
and I've never been asked for certification, nor has it been a hindrance in finding work.
 
@scheien I got one that I need to get for work, but I'm wondering if it'd be worth it to pay 150€ for one myself
@Squiggle But that's because you have experience in C# / .Net. I don't have any professional experience, which has screwed me over on a few sollicitations
 
11:56 AM
@BenjaminDiele it's always tough to find that first year of professional experience, yeah. I guess a certification will help to some degree!
 
That's what I was hoping :)
 
Certifications are rarely a bad thing
 
@BenjaminDiele I don't have certificates of any kind, other than my University degree. I honestly think that employers that attach a lot of value to technology-specific degrees, rather than overall learning capabilities and competence, aren't that interesting anyway.
 
Because althought I'm doing AX right now, I'd like to do C# in the future
 
But of course, it doesn't hurt.
 
11:57 AM
@RoelvanUden Sure, and you can choose between a good employer and a great one when you have the skills and they believe you
 
I'd value open source projects more :-P
(But that's me, and we all know human resources is often incompetent)
 
I already work 12 hours or more on average. I don't see myself working on some project just to build cred.
Open Source stuff is good for single people, or people who don't have all that much to do after work. Not to say that there aren't people with kids and more doing open source, but it's a big minority
 
think hard about which direction you want to take, professionally, before investing your own money in a certification. No point in training for WPF if you're applying for MVC roles etc.
Also I agree with @RoelvanUden - any good manager will value open source contributions highly.
also stop working 12-hour days. That ain't healthy.
 
^ That. Work max 8 hours a day, 5 days a week. Relaxing is an important thing.
 
@Squiggle I know, but I have quite a lot on my plate. But I think WPF is a nice piece of tech, I've been working with it after-hours for 3 months now.
 
12:03 PM
You'd be better off with general c# certification
 
And y'know, it is often concepts. If you understand MVVM, Angular is easy.
 
and I second that @RoelvanUden. 40/hrs week max
(I found angular pretty sweet)
 
We're building mobile apps with Angular at the moment. I love it :-)
 
@RoelvanUden I know that, you know that, @scheien knows too apparently, but HR doesn't. And they're the first gatekeeper.
 
Me too :)
 
12:05 PM
:D
 
(even integrated a barcodescanner to lookup eans and put into a shoppingcart thingy)
 
So there's this exam for C# microsoft.com/learning/en-in/exam-70-483.aspx Any others? The MS site isn't all that great
 
@scheien fun!
 
I honestly don't have a lot of experience with job hunting yet, I've only done it once. However, I'm still getting called all the time with job offers, and I had 4 concrete job offers (where I could start immediately) within a single week. I don't think HR is a big hurdle, at least, not here. Might be different in other countries..
 
also yeah, AngularJS is ace.
But I can't wait for WebComponents...
 
12:08 PM
@Squiggle: indeed, but it's a bit hacky :s (since I need to remember state when going away from the browser)
 
@RoelvanUden Then you must rock at your job, because I don't really get that many calls :(
 
@BenjaminDiele I get calls every other day :/
 
@BenjaminDiele LinkedIn goes a long way. Do you have it?
 
Sure, make me feel worse! :D
 
I don't think you should feel worse lol
 
12:10 PM
@scheien I did a barcode scanner widget for a webapp before. It just acts like an external keyboard. Still pretty neat when you actually see it working!
 
I hate it, personally.
 
Yeah i have linkedin. I get an invite once a month from a generic recruiter. Usually for front-end stuff, which I haven't done, and don't want to do.
 
@BenjaminDiele Can you link to your profile (or mail if you don't want it public)?
 
I don't get calls from recruiters anymore, because nobody has my new mobile number. It's bliss.
I still get offers of Java development roles in the UK, but I don't live there any more (and have never done Java professionally).
 
@RoelvanUden Same name, same picture on linkedin
 
12:12 PM
I'm lazy. Humor me. :p
Ah, got it.
Damn. You speak dutch. How did I not realize that before?
 
@Squiggle: cool! :>
 
I think the biggest problem might be my previous working experience.
@RoelvanUden I've known you could speak dutch the first time I've read your name :D
 
Yeah.. it gives it away :3
 
@BenjaminDiele Have you ever uploaded your CV to a big reputable computing jobs website?
 
@Sippy Yeah, and then I get calls for java and such =/
 
12:14 PM
Because if you do that, 10,000 recruiters download your CV and call you for the rest of your life.
 
een biertje, asjeblieft! (or something like that)
 
But I gotta go, gotta study for that exam thursday
 
Aight man, gl with that :)
 
gl with exam @BenjaminDiele
 
Shit I need to revise for my driving exam lol
 
12:16 PM
Thanks, it's about sharepoint =/
 
0
Q: Ajax not giving me server side function call

Cute ChildI have simple ajax as: $.ajax({ url: "http://localhost:50488/siteadmin3/search.aspx/TestJquery", type: "post", data: { id: '100', Name: 'Nilesh' }, success:function(result){ alert(result); }, error: functi...

 
@Sippy why does nobody in Tealand get their license at 16?
 
@KendallFrey Well you can't get your license legally until you're 17 so that would be why.
 
well, ok, same question, different data
Why do all these 20-somethings decide they wanna drive after all
 
I always did wanna drive lol
I didn't buy a car during uni because it would've been a huge waste of money.
 
12:27 PM
who needs a car, drive your mom's
 
I don't live with my mother.
And I already bought a car.
 
that's how we do it in america
 
ur not murican
nerd
 
half anyway
I've also been watching too much Little Britain
> In Ameddica...
 
Writing yagni stuff is fun
 
12:49 PM
good morning
 
@Squiggle: You know of any lightweight datepickers for angular? Seems like everyone have made their own at some point, with jq, bootstrap and what not.
 
@KendallFrey woah woah woah there buddy
 
im not a horse
 
lmao
you're also not an american, but that didn't stop you
:p
balls
that wasn't funnny
@Sippy
 
^nerd
 
1:00 PM
@Steve Well, depending on your definition, I am
The only thing that makes me not American is living in Canada
 
@KendallFrey :)
ugh guess i should go to work
why cant i just win the lottery
then i could be drunk on a beach right now
kbye
 
You don't need to win the lottery to be drunk on a beach
If you win the lottery, you can be drunk on your beach.
 
Hi all, I have a question about C#. Ok, I have an abstract class Block wich some classes are extending it (like GrassBlock, RockBlock, …). I have also a variable of Block type. In this variable, logically it can contains an instance of any classes extending Block. What I want to do is instantiate a new object of the type contained on this variable. How to do that correctly?
 
1:15 PM
um, block = new SomeBlock()
 
but I don't know the type wich is in
 
I'm confused
 
it's a Block type
not a derived
 
if it's a grass block, you want to create a new grass block?
 
like Block b = new SOMETHINGEXTENDSBLCOK()
yes
exactly
it's exactly what I want to do
 
1:16 PM
why...?
 
because I want to reinstantiate it
it's possible?
 
You must be confused about something
 
@scheien DatePickers? I just use the AngularUI one. I think. Lemme check.
 
that's not something you do in programming
What are you really trying to do?
 
maybe we can do b.GetType() and do a cast?
 
1:18 PM
no, you're trying to do something that you shouldn't be doing
 
it's a little bit compicated
 
explain your problem, not your attempted solution
550
Q: What is the XY problem?

GnomeWhat is the XY problem? When asking questions, how do I recognize when I'm falling into it? How do I avoid it? Return to FAQ index

 
ok, i want to reset some block
 
@scheien BTW if you're doing datepickers in Angular, note that it uses the localized datetime - which might not be the same as the server. That caused some interesting issues which we had to work around.
 
to it's original instance
but I want that this blocks keeps its type
 
1:19 PM
Then provide a way to reset it
like a Reset method
 
impossible
 
uh
why
 
because I have tons of classes that extends block
 
that's not a problem
 
and writing a method for each will be redundant an longgggggg
in each classes, I must to override
the Reset
 
1:20 PM
if the logic is the same, just put it in the base class
 
so I throw I away this solution
but the logic in other class is not the same
 
Presumably you have the "reset" logic in the constructor already
so you don't need to rewrite it, just move it into Reset
then call Reset in the constructor
 
@Squiggle: Angular one? Have they included their own? Which package?
 
but how can we call a ctor that we don't know the type?
 
we know the type in the variable that I want to reset
 
you don't call the constructor again
 
so maybe GetType
 
@scheien not sure about non-bootstrap alternatives
 
you call Reset every time you initialize or reset a block
 
1:23 PM
and this = new GrassBlock() didn't wotk
like b.Reset() ?
 
if I do that I will have to implements tons of Reset method !
exactly what I don't want to do
 
but you're not doing anything you're not doing in the constructor, right?
 
@Squiggle: allright, thanks :)
 
it is possible to instantiate an object belongs a type ?
 
1:30 PM
@Marc-AntoineJacob As in .. like .. not using var?
 
@Marc-AntoineJacob You don't trust me, do you
@Marc-AntoineJacob it's possible just like it's possible to pound in a nail with your head
 
yes like Block b = new Block() as b.GetType()
 
no sir
stop that
you don't want to do that
 
stahp
 
HAMMAHTIME!
 
1:37 PM
you want a Reset method, or something like that
 
@Marc-AntoineJacob I think you're misunderstanding the nature of mutable state and references to an existing object. You can't just replace all existing references to A to a new B. You can reset the mutable state as @KendallFrey mentioned, which is the preferred and only way, really. Except terrible hacks. TERRIBLE.
 
ok, I thought that cast can help
thanks for help
use a Reset is a good idea
finally, i have just to override it in the classes that are different
 
2:07 PM
if i have public async Task someMethod(....)
is it wrong to call it without await?
 
if it throws an exception, it'll still be caught?
 
no
unless it's handled in the task
 
I just don't want this thing eating exceptions and nobody knows about it
so if i do await it, the await keyword is what picks the first exception on the returned task and throws it, right?
thats why i'd need it
man this async shit is spreading quickly
 
any reason you can't handle the exception in a decent place?
like, where it happens
 
2:11 PM
i'm thinking of unforeseen exceptions
if I'm able to handle it in the async method I will, but sometimes I might need it to bubble up
 
foresee them
if you need a generic exception handler, you'd still be better off putting it inside
 
for instance, the endpoint i'm attempting to contact isn't responding
well, no i should still be able to handle that in the async method
idk
 
This question feels like it should be flagged or improved. I'm not really sure what to do. Thoughts? stackoverflow.com/questions/28697945
 
maybe i'm just being overly paranoid
@JeffBridgman i'm not sure how you can improve a rant lmao
 
cv-ed, dv-ed
 
2:15 PM
i'm so fricken uncomfortable having it eat exceptions
 
Maybe it's a XY problem? Seems like using a message queue or some sort of service bus might work, but yes... quite the low quality. Wasn't sure what flag to use though.... unclear?
 
@JeffBridgman closed
 
@Steve so handle them
 
yes sir
 
Thanks @LynnCrumbling
 
2:28 PM
Hi Everyone. in Netbeans one can double click the code title and it maximizes within IDE. Is there any way to do the same in VS?
 
is it bad practice to use out?
 
@LifeH2O What do you mean by "the code title"
 
@LifeH2O I have no idea what a code tile is.
 
Tab
Tab name
 
You want to maximize the tab content, or the name?
 
2:29 PM
file name
 
public bool ReadValues(int numValues, out List<short> values) vs public List<short> ReadValues(int numValues);`
 
tab content obviously
 
Just drag it out of VS and it becomes its own window, then maximize.
 
^ this.
 
@NETscape: That depends on the usage. If it's used all over the place, then there are probably some other way to do it :)
 
2:30 PM
in Netbeans when it maximizes, it hides all left, right and bottom panels. Double clicking again simply resotres it
 
@LifeH2O drag the tab back onto the tabstrip to make it a tab again.
 
Yeah that works, but i was hopping for a simpler way like NB
 
VS != NetBeans. Thankfully.
 
@scheien i guess returning bool would let me know whether to use what is returned in the out param
 
android studio rocks, fyi
 
2:32 PM
If your aim is just to maximize content area, just auto-hide other stuff.
 
@RoelvanUden No it isn't but that does not cover up other goodies in NB
 
@NETscape: indeed, like the tryparse() methods
 
PC != Mac, but Mac can not entertain gamers, consoles are behind PCs in power
 
@KendallFrey so instead of having this puppy be public async Task someMethod(...)
I think I can just not use await in the method and use like .continueWhen on the returned tasks, bad?
 
Weird how code can suddenly start behaving differently even if you haven't touched it
@Steve er, that's pretty much what await does, just less cruft
 
2:34 PM
@LifeH2O: That is not true. Mac is now running x86.
So in general it's the same, but with different OS.
 
@scheien Did they finally dump SCSI in favor or SATA, too?
 
That I don't know.
 
There's a huge party going on outside and I'm stuck in the office :(
 
Only seagulls making some noise outside out offices, and it's so quiet that I can hear the clock tick.
 
We have Gugge.
thousands of people with drums and horns
 
2:50 PM
ha got another gold badge :p
 
gratz
 
what kind of things does your editor do @rlemon?
 
takes the piss
 
can it undo Ken doll since his mom used your edickor?
 
2:57 PM
hi need help , I'm getting
cannot convert system.datetime? to system.datetime error
public DateTime ShowCheckInTime( string AssociateId, string Status)
{
return te.GetTime(AssociateId, Status);
}
Getting error in GetTime method
 
wait wat
 
I used edmx which generated gettime method
this will return a datetime
 
@SureshSavage Do you understand nullables?
 
balls
 
@NETscape ProTip: when giving anonymous surveys don't let users enter their own values :D
 
2:58 PM
@rlemon we used 3 spaces for indentation in uni
 
I hate you
 
anddd i can't believe more votes went to opening line braces
 
because we don't all use VS
:P
 
no. How to put here
@NETscape no
the get time returns a nullable datetime
@NETscape public virtual ObjectResult<Nullable<System.DateTime>> GetTime(string associateId, string status)
{
var associateIdParameter = associateId != null ?
new ObjectParameter("AssociateId", associateId) :
new ObjectParameter("AssociateId", typeof(string));

var statusParameter = status != null ?
new ObjectParameter("Status", status) :
new ObjectParameter("Status", typeof(string));

return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<Nullable<System.DateTime>>("GetTime", associateIdParameter, statusParameter);
 
@SureshSavage stop spamming, we already know your issue
 
3:00 PM
long shot, anyone here deal with node + express4 + putting a http-proxy behind a router?
 
5 spaces master race
 
and googleable
 
routers don't throw the events I need
 
discussing indentation levels proves why we need tabs ;)
 
3:01 PM
router.on('upgrade' <- no .on for routers
 
@SureshSavage GetTime returns DateTime?, your method returns DateTime
 
Hey guys, are there classes like selectableChannel and selector in C#? ...I'm coming from java and want to create a little asyn socket framework
 
@mike what is selectableChannel?
and Socket already has Async methods
 
@NETscape an abstract class for the new java io classes like socketchannel, filechannel, that can be registered with a selector. with that selector it is possible to handle multiple channels with one thread
 
Good morning everyone.
 
3:05 PM
@rlemon Heh, yes. But not for web sockets, as I presume you're doing.
 
@mike there are low-level mechanisms for this, yes - https://msdn.microsoft.com/en-us/library/vstudio/dkfd3wha(v=vs.100).aspx
but why do that when there are frameworks for you already
 
yup
damn websockets
 
Good morning.
 
but the issue here is primarily http-proxy (i think)
 
@Squiggle yes?
 
3:06 PM
sorry. Hit enter too soon :P
@mike what's the aim?
 
@mike so like, a List<Socket>? lol
 
@mike You can just put a socket into listen, do AcceptAsync and off you go.
Why would you need a framework? :P
 
@Squiggle I create a communication library and communication server in java, now i also need the libraray in c# and c++
 
ah OK
 
Task.WhenAny(...).ContinueWith(t => asdf) wtf is t
 
3:11 PM
sorry I'm used to working higher level :) I've got my head full of WCF today.
 
i could stop being lazy and look it up
 
When any of the tasks completes, continue with.. that.
Exactly as it says. lol
 
when all
i didn't mean any
is t an array of?
 
When all the tasks complete, continue with... that.
Once again exactly as it says.
 
yeah, but what is the type of t, it can't be a single task result?
i know what it does, i don't know how to use it :p need to RTFM
 
3:13 PM
If you do it for a single task, you can just do task.ContinueWith(t=>...)
 
You know nothing, Young Steve!
 
On the task :P
 
@Greg IDataContextFactory is a factory interface that generates the approriate DataContext. It is named such that its a factory and to signify what it creates
 
it's for multiple tasks
 
Basically, let's say you do 3 parallel HTTP requests. then want to do smth..
 
3:14 PM
@NETscape and yes, kind of. the selector triggers when any registered channel has any action and returns a set of selection keys. from the keys you can retrieve the action (e.g. ready for read) and the the channel
 
i'm going to hurt you, lmao
 
@Greg InventoryItem represents a business object / domain model
 
@CharlieBrown So what would be the variation between a DataContext and Context?
 
variation? there is no object named "Context" in the project
 
@CharlieBrown So InventoryItem signifies an model in essence.
@CharlieBrown I know there isn't, but in several other examples I saw the word Context rather than DataContext.
 
3:18 PM
Yes, it is a model/entity/business object
@Greg Context or DataContext is a typical name used in ORM's that create units of work, like NHibernate and EF
 
@CharlieBrown But they in essence are the same?
 
Your thinking into it too much
var context = new DataContext() just a variable name. Could have named it var magicSpecialSauce
There is no significance to the names, they are just the names I chose. Many developers (including Microsoft) use those names, so I use them for consistency
 
Okay, I wanted to clarify.
How is your boat endeavor?
 
3:44 PM
Morning
 
Guys, would using a lambda like db.Engineers.Remove(x => x.id == someId); be more performant than creating a list using db.Engineers.Where(x => x.id == someId); and looping through it removing each element from a SQL point of view?
Or would it still generate a SQL statement per element?
 
Wouldn't Remove be better?
 
It's cleaner code sure
I'm asking if it's more performant on the database
 
@Sippy Doesn't it depend on the database-specific implementation of the class?
 
That I'm not sure about.
 
3:52 PM
@LynnCrumbling How do you mean?
 
@Sippy depends on the sql that it produces, but 99% of time the first is better
 
@Sippy What is db?
 
@LynnCrumbling Entity Framework DbContext class
 
Which RDBMS?
 
@Sippy if its EF, the 2nd is required
 
3:53 PM
SQL Server
@CharlieBrown Oh is it?
Dang.
 
Irregardless of the underlying data source
 
s/Irregardless/Regardless ;)
 
EF only provides an db.Engineers.Remove(engineer) method
@LynnCrumbling probably ;)
 
Is there a clever way to trick EF into doing batch deletes/updates with one statement?
@LynnCrumbling Both are technically words :D
 
@Sippy not a trick, you create a stored command or execute sql directly
 
3:54 PM
Right
Huh. Do you think they'll add the first case to EF in future revisions? Seems like a good idea to me
 
No, it would be counter to the EF design
ORM's are an abstraction that work on the Object level, having a method that deletes an entity from the store by key without first loading would turn the ORM into a sql generator
 

« first day (1592 days earlier)      last day (3361 days later) »