« first day (3258 days earlier)      last day (1683 days later) » 
06:00 - 12:0012:00 - 22:00

12:00 PM
yo
 
When a mummy and a daddy love eachother (or alcohol/drugs/etc) very much they do some stuff and then get pregnant, and then after 9 months (pregnancy term) kids like you pop out
 
9 months != five years
your banter is awful lee
20 pregancy terms old
 
I think you need to get back to school kid
 
good one
jfc
has anyone ever suggested to you that people that aren't funny shouldn't make jokes
 
Hello guys, I have a problem about LinqToSql - SubmitChanges(),
 
12:04 PM
But if they dont make jokes - how are they ever gonna become funny?
 
this is the link to my question, could you give me a hand? stackoverflow.com/q/57956613/9851619
 
(Except, you know, falling and breaking their nose on astreet corner)
 
@Squirrelkiller by not trying to be
 
Some people don't have to try#
 
Yeah, I just do#
Well and sometimes I fail#
 
12:19 PM
look @Harry
!!squirrels
 
@Harry what do you mean, you people
 
Hey don't make fun of my bad typing ability
 
@CaptainObvious i keep asking, because you are supposed to be bringing me a sammich and you are yet to provide the sammich#
 
@Harry That's riceism
 
12:25 PM
So, where's my sammich#
I'm getting pizza today anyway, but a sammich would also be nice#
 
he already hid under the kitchen sink
give him his break
 
System.NullReferenceException: Sandwich reference not set to an instance of a sandwich
 
ILeeButlerFactory.Execute(Delivery: Food.Sammich, Location: "Kieran's office");
 
Ok so no books of UWP lol
 
@CaptainObvious that is actually a really nice error message
I wish NRE used that format
ofc, C# errors never include useful information like that tho
"index out of range"
which index? which range?
"key was not present in dictionary"
which key? which keys were present?
"reference not set to an instance of an object"
f u?
 
12:29 PM
im hungry
 
im Wietlol
 
!!WIll you get me a burger ?
 
@Hans1984 All signs point to yes
 
good
hurry up!
 
@CaptainSquirrel System.Collections.Generic.KeyNotFoundException: The given key "Kieran's office" was not present in the memory.
 
12:56 PM
@CaptainObvious >:(
 
1:33 PM
@CaptainSquirrel can you read
 
curse my inexperience with SQL case statements x-x
 
put things in temp tables and use ifs instead
 
that's what I was doing; it didn't work for what I was trying to do because I need to actually evaluate some values
outside of true/false
 
@Harry evidently no
 
Jay
I have a radiobuttonlist with 2 choices and neither are selected by default. It's a bit in the database and I'm trying to figure out how to add it to a SqlDataReader object and do validation on it, but it's not like adding a string and I'm confused
 
1:43 PM
@Jay Use entity framework core
 
A radiogroup where nothing is initially selected is just frustrating. Why not have a "nothing" option? If a choice is necessary, why not initially select one?
Also, why does git say this line is changed although seemingly nothing changed?
2 hours ago, by Squirrelkiller
<?xml version="1.0" encoding="utf-16"?>
 
Jay
using (SqlDataReader rdr = cmd.ExecuteReader())
{
	while (rdr.Read())
	{
		ExpenseLine el = new ExpenseLine();

		el.lineID = rdr["lineID"].ToString().Trim();
		el.envelopeID = rdr["envelopeID"].ToString().Trim();
		el.reimburse = rdr["reimburse"].

		collection.Add(el);
	}
}
this is where I'm at, and it's an either/or option
they have to choose one
whether it's a reimbursement or a company paid expense
but I can't just do a .ToString() after rdr["reimburse"]
idk what I'm doing
do I also need to add a reimburseID property to my class?
 
wheew I got it...I think
(sorry, not your thing)
 
Jay
@JeremyF. that's not up to me
 
Entity framework isn't always better
 
1:54 PM
@Harry Oh?
 
2:17 PM
@CaptainSquirrel Well, no, but micro ORM is better than raw SqlDataReaders
 
I've been having some AWKWARD behaviour (at least for me) in C#
basically, doing a simple LINQ/EF Query (or even using the query syntax), I've come to a situation where when I'm doing a .Select ( with a sum inside of it, going to a dynamic type, but I'm getting a strange exception that "nullable object must have a value"
the funny thing about it
is that I'm not using any nullable stuff
not in the database nor in code
I've made to test one Select that was two ints (Requested and Quantity), and another that was Quantity - Requested. On the first select, I could see just fine the values Requested and Quantity, but now on the first select, an exception occurs that the nullable object must have a value
if it accepted null, it would be understandable, but it doesn't, and shouldn't it throw an exception before the second select? I will try to make a small reproducible example later for you guys to take a look
 
3:08 PM
@MadaraUchiha it was a blog about custom errors by ben foster
 
@Harry That's not me :)
My gravatar is the one I have here.
 
Yup, I've found that
And the comment
But that's not me :)
 
thats so weird
 
Madara Uchiha isn't that uncommon a name, it's the main antagonist on Naruto.
 
3:11 PM
OH
i wouldnt know
hahaha
 
3:37 PM
I found either a question or an answer on SO from @MadaraUchiha by happenchance, it was from like 2012
 
It has happened to me before, that I've found an answer on Stack Overflow, and I'm like "No, that's wrong, whoever wrote this doesn't understand how technology X works", and I vote it down.

"You cannot vote on your own post"
 
hahaha
"wtf is this idiot doing?" ... "...oh..."
 
that's me anytime I git blame to figure out who wrote me into my current nightmare.
suddenly disgusting hacks reveal themselves to be reasonable compromises.
 
 
1 hour later…
4:49 PM
does anyone know of any good proxy providers?
 
5:02 PM
Hey all, I was implementing some code that used C# Regex.Split funcationality. I have to split based on a pipe(|). string[] array = Regex.Split("Toyotas|are|fuel|efficient", @"|"); which will work as expected by returning a array with each word as an element. However, what happens if string[] array = Regex.Split("Toyotasarefuelefficient", @"|"); delimiter is missing?
 
5:18 PM
try it?
best we can do is guess what it will do
or we try it and give you the results
in which case, it might be easier and faster if you tried it yourself
 
would be odd if it didnt just return an array with one element
 
Jay
right, I would assume it would return an array with that whole string as the one and only entry
 
wouldn't it have been faster to try it instead of asking the question
 
some ppl dont kon wabout fiddle
 
or, hell, the c# interactive window built into visual studio
or just write a little program
also, string.split does the same thing but without messing with regular expressions
 
5:24 PM
some people dont know about interactive window eitehr lol
 
hence why I'm out here tryna teach folks
> "somestring".Split('|')
string[1] { "somestring" }
 
omg
i didnt know about interactive window either lol
only immediate
 
especially since, uh, if you want to use regex.split to split on a pipe, you have to escape it. otherwise, you get this:
Regex.Split("why are you using regex.split when you don't have a regex", "|")
string[59] { "", "w", "h", "y", " ", "a", "r", "e", " ", "y", "o", "u", " ", "u", "s", "i", "n", "g", " ", "r", "e", "g", "e", "x", ".", "s", "p", "l", "i", "t", " ", "w", "h", "e", "n", " ", "y", "o", "u", " ", "d", "o", "n", "'", "t", " ", "h", "a", "v", "e", " ", "a", " ", "r", "e", "g", "e", "x", "" }
 
grace is there a correspondint interactive watch window?
 
huh?
are you asking if you can use it during debugging or whatever
 
5:30 PM
to see whats in a variable
var blah = function();
to see whats in blah
 
@Grace what I do is I write a unit test, which acts as a proof of concept or a confirmation of how a library works
 
I would simply type blah on the next line and let it show me the value of the variable
 
I like LINQPad for testing small things myself. I haven't worked the interactive window into my flow yet, seems nice to be able to send functions to it directly from code though
 
> var blah = "hat|time".Split('|');
> blah
string[2] { "hat", "time" }
 
why 25 years later C# doesn't have a proper string equals ignore case extension
 
5:34 PM
@misha What do you mean? "abc".Equals("ABC", StringComparison.OrdinalIgnoreCase)
 
right let me just write this mouthful everytime
 
having to do case insensitive string compares all the time is a code smell :^)
 
dunno about that one chief
 
You can write an extension method that does it the one time.
 
@JonathonChase that would be "abc".EqualsIgnoreCase("ABC")
 
5:36 PM
And an InvariantEqualsIgnoreCase?
 
honestly I dont think I am being too demanding just string.EqualsIgnoreCase("a","A")
well in that case you can refer to .Equals
 
yeah, i would simply write an extension method
 
public static class StringExt {
    public static bool EqualsIgnoreCase(this string left, string right) => string.Equals(left, right, StringComparison.OrdinalIgnoreCase);
}
 
ah, extensiony.
 
sure thats the basic one
 
5:38 PM
@Grace why?
 
it implies to me that you're using keys as strings in places that an enum or some such would be better
 
I am comparing meta data that I get from my db
 
thats quite an assumption lol
do a lot of case insensitive comparison in scraping
 
Well, people are asking for the feature, me not really seeing it doesn't invalidate that desire.
If it got people to stop writing "ABC".Equals(myString.ToUpper()) that would be a win.
 
 
2 hours later…
Jay
7:45 PM
I just came across this
var temp = DateTime.TryParse(txtDate.Text, out DateTime tempDate);
if (!temp)
return;
what is the if (!temp) doing?
 
whats the confusion?
 
Jay
is it saying if it's not that date?
 
tryparse returns true if the string you gave it represents a date and false if it doesn't
if textDate.Text is a string that can be parsed into a date, store it in tempDate and keep going. if it doesn't, return
 
Jay
okay any date value
 
I'd just write it as

if (!DateTime.TryParse(txtDate.Text, out DateTime tempDate))
{
return
}

//more stuff here
 
Jay
7:49 PM
so it's validation?
 
I guess you could call it that
In my head, "validation" implies that you tell the user that what they put in was wrong
but you are rejecting invalid input
 
Jay
okay, agree, but it's just making sure it's a date?
 
and, presumably, using the date later on.
 
Jay
okay, I'm with it so far
 
8:40 PM
In MVC, where would you generally put non-controller classes that multiple controllers might use. Like static function classes?
 
9:07 PM
I tend to make a folder named Infrastructure that has helper classes in it.
 
Everyone grows a Utility folder eventually.
 
Jay
9:23 PM
I'm gonna call mine StuffAndJunkAndThings
 
06:00 - 12:0012:00 - 22:00

« first day (3258 days earlier)      last day (1683 days later) »