« first day (1469 days earlier)      last day (3465 days later) » 
02:00 - 18:0018:00 - 00:00

2:15 AM
hello nerds
@TravisJ
isnt that going to be a performance issue
2 .tolists
i mean in the long run.
 
 
2 hours later…
3:52 AM
anybody here
need a quick help
 
Hi
I need some help with....
How do i make a user draw using his or her mouse pointer if button is clicked on mouse?
I just want them to click and this box appears but as they move the pointers places the box resizes itself?
 
where would u like to make them draw?
 
Um.... in a Windows Form in C# (Visual Studio Win Forms)
So if they pen the application they just have t click a button that has some shap they want to draw and when the click in the white area they draw the shape its just that the shape is formed automatically (like MS Paint).
 
I think you want to use javascript for the drawing actions maybe mixed with VML or something meanwhile storing the shapes or mouseclicks as coordinate arrays that gets written to the image on a post back event (maybe a save option).
 
Oh...
I use python for arrays and drawings but I am still new to C#. Been trying to find something to do with it for some weeeks now.
@Jilu WHat did you need help with anyway?
 
4:02 AM
just have a look in this
actually I've a question with sql query
I want to make user login name populate in gridview from ASPX code
any idea?
 
Lol
I worked with it before but not populating it.
Wait you mean making it appear as if it was Animated?
Or do you want it to be just there before and after user does something or an action?
Maybe Jean can help you :D
@JeanF. I pass this question to you: "I want to make user login name populate in gridview from ASPX code
any idea?"
 
nope, I'd rather use webapi for auth
 
4:17 AM
@JeanF. Wait, whaaa???
 
unrelated answer, sorry ^^
@Jilu, I don't get what you want to do, what is the relation between your question and the article you mention above?
 
ton.yeung thought I fit here for my C# game project :/
Meh... I need help with my math
 
 
2 hours later…
6:36 AM
this room is starting to lack users
 
6:58 AM
Thank you @drch :-))
 
7:43 AM
@JeanF. that was for 7Blue_Beast7
 
F4z
8:10 AM
Hi people, I just want to know, I'm dynamically adding a TabPage on each button and in side it will be a textbox. Now let's say I have 5 TabPages and 5 Textboxes, how would I know which textbox will be which when the user clicks "get text" button or "Save button"? I'm trying to simulate the Notepad++ Tab like feature
 
8:33 AM
@RoelvanUden ++
 
8:43 AM
Good morning people! I have coffee!
 
9:10 AM
Praised be!
 
\o/
I have no more coffee.
:(
 
9:27 AM
Hi,maybe someone can recommend book or other resource about mvvm pattern.
 
@RoelvanUden Thanks
 
9:43 AM
pff... my JSON variables that I get back from Mandrill are lowercase and underscored
doesn't really match the C# naming style
is there a way I can make my variables CamelCase while still being able to just do Json.Parse<T>()?
 
@NateKerkhofs With attributes, sure.
 
Could you give a link or something that explains that?
Is that just like [DataContract] and the likes?
 
e.g.
[JsonProperty("_id")]
public string Id {get;set;}
 
28
Q: How can I change property names when serializing with Json.net?

culixI have some data in a C# DataSet object. I can serialize it right now using a Json.net converter like this DataSet data = new DataSet(); // do some work here to populate 'data' string output = JsonConvert.SerializeObject(data); However, this uses the property names from data when printing to t...

 
I see
@Squiggle Thanks
 
9:48 AM
assuming you're using Json.net
For other types of serialization like XML there are native C# attributes you can use to override the property names
 
I'm using newtonsoft
 
sorted
 
Is there a quick way to add JsonProperties to an entire class? or do I have to manually add all of them?
 
Manual. Fun times.
 
You can also use a contractresolver
 
9:54 AM
couldn't you have said that 3 minutes ago? now I'm already done
 
work slower
 
Also, Resharper apparently can't autorename variables if they're referenced in an embedded Eval block on a page frontend. had to do a couple of them manually...
At least my code evaluation now no longer looks like one of the Daltons in their striped outfits
it just tells me now that a number of my autogenerated setters aren't used. Are these used by Json.net during a Parse?
or can I safely remove them?
 
@RoelvanUden hai
Seriously what happened to @Shaun
He's not even in the user list anymore :(
 
10:13 AM
Setters are required to deserialize objects.
 
@Squiggle Are they?
Even with the Newtonsoft deserialiser?
Also aren't you British? Don't you put Zs where Ss should be!
@RoelvanUden Aw I missed your bday :(
 
You caught me :(
Zorry.
 
You live in Switzerland right?
 
@Sippy yeah.
 
Forgivable then, I get the impression they like their Zs too
 
10:18 AM
Setters are required for .Net serialization. Had that problem recently when I was inadvertently serializing my domain model instead of the view model.
Had some internal setters
The Swiss have Qwertz keyboards.
almost identical, except the Z and the Y are swapped.
and the silly number of accents and umlauts.
(I use American qwerty keyboard at work)
 
@Sippy It's today, so, nope. ;-)
 
Also the $ key is impossible to find, which makes writing angularjs and jquery quite fun during technical interviews.
>:D
 
@NateKerkhofs sample
 
Qwertz what the fuck.
I can't get used to American qwerty lol
Got it at home, I can never hit the # key properly.
@RoelvanUden HAPPY BIRTHDAAAAAAAAAAAAAAY
 
@RoelvanUden Happy Birthday, dude :D
 
10:30 AM
@RoelvanUden sample is perhaps useful for you also
 
DPM
11:28 AM
hi..all
I want o plot a graph in c#
x value must be constant
but y value must change in each sec
pls give me a solution
3
 
C#... WPF? WinForms? ASP?
 
Lol
 
also - what's your background?
 
35 secs ago, by DPM
pls give me a solution
Don't ever say that here again lol
Unless you plan on paying us, then by all means!
 
@DPM
foreach (var second between Date.Now && Date.Future) {
plot.Graph(y++);
}
simple!
 
11:36 AM
@Squiggle Holy shit does that work as a second by second loop!?
OMAGAWD U GENIUS
lel
 
Oct 17 at 11:22, by Kendall Frey
HAPPY FRIDAY BITCHES
 
Say it properly!
Or no star for u!
 
I have 4 stars, sipy pls
 
Bday > friday
 
5 > 4
 
11:45 AM
There u go
hav 5
 
well shit, 6 > 5
 
Is there any reason you would want to write an extension method on your own class in the same project (and the extension is only used in that project)? I'm trying to figure out some code.
 
@nickfinity Not any obvious ones
 
12:03 PM
@nickfinity If it is an interface or abstract, perhaps.
 
Urgh. I ate too much at lunch.
 
12:21 PM
@Squiggle hate that
What'd you have? :D
 
Beef stew with polenta.
 
Oooo
 
Work canteen is gooooood
 
I just had a sausage, bacon and cheese ciabatta with caramelised onion :D
So good.
 
(and subsidised!)
:9
 
12:22 PM
Yeah ours is the same ^_^
Probably not as big as yours though
 
@KendallFrey @RoelvanUden Thanks. It's not an interface or abstract. Seems completely random. Thanks for the help.
 
Caters for about ~160 people here. It's not so big.
 
At the same time? xD
ours caters for like 15
 
hah I guess I'm comparing this to the one at HQ
 
Lol
 
12:24 PM
So, right. Technical question. I feel like there's a better solution.
 
Who do you work for, if I may?
 
"a bank" :)
 
Ahh cool
 
I need to create a workflow (WF), but there are so many conditional actions that it ends up being ugly and potentially brittle
am I missing an obvious design pattern or WF capability?
Going to rewrite it.
 
12:58 PM
Also - does anyone else need to calculate things like "number of working days"
between X and Y
The one approach I've seen before was to have a Dates table with one row per day, with columns for Date, Period, Quarter, Month, IsWeekend, IsHoliday etc.
was mainly used as a Dimension for OLAP queries, but also used to calculate number of working days between Dates X and Y
e.g. SELECT Count(Day) WHERE IsWeekend = 0 AND IsHoliday = 0 AND Day BETWEEN '01-02-2014' AND '01-03-2014'
Is that sane? Is there a more efficient way of doing this in code, with just a list containing holiday dates?
 
Seems more intelligent to do it the first way
As holiday dates change yearly you'd need someone to input it
And what if a new national holiday is declared
 
Well I'd still store the holidays somewhere for both approaches
but the first approach needs a script to generate all of those date rows, and the 2nd approach is just procedural
 
I think of the two, SQL seems the more sane approach.
To me.
Hmm
 
the first approach was brilliant for SSAS :)
until the Analyst clicked the 'regenerate dates table' button and broke everything
 
1:14 PM
Lol
Was it a big red button?
 
hah, no. Just a menu option in a dashboard somewhere. I removed it after that incident.
Excel powerpivot <3
import timeseries data, import date table, match on date, group by period, aggregate income
business report done in 30 seconds
 
Hah
I don't have to do that shit ^_^
 
2:20 PM
public AuthorizeActivityAttribute(string activity)
{
	var contextUser = HttpContext.Current.User.Identity;

	this.Activity = activity;
	this.currentUser = new UsersHelper().getUserBySAM(contextUser.Name.Substring(contextUser.Name.LastIndexOf('\\') + 1));
}
Eugh
Is it naughty to do a constructor like that?
 
not sure what it's doing, but it doesn't look too evil
 
I just meant the idea of declaring temp vars n stuff inside one
And using methods to initialise vars
 
why would a temp variable be bad?
 
Rather than parameters
No idea ^_^
That's why I asked :D
 
I have 33 tabs open
 
2:27 PM
Manly.
Wait wtf
AutoCreatedUser : User : ApplicationUser
getUserBySAM() returns AutoCreatedUser
currentUser is ApplicationUser type
why can a subclass be pushed into a superclass container?
LOL
Forget I asked that.
 
Got confused for a minute.
saying that, is there any silly overhead in doing that assuming the sub just has like 10 more variables?
Won't matter for this project, but if I was doing it in future I'd imagine it's probably better to return super when you want super
 
nah, there won't be much overhead
returning subclasses is common
 
Ah cool
Thanks
 
similar to GetEnumerator or w/e
 
2:59 PM
how to read xml like this? pastebin.com/sHiVD8qz
Json.NET allows this, but i have no idea how to use it for xml / write a class for it.
 
How is everyone.
 
hi everyone!
 
3:14 PM
:D
 
Does that look right?
ConfigManager is a client request >_>
 
@Sippy no
new GroupHelper() in foreach loop
use HashSet<string> instead of List<string>
the CurrentUser can be deferred
remove bool authorize = false;
 
3:32 PM
Yes
Why
What
Why
 
-
faster contains
you don't need to query the CurrentUser in the constructor it can be loaded in the AuthorizeCore method
-
 
I don't get the remove the return thing
It has to return
It's a return function
 
return authorize; --> return false
no need to declare that variable, useless
 
OH yeah
Right, cool, thanks
 
any time
 
3:45 PM
hooray for Peter
 
Ooh Hungarian!
 
am i a bad person? :O :D
the evil himself?!
 
Not as far as I know...
I have a Hungarian co-worker. He's smart. By extension you must also be smart.
Also Hungarian have an awesome accent.
 
Speaking of Hungary, it's almost lunch time
 
3:51 PM
Well mine not as awesome yet i need to practise more to be up to that reputation
Yes definitely @KendallFrey
 
almost home time for me.
 
In Hungary we have a long weekend because of a public holiday. 4 day long! ;)
 
Nice!
Glühwein season starts here tomorrow.
 
var contextUser = httpContext.User.Identity;
ApplicationUser currentUser;

if (httpContext.Session["currentUser"] == null)
	httpContext.Session["currentUser"] = new UsersHelper().getUserBySAM(contextUser.Name.Substring(contextUser.Name.LastIndexOf('\\') + 1));
currentUser = (ApplicationUser)httpContext.Session["currentUser"];
Does that look like a more intelligent way to avoid querying AD
Might as well just var currentUser as well
Anyway hometime :D
 
@Squiggle sounds awesome, i like to drink (as any other hungarian) :)
 
4:01 PM
do you need to avoid it? Is that a premature optimisation?
 
@Sippy
ApplicationUser currentUser = httpContext.Session["currentUser"] ?? new UsersHelper().getUserBySAM(contextUser.Name.Substring(contextUser.Name.LastIndexOf('\\') + 1));
and i'm not sure that the ApplicationUser is in good place in the HttpSessionState
 
null coalesce is lovely syntax
 
wait for C# 6.0: ?.
int? variable = somethingThatCanBeNull ?.GetInteger();
jesus f.ck.ng christ (with the voice of Matthew McConaughey)
 
We'll find out when I test it on Monday I guess @peterkiss
 
I was meaning the current ?? operator.
I'm not sure what to make of ?.
 
4:15 PM
@Squiggle The most awesome thing ever. Safe navigation. It's sorely needed.
 
One of them is ternary isn't it?
 
the ?? is the ternary, yes
?. is the new "Null-Conditional Operator"
 
foo = something ? bar : baz;
that's ternary
yeah I guess I just feel like the Null-conditional thing makes stuff feel a bit wooly.
 
Peter the context above is passed into the authorise core, I assume it is the current context so getting and setting session cars in it should be ok
Vars
This chat sucks on mobile devices
 
@Squiggle you are right ?: is the ternary, ?, is the null-coalescing operator but i was in the PHP room and there is no ?? operator just the sort ?:, sorry :)
@Sippy if the ApplicationUser can not be serialized correctly then the code can end up with an exception like the user instance lost it's connection to the underlying source or anything
 
4:22 PM
:)
 
@Sippy and with a malware HttpModule the HttpSessionState can be altered with a fake ApplicationUser and this way all authorization can be bypassed easily (little chance to have this kind of attack but still)
(am i paranoid?)
 
4:56 PM
WCF question
How do I add behaviors to a service, without using a config file?
 
create a custom ServiceHostFactory
and set it in the svc file markup by specifing the Factory attribute
 
I am kind of disappointed with myself that I didn't know the answer off the top of my head
@KendallFrey I think the complete answer is add it to Host.Description.Behaviors
 
ah, that might be it
everything is hidden in this object tree
BTW, ever worked with message inspectors?
 
I've got part of the way through writing one just recently
 
I'm trying to hack something together today
original problem is that we don't want a timeout when messages exceed the max received size
WCF is hard
 
5:03 PM
timeout is weird
shouldn't that throw an exception?
 
what kind of messages are those?
 
@TomW it does throw on internally, but we can't catch it
 
what binding is it using?
 
WSHttp
 
should return 400 IIRC
 
5:10 PM
I was getting a 413 at one point, I forget what the circumstances were
 
or that, sounds more accurate
 
How is everyone.
 
I'd be more concerned that something about your setup is suppressing it doing the correct thing
 
So that's not the default behaviour?
 
@ton.yeung Well fuck Sublime, hello Atom :-P
 
5:13 PM
@KendallFrey whenever we've had message sizes exceeded on http services of any kind (we have custom bindings) we get an http error code back
 
@ton.yeung Yep. Atom is tons better than Sublime though. IMHO.
 
I think this might be it
If the server gets a message that's too large, it throws a 413
It's if the client gets a message that's too large, it just stops
 
hrm
 
@ton.yeung Pretty much, hence I don't mind it as much. But it does one thing a LOT better: integration with linters. It's so, so, so much better.
 
aaah, is it just timing out because sending the message over the wire takes too long?
 
5:16 PM
no
It discards the response
and keeps waiting for a response
brilliant
 
@ton.yeung I just don't understand how it can do this tho. Repositories say JSCS linter is on 1.5.0 of JSCS but it CLEARLY is using the 1.7 linters on my files...
@ton.yeung No, it's doing exactly as it should but I don't get why :P
Huh, it has 1.7.3 downloaded but the package file says it's referencing 1.5.0..
OH WELL. STANDARD CONSUMER STYLE: IT WORKS, AND I DONT CARE HOW
 
is it possible to Have Asp.NET Button perform code-behind action but not postback?
i guess i might need ajax?
 
no
unless ajax isn't a postback
but you need a request of some kind
 
5:32 PM
can I just: <asp:LinkButton id="btnX" OnClientClick="jqFunc(); return false;" runat="server"
Text="Clear Content" onclick="btnX_Click"/>
 
Educate me on the difference between a postback and a request
I don't ASP.NET
 
ok
 
my problem is that that normal button to clear content is triggering the RadAsynchUpload event if I selected a file but did not upload it...
in other words it is causing a postback
can I just have the clear all Link call jquery which then calls a code-behind procedure?
is it me? I think it is stuped .net cant handle it by 2014 lol.. I am sure I can call the code-behind funct from jquery..
 
a get request will also reload the page
 
5:45 PM
looks like the answer lies in PageMethods.. cool
12
Q: How to call code behind server method from a client side javascript function?

A. Sam John ChristopherI am having an javascript function for a HTML button click event in aspx page. And a server Method in its code behind page. Now i want to call the server method from the javascript function with some parameters only when the HTML button is clicked by the user. Please don't change this scenario an...

 
the answer to that would be ajax
 
yeah I think that is what <asp:ScriptManager enables is AJAX..
 
Are you using webforms?
 
yes unfortunately
 
Well, I am going to assume you had no choice lol
Yeah, webforms uses some ridiculous obfuscation for ajax and I do not know why. I am also not familiar with it.
 
5:48 PM
next week I am likely to be taking on the daunting task of making a web forms app async
 
:)
 
BTW
you can make a brand new mvc project, slap all your web forms in there, and then build mvc on top of it
fully functional
all the new functionality could be async
 
my boss is crazy.. she said MVC is too expensive
 
its freaking free
I use it, haven't paid a dime for it.
 
quadruple development time etc
 
5:50 PM
What? More dev time? It streamlines the whole process
 
I know scarey right?
 
sigh
Send your boss to a .net conference
She will see the light
 
amen
 
How do people get away with just making shit up
 
my new tech lead starts soon so we will be talking
 
02:00 - 18:0018:00 - 00:00

« first day (1469 days earlier)      last day (3465 days later) »