« first day (3421 days earlier)      last day (1519 days later) » 
03:00 - 12:0012:00 - 00:00

mr5
3:44 AM
@CaptainObvious is this a server?
@V.7 lol I don't use NoScript. I'm just ridiculing the icon xD
 
4:11 AM
maomaomao
miaomiaomiao
meowmeowmeow
nyannyannyan
 
4:45 AM
@DKDhilip your opinion on mahathir's non-partisan coalition federal government?
Fixing racial politics? Starting point of Communism?
 
@nyconing No good at all, what do you think?
I bet they will sabotage each other
Malaysia won't allow Communism
 
Once our federal constitution arent racial-friendly, once our racist WILL NOT go away.
Due to federal constitution, some of position of government only reserved for malay race
 
No matter how hard we try, there's always racism
 
So non-partisan coalition will not fix racist, like singapore was success to eliminate racist is they dont have those ridiculous constitution
As you said. malaysian will not accept communism.
non-partisan coalition government will not work.
 
Communist ideology is totally banned here
Unity government doesn't mean Communism
But it will be authoritarian
 
4:54 AM
non-partisan coalition are the starting point of communism
every communism country in the world has began with similar as non-partisan coalition
yes, it just a starting point, not means it was communism
 
We're still doing free market economy
Every communist countries in history started with revolution
 
back to topic, I dont think mahathir will let PKR on governor
but if PKR was successful be a central government, PKR is our last hope
 
Because he doesn't want Anwar to become next PM
PKR maybe our last hope, but what will happen next?
What if Anwar really become next PM?
I guess a lot of bad things will happen next
 
PKR be government? that might cause massive jealous in opposition.
especially UMNO
 
I think they will try everything to sabotage
UMNO + PAS is a cancer already
But still a lot of Malays support them
 
5:06 AM
yes, malay race has support PKR more than UMNO nowaday, that was really a surprise
 
Older generation and rural Malay community still supporting UMNO
It's majority of them
 
Do you know DAP are now take the most parliamentary seats
DAP are now the biggest party in malaysia, because of PKR has divided
 
Pakatan currently has 92 seats in Parliament — DAP has 42, while PKR holds 39 and Amanah with 11.
 
yeah, forget coliation, DAP get the most seats
 
When you look at Malay sentiments on social media, you'll see they don't like DAP
Because of race, they also called DAP komunis
 
5:20 AM
that was expected
 
mr5
I wish our people (including me) are more educated about this political jargons and its system.
 
because the statement of 'malaysia = tanah melayu' is real in our framework
It was 'Monarchies of Malaysia'
As, our Royal Highness. The Kings
We shall respect them
And they are Malay in race
 
That's why they banned communist ideology, because it is totally incompatible with their ideology
 
5:30 AM
Ah, now the decision of new government is up to our 'Yang di-Pertuan' in states
Tomorrow again
lol, back to work
 
Tomorrow, tomorrow, and tomorrow again...
 
yeah lets hope transfer of power still peace and successful as 2018
 
Yeah...
 
no matter who is on position, they have withstand the stronger democratic pressure than ever, I think they will be better than ever
 
5:46 AM
I'm not so optimistic about that, because of what they did in the past
 
mahathir back to PRIBUMI again
 
This old fox
 
6:09 AM
PRIBUMI isnt inside Pakatan coalition btw, lets see PRIBUMI will back to Pakatan or not
And then all the thing back to the beginning
Our government was shows us a really good drama then
 
And then keep repeating the same drama
 
7:04 AM
posted on February 21, 2020 by Scott Hanselman

I've written about WSL2 and it's glorious wonders many times. As its release (presumably) grows closer - as of this writing it's on Windows Insiders Slow and Fast - I wanted to update a few posts. I've blogged about a few cool thing around WSL and Docker Docker Desktop for WSL 2 integrates Windows 10 and Linux even closer Remote Debugging a .NET Core Linux app in WSL2 from Visual Studio on

 
GoOoOoOoOoOoOoOoOoOoOoOd Mornin' squirrelerinos!
 
mr5
Is Task#IsCompleted thread safe?
 
is there a way to generate C# code from a list such as :
List<Student> studentList = someFromDb()//returns a list of 5 students fro db;
GiveMeCode(studentList);// ---> should give me:
IList<Student> studentList = new List<Student>() {
                    new Student() { StudentID = 1, StudentName = "John"} ,
                    new Student() { StudentID = 2, StudentName = "Steve"} ,
                    new Student() { StudentID = 3, StudentName = "Bill"} ,
                    new Student() { StudentID = 3, StudentName = "Bill"} ,
 
@SamuraiJack I don't understand the question. What's the difference between the studentList you get from the DB and the studentList you create in the third line?
 
7:19 AM
GiveMeCode() here is a method that will give you the text output
as in .. you can copy the text and paste it in Visual Studio to create in memory data
 
Ah, I see.
 
I wonder if someone has posted something like that somewhere ?
 
There are libraries for code generation, yes, but not ones you can simply plug in an object and get the initialization syntax for it.
Depending on how flexible you need it, it might be very simple.
 
@nyconing the stored procedure that you have mentioned only gives you schema and not the data
@AvnerShahar-Kashtan flexible enough to work with any list<T> where T has simple properties like int,string and date
 
7:27 AM
data ? data on your database isnt?
 
@nyconing

public class reftest
{
    public int? n { get; set; }

    public int? Id { get; set; }

    public string FileName { get; set; }

    public string FileUri { get; set; }

    public string DocumentNumber { get; set; }

    public short? FileStatus { get; set; }

    public DateTime? CreatedOn { get; set; }

    public string GrId { get; set; }

    public string GrNumber { get; set; }

}
@nyconing that is the output that i got from that stored procedure.. as you can see it does not have code that will initialize the List with data in my db table
 
Im confused
youre succeed to generate the class
 
@nyconing I want that procedure to return something like this:
IList<Student> studentList = new List<Student>() {
                    new Student() { StudentID = 1, StudentName = "John"} ,
                    new Student() { StudentID = 2, StudentName = "Steve"} ,
                    new Student() { StudentID = 3, StudentName = "Bill"} ,
                    new Student() { StudentID = 3, StudentName = "Bill"} ,
                    new Student() { StudentID = 4, StudentName = "Ram" } ,
                    new Student() { StudentID = 5, StudentName = "Ron" }
 
morning
 
oh, wait a minutes
do you have cmd.ExecuteRead() somewhere in your code?
SqlCommand.ExecuteReader()
public TA[] QuerySchemaClass<TA>(string query, Func<TA> classCreator, SqlParameter[] parameters) where TA : class {
    if (!IsConnected) throw new Exception("Database is not connected.");
    var cmd = new SqlCommand(query, Connection);
    if (parameters != null && parameters.Length > 0) {
        foreach (var parameter in parameters) {
            cmd.Parameters.Add(parameter);
        }
    }
    var cs = cmd.ExecuteReader();
    var dt = new List<TA>();
    if (cs.HasRows) {
        while (cs.Read()) {
put this method in that place
utilize it var arrayOfItems = dbc.QuerySchemaClass<reftest>("select top 10 * from reftest", () => new reftest(), null)
now arrayOfItems have 10 reftest classes, with data
 
7:41 AM
let me try
 
did this answer your question? as I understanding
 
@SamuraiJack It's a good exercise for reflection, and then either simple string manipulation, or actual code generation.
 
hey I have made a mistake, put var classProps = typeof(TA).GetProperties().ToDictionary(x => x.Name); outside of the loop
 
Ugh, I'm stuck for a good name for a method.
How would you call a method that takes a status, then changes it to a different status based on context. Let's say, your have a connection that reports its status as ConnectionStatus.AwaitingResponse, but you know that for connections of type X in situations Y, this should actually be considered ConnectionStatus.Connected. How would I call the method that gets teh current status and context and returns the "real" status?
CoerceConnectionStatus? FixConnectionStatus?
 
switch (connectionStatus) {case ConnectionStatus.AwaitingResponse: return ServiceStatus.Connected; }
maybe
 
7:52 AM
Not the code. The name.
 
ServiceStatus
 
For the method that changes the status.
A name like "ChangeConnectionStatus" doesn't tell future readers what's happening there.
 
ParseServiceStatus()
 
"FixConnectionStatus" is equally unhelpful.
No parsing going on there.
 
there is
 
7:54 AM
Not really. I don't need to take teh connection status and understand its meaning and then create a more specifically typed representation, like int.Parse. I don't need to convert an int or string to the enum.
 
you manupulating the connections, and returns more simply status, for me, this is a parse
 
I have a business logic rule that says "If state == X and system.state == Y THEN state = Z".
Parsing doesn't change the parsed value, it just understands it, properly, in its domain.
 
Then ResolvingServiceStatus()
or AnalyzeServiceStatus()
 
Not really, because I'm not just analyzing - I'm also changing, or at least suggesting a more correct status. And I'm not only analyzing the service status, but various other metadata.
 
if it was private, just name it with qweqweqwe()
 
7:58 AM
@nyconing "private" means I need to read it, my teammates need to read it, future maintainers need to read it.
 
nah, just use ResolvingServiceStatus() I think, dont cost time on naming
And then returns new enum ServiceStatus it was quite helpful
 
As someone currently reading through a large and unfamiliar code base, I can say that naming is very important.
 
@nyconing doesnt seem to be working..
 
error?
 
{System.Collections.Generic.KeyNotFoundException: The given key 'DocumentNumber' was not present in the dictionary.
            var arrayOfItems = QuerySchemaClass<PackingSlipDetail>("SELECT  Fu.FileName, Fu.FileUri, Fu.DocumentNumber, Fu.FileStatus, Fu.CreatedOn, Gr.GrId, Gr.GrNumber FROM FileUpload Fu LEFT JOIN GoodsReceipt Gr ON Fu.Id = Gr.SlipId", () => new PackingSlipDetail(), null);
 
8:03 AM
your class given isnt correct
 
@AvnerShahar-Kashtan DomainSpecificStatusFrom(statusObj, contextObj)
 
make sure your class is generated correctly
you joined the table
the class-based schema wont work on that
did you want to skip the key, if KeyNotFound?
then replace the loop:
do {
    c++;
    var key = cs.GetName(c);
    var value = cs.GetValue(c);
    if (classProps.ContainsKey(key))
        classProps[cs.GetName(c)].SetValue(row, value == DBNull.Value ? null : value);
} while (c + 1 != cs.FieldCount);
with this your class can be flexible, just declare properties you want
mistake made again, update:
do {
    c++;
    var key = cs.GetName(c);
    var value = cs.GetValue(c);
    if (classProps.ContainsKey(key))
        classProps[key].SetValue(row, value == DBNull.Value ? null : value);
} while (c + 1 != cs.FieldCount);
 
@nyconing I thinky ou did not get my requirement
although there are no errors now.. i fixed the class. generated the class with tthe stored procedure
but I am still not getting data ... I mean i am getting data but i am getting it in memory not as code
 
SELECT Fu.FileName, Fu.FileUri, Fu.DocumentNumber, Fu.FileStatus, Fu.CreatedOn, Gr.GrId, Gr.GrNumber FROM FileUpload Fu LEFT JOIN GoodsReceipt Gr ON Fu.Id = Gr.SlipId
You declared all properties in class?
 
when I say I need :
IList<Student> studentList = new List<Student>() {
                    new Student() { StudentID = 1, StudentName = "John"} ,
                    new Student() { StudentID = 2, StudentName = "Steve"} ,
                    new Student() { StudentID = 3, StudentName = "Bill"} ,
                    new Student() { StudentID = 3, StudentName = "Bill"} ,
                    new Student() { StudentID = 4, StudentName = "Ram" } ,
                    new Student() { StudentID = 5, StudentName = "Ron" }
i mean i need this in text.. something that I can copy and paste next time and wont have to hit db again
 
8:11 AM
ok... you now get the data in memory right?
 
Yes. I dont want it in memory
I want text. So i can paste it somewhere for later.
 
serialize it meet your requirement?
 
Newtonsoft?
bloody hell why did i not think of that earlier
 
yeah, or XMLSerialize, or System.Tetx.Json
🦄yeah you can serialize it and deserialize when you want it, but if you really want it in form of c# code.... it maybe more harder way...
 
I think serialization should suffice
thanks mate
 
8:19 AM
\o
 
8:45 AM
yo yo yo
I'm back and I'm hotter then ever
Don't touch this cup, I'm freshly brewed.
 
the virus can't kill me, I'm just a cup of java.
 
Morning children
 
Does that mean you're spending your time talking to "children" in a chatroom?
FBI open up
 
Well there is @Harry
You should change your picture to a mug or something
 
8:52 AM
I like that idea
 
@CupOfJava You're baisically a virus already.
 
brb, I'm going mug shopping
 
@CupOfJava google.com/…
The code is a bit silly because it inclines that you first do work and then check if it's already finished at all
 
I took a photo off the internet. I hope I don't have to deal with copyright
it's going to take it awhile to update
 
Damn now them crawlers will find you!
Probebly cuz it has to do with java?
 
9:05 AM
Has anyone had trouble with Node.js before?
it's installed but it's telling me it needs to be installed
I think I'm going to turn it on and off then see if it fixes it.
 
Dude this PM doesn't get it, I keep getting invited to meetings that I have no idea what they are talking about
these people don't even know basic RDBMS notation
instead of having a table called Element with one field Id, they created a table called Elements with a field called Element
 
classic
 
I seriously have no idea what they are speaking about, but they are arguing why can't we get rid of all the views and use the tables from the get go
OMFG
 
@CupOfJava I have never had the lack of trouble with Node.js
 
mr5
When you say "a couple of questions", is it the same as saying, "two questions"?
 
9:13 AM
the field has stuff like 0.1.3.7 in a field, which means the element 0 has a FK to elements 1, 3, and 7
I am appalled
 
@Wietlol I think it's because I'm using the angular pre-made template
 
no wait
the element number IS THE FUCKING ROW NUMBER
 
@mr5 ye, but it is worthy to note that the two questions might be in an intimate relationship
 
REEEEEEEEEEEEE
data in row 1 references the element 1
who put these idiots in here
brings back the memories from previous companies
 
mr5
@Wietlol what? really?
 
9:15 AM
Morning
 
someone is explaining they can't add a FK if there is no PK in a table
 
mr5
I thought it is the same as saying "I have multiple questions"
PK = Poreign Key
 
So the gf ended up in the hospital yesterday, managed to get laundry detergent in both eyes
 
now the other guy is saying, and I quote: If this field can repeat... then make the PK the combination of the PK and the FK.
 
She's got skills...
 
9:16 AM
dbadmin's nightmare : 5,236,125,567 rows effected
 
@DAustin you're meant to eat the tide pods, not put them in your eyes
 
@CaptainObvious im 20 >:(
 
mr5
@HéctorÁlvarez why are your PM intervening with how you code?
 
Lol, she's still not in the joking mood but yeah I intend to have a good laugh in a few days when she's a bit better
Got the day off at least
 
9:18 AM
@nyconing I don't even have that many rows in any of my tables
 
@CaptainObvious same, think my largest is 3mil
 
The most I have is 31m rows
 
You're 10 times the DBA I am then lol
 
Impressive
 
9:20 AM
@mr5 Nooo, no. I didn't do any of this shit. I am only watching and listening, but these guys designed a database and don't even know what a PK is
 
Is it the log table :P
@HéctorÁlvarez yeah a bunch of the dB here had IDs stored as decimals.... The fuck?
 
mr5
@HéctorÁlvarez why do they even care how the db is structured? It's not their job?
 
or maybe serialized constraint lock
 
@DAustin not even close. More memory expense compared to not even knowing how to get started.
@mr5 They built it, and they have no idea what is happening
 
@DAustin No actually
 
9:22 AM
they designed, built, and maintain it. But it's shit
 
there are 4 tables in the database and it's already trash
 
The 2nd and 3rd tables in that list are log tables
 
Well thankfully swapping them out for ints was simple enough, was just worried it was gonna break some of the legacy apps they've built, so far so good lol
 
As well as the 6th one in the first screenshot
 
9:24 AM
the second table must have some seriously large records
>1kb per record on average
 
Ah fair enough, I made an update log table for a manual replication script. It's nearly at 100k rows in a month lol
 
mr5
@HéctorÁlvarez PM is doing code in your workplace?
 
TBF half of those was an update an automated process ran the did nothing really, so dropped that and it halted the speed it was filling
 
Should we be more worried of denial of service attacks being easier with Blazor? Or am I misunderstanding how it works....
 
What's the app captain? Mines just a CRM
I've only just started reading blazor, thought it was just another js library but no, seems far more interesting
 
9:27 AM
@mr5 no, it's a different person
PM only invited me to the meeting
 
So how does a dos attack work on blazor?
 
simply jam their service with powerful networking
 
So the same as any other? Thought cupofjava had an article or something about it
 
Good morning yall
 
mr5
@HéctorÁlvarez why didn't you interrupt them and tell them that it's not their job?
 
mr5
you be the boss this time ;)
 
@mr5 Because I literally have no power here, not my duty
 
Mornin
 
Imagine you invite someone who has just been assigned to your team, doesn't even know what the project is about, and this person starts bossing you around
over 1 hour lost today, now I have to redo the monthly assigments
yay, more timesheets, what a waste of time
 
better than index 0.0
 
9:40 AM
@HéctorÁlvarez tell management and get them fire
d
 
What, why would I do that
 
@HéctorÁlvarez think about it... the next thing you know you get performance issues... he becomes your team lead and he gets you fired
I mean you don't need to get him/her fired just need to let management know anyways
 
9:55 AM
\o
o/
 
@Hans1984 hahaha
 
:D
 
need regex for find string between two string and first string should be last occurrence before second string
e.g "hi how are you hi are you doing"
need string "are you", regex should match between hi and doing
hi (.*)doing - this gives whole string
 
10:05 AM
@Speedy But you can see how the rule "everything between hi and doing" would return the entire string, right?
Check how to do multiple matches with your regex - it's possible that you'll get both as matches.
 
@littlemisscomputerscientist I think we are on different levels here
I would like to reiterate that this is not a shit company, so I trust this person simply isn't proficient at this in particular
it's not like they are some kind of jerks who will dick-bite me from under the desk
besides, firing someone for one mistake is not the way
 
@HéctorÁlvarez look like I misunderstood the situation
 
@littlemisscomputerscientist @HéctorÁlvarez Sheesh, imagine working with littlemisscomputerscientist ? He/She would be smiling to your face and at the same time trying to ruin your career/life. Ironically someone like that is the one that management should get rid of as they poison the team culture.
 
squirrels !
report
 
Guys need a little help with reflection and Generics
     public static T MapToSingle<T>(this RefCountingDataReader dr) where T : new()
                { }

 public async Task<object> DisposableOperation<T>(SqlCommand cmd, Action del, object obj)
        {
            object result=null;
            using (SqlConnection sqlConnection = (SqlConnection)sqlHelper.CreateConnection())
            {
                sqlConnection.Open();
                cmd.Connection = sqlConnection;
                using (cmd)
                {
                    using (var dr = (RefCountingDataReader)(await sqlHelper.ExecuteReaderAsync(cmd)))
I am getting this error : T must be non generic type with public parameterless constructor...
How to I pass the type here?
 
@littlemisscomputerscientist I mean, I've had teams where people keep trying to sabotage each other, and I've had to work with people who are rather unpleasant, and I swear I won't go back to one of those places
You should try to be open minded
Instead of saying "This person should be fired", you should try to say "why is this person not as good as I had expected?" or "Perhaps I am wrong, or missing some details".
It will help you understand your job, every day you will get better. Not only because you learn to understand people, but also because you understand why a product has been done in a particular way, or where's the problem you need to fix.
No need to flog the poor dev who made a trash spaghetti code when the problem was the boss saying "We need you to port this VB API to .NET Core before the day is over, even if you have never programmed in C#"
maybe this guy has never worked with DBs, I can help with that
 
10:40 AM
@SamuraiJack The error is cause by where T : new() on generic type, and your class declared have no new() signature matched constructor
adding parameterless (new()) constructor in your class
 
10:59 AM
its an abstract class where I have DisposableOperation() .. i dont think i can add a constructor here
 
mr5
happy long weekend everyone!!!
 
Why long weekend?
 
oh got it
 
add where T : new() back to your method
 
I changed it to :
public async Task<object> DisposableOperation<T>(SqlCommand cmd, Action del, object obj) where T : new()
{
yeah .. thanks
 
11:02 AM
oh you got it
 
hey anyone can answer this stackoverflow.com/questions/60414809/….
 
No, nobody can
 
I have been stuck for 1 day
 
Nobody can answer because it was closed, read your question's status properly
> It is not currently accepting answers.
 
@mr5 :o
I wish
 
11:11 AM
Can you only use a query as the source of an IEnumerable or can you use a collection/object initializer (e.g. {arg1, arg2, arg3, arg4, arg5, ... argN} too?
 
!~>Enumerable.Repeat("Ironman",8).ToArray()
!=>["Ironman","Ironman","Ironman","Ironman","Ironman","Ironman","Ironman","Ironman"]
 
Rob
@MyWrathAcademia Not really sure what your question is. Can you give an example of what you're trying to do?
 
@nyconing thanks but I mean in a more underdstandable syntax like IEnumerable<Task<in>> tasks = {GiveMeAnInteger(1), GiveMeAnInteger(2)};
 
Rob
You can use an array
 
@nyconing shibas can
!~shiba
 
Rob
IEnumerable<int> numbers = new[] { 1, 2, 3 }
 
lol
 
@Rob I can define the source of an IEnumerable using IEnumerable<Task<int>> tasksList = from t in tasks select GiveMeAnInteger(1); then tasksList.ToList() to use information from that source. Can I define the same source using a collection/array literal?
@nyconing I forgot what dog is in Japanese
 
@Shrirang what is the question?
 
Rob
@MyWrathAcademia You can do IEnumerable<Task<int>> tasks = new[] { GiveMyAnInteger(1), GiveMeAnInteger(2) }
 
11:20 AM
ping, ping, ping
 
pong, pong, pong
 
I feel bad for Rob
who... actually might have chat muted...
 
Rob
At work I do, but not on purpose... I just don't have any speakers or headphones attached to the computer :)
 
@Rob great thats exactly what I wanted, thanks. So then tasks.toArray() uses new[] { GiveMyAnInteger(1), GiveMeAnInteger(2) }, right?
 
Rob
Er, not exactly
 
11:23 AM
@Rob why is your name blue?
@Rob come again please?
 
Rob
I'm a smurf in disguise
ToArray takes any IEnumerable<> and turns it into an array. But...
If you're doing that... you can skip the IEnumerable<> part entirely and just write var taskList = new[] { GiveMeAnInteger(1), GiveMeAnInteger(2) } and taskList is already an array of Task<int>. No need to call .ToArray()
 
@MyWrathAcademia did you already learn interfaces?
(I might confuse you with someone else)
 
!~>new[]{1,2,3,4,5,6}.ToArray().ToArray().ToArray().ToArray().ToArray()
!=>[1,2,3,4,5,6]
 
!~> Console.WriteLine(42);
Console.WriteLine(42);
 
!=>"{void}"
 
11:27 AM
thank you very much
 
@Rob I understand, thanks but why then do you need IEnumerable when the information in the source you define is a query?
 
Rob
Because IEnumerable is lazily executed
Sorry, I should clarify, it can be lazily executed
 
@Wietlol I will learn interfaces in the coming week?
 
is that a question?
 
learn now. not next week
 
11:31 AM
I feel like you are learning the language in a very weird order
 
@Wietlol I will learn interfaces in the coming week?
Isn't IEnumerable lazily loaded for both IEnumerable<Task<int>> tasksList = from t in tasks select GiveMeAnInteger(1); and IEnumerable<Task<int>> tasks = new[] { GiveMyAnInteger(1), GiveMeAnInteger(2)}?
@Wietlol Why do you say that?
 
like... order mean weird I very
 
@Wietlol do you mean I am learning topics without first having all prerequisites for that topic?
 
yep
 
Rob
@MyWrathAcademia It's lazily executed in the first, not the second. The second creates an array immediately, and then casts it to IEnumerable<int>. Put some debug statements in GiveMeAnInteger. Run the code and see what happens. Then add a foreach (var task in tasksList) and see what happens
 
11:36 AM
@Wietlol Oh, that's because when I'm reading code examples sometimes (a lot) they use language structures/topics I have not yet covered or heard of and instead of reading the rest of the code without understanding those advanced programming structures/topics I try to understand advanced stuff before progressing. :)
 
I noticed
 
@Rob Great insight. C# does implicit conversion for the second statement. How covenient. Does lazily loaded and lazily executed mean the same (i.e. in this context loaded == executed)?
 
Rob
In this case it'd be executed
Lazily loaded would mean you've loaded a resource only at the point you need it, not before
Not to do with IEnumerable<>, really
 
just got my new guarana powder
this seems to have even more caffeine
 
Hello all
 
11:43 AM
ohai
 
@Hans1984 aperture ∞
 
Finally got PM to explain the project, now he's drifting away from everything... damn this dude has zero concentration
 
@nyconing huh ?
 
@Wietlol I could learn C# a lot faster if I just read the documentation in chronological order without delving further/deep into advanced topics.
Besides, in response to being asked how he gained a deep and vast knowledge in Physics/ Science Newton once said he stood on the Shoulders of giants. I can learn C# this way because I am also standing on the shoulders of giants.
 
11:45 AM
"here's what you need to know about cloud deployments". 20 minutes later, he's explaining to me about problems he had at home while drilling the heater exhaust.
 
@MyWrathAcademia still, I recommend you to learn interfaces before delving into linq
 
@nyconing oh I see
 
"I'll be dropping mad apples on your head from the shoulders of giants" - Stephen Hawking, 2011, Epic Rap Battles of history.
 
Hey guys, I was wondering if anyone here had any experience using the Xero api with ASP.net? I've been trying to figure out how to use the API for days now... And I've only just managed to connect to it
 
@Rob So this lazy loading is not applicable (i.e. intended for) to IEnumerable<>?
 
11:48 AM
not necessarily
 
Rob
@MyWrathAcademia No, it's the difference between loading a resource and executing something, with or without the lazy
 
@Rob thanks. I now understand that lazily executed means that the source of information is executed only when you need it, where as lazily loaded means that you load the source of information when you need it, not before which is not what IEnumerable<> does as shown by IEnumerable<Task<int>> taskList = from t in tasks select GiveMeAnInteger(1); taskList.ToList()
 
@Shrirang yes, I read that, but what is your question?
 
Rob
@MyWrathAcademia The ToList() is throwing you off. Take for example: var numbers = new [] { 1, 2, 3, 4, }.Select(n => n + 1). That n+1 function will not execute until you ask for items from numbers
And, if you write numbers.Take(2), n + 1 will only execute on the first two items, not the entire set
Once you iterate it, that is
To be clearer... var numbers = new [] { 1, 2, 3, 4, }.Select(n => n + 1), apart from the array construction, doesn't actually do anything, it just expresses how you want the enumerable to execute when you execute it. Only when you foreach, ToList, ToArray, or any other function which starts taking items will it begin to execute
And if you were to write var a = numbers.ToList(); var b = numbers.ToList(), that n + 1 function will execute twice for each number
 
03:00 - 12:0012:00 - 00:00

« first day (3421 days earlier)      last day (1519 days later) »