« first day (1748 days earlier)      last day (3207 days later) » 

12:04 AM
hello
 
i could use some help on some algoritme issue i have
any1 up for it?
so nope?
my problem is: i dont know how to make the 2th round in a single eliminiation tournement ( printyourbrackets.com/… )
this is my psuedo code for now(not c++ tho) ( pastebin.com/Lb2vURUJ )
 
12:56 AM
@cc2k use a linked list instead?
could use it to make a tree backwards and just fill it in as you go
 
i have no idea what a linked list is
hm ill look into it
 
you could also make your own tree implementation like:
158
Q: Tree data structure in C#

stimmsI was looking for a tree or graph data structure in C# but I guess there isn't one provided. http://msdn.microsoft.com/en-us/library/ms379574.aspx explains a bit about why. Is there a convenient library which is commonly used to provide this functionality? Perhaps through a strategy pattern to ...

 
ty for the link, im gonne look into further when im back from the death :)
 
abr
1:39 AM
anyone around with some experience regarding asp.net and web deployment?
 
 
4 hours later…
5:38 AM
@Griffin lol, fucking swat wtf
"a guy threatened to shoot himself, so we shot his window to show him we aren't fucking around and that he needs to come outside right NOW."
 
how to implement reseller api to www.yogihosting.com ?
 
@Jeremy: haha, that's fucked up.
 
5:59 AM
Good morning
 
helloooooooo friday-1!
 
hi @BenjaminDiele & @Loet
 
@scheien Sup!
 
Not much
Still recovering from vacation
 
@scheien Haha, the week is almost over. Then recover from the weekend ;)
 
6:11 AM
:)
 
 
1 hour later…
7:34 AM
Holiday in T-6hrs
still beautiful
 
Haha :)
 
Ow, did something happen?
 
apparently so!
 
Call support now!
And explain them that something happened
 
SUPPORT HELLO THIS IS USER
HOW DO I FIX SOMETHING HAPPENED
 
7:37 AM
What does the message say?
Something happened
No no, what does it say..
Well...
 
Something Happened is Joseph Heller's second novel (published in 1974, thirteen years after Catch-22). Its main character and narrator is Bob Slocum, a businessman who engages in a stream of consciousness narrative about his job, his family, his childhood, his sexual escapades, and his own psyche. While there is an ongoing plot about Slocum preparing for a promotion at work, most of the book focuses on detailing various events from his life, ranging from early childhood to his predictions for the future, often in non-chronological order and with little if anything to connect one anecdote to the...
 
!!Something
 
@Marek That didn't make much sense. Use the !!/help command to learn more.
 
:(
 
@CapricaSix! You're back!
 
7:38 AM
!!/help
 
@Marek Information on interacting with me can be found at this page
 
HALP!
 
Did she go on holiday?
 
!!meme somethig
 
@Marek Sorry, I don't know that one.
 
7:40 AM
!!meme something
hello?
 
She's gone again
 
hello.
oh BTW did you folks hear about the other RyuJIT bug?
 
yea
Not good :(
 
something to do with optimisation of calculations involving nullable primitives?
yeahhh
 
Seems like it
 
7:52 AM
@Squiggle Great..
 
[MethodImpl(MethodImplOptions.NoInlining)]
 
@Squiggle Ooh cool..
But they already made a bugfix
 
this sums it up pretty nicely
according to that post, the bug is border line for most applications
 
!!meme Visual Basic
 
@Marek Sorry, I don't know that one.
 
7:56 AM
lol
 
I wouldn't be so happy to have unreliable program runs. Imagine debugging that.
 
I agree
 
!!meme VB
 
@Marek Sorry, I don't know that one.
 
I would much rather suffer 10% performance loss (or whatever) for consistency.
 
7:56 AM
but the only known case is the one stackexchange guys have encountered.
You can disable tail call optimization, or even use the "old" jitter
 
They probably spent a ton of time figuring out WTF was going on.
 
hehe yeah
 
that .NET 4.6 JIT bug is still not fixed?
 
@SteffenWinkler It is fixed, internally.
 
@Loetn so they have a fix but aren't releasing it? What happened? Did they start to employ Debian Testing devs?
 
8:04 AM
@RoelvanUden Hey it's me again!
 
@SteffenWinkler: It follows the same internal procedures as when they fix an exploit.
 
^
 
@scheien which is stupid IMHO. If you've a fix you test it and then release it. Not test it, wait 2 weeks and then release it together with a bunch of other patches that add a new batch of bugs
 
As stated at the start of the post, we have already started producing a RyuJIT patch for the .NET Framework 4.6. We will post an update when it is is available.
 
@SteffenWinkler: I guess they'll release it as quick as possible.
 
8:07 AM
they have to make sure the fix doesn't cause more issues, too...
ever fixed a bug, only to discover you've created a new one? Happens all the time.
 
@Squiggle that's why I wrote that one should test it.
 
I do not write bugs
 
@Squiggle no. Usually there are at least 2 new bugs and the application behaves slightly different.
 
@SteffenWinkler and then the user complains that their work-around doesn't work any longer
 
that as well
which they used for the past 4 years
 
8:09 AM
@Sweeper Waddup :-)
 
hi
 
while the original bug that workaround was for was fixed 2 weeks after they notified you.
 
> We have not identified an exploit, but are pushing the change through our process at the same pace as we would an exploit.
because a lot of people are talking about it
 
@RoelvanUden It seems like that you're always in this chat room
 
@Sweeper I am, except when I sleep. :P
 
8:11 AM
@Sweeper I'm pretty sure that @RoelvanUden is to us what karmanaut is to reddit.
 
I don't usually go to reddit
So I don't know who is karmanaut
 
he's everywhere, everytime and I'm pretty sure y'all are just @RoelvanUden with alternate accounts
 
haha
 
question: What monitoring tools do you people use on your servers?
 
@SteffenWinkler Hah now there is an idea..
 
8:13 AM
@Squiggle well, if the green LED is shining... ;)
 
:-/
 
@Squiggle We use humans.
Once we start getting "The site doesn't work!" e-mails, it's down.
5
 
lol
 
hehe
 
hah
 
8:14 AM
:-/ :-/
 
I've the slight feeling that isn't what @Squiggle is after
 
so you don't have services that monitor queues or event logs, or check to see whether or not services are running?
like, sending you a text if the outbound message queue is above a threshold etc
 
But seriously, our system admin runs the servers as virtual servers in his managed farm. Those have warning systems. Then, each virtual runs service monitoring software to e-mail when a service went down. Finally, each application makes its own log and e-mails on an error. Life sucks when e-mail is down :-O
 
@Squiggle you should maybe head over to ServerFault to get a 'real' answer ;)
 
I'm not looking for recommendations. Just curious to see how many of you have something like Nagios in place.
 
8:17 AM
still the wrong group of persons ;)
 
fair enough.
 
@Squiggle: Mostly email based nowadays (exceptions, errors and whatnot). At a former position we had a signalr based system that tracked each "client", and if it went down we knew it in a couple of seconds.
 
oh? that sounds interesting. Useful, or irritating.
 
Agents monitoring everything from server state ( cpu, memory, disk etc) and services that sent pings every now and then
 
I mean I once wrote a small tool that reported wether database backups were successfull and how much space was left on the harddisks, but that's not really what you're after I guess ;)
 
8:21 AM
@Squiggle: it worked out ok. somewhat useful yes, overkill? definitely :)
 
hi everyone
can anyone suggest a good library for parsing xml into csv ?
 
did you even try googling it?
 
just iterate over every element in the root node using XmlDocument or whatever
 
@iulitaro XElement.Load, use LINQ to query, produce a string. Tada!
 
I am not looking for online tools @scheien .
thanks @StevenLiekens @RoelvanUden
I'll start with the basics
 
8:31 AM
actually, hook up an XmlReader to a StringWriter
that'll give you the best performance
 
Morning all
 
unless you need to process the XML using xpath or something?
 
Indeed. In with XmlReader => produce a CSV line => out with StringWriter
 
you could just do it with a XSLT ;)
 
How dare you suggest something sane that doesn't use .NET?!
 
8:32 AM
gotcha!
will have to parse quite large XML files in the end
and extract just some info in the CSV
 
Then streaming input and output is the best way to performance.
 
Hello everybody!
 
Bonjour
 
halo
 
I got a simple question I guess, but I cant find answer on it, maybe it because of lack of engish language knowledge :c
Have you ever used the TeamCity tool?

I can't find in 'build steps' where I can set specific VCS to step
It's not about C#, yeah. But we develop in c#, that why i decided to ask here
 
8:47 AM
@DanilGholtsman like jetbrains.com/teamcity/features/… ?
 
I just found out that you can have 2-step web config transformations using default tooling in VS2012 and up
thanks for not telling me, guys
 
2-step?
 
why would you need that?
 
there's Web.$(Configuration).config transforms that everyone including the pope knows about
but you can also have a Web.$(PublishProfileName).config file
and the web publishing pipeline picks it up automatically
no more tst/stg/prd solution configurations!
nobody else is phased by this?
 
8:52 AM
aha
 
the highlighted files get transformed when I publish to 'Prod'
and I didn't need to set up any project configurations
 
that's delightful
 
and without having to resort to weird web deploy hacks
I'm so happy
why the hell is this feature not documented
 
it probably is documented - if you know precisely where to look
 
not on MSDN
shanselman mentioned it on his blog
that's how I found out
 
8:58 AM
@Squiggle yeah okay I setted up 2 vcs
 
@StevenLiekens I got different transformations either
When it was one vcs
root
 
@StevenLiekens That's been around for years. :o
 
I were 3 steps - nuget step, rebuild step and deploy from the test root. Now I want to add same steps for other root. And the problem is I can't find steetings neither when I set up step neither I set up vcs
Or should I make other project for it?
 
sorry, we don't use teamcity so I don't know
 
9:06 AM
@StevenLiekens I did not know that. Is it documented anywhere?
Other than hanselman's blog. That doesn't count.
 
it isn't
web deploy is so poorly documented, it's sad
especially the msbuild integration
 
looking at dotnet's github page I think I'll stay away from .NET 4.6 for some time...
 
the problem is that once it's installed, any 4.x app will run with the 4.6 runtime
 
aside from the (new) bug @Squiggle linked to there seem to be performance regressions
 
Why didn't 4.6 become 5.0 btw?
 
9:11 AM
In a similiar vein, why did 4.5.1 not become 4.6?
 
When you're swapping out the entire architecture, doesn't that warrant a major version bump?
 
it should, yes.
[back to .NET 4.6] and with, shortly after release two hefty bugs being discovered, I'm pretty sure there are more to follow.
 
hefty, but rare
 
rare - how?
the first one would affect nearly every 64 bit .NET application
 
the tail-call problem?
 
9:14 AM
yes
 
@RoelvanUden: Semantic versioning?
incrementing to 5 would imply breaking changes?
 
@scheien well, something did break ;)
 
from what I gather, that bug only occurs under very specific circumstances that don't exist in most code that is out there
 
@SteffenWinkler: That's a bug. Not breaking change :p
 
yeah, 4.6 is a perfectly valid increment. No breaking changes in terms of API.
 
9:16 AM
@StevenLiekens as far as I understood it as soon as you passed a parameter from Method1 to Method2 to Method3 that parameter would be 'corrupted'
 
What is the coolest way to parse int 200 to 2,00 decimal (reserve last 2 number for dec.) ?
 
@scheien implying a bug isn't a change :p
 
hehe
 
@Marek divide by 100? (not sure what you are after)
 
Yeah, true. @SteffenWinkler
 
9:18 AM
@StevenLiekens and I've code that, due to interfaces/abstraction, has 'method chains' with a max count (in two cases) of 8
not counting whatever WPF is throwing between those calls
of course such long method chains are unusual, but if it only takes 3 methods chained, that must affect a lot of applications.
since I've a long weekend I guess I'll test a few of our applications on my W10 VM.
 
It's also a nullable that gets lost/replaced.
Atleast in the sample on github
not sure if the bug is present if it's changed to int rather than nullable<int>
 
@scheien for the tail optimization?
 
ye
 
oh, didn't notice that
thank's for pointing that out
that should mean it doesn't affect two of our applications, coincidentally the only x64 applications we've
 
9:35 AM
I wish that Dictionary.ContainsKey() didn't exist
 
@StevenLiekens why?
 
it's too convenient
 
why would anyone remember how to use TryGetValue if you can do this instead
if (dict.ContainsKey(key)) var value = dict[key];
 
honestly? I never understood the point of all those Try(...) methods.
 
9:38 AM
I did a solution-wide search for ContainsKey
Matching lines: 420
wanna take a stab at how many of them are using it properly?
it's probably close to 0
 
;) what would be an inproper use of that method?
 
the point of TryGetValue is to avoid double lookups
ContainsKey should only be used if you're not interested in getting the value
not to mention race conditions
 
oh, meaning it should only be used when you want to check if you've to add a key?
 
ok you lost me
I know of no other use case for that method but those two.
 
9:40 AM
should only be used when you need to know if the key is present, without further plans to modify the dictionary
 
well retrieving the value to a key isn't 'modifying'
 
@StevenLiekens So how do you check if a key is present and if not, add that key?
 
dict[key] = value
it adds or replaces it
 
@StevenLiekens I always forget about that. It looks ugly.
also doesn't help when your value is a List<T>
 
^ Hah, that's what I'm currently looking at
 
9:42 AM
;)
that's what I love about .NET: You can put a Dictionary in a Dictionary in a List in a Dictionary
 
if (this.Errors.ContainsKey(vf.PropertyName))
                        this.Errors[vf.PropertyName].Add(vf.ErrorMessage);
                    else
                        this.Errors[vf.PropertyName] = new List<string> { vf.ErrorMessage };
-_-
 
yup, that's what I meant
although I came up with a (slightly) nicer way of doing it:
 
in that case you should TryGetValue the list
 
Hi Guys, Can anyone help with LinqKit predicate builder please its not giving expected results back
I have the following method
 
if (!this.Errors.ContainsKey(vf.PropertyName))
{
 this.Errors[vf.PropertyName] = new List<string>();
}
this.Errors[vf.PropertyName].Add(vf.ErrorMessage);
it's easier on the eye IMHO
 
9:45 AM
I want to return back the appointment with an ID of x for an installer with an ID of y
so shoul dbe a single entity but its returning all the appointments for the installet
 
@StevenLiekens with TryGetValue you'd need a seperate List<T> value. If you've only one dictionary that's fine but with three or more dictionaries that seriously clutters your code.
 
List<string> result;
if (!this.Errors.TryGetValue(vf.PropertyName, out result))
{
    this.Errors[vf.PropertyName] = (result = new List<string>());
}

result.Add(vf.ErrorMessage);
you're welcome
 
i assume its because of the .Any??
 
@SteffenWinkler Aha, true :)
 
but PredicateBuilder wants a Bool return so I cant do a .where when its nested
 
9:47 AM
@StevenLiekens It's not that big of a difference, no?
 
@StevenLiekens heh, in that code you also do what you wanted to avoid originally: You do two lookups
 
no I don't @SteffenWinkler
 
yes you do. TryGetValue is still a lookup
or I missed something
 
this is my Get method too
anyone got any ideas?
 
you missed something
 
9:49 AM
also even if I need one more lookup, what's the cost? Dictionaries are so fast that you'd need a really large (>10k entries) dictionary for that to make a real impact
 
@StevenLiekens I find that less readable
 
that's another point against it as I feel the same way @Loetn does
 
you can wrap it in an extension
GetOrAdd(string)
or idk
 
But like @SteffenWinkler said, performance wise, that won't make a big difference
 
ok, I get your point. From a performance point, yes it may be nicer. Also from a purely logical point. @StevenLiekens but it's just really, really ugly :/
now let's help that poor @user3545438
 
9:52 AM
I agree there may be a language design issue here
but that's no excuse to use a less optimal solution
 
@SteffenWinkler
if you could that would be nice :)
thank you
 
@StevenLiekens yes it is. Making your code unreadable is bad and is only justifyable if there is some real and heavy performance increasement or other huge advantage
which is the main reason we C# devs don't like Java devs and their stupid factories
 
you can just put a comment above the thing that explains you tried to make it readable but couldn't because that's how C# works
:D
 
that was a joke
 
9:56 AM
I found this link albahari.com/nutshell/predicatebuilder.aspx but cant really see an instance where its drilling down an additional level??
 
@user3545438 that's because 'Any' doesn't limit your list. It just returns 'true' if at least one element of the collection satisfies the condition.
@user3545438 replacing your 'any' with 'Where()' should give you the result you want.
 
@SteffenWinkler i thought so, but as its expecting a .Where will not work
as it want a Bool return
 
oh, right.
 
this is the code for the method
taken from here
any ideas?
 
If I'm not completely mistaken, you'd need a second PredicateBuilder for the Appointment and then 'join' them. At least that's (kind of) how it works with 'normal' Expression trees...
I've never used a PredicateBuilder so I'm of no real help here
 
10:04 AM
so effectively I would need one from the perspective of the appointment?
and then .And them together?
but as they are Typed how would I do this any ideas?
 
huh, nvm. Apparently the Any is correct.
is there a documentation about that class somewhere?
can't find it on msdn and as I said before, never heared about it
 
PredicateBuiler you mean?
yes it is here
this is my GetAppointments method
you see my context is based form the installer perspective rather than the appointment
so thats why i need to grab it this way?
I tried the following
@SteffenWinkler any ideas? sorry to bug im tearing my hair out (literally :) )
 
10:56 AM
@user3545438 okay, so that thing is just a fancy way for building Expression Trees. Got it. Because of how it's capsuled, I'm not sure how to 'join' it. The way I did it was to create an var basePar = Expression.Parameter(typeof(MyClass), "myclasspar") and then an Expression.Property(basePar, "Appointments") with those two you should be able to build your own ExpressionTree
errh, sorry made a mistake on the Expression.Property thing
The string should be replaced with this: ((() => new MyClass().SomeProperty).Body as MemberExpression).ToString())
that way it's not hardcoded and if you change the name of that property some time later refactoring will take care of it
 
11:18 AM
hi
 
hello again!
 
Hello sir!
 
@Squiggle finally, i found the solution for my problem.
 
from an old msbuild blog: "Coding ... the boring bit between builds"
 
11:21 AM
@StevenLiekens the way you suggested me yesterday, that is not going to work.
 
why's that?
 
you said, send a request, and then come back, and then see again and again to see if the results is ready.
but when we come back from controller action, the instance is disposed.
then
how the process can keep itself to continue.
 
@MuhammadSohail it can work, if you understand how to use tasks and temporary storage
 
which tasks? I have found the solution by some other way, but i would like to learn how? are you talking about async...task...await
?
 
you could also use different approaches to threadding
 
11:29 AM
for now, i did it using multiple ajax requests.
i send 20 addresses per request
and it keeps on sending 20 addresses per ajax POST request, and then next 20 and then next 20 ... and this goes on until all are finished.
what do you think
is it good approach ?
 
it's one approach :)
 
so it's good.
 
@SteffenWinkler sorry for not replying is didnt see it. Been trying to desperately get it working
@SteffenWinkler I'll just write it up and test it thanks for you imput i appreciate it
 
11:51 AM
twitter.com/sempf/status/514473420277694465 just lost my shit at this tweet
 
I'll have a pint of ';DROP TABLE Beers; please
 
Cannot drop the table 'Beers', because it does not exist or you do not have permission.
 
/me slaps @Loetn
SANITISE YOUR INPUTS, BARMAN
 
:)
 
haha
 
11:55 AM
The cleaning lady is not available..
 
@SteffenWinkler Aah, little Bobby Tables
 
that was actually my google search term :D
 
classic
 

« first day (1748 days earlier)      last day (3207 days later) »