« first day (726 days earlier)      last day (4226 days later) » 

3:10 PM
Anyone here have a technet subscription? I'm having issues with my product keys working
 
That's a negative, Ghost Rider.
 
sometimes I hate microsoft... I typed in the key about 12 F'in times and it said it wasn't valid so I went to technet and copy and pasted it and it worked... ITS THE SAME KEY!!
 
Hidden characters?
 
The real question is why didn't you copypaste first.
 
The real WTF is that you typed it in.
Or what he said.
 
3:20 PM
I mean, typing? That's pretty old fashioned. Pretty much nobody does that anymore.
 
How did you enter that message?
 
My colleague had a sucky problem today, he got one object from a web service and another from a dll. They are the same object but ns are different and a few properties are different. Is there a good way to handle that?
 
Then how are they the same object?
 
I was thinking reflection to create a conversion + unit tests
 
@KendallFrey I copy-paste from a text file that has all the words I'll need.
 
3:23 PM
They describe the same data come from the same source but in different ways.
a) from web service
b) from dll
I dont know how to word it really
 
@JohanLarsson: why is that a problem?
 
guys can you explain to me how the switch statement can do this?
switch(foo)
case 1:
string something = "whatever";
brake
case2:
something = "where??"l
 
Because cases are just labels, not scope blocks,
 
how can I use something again without declaring it?? does that mean that string is set to "whatever" then "where" ?
 
@IliaJerebtsov It creates a lot of duplicate code for him where he does almost the same thing. Reeks of risk for copy-paste errors
 
3:25 PM
You did declare it, before the case 2:
 
And no, I don't think it is ever set to "whatever".
 
@JohanLarsson: He could have an interface that both classes implement, and then write code to that interface.
 
string something = "whatever";
is equal to
string something;
something = "whatever";
 
and I can scope it too
I never knew you could do that
thanks
 
3:27 PM
this Saturday seems to be international Suit Up Day
 
@KendallFrey - When case 1 is skipped, how is something = "whatever" valid code? Or, if case 1 is hit, and something has already been defined, how is redefining it with sting something = "whatever" valid?
 
I've decided that I should write all switch blocks like this:
switch (x)
{
case 1:
{
}
case 2:
{
}
}
@TravisJ What you're missing is that running that line of code does not declare the variable. A variable declaration is not code. It is placed at the beginning of a block in the resulting output.
For example, when you are stepping through code in a debugger, int x; is skipped over, because it isn't actually part of the program flow.
 
lol, you are just covering your ass
I can put a breakpoint on int x;
 
It's cleaner just to put the switch into its own function if you're just going to affect a string.
 
face it, that previous code was flawed and you went with it
 
3:34 PM
@TravisJ But can you execute it? I can put a breakpoint on a {, too.
 
so the compiler is removing the declaration of the string from the switch statement?
 
I think the compiler adds NOPs in debug mode just so you can do that.
 
@IliaJerebtsov Yes that would be a solution except he does not own the code so I don't knowhow to inject an interface
 
I don't see how this is valid code:
switch(2){
                case 1:
                    string something = "whatever";
                    break;
                case 2:
                    something = "where??";
                    break;
            }
 
Why not?
Think of it this way.
 
3:37 PM
@JohanLarsson: In that case he could have a wrapper object that implements that interface.
 
It's very similar to:
 
interface IMyObjectAdapter
class MyWsAdapter : IMyObjectAdapter
class MyNativeAdapter: IMyObjectAdapter
 
label1:
string something = "whatever";
label2:
something = "where??";
 
in asm?
 
@IliaJerebtsov Sounds reasonable, still going to be some plumbing but at least only in one place
ty
 
3:41 PM
@TravisJ I find that pretty valid code - just a bit silly ( chances are he's testing the specific case and thus forcing it to go there everytime )
 
@JohanLarsson Or ultimately if it's just data, you could simply copy the data over to an object you control.
 
Also why does it say loading... on @TravisJ
 
I am haxing u (j/k)
 
Nuu!
I keel you! (Akhmed style)
 
@TravisJ I need help hacking facebook.
(References!)
 
3:42 PM
@IliaJerebtsov I was thinking maybe go via xml + xslt transform but still a lot of code and maybe harder to see if something goes wrong
 
@Maverik - It seems invalid because when something is used in case 2, it has not be initialized.
@SpencerCole - Hacking it how?
 
@JohanLarsson You can use AutoMapper to copy everything (almost) automatically.
 
@TravisJ oh you're right :D I thought you were referring to switch(2) :D thats kinda silly :D
 
@KendallFrey should get the reference.
 
@TravisJ No, that's C#, silly.
@SpencerCole Ugh.
 
3:44 PM
I can't get EF5 to work with 3.5... is it a nuget limitation or MS Dropped 3.5 support?
 
@IliaJerebtsov That looks really promising, gonna tell him to play around with it
 
That C# is similar to:
 
Hi alll
 
@KendallFrey =D
 
string something;
label1:
something = "whatever";
label2:
something = "where??";
How is that not valid?
 
3:46 PM
@KendallFrey: Clearly it does that, but it's weird that it's valid.
Counter-intuitive.
 
you can use labels in c#?
 
Counter-intuitive, yes, but not weird.
 
yup I believe you can do goto as well
 
@TravisJ People with such little knowledge shouldn't be in here.
 
if memory serves!
 
3:47 PM
@Maverik Of course
 
Well it's a little bit weird. Unexpected at least.
 
of course, because of the best practice that is goto, I don't use it so I've only read theory :)
 
Goto is great when you want to break out of nested loops.
 
is it anti-pattern day in here?
what did I miss
 
And FYI, ASM and MSIL don't use blocks, they use branches/jumps/goto
@TravisJ Day 1 of C# 101.
 
3:49 PM
@KendallFrey I guess yes wise use of goto can possibly make things clean instead of guards that i have to put in place to detect an early break in inner for loops
 
asm uses labels and jmp labelName
 
goto is not an anti-pattern. spaghetti code is an anti-pattern.
 
but i can't recall the last time I nested for loops
 
@KendallFrey - goto is an anti-pattern.
 
@TravisJ goto is atomic energy :)
 
3:50 PM
@Maverik Wha? Seriously? I do it all the time, so much that I don't remember the last time I did it.
 
@TravisJ: anti-patterns have their place too
 
They do, in taboo.
 
@TravisJ I disagree.
 
@KendallFrey - multi nested blocks escaped by goto, why even use a high level language at that point
 
@KendallFrey I know it sounds strange but I just haven't had to do it. If i start nesting I try to think how i can avoid nesting and generally manage
 
3:51 PM
You can refactor to another function and return instead.
 
@TravisJ Because in a low-level language, it would be suicide-inducing.
 
anyone ever use Kendo UI ?
 
@IliaJerebtsov I hate that.
@ScottSelby All I know is that it looks like my name.
 
You must have a terribly high level of coupling in your code.
 
lol
 
3:52 PM
I do :(
 
@KendallFrey if scrolling is hard, you could just as well make an inline function and then call it.
 
What does that have to do with goto?
 
In Javascript that's pretty much a requirement.
 
@IliaJerebtsov inline function? You mean via the delegate keyword?
 
Yes. Or Action<>
 
3:54 PM
Yeah, but that doesn't define a function.
 
There is a question on SO about JSONP , and Jason P commented "First they take my first name , now this is just going too far"
 
Action doSomething = () => {
  Console.WriteLine("hello");
};

doSomething();
 
Javascript doesn't have goto? Bastards!
@IliaJerebtsov That's lambda.
You don't need lambdas like that.
 
I have to search for a single quote in a string(fullname.Text) and put a back slash before it. I am writing SuppressSpecialCharacters function for this.
The function is returning the desired value. Eg. If fullname.text= O’Neil, then function shows O\’Neil at line 2.

But when the control returns back to line one it shows
O\\’Neil. Can anyone help me debug why I am getting 2 back slashes instead of one.

Here is the code:

String FullNameTemp = SuppressSpecialCharacters(fullname.Text); --- line 1
 
even better, (() => { Console.Write("Hi"); })(); is apparently valid syntax.
 
3:57 PM
Yes.
@techblog Where did you see that double-backslash value? In the debugger? If so, it's really a single backslash.
For those that didn't know about this:
Action<string> print = delegate (string x)
{
	Console.WriteLine(x);
};
print("obama");
print("romney");
 
@KendallFrey yeah in the debugger...because I am getting error while executing the query so I checked it with the debugger...
 
If you print it out, it should show a single backslash.
 
@KendallFrey: What's the practical difference between using delegate() and () => ?
 
I don't know, but I'm guessing the delegate is faster and more direct.
Maybe compile time magic eliminates that.
 
45
Q: delegate keyword vs. lambda notation

MojoFilterOnce it is compiled, is there a difference between: delegate { x = 0; } and () => { x = 0 } ?

 
4:06 PM
Remember kids, every time you overload a methods from a base class, a little kitten starts crying. - Jon Skeet
lol
lunch!
 
4:16 PM
I'm watching how it's made while on lunch... I'm afraid people here will think I'm a nerd.
 
haha
sometimes that show sucks , it'll be like rubber bands or something
 
Netflix lets me skip those lol
 
@SpencerCole What is Netflix?
 
sup guys
 
is there a way to go from variable to autoproperty directly with resharper?
 
4:21 PM
@PicrofoEGY Streaming of Movies and Television Shows
 
@SpencerCole Oh I see. Thanks :D
 
Ctrl+f makes it a field
 
No problem
 
then encapsulate field...
want to merge them
 
@zneak The sky :D
 
4:23 PM
Nevermind, I've switched to Doctor Who!
 
So this whole time I thought entity-framework was fking me. Turns out it was mysql connector for .net
*&^%$#@#$%^&
 
@TravisJ You had it confirmed at least?
 
Yes
 
@TravisJ Don't worry, entity-framework is probably still fking you, you just don't know it yet.
 
lol @IliaJerebtsov
 
4:25 PM
I'm surprised so many here like EF, I've heard so much bad about it
 
@JohanLarsson - When used with MSSQL, same exact code, everything compiles and runs 100% as expected. With MySQL connector, it runs 85% as expected and that other 15% is a huge mess.
 
@TravisJ Is it the same problem with nHibernate vs MySql?
 
I have no idea.
 
Can you test it easily with dummy data?
probably not easy to replace it if need be
 
I haven't used nHibernate before.
I am not sure if it fully supports eager loading.
 
4:27 PM
I don't know ef nor nhibernate
 
@JohanLarsson It seems to be the nicer of the various evils.
 
I had an ef developer trying to figure this out with me for a while.
 
I still use LinqToSQL, but one day I know I'm going to have to wade into it.
 
I use linq to sql too
 
I used LINQ to SQL.
Note the past tense.
 
4:30 PM
It's still better than datasets.
 
I hate when people severely underestimate my project time. He wasn't even a salesman!
 
hm, I wonder if I should switch to dotconnect
decisions, decisions.
 
Im using EF in a few projects... For me works great.
 
I meant from mysql connector
I have been enjoying EF
 
I like how their site is full of fried eggs.
It reminds me of breakfast.
 
4:35 PM
Ah, no. I tried with MySQL, i wasnt able to make it work... Maybe cause VS2012 doesnt recognize the MySQLConnector.
I spend like 2 days trying and then decided to stay with MSSQL to save me from headhaches...
 
.net 4.5 isn't compatible with mysql connector
well, the other way around
mysql connector doesn't support .net 4.5
have you tried dotconnect express? that might work for you
 
MS have some incitament to make ef function less than perfect with MS-sql
 
indeed
 
SQL is one of the few things they actually make money on
and SQL probably have a brighter future than os and office
 
@KendallFrey Hey !! Thanks ...it worked! :)
 
4:53 PM
@JohanLarsson - I wonder if I can just rewrite the code to fix the issue
did it with javascriptserializer already this week :)
in mysql connector's code:
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
// for more details.
 
New to C# chat? Read The Wiki
6
 
@KyleTrauberman I refuse!
 
@KyleTrauberman That sounds like a chat FAQ, not a C# room FAQ.
 
betteR?
 
technically yes.
 
5:06 PM
I like the capital 'R' at the end, instead of initial caps.
 
bettEr?
 
No! I liked it the other way!
 
nEW cASING cONVENTION! uSE iT!
 
I hope you stub your toe.
 
5:07 PM
I did already.
 
I hope you do it again.
 
I did.
 
i am gOINg to cAPITALIZe aLl tHe mIDDLe lETTERs
 
Oh god my eyes.
 
OR ThE OtheR WaY
 
5:08 PM
no tHIs wAy is bETTEr
 
or_we_could_be_old_school_and_do_this
 
whataboutnotusingspaces?
 
I.. no.
Just no.
 
itssomuchbetter
 
@KendallFrey Sorry to interrupt your formatting fight :P have you messed with with MVC3 much?
 
5:09 PM
justUseCamelCaseAndGetOverIt
 
@SpencerColehowareyoutoday?
 
@robjb No.
 
@robjb I have
 
I'm going to ignore both of you.
@robjb So have I, for what it's worth.
 
tHenwEnEedawAytOsPlitwOrds
 
5:09 PM
@robjbihAVEalITTLEeXPERIENCEwITHmVC3
 
twitch
 
@KendallFreynowedON't
 
@SpencerCole, @KyleTrauberman Any insight on how model-view data gets passed to the controller?
 
yES
 
@robjb from where?
from the view?
 
5:10 PM
tHE dATA pOSTED iS mAPPED bASED oN tHE nAME dEFINED oN tHE iNPUT tAG.
 
Specifically, I'm submitting a login view, the view contains a form that posts back to the same view
 
it gets passed over an http request
then the modelbinder binds the data to your action's parameters/model
 
You just accept the post values and manipulate them that way.
 
@robjb so you have a form with a username and password?
 
15
Q: Simple MVC3 Question - How to retreive form values from HTTPPOST, dictionary or?

RichardSimple question. I have an mvc controller that has method: [HttpPost] public ActionResult SubmitAction() { // Get Post Params Here ... return something ... } The form is a non-trivial form with a simple textbox. Question - how on earth do I access the parameter values? I am not posting ...

 
5:12 PM
public ActionResult Login(string username, string password){}
that will work
 
Yep ... obviously over HTTPS, but I wanted to learn a little bit more about how parameters are passed to avoid any security gotchas
And that's exactly my current Login view signature :P
 
public class MapExample
{
 public string lol1 { get; set; }
 public int easy { get; set; }
}

[HttpPost]
public ActionResult hereItIs( MapExample model ){
 //use model.lol1
}

<form>
 <input name="lol1" /><input name="easy" />
</form>
 
well, they come in over http, usually as plain text or encrypted via ssl
 
When that form is submitted, the controller will properly map the values into the MapExample class because the names in the inputs match the class definition.
 
then the model binder takes then and puts them over there --> the action method params
 
5:13 PM
@KyleTrauberman I just didn't want to see the data appearing in the query string, for example ;)
 
then use http post
modify your action method like so:
[HttpPost]
public ActionResult Login(string username, string password){}
 
You can even use more complex versions, where subclasses are named thusly:

public SubClass SubClassName { get; set; }

public class SubClass { public int someNumber { get; set; }

<input name="SubClass.someNumber" />
 
now only post will be accepted for that action
 
@KyleTrauberman Heh, that's what I currently have :]
 
@robjb - To avoid having data show up in the query string you should always use the PRG pattern and pass in a view model.
 
5:15 PM
@robjb i'm confused about what you're confused about
 
@KyleTrauberman - rob is afraid of having the login page redirect with the user name and password just entered as part of the query string.
 
right, but he said he already has all of the optimizations i've suggested
 
I think he is being overly cautious by asking
 
Yea :p
 
gotcha
 
5:17 PM
I have other views that use [HttpPost] and the parameters do seem to get passed through query string
 
Never return a view from a post
ever
 
Uh-oh
 
The "PRG" pattern, means when you post, then you redirect to a get method and then return the view.
post-redirect-get
 
@TravisJ Actually now that I look at my controller, all of my [HttpPost] actions are redirecting :D
 
nice :D
when sending values in that redirection, you can get values which show up in a query string
 
5:21 PM
@robjb just because you use http post, doesn't mean you can't still use a query string
 
you can use TempData for one redirect lifetime in order to get past having those show up in the query string
 
so you'll want to make sure your form is setup to send via post
 
[HttpPost]
public action Login(){ TempData["myInt"] = 5;return RedirectToAction("LoggedIn"); }
public action LoggedIn(){ if(TempData.ContainsKey("myInt"){ /*use myInt*/;} return View();}
 
@TravisJ Yep, currently doing that too :)
 
nice
I can't find the offending mysql connector code =/
I looked everywhere, it is a freaking mess in there
 
5:25 PM
Afternoon chai tea pick-me-up!
I'm ready to take on the world, one coding project at a time.
After a couple more reddit links on my phone.
 
@KyleTrauberman I knew that a query string can be used in an HTTP Post, that was the cause of my original question ... I was trying to grep under what conditions MVC3 passes values in the query string (vs the HTTP request content)
 
@SpencerCole Error 1 The type or namespace name 'world' could not be found (are you missing a using directive or an assembly reference?)
 
And thanks for both of your help :)
 
@robjb MVC it self doesn't control when things get sent via querystring (unless its from a redirect)
 
@SpencerCole I didn't get the line after "Afternoon" what did "chai tea pick-me-up" mean?
 
5:26 PM
the browser controls where things go when submitting stuff to the server
 
@rlemon I'll.. no. Not even Chai Tea has prepared me to troubleshoot sarcasm.
 
Ahh alright. That's helpful to know
 
@SpencerCole I'm going to guess Chai is the type of tea? :)
 
thats why you need to make sure your form is setup for post
 
@Maverik Yep. It's a delicious type of tea.
 
5:28 PM
 
@KyleTrauberman It is indeed. Thx for the heads up.
 
Masala chai (literally "mixed-spice tea") is a beverage from the Indian subcontinent made by brewing tea with a mixture of aromatic Indian spices and herbs. Etymology and terminology Plain chai By itself, chai or cha is merely the generic word for "tea" in many European and Asian languages. The widespread form chai comes from Persian چای chay. Street vendors called "chai wallahs" (sometimes spelled "chaiwalas") are a common sight, although coffee is a more popular beverage in some southern parts of India. Chai is also a popular item in restaurants known as Irani cafés or the genre o...
 
 
^ nice
 
@SpencerCole confusion over then! reason for confusion: chai literally means tea - so I couldn't figure the duplication. to me it was like saying tea tea :D
 
5:29 PM
user image
2
^ related
 
@SpencerCole and yup i've had a few flavours of those .. really nice stuff if you can handle it :)
 
LOL
 
@Maverik I drink it all the time. I think it's particularly good with some good cream in it.
My family is a huge tea drinking family.
 
5:31 PM
oh god lol
 
@rlemon Anne Hathaway
 
@SpencerCole same here - I love the "Kashmeri Chai" version. can't find the exact recipe but this comes close: coffeetea.about.com/od/hottea/r/kashmir.htm
wish I could make it myself!
 
@Maverik I have a tea at home thats called 'blueberry muffin' we bought at a store near here. It tastes just like a blueberry muffin dipped in black tea.
 
but while it seams easy - i just don't manage it right
 
5:35 PM
Tea: Coffees polite, albeit somewhat of a wuss, little brother.
 
@SpencerCole now thats interesting! I'll see if i can find it around here
 
@rlemon I take exception to that.
 
i only hate tea because coffee never stained my teeth. I switched to tea, and 3 months in I looked like a Britt from the 60's
 
apparently my boss woke up this morning and thought "I should wear a backwards cap today"
 
lol
 
5:36 PM
Anyone knows a website that provides a Code Signing certificate for Open Source Projects?
 
@rlemon lol, i've never known that effect
 
@PicrofoEGY, is it for distribution at large or just for yourself?
 
I went to work dressed in this for my first day... The office girls all laughed, the two clients in the waiting room didn't end up buying our product. overall i'd call it a win
 
@zneak Distribution :D
 
well considering the whole point of code signing for distribution, I'd be surprised that you find anything free
in case you're looking for something free
 
5:39 PM
while it may not be free there are some fairly cheap options out there.
 
@zneak I think that Certum provides it for free but they did not reply to my request yet
 
I think I got one from comodo reseller for under 100 pounds
 
@Maverik Yeah, KSoftware sells COMODO Certificates for 99$/yr
 
yea that one!
 
I got a free ssl cert some time ago
 
5:41 PM
I think that I'll go with KSoftware if Certum did not reply to my request
@zneak I used to get mine from InstantSSL
 
Anybody worked with Node.js server?
 
I've never tried Javascripting :D
 
Anyone here a PC gamer?
 
@robjb I used to play COD :D
 
I feel compelled to recommend Dishonored, it's ****in sweet
I haven't gotten into a single player game like this in yeaaars
@PicrofoEGY I remember the first couple SP COD games, they were really fun. I'm pretty tired of the MP madden format they've adopted since then.
 
5:48 PM
I don't think that my computer will meet this game requirements. I've got a VGA card with 32MB RAM :D
 
lol
 
@Maverik yea I have worked with node.js
and I love JavaScript
 
"Nested queries in a projection clause might get translated into Cartesian product queries on the server." -Entity Framework
 
@robjb I still have COD 2 on this PC
 
Sigh, every day it is a different f'ing framework that seems to be the problem here.
 
5:49 PM
It's really fun with cheats :D
 
@TravisJ I think that would make sense to me if I knew what a projection clause was.
 
but I can't play it now due to my Graphics card :D
 
@robjb - stackoverflow.com/q/12825643/1026459 , f => f.Bars.Select(b=> b.Employees.Select( e=> e.Position))
 
I'm extremely impressed with load times on Dishonored ... only like 1-2 seconds per load so far, and the world is huge. Don't know how they did it.
 
.Select represents the projection. The second one is nested. fml
How large is the file on your hard drive?
must be like 8 gb
 
5:51 PM
@robjb I really wish if I could try this, I think that I must upgrade my computer now :D
 
That game is a resource behemoth. They just mashed everything into cache and then maxed out the gpu. Good luck having your computer survive for a year running that game :P you should look at your system resources and try to avoid running at 90%+
 
@TravisJ Hmm? The game is ~6GB I think.
@TravisJ How do you know that? lol
 
;)
 
@TravisJ My Computer is always 90%+ hahaha :D
 
@PicrofoEGY lol :)
 
5:54 PM
@TravisJ Do you work in gaming industry, or you just did some clever analysis?
 
@robjb - I have done some intensive game testing :D
 
Ah, very nice
 
Has anyone configured a barcode scanner before? Funnnnn.
 
Did you just do that?
 
Not all today.
 
5:56 PM
Were you able to integrate the scanner into a c# application?
 
But more configuration that didn't get done yesterday.
Sort of. I wrote a test app.
 
@TravisJ, were you talking about CPU cache? Seems like most of the load times would be from textures and models, hence, GPU bound.
 
@robjb - Nah, what I meant was main memory
 
Hmm, well either way, they did a damn good job of making it run smooth
 
They cache it in your RAM, what is the requirement to run the game? 4GB or something crazy I would assume
 
5:58 PM
I'm extending my own custom control (class MyControl : AnotherCustomControl) which extends the UserControl class (class AnotherCustomControl : UserControl). However all the properties of AnotherCustomControl appear disabled in the designer of MyControl. How can I fix that?
 
I think it is more like your computer is OP :)
 
No game should require 4GB.
 
lol, well it's waaay smoother than Skyrim, and prettier, and tends to have similarly sized environments (except it's not a open-world sandbox.)
 
It seems like the controls are blocked (locked)
 

« first day (726 days earlier)      last day (4226 days later) »