« first day (648 days earlier)      last day (4294 days later) » 

7:00 PM
looking at the starred panel on the side I have come to realize almost everything on there could be very sexual
 
lmao
 
So if my stored procedure has been executing for 15 minutes and has not finished, does that mean I did something wrong?
 
yes
1 min is pretty bad
 
soooo you havent finished yet...? yeh you did something wrong....protection?
2
some try catch statement in your code?
 
hello all, first time here. my c# application is getting json data from a wcf service. i am going to use DataContractJsonSerializer to deserialize the data. however the json that is returned is an array of objects, like this:
{object1, object2, object3, timestamp}

will the object that i deserialze into have to be placed into an array expecting these three separate objects (plus timestamp)? ie, i will have to create a datatype to exactly match the incoming json?
 
7:02 PM
yea, I usually put a breakpoint in my catch to let me know
 
Most of the time, a one-to-one relationship is pretty redundant. You might as well just make one table.
 
Clustered Index Insert Cost: 82%
 
@NathanielPawelczyk that is not a proper array
 
yes i know that is not proper json
 
copy and paste your json here
 
7:03 PM
its kind of big
but here goes
 
how about a link to your code? lol
 
{

"train1":{
"dpt_station":"ROUTE59",
"train_num":"1268",
"scheduled_dpt_time":"/Date(1343158080000)/",
"estimated_dpt_time":"/Date(1343158080000)/",
"is_modified":false,
"timestamp":"/Date(1343154179134)/",
"DateAge":0,
"is_duplicate":false,
"RunState":2
},
"train2":{
"dpt_station":"ROUTE59",
"train_num":"1270",
"scheduled_dpt_time":"/Date(1343161680000)/",
"estimated_dpt_time":"/Date(1343161680000)/",
"is_modified":false,
"timestamp":"/Date(1343154179134)/",
"DateAge":0,
"is_duplicate":false,
 
There is no array.
 
is it one large object containing 3 sub-objects, with the timestamp?
 
7:04 PM
cant think straight after being up for 32 hours
 
no its not
 
Yes.
 
uh...so it is 1 object, to clarify?
 
Yes.
{ ... } is an object, [ ... ] is an array.
 
ok. so the object i deseralize into will have to exactly match this large object i have here, complete with its sub-objects?
 
7:05 PM
Ideally, yes.
 
there is no large object, I know you meant to define one
 
well, i cannot define the format of the incoming json
it is a web service provided by a 3rd party
 
huh
oh
 
yeah the object you "deserialize into...will have to match that 'large' object..."
 
ok
any idea how i will define my object that will populated?
 
7:06 PM
steve where are you add to this :P
oh I see you wanna populate it ;)
 
i'm a little rusty on my json,i can't lie
 
well, basically i need to convert this JSON into an object that i can work with in c#
i was thinking that the DataContractJSONSerializer would help me w/ this
 
yeah this is beyond my experience level, i've never passed javascript to c#
lol
 
the way you have it "train1" is going to be read as an object equal to "responseTime"
 
steve you gotta practice practice before you get int university or your out on first strike :P
 
7:09 PM
i'm about to graduate the university :)
but they only teach you the bare bones basics, kind of disappointing
 
and you're rusty?
 
@ScottSelby, yes as in they are in the same level inside the main object
 
i created a social networking site for alcoholics called Boozards.com that relied heavily on js and json, but this was back in 2006
 
i've drank a lot of beer since then, so my memory is toast
 
7:10 PM
this has taken an interesting turn
 
@NathanielPawelczyk , that is a little bit harder then uniform objects but it still won't be too bad
 
ok
how would i define the object i will deserialze into, as i have nested objects?
 
I've never used WCF, maybe someone else can answer if they are the same as the rst of .Net classes
 
never used wcf either :(
 
is there a .net chatroom i could try?
 
7:13 PM
he has "deserialized into, now has attained nested objects" giggdy giggdy
 
This is the de facto .NET chat room.
 
oh, i thought there wer seperate for c# and .net
 
simple google search for "deserialize json c#"
 
alright
thanks guys, big help here!
 
7:14 PM
that article uses newton
 
you might just want to download that and read their documentation
 
either way, there are tons of articles on how to deserialize json objects into c#, i don't know how, but its out there
 
k, ill read up
 
7:16 PM
that is the best way to go , I don't use MVC , but have heard that Microsoft adopted that library into MVC
 
sweet, thanks again
bye
 
yep have a good one :)
 
bah bah booey
 
^
thats familiar, whats that from?
 
howard stern
 
7:20 PM
the movie?
 
its part of his show , people yell it all over live news - sports events , funerals
 
oh
i watched his movie the other week, must be where i heard it from
 
yea, I've been listening to him for years , his show is really good now on satelite
 
Anyone have any experience with static events? (Or, obviously, a better solution to my problem would be wonderful)
 
static events :/ @KendallFrey explain!
 
7:22 PM
yes, I use them alot
whats up @SamDeHaan
 
I've got a WCF data service. And (requirements!) the architecture of this product also has a 'Manager' type class that needs to be able to respond to DB changes made by certain posts from the data service.
So, I was told to use events, pass an event over when I make a change that requires an action.
 
@Steve An object doesn't fire the event, rather, a class fires it.
You can't subscribe to a certain object's event.
 
what would be the benefit of having the class fire it instead of an object, examples?
 
What I'm confused on / having issues with is that (in my understanding) the DataServiceHost hosting my data service can make multiple instances of my service to satisfy whatever requests it is getting, and I am not sure how to subscribe to the events in question
 
Oh
 
7:26 PM
@Steve When it's not part of an object, for example in a static class.
 
does it have to be part of a static class?
could it be if any object meets a certain criteria the class fires an event for all objects
 
I was thinking static events may be the answer, subscribe to the static event and in this way be able to subscribe to the events of any number of instances, but I'm entirely new to C# and wasn't sure if this is going to work out how I want it to.
 
oh, thats what i just asked ^
 
@Steve It could.
 
ugh, i have interviews all afternoon tomorrow
4 45 minute interviews, back to back
 
7:43 PM
Are you the interviewer, or the interviewee?
 
@Steve Please hire me.
 
Andre do you not want to know what the job is for?
 
i'm the interviewee
im an intern, i'm interviewing for a fulltime position once my internship is finished
 
Well I'm pretty sure he is not a pimp since he is in the c# room...
Damn Steve I forgot you're a noob :(
 
@Andredseixas pimp slap back in your place, ho
lol yeah, im noobish :p
 
7:47 PM
Ok, just don't hit me.
I hate this cultural difference..
I work fulltime and receive 1/3 that you as an intern receive ...
 
lol i doubt that
 
I think it is 1/5 since dollar is twice the price of a real
you get 3500$ a month, I get about 760$ a month...
Am I wrong ?
 
I don't care too much about money...money can't buy me love.
 
No but money can pay my car, my gas, my house so.. Yeah, I care about money..
 
while thats true, i only take home around 2000/month, and our standard of living is higher
 
7:52 PM
Well if you do care about money, and you end up with a lot of it, at least do some philanthropy. If you are getting into developing then you definitely have a bright future.
 
half of that goes for my apt
 
I love developing. I rather die than not work on developing
 
and then i have tons of other bills, i really don't take home much more than you man
 
I get 760$ a month but about 600$ because of the taxes... since it isn't much that I earn, I don't get a lot of cuts..
 
how much does it cost for your home or apartment though?
i bet you its 1/3 of what mine is
 
7:53 PM
Man, a pack of Hollywood cigarettes costs about 2,50$
 
i pay 7.50 for a pack of smokes
 
The rent for a small apt with 1 bedroom is about 600$
Wow, 7.50 ? I would stop smoking if I had to pay that..
 
i only smoke two a day
lol
 
two packs ?
 
two cigarettes
two on the drive to work, 2 on the drive home
oops, i mean four a day, i can't count
 
7:56 PM
Two cigarettes is just a breakfast :( I can't handle the stress sometimes
About a pack a day.
 
when i get stressed, especially during school, i smoke about that lol
 
F-ck, I'm going to grab a smoke, be right back in 5 minutes.
 
hahaha okay
 
Does anyone here have experience with SignalR?
 
i do not sorry
 
7:58 PM
@TravisJ It's married or rich, never both.
 
Anyone? :/
 
@KendallFrey - Never? I could think of a few :)
 
What if I say I did, and acted as a proxy for google?
@TravisJ I don't know anyone that got rich after they were married.
Windows Explorer needs an undo button. I hate it when I bump something and something disappears, nowhere to be found.
 
 
I feel like butthurt dweller.
 
8:02 PM
lmao
i'm butt hurt too, don't worry
 
Well, there is one thing that are f-cking expensive in Brazil are the apple products..
MacbookPro is 1150$ the basic and 1000$ the iPhone :(
But in general the life cost is not that expensive compared to other where you live.. But 3500$ is hell of a money.
 
your women are so beautiful though
 
Well, you know what they say about brazilians.. we can not lie, because we like big butts oh yeah hahaha
 
lmao
 
@KendallFrey Ctrl+Z works.
At least once.
 
8:06 PM
@KendallFrey - Although it is uncommon, it does happen.
 
Ha, it worked this time.
I created a link, and pressed Ctrl+Z.
I got a message saying it already exists in this location.
WTF Recycle Bin?
 
YOLO
 
someone needs to add YOLO to the swear word filter
 
lmao
 
Why would you do that? YOLO
XD
 
8:12 PM
I was born in Yolo Country, true story
 
ha
I just heard about yolo about 2 weeks ago
 
@ScottSelby haha same here
 
I'm gonna greasemonkey it up
word filter
later
 
welcome
:)
 
im not leaving
just procrastinating with my greasemonkey action
 
8:15 PM
i am, on the other hand, leaving
have a good one
YOLO
 
Does javascript not allow changes by ref in a function?

function reset( obj ){ obj = []; }
var data = [ 1, 2 ];
reset( data );
 
test it
 
It doesn't, I wasn't sure if there was a better way than that to do it.
 
that doesn't work?
 
nope
I could return the thing and then call data = reset( data ) but that is lame
 
8:17 PM
I think there is a way to re-write that
 
maybe ill ask rlemon
 
@TravisJ doesn't look like it
 
theifmaster knows everything (maybe more then Kendall)
 
@TravisJ: JavaScript arguments are objects passed by value.
JavaScript doesn't support ref arguments.
 
8:20 PM
We will see ;)
 
@Kyle I changed it a bit. jsfiddle.net/H5BCV/1
 
You can make a workaround by passing an object wrapper.
 
8:41 PM
hello :)
is possible get the link href knowing the id in c# windows form???
this is question: http://stackoverflow.com/questions/11658067/get-href-link-by-id-webbrowser1-c-sharp
 
9:06 PM
hello
hey @KendallFrey
can I configure a folder to only allow users into a certain folder that have a certain session and redirect if that session is not found ?
where'd everyone go
0
Q: c# authentication from session into members folder

Scott SelbyI have set up member folders in c# asp.net webforms before to only allow certain users and to redirect if the user is not authenticated. I am wondering is this possible / how would I implement the authentication based on weather a Session variable is present(filled with a value) or not authentic...

 
any constructive criticism of this answer of mine would be really welcome:
0
A: Slimming down a switch statement

codesparkleThis answer presumes that you are going to apply that switch statement to a string, not just to single characters (though that would also work). The best approach seems to be the one outlined in this StackOverflow answer. I adapted it to use LINQ: var chars = from character in valToCheck.Norma...

 
@codesparkle - that looks way better
not sure if its going to be faster , may even take longer , but it definetly looks more readable , and will work for characters that he won't predict
 
it is indeed slower
but I really haven't done a proper benchmark
 
I guess it depends on where it is going to be implemented , if it is going to be on like 100,000 char text checking each char that would be no good
 
though the fact that the original switch statement operated on a single char (passed a string) suggests to me that the OP's approach may not even be faster all-in-all
*as a string
 
9:18 PM
yea, I was thinking the same thing
 
well thanks @scott, that was very helpful
wasn't sure if I had a missed a major point
 
@codesparkle That question has been asked and answered so much, that it's not even worth bothering anymore.
We had to do something similar back at my last place.
We needed to do it to post to a webservice.
 
yea, I've seen it done with ITranslate interface
 
Problem was, there were some really funky characters outside of the diacritics that we needed to account for (random no-width spaces, for example).
 
@SPFiredrake - did you see my question
 
9:24 PM
Yeah, sorry but no insights :/
Anyway, created a single string of all invalid characters, and a simple static array of their replacements.
This was still on 2.0 framework, so no LINQ.
 
you sure you got all invalid character
 
Only ones we've encountered before (had a log)
Used Regex.Replace, that took the position of the invalid character in the string, and referenced the corresponding replacement array as the MatchEvaluator.
 
you could probably do google translate
 
This was backend code that was part of our payment processor.
 
if you want to make things slower and less reliable , but the best translation
 
9:26 PM
Couldn't send that sort of information over the wire, no matter what the reason.
Other than the web service.
 
true dat
hey, upvote my question so someone smart comese along and answers it
 
9:46 PM
OK, just upvoted the c# authentication from session into members folder question
 
@ScottSelby you owe me
1 millioonnnnn dollars
 
@klut do you have your pinky finger on your lip just like in the movie?
 
@kush yes, so does my shaved chi......wa(sp)
i'm not even going to try and spell it
 
chihuahua
if I grok you
 
@walkingTarget started it chihuawa, then figured there couldn't be a wa in there haha/
 
9:49 PM
@Kendall - still around?
 
10:05 PM
Do you guys think it's possible to implement a class representing an infinite set in C#? I'm designing a class library for discrete mathematics - my idea was to design a base class, and then you would have to derive from the class and implement your own methods (most important of which would be Contains).. But I have no idea how I could check if an infinite set is a subset of another infinite set, or how to enumerate it in a foreach (Which is necessary to implement ISet).. Ideas?
en.wikipedia.org/wiki/Infinite_set For anyone who might not know what it is :P
 
What are you using to represent an infinite set?
 
I would like to know this as well. @Daniel if you write it as a real question and link here, I will promise you one upvote.
 
I don't understand the question lol.. I'm not using anything to represent it, I'm asking for ideas on how to represent it :P. My idea (as I said) was to derive from some base class that implemented ISet, but I can't think of how to implement methods like Subset..
Will do :)
 
10:21 PM
If you could represent the members with a function, then I suppose a set could be "infinite"
 
I think we're talking about countable infinite here, just making sure
 
Have your ISet contain some number which is nullable. Null = infinity
public class NumberSet
{
 public int? length { get; set; }
 public double[] Numbers { get; set; }

 public NumberSet()
 {
   this.length = 0;
 }

 public bool isInfinite()
 {
  return (this.length.Value == null )? true: false;
 }
}
 
kush, I'd also like to represent classes that aren't countably infinite - this is another source of difficulty: enumerating N is easy, if impractical, but how do you enumerate R? I'm writing my question right now btw :)
 
@Daniel - You can enumerate R by finding the most precise number and then multiplying all numbers by the level of precision. R => N. Then you can treat them as ints.
 
0
Q: How can I implement an infinite set class?

DanielI'm designing a class library, for discrete mathematics, and I can't think of a way to implement an infinite set. What I have so far is: I have an abstract base class, Set, which implements the interface ISet. For finite sets, I derive a class FiniteSet, which implements each set method. I can t...

 
11:25 PM
@Daniel - I posted an answer to that question.
 
@Daniel I have no idea how to do R. Perhaps posting this question to r/math on reddit might help.
 
11:43 PM
So, I earned the talkative badge. Don't know if that's good or bad.
2
 

« first day (648 days earlier)      last day (4294 days later) »