« first day (646 days earlier)      last day (4300 days later) » 

6:00 PM
That's a named number.
 
nope
that's a #define'd number
 
Wikipedia does not have an article with this exact name.
 
I walked in on the how many 9's are there from 1-100.... This is what frickin C# geniuses talk about.... And make errors?!?!?! We should get errors when trying to print the Big O on a Console Application
 
6:03 PM
I found "Largest Unnamed Number" on wikipedia
it's a nullable
 
That's not what I asked for.
 
@OutlawLemur there are zero 9's from 1b to 100b
 
olympic medalist in computer science? i didn't realize the olympics had computer science as a sport
(just joking, i realize it was a pasting error, but still funny nonetheless)
 
Jon Skeet's up to his tricks again...
How does one copy-paste that bad?
 
6:06 PM
what is the sum of all natural numbers below one thousand that are multiples of either 3 or 5?
 
Go figure it out yourself. I know that one.
 
Making program to do it for me...
 
as do i, @kendall
I'm on #18 right now
 
@OutlawLemur That's the whole idea of PE.
 
233,168
 
6:08 PM
somebody googled a google
 
@Steve %^$*%
 
I did about 50 and ran out of easy ones.
 
im a math whiz
 
did that in my head too
 
6:09 PM
@HansZ Easy, quite.
 
#67 is smashingly simple, imo
O(n) solution
 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace sumof351000
{
class Program
{
static void Main(string[] args)
{
List<int> listtosum = new List<int>();

for (int i = 0; i < 1000; i++)
{
if (i % 3 == 0 || i % 5 == 0)
{
listtosum.Add(i);
}
}

Console.WriteLine(listtosum.Sum());
Console.Read();
}
}
}
 
Am I the only one that wrote a O(1) algorithm for #1?
 
I should get a reward
 
return (333(334)/2*3)+(199(200)/2*5)-(66(67)/2*15);
 
6:13 PM
@HansZ Make it accept parameters.
 
@KendallFrey when you go to a university to get your degree, you are going to be so bored since you know all of this crap already
 
return (((max-1)/n1)((max-1)/n1+1)/2*(n1))+(((max-1)/n2)((max-1)/n2+1)/2*(n2))-(((max-1)/n1/n2)((max-1/n1/n2+1)/2*(n1*n2)))
 
I bought a C# book written in Hebrew yesterday. Yay.
Stack Overflow closing your App Store questions? Unsure how to start on the Droid Market? App rejected & no clue why? With Windows 8, this proposal becomes more relevant.
http://area51.stackexchange.com/proposals/30702/app-stores
 
I bought an English book written in C#.
So easy to understand.
 
:(
 
6:17 PM
return Enumerable.Range(0,1000).Where(x => x%3 == 0 || x%5==0).Sum();
 
No more O(1).
 
@KendallFrey Haha, yea. Not sure what language I'll be learning more of.
 
@KendallFrey is O(1) because 1000 is a constant
O(1000) = O(1)
 
Alright, replace 1000 with 10^1000.
 
still O(1)
 
6:19 PM
if you've got alzeimers can you still be an excellent programmer?
 
Then tell me what happens.
 
;)
 
Make the input a parameter.
 
@Nadal i've had some bad head injuries, and concussions, so i'll tell you in 10 years
 
public uint answer(uint n)
{
   if(n == 1000)
       return Enumerable.Range(0,1000).Where(x => x%3 == 0 || x%5==0).Sum();
   throw InvalidArgumentException();
}
 
6:20 PM
Concussion != Alzheimers
 
i think i could possibly have it
i forget syntax so quickly
 
yeah
 
if I have a a property "ViewName" in class A and a property "ViewName" in class B, will NotifyPropertyChanged affect both properties or only its respective class?
 
I usually just say "that thing that does that"
 
@KendallFrey concussions lead to a greater chance of alzheimers according to studies
 
6:22 PM
@KendallFrey, behold, a heuristic algorithm
 
@klut only of the respective class I believe.
 
thx
 
no problem
 
omg if my last name was long, I would name my son Max
 
If my last name was long, I would name my son Cheng
 
so his chinese name would be Long Cheng, which, read backwards, is Cheng Long, the chinese name for jackie chan
or better yet, Xiao Li
because Li Xiao Long is Bruce Lee
 
Here's a crash course on Chinese:
Ai Bang Mai Ne: I bumped into the coffee table

Chin Tu Fat: You need a face lift

Gun Pao Der: An ancient Chinese invention

Hu Flung Dung: Which one of you fertilized the field?

Hu Yu Hai Ding: We have reason to believe you are harboring a fugitive

Jan Ne Ka Sun: A former late night talk show host

Kum Hia: Approach me

Lao Ze Sho: Gilligan's Island

Lao Ze: Not very good

Lin Ching: An illegal execution

Moon Lan Ding: A great achievement of the American space program

Ne Ahn: A lighting fixture used in advertising signs
Sees 75-line js file. This shouldn't be too hard to understand. Sees:
eval(fso.OpenTextFile("Library.js",1).ReadAll());
Opens Library.js, which is 1217 lines.
FFFFFFFUUUUUUUUUUUU
 
@KendallFrey If I want to piss off my Japanese friend I walk up to him and say: Nagiri Yamaha sashimi Suzuki?!
 
im
going
crazy
 
Kum Hia, bro!
 
@KendallFrey "Ai Bang Mai Ne", best guess is "Love Gangs are Selling those"
"Chin Tu Fat", buess guess is "You(archaic) are Prosperous from Dirt"
 
what is "I love you" in chinese?
inb4 word doesn't exist in chinese
 
Wo Ai Ni 我爱你
 
thanks
brb hitting on chinese chicks
wait .. was that chinese or japanese/?
ehh doesn't matter. brb hitting on all asian chicks
 
6:36 PM
:)
 
japanese is
Dai Su Ki だいすき
 
All I know is Ni Hao.
 
how do you do a left outer join between two objects in linq
trivia question
i dont really want to/need to know
 
6:39 PM
join blah in blah on blahconditional
 
@HansZ dang you win
 
example
 
join search in thisquestion on google equals found
 
uhhh
 
6:41 PM
TIL Jedi Council = Presbyterian Church
 
It's a version of star wars that was so poorly translated
i'm downloading it now at home.
for educational purposes only*
 
I am laughing at work
 
that's lol^2
 
what is this, barrens chat?
ffs
 
6:51 PM
 
Inspect Element --> Delete
 
@RyanTernier loli was reading that when my boss came in and caught me :(
@canon WOWWWWWWWWW
 
I wanna order some Write-Only Memory right now
 
I have only read one Star Wars that was interesting.. the others were just boring. The films were great though
 
@Steve heh
 
6:59 PM
i <3 pvp
 
@Steve ahh
 
:(
 
omg did anyone see the new youtube "video no longer available" error?
it has static background like old TVs <3
 
nice
 
Is it me, or do others get highly frustrated when someone does:
var obj = new SqlConnection();
or
var age = 3;
it it that hard to do:
SqlConnection obj = new SqlConnection();?
and that hard to do:
SqlCOnnection SomethingBEtterThanObj = new SqlConnection();?
 
7:02 PM
yep, bugs me too
 
What is var good for?
 
anonymous types
 
linq among other things
 
It's great for anon types / LINQ
however, it gets abused
 
especially when working with linq
 
7:03 PM
var myObj = GetRanomSomethingFromAStupidFunction();
....
 
If you know the type you need, using var is just lazy
 
JTA
@RyanTernier I agree. I hate var. I find intellisense works much better without it too.
 
i'm going to write an entire application with "var"s and see how well it goes over with my boss, just for entertainment
 
Intuitive variable name makes sense in any situation though
 
count should never be a DateTime.
 
7:05 PM
for(var i = 0;i<10;i++)
{
}
GAHHH
 
especially since var and int have the same number of characters, it doesn't make typing it any quicker lol
 
That's OK in JS. NOT in C#.
 
@KendallFrey i've never thought about using a datetime as a counter, but it sounds like something i might try. Why shouldn't i?
 
@Steve Something called common sense, followed by performance, clarity, maintainability, and for gods sake man, wtf. =D
 
Because if you do, you will constantly live in fear of a psychopathic future developer.
 
7:08 PM
lol okay
"you will get serial killed if you do" is a good enough answer for me :p
 
lol you can't serially kill one person.
 
lol well if he's psychopathic enough to kill me for using a datetime in a loop, it probably isn't his first rodeo
 
and furthermore what's he doing at a rodeo? there's more people out there to kill
 
@Maslow he's into animals, and stuff
 
@KendallFrey just because there are inappropriate uses of a tool, doesn't make the tool itself flawed. the var keyword kills people? or people that are using it wrong kill people?
 
7:13 PM
fill me with more knowledge @kendall , you always teach me interesting things :)
 
When using a DataTemplateSelector is it ok to have a property in the ViewModel to identify which view to select? Or does doing this break some pattern..
 
So this DaveDV guy came in this morning saying how bad EF was because of N+1 selects, and that EF should never be used, what are your opinions on that? is EF that bad? should I try to avoid it?
 
Ell
@Steve var is type inference isn't it? or is it dynamic type?
 
Yar you bunch of sharpers. Can one of you tell me if I am correct about this. I am reading the documentation on the Timer class here: msdn.microsoft.com/en-us/library/… . It says that the elapsed event can occur even after the timer has stopped. The way I understand it is that the event occurs and is put on a queue, you then stop the timer, and then event works its way through the queue and finally is handled making it look like it occurred afterwards.
Is this correct?
 
@Steve Did you know that it is possible to initialize an interface with the new keyword?
@Justin I think so.
 
7:18 PM
@Ell i dont know what it is, but i know how it works
 
@KendallFrey Ok thanks
 
@KendallFrey No I didn't, i misread what you wrote
 
@KendallFrey tell me more
 
@KendallFrey oh, I thought I remembered reading that, just heck no don't use it, and I forgot it.
 
7:21 PM
@Maslow i heard you want to use it as often as possible
 
@Steve if you are trying to find that one psycho coder
 
@Maslow lmfao
 
Any windows hosts that should be avoided/are recommended?
 
hated... asphostcentral
disliked godaddy, but then I was trying to use MVC3 while it was ctp
 
I could see @RyanTernier being that pyscho coder that comes late at night and serial kills me..... that stache is what gave him away
 
7:25 PM
Any recommendeD?
 
I hear aspnix.com is good, also let me see if I can find the other 2
 
I was actually looking for a good asp.net webhost too, good question
 
so far i'm liking what I've seen of hostasp.net so far. I am helping run a site hosted there.
that's prob my favorite of those I've been hands on with
 
so aspnix or hostasp?
 
I've heard aspnix is good, but I have experienced some very nice things on hostasp.
 
7:30 PM
I use Arvixe for my host:
http://www.arvixe.com/asp_net_web_hosting
 
I wonder if hostasp has servers in the states. It's hard to tell
 
Wish more hosts would use PostgreSQL
 
discountasp does
 
Right now my company has web.com and I don't like it
I can't upgrade to dedicated either
 
I have discountasp.net , haven't had any problems
 
Ell
7:38 PM
@Justin why?
 
@Ell I like using it over MySQL
in the free database realm
 
that aspnix.com has sql server
:)
on the cheap too
 
yea, id like to try out Sql 2012
 
vs2010 didn't like sql server 2012 much at all :/
 
so use vs2012 =)
 
7:48 PM
i haven't tried it yet, i should
have you?
 
yup
at home, and at work
 
there was some fluff going around a lil bit ago about it being able to do mobile development, have you messed around with that part of it yet?
 
no
 
i wonder if its only for windows phones
 
I thought windows announced their done making phones
 
7:50 PM
i haven't heard that
but i don't keep up on microsofts press releases either
 
I think it is because i signed up for a trail of some software , so they have my email
 
ahhh
 
So, I just popped over to meta to find out why chat is sort of relegated to some sort of back-room functionality
and apparently they dislike chat
I wonder why they even implemented it at all
 
who, SO?
 
their weird
 
7:54 PM
has anybody ever messed with magic packets before and WOL?
 
Yeah, SO.
apparently it conflicts with its QA-nature
 
hm
that explains why its so buggy
 
wake-on-LAN or world of logs?
disambiguation pls
 
wake on lan
so, if you use linq to create an anon type, and you needed to return that anon type from a method, how would you do that? What would you have the methods return type be? Is this even possible?
 
Use a lambda: () => return new { Foo: "Bar" };
 
8:09 PM
this is the qustion i'm looking at, and while it has been answered for his... situation, it made me think about any other situation
1
Q: return value in function

Mas JamieI have 2 tables: "Customer" And "Customer_Address" I have a function: public IEnumerable<Customer_Address> ReadAddressForCustomer(int CustomerID) { ProjectServiceForCustomerDataContext DB = new ProjectServiceForCustomerDataContext(); var CA = (from C in DB.Customer...

so .... what?
public xxxxx somefunction()
{
return new { Foo : "Bar" };
}
 
That returns an anonymous type.
 
what would xxxxx be?
var?
 
If you really need to do that, define a custom type.
 
@Kendall - hi :) do you know how to do this?

I have a
DateTime mydate = 5/1/2012;
and
int days = 5;

how can I get
DateTime newDate = myDate - days;
I tried with TimeSpan but couldn't quite get it
 
i'm not doing anything, just learning :) But thanks for the custom type answer
@TravisJ theres a method within datetime that does that, let me find it
 
8:13 PM
@steve - nice :D
 
mydate.AddDays(-days)
or
mydate.Subtract(TimeSpan.FromDays(days));
 
sweet, thanks guys
 
dang kendall, always out-doing me :(
 
8:27 PM
@steve dynamic, imo
 
You could but... ewww...
 
I come from the wild west of javascript... so, I'm not particularly fond of concrete types.
:P
 
welcome to server side, finally you get to see what is going on instead of just building a UI :P
 
node.js
what ui?
 
@canon Don't worry, we forgive you
 
8:35 PM
:P
 
You can live in your "Scripty" little world while we live in our code world
 
I think the code world is in the c++ room
 
Code = compiled. C# is compiled thus C# is code.
Script is non-compiled. Thus Javascript is script
aside from the fact that it has script in it's name ;D
 
We're all end users. The only code is inside the CPU, interpreting our instructions.
 
Long live the users.
 
8:38 PM
@RyanTernier: So what's CoffeeScript?
End users are all programmers. They change the internal state of the computer to do what they want it to.
 
@KendallFrey Useless
 
Please enter c (code) or s (script):
 
exit(0);
 
But it's compiled!
 
8:40 PM
not really
 
Well, neither is C#. It's just transformed into a different language.
 
coffeescript is just an abuse of eval
 
@TravisJ THANK YOU
 
I just looked at a the CoffeeScript sample. Lambdas. DO WANT. :)_
 
lambdas do rock, but only because you are used to the c# version of them :)
 
8:45 PM
I really wish I could i => i.toString() instead of function(i){return i.toString();}
 
@TravisJ Hey :) Did you see my many thoughts? :p;
@KendallFrey Is this C# or JScript?
 
both
 
@LewsTherin J(ava)Script
 
@KendallFrey Too lazy
 
E.g. both. Note JScript !== JavaScript
 
8:47 PM
Anyways, i=>i.ToString() should be possible in C#
 
It is.
 
@KendallFrey Stand corrected.
 
jscript/javascript/ecmascript explanation ejohn.org/blog/versions-of-javascript
 
They are in fact quite different.
WScript.Echo vs alert etc.
JScript > Batch > VBScript
 
Ok now, you are just showing off :)
 
8:52 PM
shush
 
@Lews -
If x1 = x2 there is no triangle, so all you are summing up is a line.
if starttime = 9:52:36 1/11/2012
and you get the TimeSpan.Milliseconds of starttime - currenttime
then you technically have the total number of elapsed milliseconds from start to current.
 
> If x1 = x2 there is no triangle, so all you are summing up is a line.
 
@TravisJ Not x1 = x2, y1 = y2.
 
You would not believe how hard it was to convince my Gr. 6 teacher that.
 
What would you prefer... Two tab or One tab GUI
Two tab: Tab 1 would be a tab where you can setup a "watch" on real-time data that will display information on a chart. Tab 2 would be a tab where you can setup a "watch" on real-time data that will display information on a gauge.
or
Would you rather have the one tab that gives you the option to select how to add the "watch" to the usercontrol, as a graph or gauge
 
8:54 PM
@kendall lol
@lews - If y1==y2 then there is also no triangle because that will make the flat top of the rectangle.
 
@TravisJ Exactly yeah. So do I just calculate it anyways?
I think it is fine the way it is.. the result of the triangle calculation should be 0
 
yup
 
The elapsed time I think is wrong however.
 
How so?
 
Well if you subtract endTime-startTime, would you logically expect the elapsed milliseconds to increase? Without sorting
 
8:59 PM
The first element is expected to be the oldest date. The list must be sorted in order to take advantage of some of the assumptions made.
 
I am talking about converting the initial list of points to milliseconds, y values. This is before sorting the list.
  DateTime start1 = list1.ElementAt(0).Date;
            DateTime start2 = list2.ElementAt(0).Date;
            var line1 = new List<Coordinate>();
            var line2 = new List<Coordinate>();
            for(int index = 0; index < list1.Count; index++)
            {
                TimeSpan xval1 = list1.ElementAt(index).Date -start1;
                TimeSpan xval2 = list2.ElementAt(index).Date - start2;

                var coord1 = new Coordinate(xval1.Milliseconds, list1.ElementAt(index).y);
  var coord1 = new Coordinate(xval1.Milliseconds, list1.ElementAt(index).y);
                line1.Add(coord1);

                var coord2 = new Coordinate(xval2.Milliseconds, list2.ElementAt(index).y);
 
@lews - //assuming dates are in order and first one is last date is right before that :)
 
@TravisJ The dates are in order. But it is the earliest date to last date.
Which means when I am converting the list without sorting.. I expect the list to be ordered
 
earliest as in latest in the day ?
it should be ordered
 
If I call a DateTime.Now, then 10 minutes later change system time to 15 minutes earlier, would my time elapsed me -5 minutes, thus making me a time traveler?
 
9:05 PM
@TravisJ The points are from 12am to 8pm on the same day for example. When I convert to milliseconds,y value. I expect the collection to be ordered without sorting. But it isn't
Because we are using milliseconds, as an example we can have 650ms for the first point, and 10 ms for the second point
 
@Lews - one sec
 
@klut For the computer maybe.
 
@Lews - I see. I was expecting that to return the total amount of milliseconds that were in the timespan but in fact it is only the fractional part. That will need to be refactored.
I believe that you are correct to use TotalMilliseconds
 
@TravisJ I did change the code I have here to use TotalMilliseconds. But the area is massive number. And with my poor math skill, I wasn't sure whether to divide the result by 1000.
 
@Lews - Here is the thing about that. I was unsure about what the area was going to represent to you or what lines you were comparing. It will return an area, albeit large because the totalmilliseconds will be very large as well. To make that area significant, you need to figure out what y represents with relation to milliseconds.
 
9:13 PM
@TravisJ Let's say y represents velocity - easiest thing I could think of. How would I go about it?
 
I can't believe I just used ??
 
A nullable type?
 
FirstOrDefault
 
A nullable operator?
@KendallFrey Uh..
What is wrong with FirstOrDefault
 
@Lews - The area under a curve represents an integration. In this case, the difference is still a representation of that integration. With y being velocity, the integration of f(x) = xt + c where x is the velocity, t is time, and c is a constant, will represent the change over that time. Thus the Sf(x) will be the acceleration (x/n)t^n+1 + ct;
 
9:18 PM
@TravisJ Um ok... realllllllly bad choice. What about something simple like sales trends?
Number of people who bought a jean or shirt.. it could be the profit made over time even
The problem here is transforming the result into something meaningful, I knew a simple divide by 1000 isn't the soln lol
 
@Lews - For y = $Sold, the area under the curve will represent the amount sold in that time frame. To get a more realistic number, you would then divide the area by the total time and you could get an average $sold in that time frame.
 
@TravisJ Basically sum up the time found in each point. Divide the area by that time
I would probably need a long for that lol... brb
 
@Lews - Nah, for the actual, defined, situation if you divided by total milliseconds it should give you the average distance between the two curves - whatever that distance represents to you
totalmilliseconds of the entire range
so from elemAt(0) to elemAt(count)
 
Anyone use SAXON for XSLT parsing?
 
9:36 PM
@LewsTherin Wrong? Nothing.
 
http://stackoverflow.com/questions/11620954/i-will-pay-5-dollars-if-someone-help-me-to-make-two-things-on-my-site
this is probably the most terrible question I have seen ever
 
@TravisJ Thanks I will show the result to my boss. And see what he thinks.
 
@Lews - :)
 
@TravisJ One more thing.. very stupid question. But I still haven't found the answer.
The intersection points are a special case, and we need to find the intersection point to be used as a data point. Why do we need to find those intersection points?
Do you understand the question?
 
Those points must be found to handle the situation where the areas are not overlapping. When the areas are not overlapping, it makes no sense to compare their areas. So, the intersection point must be found and inserted to make sure that all areas are compared are overlapping or the comparison will be off.
In order to accomplish that the intersection points are inserted to both lines. This ensures that the areas will always overlap.
 
9:49 PM
Um.. if the areas are not overlapping isn't that the normal case?
So two line charts, one directly on top of the other(overlapping), or maybe a point directly on top of the other, but not intersecting should give us the normal case.
 
Nope. The area formed up to the lower y value from y=0 inside of x1 to x2 is the base which will always overlap. However, sometimes the triangles formed at the top are not both in the same direction. Picture your right hand making a triangle with the thumb and index finger. Now do the same on the other hand. In order to compare those areas, one of the triangles must be flipped so they are aligned correctly. The intersection point insertion will guarantee that they are always aligned.
 
"The area formed up to the lower y value from y=0 inside of x1 to x2 is the base which will always overlap." I am :S^10000
 
well let me make a picture, 1s
Probably confused because that wasn't the best explanation on my part. This image should help
the graphics are sloppy and done in like 15 seconds so don't expect a picasso lol
 
@TravisJ Have you seen my drawing? :D
 
@Lews - here it is: i.imgur.com/YvMY8.png
 
9:58 PM
@TravisJ Ok compared to my drawing, mine is picasso :)
 
lol
 
Lol kidding :)
It appears as if you are taking the black and blue triangle and putting either one on top of the other.
Where they touch is that the intersection point?
 

« first day (646 days earlier)      last day (4300 days later) »