« first day (908 days earlier)      last day (4266 days later) » 

10:01
OMG
how come he didnt know the answer ? He wrote a book even !
inorite?
my cousin bought that book and I told him about skeet.
@RyanJM My MVC bundle problem solved after re installing MVC4
yeah thats good way to tell about him..did you read that book's foreword ?
I have the pdf. He sent it to me. Don't tell skeet.
I wont .lol i have even
hello !
10:08
hi
hello
can any of you help me ? I want to make a application..
Where I want to connect to object with each other with arrow.
Just like SQL Server 2005 Diagram. where two table get connected on the base of relation ship ?
or similar to MS VISIO
10:27
Hi. If I have function that takes IEnumerable<T>, should I copy it (e.g. with .ToEnumerable ()) before change? Or I should instead assume that caller already took care of it?
should I instead*
if its ienumerable why do you need to .ToEnumerable?
actually what do you mean by 'change'
Remove some elements from it for example
you cant remove elements from an enumerable
As far as I know, .ToEnumerable () will create shallow copy of enumerable instance
Well, ok, let's change IEnumerable to List<T>.
well you shouldnt be doing that
plus, if you modify a collection while its bein enumerated, it will throw an exception
if you expect a list, it should take a List<T> as a param, not an enumerable
or do you mean ToList() ?
I dont think theres a ToEnumerable
there's an AsEnumerable()...
10:36
Well, I have ToEnumerable
But it doesn't matter: I mean ToList(), just wanted to make question more general
ok
well if your method needs to change items, you should accept a type that provides that. Maybe ICollection or ISet
So, if I have function that takes List<T>, who should take care of copying?
ah ok i think i get it now...
to me, i find it flaky if you pass a collection to a method and its content changes
it should probably perform the filtering and return a new list
but thats up to you
IEnumerable<T> RemoveSomeElements(IEnumerable<T> stuff) { }
with an interface like that the caller should guarantee that what he passes in isn't modified since it is an IEnumerable
So, you're saying that List should be copied inside function
yeah
var listToModify = paramList.ToList(); will do it
10:40
I wish there was some 'const' for that
Well, that's what I was thinking
yeah, well thats what's good about ienumerable
because without an explicit cast to the concrete type, you cant (and shouldnt) modify it
you can also use a readonly list
Just wondering, is it possble to make a window solely using c# code and not using the visual studio designer.
@AnkurSharma: sure, but it could be painful
Anything is possible. But it's going to take you a really long time.
You're talking about starting clean there. Like CLEAN.
anythin is possible - see zombo.com for details
10:44
When designing window in Visual Studio, I feel like I am not learning C#. It feels like I am learning Visual Studio.
@drch lol my new home page
sure but if you learn how to lay out a form by hand, that information wont be useful
learn with a console application.
ok
I dont get what is so funny or interesting about zombo.com?
it's enlightening if you're as ADHD as me.
10:46
@AnkurSharma If you do WPF, you can write your own XAML -- then you learn. A bit.
@RoelvanUden Ok. Will consider that.
away with RAD -> write XAML yourself = progress :D
I prefer writing XAML instead of using the designer. The code is clean then.
I prefer copy pasting HTML
or using the winforms designer :p
I prefer Frontpage.
10:49
lol
shit did I type that out loud?
So is there like a Bootstrap for XAML ?
Am I the only one that doesn't see starred comments?
refresh. nvm.
anyone find me a good example of using iComparable with 2 dates please, I couldn't seem to find a good one
11:00
shouldn't use arrayList
11
Q: How to sort ArrayList of DateTime objects in descending order?

EugeneHow do I sort ArrayList of DateTime objects in descending order? Thank you.

I read something about that last night
You can't use a List?
I got a custom list, but I don't know how to sort it
.OrderByDescending(x=>x)
use List<T> not ArrayList
its .net 2.0 :/
List<T> has been around since then
call .Sort with an IComparer<DateTime>
11:08
with this example I am only getting .CompareTo method, there isn't no intellisense for .Sort
use a List<T> and .Sort()
its list with two dates
?
what is wrong with the accepted answer in the question you linked?
List.Sort() is in 2.0 according to MSDN
List<DateTime> dates = new List<DateTime>() {DateTime.Now, DateTime.Now.AddDays(1), DateTime.Now.AddDays(-2)};
dates.Sort(delegate(DateTime a, DateTime b) { return b.CompareTo(a); });
.net 2.0 approved!
11:16
Dear C# overlords.
I have a file with 4 integers each line.
What's the "fastest" way to store these?
(Fastest as in, I'll have to go through them with loops, as fast as possible. Multi-threadedness is a must.)
how big are the files?
Not much. Just a megabyte or so. Memory is not a problem (32gb available).
You're not really going to be able to multithread that unless the records are all the same size
if you can change the format of the file to be a fixed length you could do that
but even in a single thread with a streamreader and intparse youre probably looking at pretty fast overall
Ah, think of it as a simple file. Algorithm is the key here (and thus, speed).
So, single file, 4 integers each line.
right so 4 integers could be stored as binary data
an int is 4 bytes
but if its a string, thats different
in binary, 100 takes the same storage space and 2 billion
11:20
just int. (max 999)
but in a string, not so
do they have leading zeros?
like 001 020 999
nope
sample line: 71 419 70 12
do a File.ReadAllLines() so you can burst IO
then do a Parralell.For() to parse the strings
Alright. And what about the calculations?
I mean... how does C# handle multi-threading? Do I need a specific storage for that? (Like "ConcurrentBag" and it's fellow brethren.) Or can I just ... let's say ... split the array / cores and run through it?
(Well, maybe this wasn't the brightest idea I.)
paralell.for could do that for you
cause you get an index
so you could initialize an array for your results and use the index to modify that and know that the threads wont dirty up the other writes
11:26
Alright, thanks! Time to rev up this stuff.
btw have you ever used TFS? do you think it worth it? (I can get one for free, but does it worth the time?)
brb
what if I have 10 dates then can I still use

dates.Sort(delegate(DateTime a, DateTime b) { return b.CompareTo(a); });
@Shiki: id probably just use git or svn. TFS is overkill for most cases and can be a pain to set up. if you need all its features, then go for it.
@MuhammadRaja: you could use that with a zillion dates
alright, thanks
every single example I could find for custom list class, is adding items statically, what If I am adding items dynamically
23
Q: Are 2 dimensional Lists possible in c#?

CasperTI'd like to set up a multidimensional list. For reference, I am working on a playlist analyzer. I have a file/file-list, which my program saves in a standard list. One line from the file in each list entry. I then analyze the list with regular-expressions to find specific lines. Some of the dat...

do you have some code?
i think youre mixin up some fundamentals
11:40
yup I think I am
show your code
thanks, I figured out, basically I was confused with how to add items to a custom list
alright cool
even though I done it like hundred times before but not that frequently
Hello
I'm messing with SignalR but Clients.someMethod is unresolved?
11:46
as in you get a js error?
I get a .NET error
someMethod is unresolved
hmm. i think the ychanged the api
the thing youre calling is a dynamic object so you shouldnt really get an unresolved error
Great, so I'm following an outdated tutorial
yeah but its easy as pie once you get the api right
Hi all
need a bit help
11:48
It isn't dynamic.. that's the problem.
with linq
Oh thanks :P
I didn't know about that
11:49
I have one csv string & need to match the data with dictionary object vale & extract the repective key again forming csv
yeah they updated the api because there were 3 common use cases: all, all except caller, caller only
and groups of course
I don't understand how it works tbh
I know it uses different ways of messaging
which part
Everything :D
I'm just beginning
??
someone there to help me
11:52
I didn't understand your question
signalr is like an rpc message bus
a message gets put on there describing the method to invoke and the arguments
@LewsTherin I have a csv string like black,blue
& a dictionary collection like key=black value = noir
Ok, at first glance I understand that javascript call server side methods on things called hub (no biggy there). I don't get what invokes the Hub
@Neha ?
a hub is just an abstraction that allows you to group clients and connections
@LewsTherin i guess u first dne with @drch then 'll ask
11:55
@Neha So basically dict["black"] = "noir"
@drch Right, but what invokes a Hub method?
Oh yeah the client
@LewsTherin hm
@lews: yeah, it basically works the same way. a client puts a message on the bus and its dispatched to the appropriate hub
Ok, I guess what I'm asking is.. where does the Controller fit in?
its completely separate from the normal page request lifecycle
11:56
@drch I wish to compare the csv with xml & retrive the other csv of xml values
@drch I see.. and if I need to complex server side processing?
What if Javascript isn't enabled?
requires js
you can do complex processing
just remember youre not in a http request context
I see.. basically don't use SignalR for everything. I think it will be obvious when not to use it.
At least I hope so.
Someday, someone's going to disable javascript while visiting an NodeJS site and all hell is going to break loose.
@RyanJMcGowan Oh yeah :P. If the client uses javascript of course
Try disabling Javascript on Facebook
12:01
I will. That would be interesting. It's a single-page app.
you can basically use signalr anywhere you would use ajax if you really want
like you can still invoke a hub method from a controller action
or anywhere for that matter
Is that good practice?
sure
wait which part
disabling Javascript.
12:08
Calling a hub method from a Controller
yeah totally
Isn't that pointless?
not necessarily
maybe when you hit the /joinChat controller, it sends a message to everyone else in the room
ChatHub.UserJoined("Lews");
but then again maybe that happens from the hub itself
I assumed that would be sent from Javascript
could be... might be a bad example ;)
12:09
Lol
It's ok.. I will try to see how much I get that done
but maybe its server generated messages
maybe its an admin dashboard that updates real time
Oh I see
as opposed to somethin that facilitates 2 clients
12:11
I hope they don't change the API again :P
That's why I dislike Node
@LewsTherin Blasphemy!
Rofl :D
Node is too much work
omg signalr + angular
roel you convert to the angularjs dark side?
12:17
@LewsTherin Can you give me an example? I haven't heard this reason for disliking Node yet so I am wondering what specifically is causing it :)
@drch I watched the videos you linked, well, a bunch of them. AngularJS is, to me, really poor design. I won't use it.
the really nasty stuff is optional
you can still have semantic html
@drch Does it make sense to use SignalR with another framework like Knockout?
sure
@drch I don't like how it deals with subscribing/publishing. It feels very wrong.
you could synchronize a js model across clients
and have it mvvm with knockout
12:19
@RoelvanUden I am sure there are many reasons.. but threading is a PITA
@LewsTherin ... Node has no threading?
Have you done Node?
I do a lot of Node.
Right, was wondering whether that was a genuine question :P
@drch I was after being able to switch templates and I was missing a rather obvious solution, use the template binding KnockoutJS provides. You just need to hook in some URL routing (like Director) and it works splendidly.
12:20
@RoelvanUden I haven't done any Node, but from the examples, to make it multithreaded you need a lot of callbacks
So that it becomes a nested closure of fuck me.
@LewsTherin Ah yeah, that is true. It isn't actually quite that bad for popular frameworks such as ExpressJS and even less so if you use IcedCoffeeScript, which has an await/async-like functionality as C# has. Thanks for your reasoning :)
I will have to try one of them at some point... "IcedCoffee.." lol
It is a super-set of CoffeeScript, it's worth a look coffeescript.org
Thanks ;)
am lacking some dopamine :P
12:36
Coffeescript looks interesting. Why haven't I heard of this before? D:
Because the purists hate it :P
Although I dislike the use of -> for return statements
CoffeeScript doesn't actually have return statements. -> is a function.
It just determines the last operator and makes it return. :P
I suppose that's in a way the same thing?
how can I get list's latest date even though I applied Icomparable interface to it
a list with two dates properties
12:40
sum = (a, b) ->
	a + b
would love to but its .net 2.0
@TomF ^ In that case, a + b is the last operator of the block, thus will return
Will return (a + b) right?
Interesting
12:41
So if you use an if statement, like so:
dunno = (a, b) ->
	if a > 10
		a - b
	else
		a + b
Will make return a - b; as well as return a +b since both are last operators in a block
sorry can;t use linq
I see.
Well, Ninja Echo had a busy night :)
6 hours ago, by RyanJMcGowan
I'm starting to thing Ninja IS Kendall.
hee hee
I must have been tired
think*
@KendallFrey if I sort my custom list with a Icomparable interface, how I am going to get maximum value, .net 2.0
12:50
The more you use it, the better I can make it. Keep up the good work :D
Skeet tweeted at me last night. <3
stalker
@MuhammadRaja Get the last item?
how ? by using index ? but what if its dynamic then using list's count method
12:52
@RyanJMcGowan are you JeffCrush?
@MuhammadRaja If it's a List, you can use Count - 1
psuedonym. My middle name.
follows you
I should probably start a new twitter account. JeffCrush was more of a outlet during my bad streak. haha
It’s Homeopathy Awareness Week! Ever wonder how it works? http://www.howdoeshomeopathywork.com/
lawl
@drch Around?
12:56
@KendallFrey Name me a book for getting basic concepts of c# programming, like fundamentals please
Anything by O'Reilly is generally good, no?
Like Bill?
Publishing
I read Beginning Visual C# 2008 by Wrox. Get an up-to-date version of that.
Yesterday, my wife mentioned Kendall Frey while I was in the shower. As if being shown up at C# programming wasn't enough.
12:59
She was stalking my computer, reading the chat.
lol
I'm famous!
I think she mixed up starred comments with conversation.

« first day (908 days earlier)      last day (4266 days later) »