« first day (3166 days earlier)      last day (1765 days later) » 

9:00 AM
INNER JOIN - the Fancy where (msdn)
@CaptainSquirrel Frigg that shit arghghghgh
 
Meaning FooLookup, BarLookup would also require FromJson methods
So every class I create would need to have that FromJson implemented, which leads me to idea of why not just derive it and override if needed
@Squirrelintraining I treat join as fancy select in selects
 
you cant override a static method
and you cant make those methods generic
 
I want to kick you for rick rolling me
 
WHERE in (SELECT)
 
but i know i shouldn't
also what @Raimonds said
 
9:02 AM
I love Visual Studios rebase GUI
 
@Wietlol hey wiet, ever tried doing public static string ToString(this MyObject myObject, int placeholder = 0) { /* logic */ }
 
What is that @Squirrelkiller
 
evil laughter commence
 
Sp convenient
 
@CaptainSquirrel ♥
 
9:02 AM
>:(
 
@Raimonds Visual Studio is the standard IDE to work in the .NET ecosystem, by Microsoft.
 
Sorry couldn't resist not to do it kieran
 
I mean "rebase GUI"
 
@Squirrelintraining that is overloading, not overriding
 
A GUI guiding you through the rebase
 
9:04 AM
Never knew they had one
 
Including a great merge tool
 
I am leaning toward console wich each SYNC press
 
I don't understand hwo people still use sourcetree or a text editor for merging
 
@Wietlol I know, but now use (new MyObject()).ToString() which one gets called? The standard .ToString() or the .ToString(0) not very clear, you'll need to "think" about that to answer it.
 
U can have any editor for merges as far as I know
 
9:05 AM
do I?
it calls the extension method
 
YES YOU DO
 
if you imported it
 
Are you sure?
 
@Raimonds You can, but the VS merge tool is superior
 
if you didnt, it calls the inherited or overridden toString
 
9:05 AM
I like winmerge more :D
 
@Squirrelkiller i dunno, you say that but i've been stung by it a fair few times
 
Well I used to
 
Also piece of advice kids
 
That's why you always go over the merge before accepting it, Captain
 
Don't trap ALL your fingers in a door
it fucking hurts
 
9:06 AM
By all you mean on single hand
 
not including legs
 
wait what
 
and extra finger
 
FINGERS, not toes
 
9:07 AM
In my english everything is a finger :D
 
!!gif wtf
 
@CaptainSquirrel That didn't make much sense. Use the !!/help command to learn more.
 
Hi finger, my finger is finger
 
Do you think it would hurt more or less if I had 6 fingers on my hand?
 
9:08 AM
why should it hurt more or less?
 
hmm...
@Squirrelintraining it appears it uses the inherited method
 
I think that is hard to measure to give proper response
 
which means that you cannot overload methods using the same argument list by extension methods at all
 
If you managed to slam 6 fingers in a car door, you'd probably feel more pain than if you had 5 fingers
 
9:09 AM
@Wietlol Even if you include using of overload?
 
I assume you know I am not a fan of C#, but it keeps getting worse
@Raimonds even if you included it
 
@Wietlol See
 
mr5
Someday I want to get into Wiet's level of abstracting things
 
@Wietlol It makes more sense because .ToString() fits better than .ToString([randomNumber]) which is why it uses the default one, but it's not clear from the start.
 
keep dreaming :)
 
9:11 AM
You will become object
 
@Squirrelintraining randomNumber?
 
mr5
But I think some suggestion is overengineered this time
 
But isn't overload supposed to have number so no wonder it will use default
 
@Wietlol I wasn't created enough to write a number
 
I think .NET is a mess under the hood ;D
It would be more confusing if you would make int optional
 
9:12 AM
oh wait, I didnt even try with the optional argument
I tried just public static String ToString(this MyObject self)
but even that should work
in the case of the optional argument, it should be the inherited one
 
Oh i see there is default value of 0
 
because optional arguments are later on the priority of overloads than no-argument
 
That should make it confusing
 
@Wietlol aye
All is confusing
 
but an extension method should be higher up the priority of overloads than inherited methods
 
9:13 AM
I am pretty sure it should hit default one, unless explicitly told to use extension
 
which isnt in C#
 
It reminds me of css selectors
 
@Raimonds Always default
 
whatever is more specifically targeted takes presence
I think if you try to give it int? x which is only known at runtime like from some sort of random 0-1 where 0 would give you null and 1 would give you number it would show that it uses extension method
 
WHERE BE HECTOR
is ded?
 
9:18 AM
WHERE hactor.active = 1
 
who tf is hactor
Also, my fingers are definately bruised
the tips of my fingers
 
hexadecimal god of thunder
 
@Squirrelintraining @Raimonds in this case, the priority order is very clear
the calls which use two arguments go to the second function
the call with one argument goes to the first function
if you wanted to make that first call use the second function, you should specify the second argument, which can be equal to the default
(since default values in C# are really poor, you can just specify the value without problems)
 
Yeah I know that much
 
9:28 AM
using named arguments, you could also distinguish between the two
 
Def values are more like fail save feature
 
mr5
> Stakroge is a city in central Jutland with 245 inhabitants (2019)
 
Or awful way to tweak existing function to make ir do more than it should
 
mr5
A city in Denmark with 245 inhabitants?
 
9:29 AM
uh
wot
...context?
 
"new MyObject().ToString(a: 2); // calls second" wow, I did not expect that
 
mr5
I'm not sure if those inhabitants are all people
 
however, overloads on extension methods has a slightly different priority tree
 
Anyone remember Satibel?
is he ded
 
i rmemeber 007
 
9:31 AM
Hello, anyone knows how to get what number of Monday and Sunday based from the current date?
 
yeah me too
 
mr5
I remember nerdintraining and kamil solekeki
 
Jun 14 '17 at 18:58, by user7480455
I was kicked in the face by a horse
 
mr5
@AppleCiderYummy yes
 
Let's say, today is 6/17/2019
 
9:31 AM
i remember nerd in training
and breathing#
 
so it means, 17 and 23
Monday and Sunday
 
Nerd in training is @Squirrelintraining
 
how to get it on C#
 
Kamil just disappeared
Apr 28 '17 at 18:23, by user7480455
what is RTFM??
man
i miss 007
 
that geezer
he always brightened up my day
 
9:32 AM
aye
 
i had a nightmare this morning boys
 
was it that you were 007?
 
there was a ryan here as well IIRC
 
i went out on saturday night and took my car, got a taxi home
didnt go back to get it yesterday
so walked out the house this morning to drive to work
obviously it wasnt there
i had to get a taxi in
 
9:33 AM
i was raging
 
@Raimonds @Squirrelintraining
 
Nov 2 '17 at 19:18, by user7480455
If it requires that much coding we dont need it..
 
this priority order is mostly considered wrong
most language prioritize extensions over inherited methods
because the extension in almsot every case is written for that type and knows that that method is already a member method
 
words to live by there guize
 
back in 85
wow
 
9:36 AM
I anybody here doing CodeWars?
I will apply for a job. Would you recommend to write about my Codewars training?
*Is
 
I have this.
public static class DateExtensions
    {
        public static DateTime StartOfWeek(this DateTime dt, DayOfWeek startOfWeek)
        {
            var diff = (7 + (dt.DayOfWeek - startOfWeek)) % 7;
            return dt.AddDays(-1 * diff).Date;
        }
    }
but what about the end of the week?
 
@AppleCiderYummy return StartOfWeek(dt, startOfWeek).AddDays(6)?
 
...i have two methods that do literally the exact same thing
yet
one returns true
and one returns false
i just
wot
 
that's scary
there must be a difference somewhere
 
9:41 AM
sec
the only difference is how they are returned
Figure that shit out
 
@Harry scary
I would say some imigrants stole it but since this is not in germany
 
@CaptainSquirrel Put it into a copypastable format and I'll try it on my machine :D
 
public static bool TryParseDateTime(this Field dateTimeField, out DateTime dateTime)
{
	// 20190325T114912Z
	var result = DateTime.TryParseExact(dateTimeField?.Value, "yyyyMMdd'T'hhmmss'Z'", System.Globalization.CultureInfo.InvariantCulture, System.Globalization.DateTimeStyles.AssumeUniversal, out dateTime);
	return result;
}

public static bool ParseDateTime(this Field dateTimeField, out DateTime datetime)
{
	return DateTime.TryParseExact(dateTimeField?.Value, "yyyyMMdd'T'HHmmss'Z'", System.Globalization.CultureInfo.InvariantCulture, System.Globalization.DateTimeStyles.AssumeUniversal, out
 
@CaptainSquirrel LIES!
 
Just replace dateTimeField with a string that equals "20190325T114912Z"
@Squirrelintraining DID I JUST BLOW YOUR COVER
I'M SORRY
... this fire alarm test has been going on for a good 10 minutes at least
 
9:47 AM
@Wietlol why you pinigng meh
 
they have tested the alarm about 7 times
why
we can hear that it rings
 
@CaptainSquirrel What cover? cough
 
I don't know what you are referring to @Squirrelintraining cough
 
haha they just try to drive you insane
and make you riot
 
@CaptainSquirrel here, take this blue pill hand a box with EDMA written on it
 
9:49 AM
@Wietlol YAML is just a different notation for JSON. All the JSON types can be represented. Objects, arrays, numbers, strings, booleans, etc.
 
EDMA?
wot
 
@Neil it works with add6
 
@Squirrelintraining because that link was related to overload priority order
 
10:06 AM
@CaptainSquirrel Wait what's Field?
Is it like...a nullable string?
Optional<string> ?
 
@Squirrelkiller its a data type that comes from the CMS that we build ontop of
.value is a string
so just pass it as a string :D
 
@Wietlol OiC
 
10:33 AM
yeye
!!meow
 
Hi guys, Please how would you model the following relationship in entityframeworkcore using fluent api?gist.github.com/FrankDupree/382fce6bba40b87e5be95256569f10dd
 
pow
 
right in the kisser
 
@CapricaSix and @Hans1984 please guys help me!
 
10:34 AM
@FrankDupree CapricaSix is a bot
And if someone can help you, they will
 
@CaptainSquirrel oh my gosh! thanks for the heads up
 
huh
 
Don't mention it :D
 
let me have a look..
 
well i asked ages ago, and no answer
 
10:34 AM
People are busy my dude
 
this is the original question on stackoverflow stackoverflow.com/questions/56584027/…
 
unfortunatly I can't help you
I looked at it
 
I can't either :/
 
:(
please any ideas where i can get help
i also tried gitter
 
Maybe try the sql room
You may gain some insight about the foreign key issue
 
10:36 AM
ah yes, didnt think of that. gracias
 
smart Squirrel
 
You don't get to be a captain by being stupid :D
 
true that
 
Hi
I have an inputString = "0:00:00"
I want to fetch Hour
 
10:51 AM
refactoring old spaghetti code
> // todo cry
// todo cry even harder
 
but I should then get "00" instead of "0"
 
two methods are a big pain
 
I tried TimeSpan
TimeSpan.ParseExact(item.LocalEventTime, "H:m:s", null).ToString("HH:mm:ss");
but get input string in incorrect format
 
Do you want the hour as string?
 
yes
 
10:53 AM
yourString[0].ToString().PadLeft(2, "0")
Wait no
pseudoCode:
Get characters from myString up until and excluding the ':'.
PadLeft with 0 so it's 2 characters long.
 
... Why don't you just .ToString("HH");
?
 
yes simple! "_"
 
Why don't you simply append n 0s to the front, then do slice(-n) on the resulting string?
 
because I have the original in String @CaptainSquirrel
 
Why don't you just use DateTimes properly
 
10:57 AM
^
 
What type is item.LocalEventTime
 
string
 
myString.SubString(myString.Find(";")).PadLeft(2, "0");
There you go
 
@CaptainSquirrel Object
 
Convert.ToDateTime(item.LocalEventTime).ToString("HH"); ?
 
10:58 AM
@CaptainSquirrel Because we don't do that anymore in germany (HH = Heil Hitler)
 
@CaptainObvious I am getting the input in the file in that format only
 
@Squirrelintraining We aren't?!
 
@Squirrelkiller Bavaria doesn't belong to germany
 
We're in HH though
 
10:59 AM
Lies
 

« first day (3166 days earlier)      last day (1765 days later) »