« first day (1622 days earlier)      last day (2527 days later) » 
02:00 - 17:0017:00 - 22:00

user7442629
5:02 PM
@Maverik does a Linq function exist that will select the first entry in an array/list that matches a lambda expression? Such as this: prntscr.com/epzj6v
 
First() or FirstOrDefault()
depending on if you want it to throw or return a default value in absence of match
you may also want to consider Single / SingleOrDefault instead
Single will throw if more than one match exists -- often this is what you want
Also please try to use actual text code snippets - takes forever to load a screenshot besides having to navigate away from the screen
 
user2509848
Did Johan's project get any further?
 
user7442629
Oh First can be used like this
 
Johans?
 
user2509848
Yeah.
 
user7442629
5:07 PM
I thought that the name implied so, but I'd only seen it used to get the first element in a sequence as in sequence[0]
 
user7442629
Also what is the default value in FirstOrDefault
 
user2509848
default(type)
 
user2509848
null for reference types.
 
user2509848
0 for int, string.Empty for string.
 
user2509848
Unless you specify a default.
 
user7442629
5:09 PM
I can specify a default?
 
user2509848
You can do a call like .FirstOrDefault(defaultValue).
 
user7442629
Shows only one parameter in intellisense
 
user2509848
Yup.
 
user2509848
If you do .FirstOrDefault(), it uses the system default for the type.
 
user7442629
Isn't the first element the condition?
 
user7442629
5:10 PM
I would like the default value to be Versions.Last()
 
user2509848
Well, if you are using reference types, you can do .FirstOrDefault() ?? Versions.Last().
 
user7442629
Oh yeah thanks
 
hmm it should have an overload
.FirstOrDefault (x => x.IsMatch, new DefaultValueOfX())
seems it doesn't support..
so .FirstOrDefault(x => x.IsMatch) ?? new DefaultValue(); will have to do
(the predicate overload is optional if you want the first element that matches a certain condition)
 
user2509848
Ah, my mistake.
 
user2509848
It doesn't have an overload, but it does support this:
 
user2509848
5:16 PM
foo.DefaultIfEmpty("test").FirstOrDefault();
 
yea its odd.. i was sure it supports default in FirstOrDefault along with predicate
its probably a different method and I'd guess this to be an oversight
 
user2509848
Me too, I could have sworn I've seen it.
 
but yea.. plenty of ways around :)
may be its SingleOrDefault that supports it?
 
user2509848
Nope.
 
nope..
heh.. i dunno.. will eventually run into it :) we can't both have deja-vu at the same time!
 
user2509848
5:18 PM
I looked at all the *OrDefault, and none of them supported it.
 
unless... OMG! They cut the hard line!
 
user7442629
I need this C# 7.0 you guys speak of
 
user2509848
Huh?
 
Visual Studio 2017 ships with it Aleks
 
user7442629
This is painful: prntscr.com/epzr7c :D
 
5:19 PM
no print screens please
not openin
 
user7442629
Having to declare variables on one line, then doing the out operation
 
user2509848
It's just a screenshot of code not using out vars.
 
@LynnCrumbling nobody got my comment about hard line :(
 
user7442629
Yeah gotta get that VS 2017
 
user7442629
I don't know what a hard line is or what the reference was
 
user7442629
5:20 PM
It just implied that they removed it
 
I know it's code Hosch - but it needs to change.. i'm getting sick of having to open screenshots to see two line code every few minutes
 
user2509848
@Maverik Oh, this person has a reputation?
 
user2509848
I'm not a regular here.
 
14 mins ago, by Maverik
Also please try to use actual text code snippets - takes forever to load a screenshot besides having to navigate away from the screen
Yea i know - neither is he actually - but he's been using screenshots a lot
 
user7442629
I apologise, I just find that it looks better with Syntax highlighting
 
user7442629
5:21 PM
And also I didn't see that message
 
gist.github.com will do syntax highlight if you give the "filename" a proper extension
use that if you must - though we can perfectly read simple code lines without syntax highlight too
(just use the Fixed Font button when you paste code)
So Hosch what project of Johans were you asking about?
 
user7442629
By the way you can scroll click links to just open in a new tab
 
Did you mean the Samples thing we were talking about? - that's a community project and not specifically Johans - though Johan being Johan.. he just jumped straight into code and pushed out two repos (last i checked)
Aleks - the point is: I don't want to navigate away from this chat
 
user2509848
The MVVM one.
 
yea thats community project
you can see progress @ gitlab.com/so-wpf/samples
but so far he's the only one who pushed out two samples (no surprise there really :) )
I've been thinking about doing one - but haven't figured out what to cover..
yes!
why nobody else gets me :(
 
5:28 PM
;)
 
I is all alone and need a hug! (from somebody who understands me of course!)
 
hugs
hehe
 
feels better - wipes tears - pulls his fringe back off his forehead which immediately falls back in place
 
If you're looking for ideas - I'd love to see the content-driven-by-datacontext example.
 
yea I could do that :)
but i'd need "content" for it to cover :D
 
5:30 PM
howdy doooo
 
also who is this imposter Kevin?
wheres our netscape?
 
its the real one. netscape got netscraped
 
:(
Kevin I'm with you on the question you asked in slack
 
i made the mistake of going in the python room the other week
where there is another Kevin
 
same sentiments as you - unethical - merely having the same company employees do the review is unethical enough for me and I'll black list the author in my list
 
5:32 PM
and i got pinged 21 times, none of them meant for me -_-
Okay, thanks for input :) I reported anon
 
erm so.. still why did you lose the gravatar?
 
didn't fit the name heh
 
oh lets help you with that!
here's your options: google.co.uk/…
I think first image will do just fine
 
i agree
but its not changing... hrm
change it in my profile... and refreshing that doesn't show updated
 
Ha. Do that same search for Lynn.
 
5:39 PM
it takes time to kick in
I ran into this kevin though - mmm.. i think i like this one .. especially the last name xD stackoverflow.com/users/96690/kevin-dungs
well i replaced kevin with lynn in my "stackoverflow Lynn" image search and ran into something unexpected: stackoverflow.com/users/6296830/lynn-stahl
think I like your look Lynn :P
well.. i tried it on myself.. i like the images! google.co.uk/…;*
in a black dress like that? of course!
unless you mean the masses of Lynn in generic !gi search
I especially like this one: superstreetonline.com/girls/…
NSFW btw
sorry forgot to add the tag.. hope its not too late!
 
-_-
too late
 
sorry - but superstreetonline + girls should have given you an idea.. still the first image isn't too bad :)
 
yeah it was loading and i was thinking ... "hmmmm"
 
anyways, i'm closing Lynns search - too NSFW :)
 
haha.
 
5:46 PM
i dunno what taht is
1 message moved to Trash can
yea i just saw it
checking
 
4 messages moved to Trash can
avatar still isn't changing...
 
Your avatar is green, Kevin
 
The mathematical definition of a set doesn't contain any duplicates right? That's why a HashSet gets it's name?
 
@Maverik LOL.. I have ...um... different curves.
 
Each Hash is only contained once.
 
5:51 PM
yes William
@Kevin are you sure you changed it against the correct email address you're using with stackoverflow? gravatar seems to disagree
 
i mean, i'm signed in and all...
not sure how i can have multiple email address & gravatars
 
umm gravatar supports having different images against different email addresses from one account
the email address you registered with SO, should have an entry in gravatar against it (in theory against your gravatar account)
right now gravatar says there's nothing there so it's returning default ident icon (i've checked directly off gravatar using your email hash from SO)
 
i don't have gravatar
i meant avatar
 
well.. thats what SO is presenting - its presenting your gravatar..
 
i didn't think i did... lol
 
5:59 PM
if your local avatar in SO is meant to override gravatar - well that thing is slow as eff
 
i don't have an account on gravatar?
 
having a gravatar account is a good idea btw.. as internet widely accepts it now for presenting default avatars based off email addresses
well thats fine - gravatar will return a default unique ident icon for any email address sent to it (it only knows the hash not the actual email)
 
@WilliamMariager it's a set because sets don't have order or duplicates, and it's called hashset because it uses a hashtable in its implementation
 
okay... but i'm changing the avatar on SO... and its not actually changing?
wtf did you sign me up for Mav lol
i now have a gravatar account, and SO is using my identicon, not an avatar or gravatar
 
6:03 PM
what i didn't do anything - SO does it by default for everybody
as do a million other websites on internet
 
My face is from Gravatar
SO fetches it
 
i sent you the exact link that SO fetches
d= bit tells it to use identicon as default - r= tells it that it only wants ident icon that's PG rated by user
 
if i only had a brain :)
@LynnCrumbling is layout in Android at all similar to XAML?
or anyone else know for that matter
 
Android layouting does use a XML based language, but you'll find it's annoying to use quite soon
 
Isn't Xamarin Forms kinda like XAML?
 
6:12 PM
XF is very much xaml
android is pure xml
xml != xaml
 
XF is XAML, I've assumed the question is about pure android
 
yes
 
Yeah, was just asking, since it might be a viable alternative :)
 
how do you remove title bar without hiding notification bar... using android studio?
 
lol
painfully
you would define a theme and play with the options
<item name="windowNoTitle">true</item>
 
6:16 PM
still wonder why they default it on. i've seen 0 apps ever keep it visible.
 
i just use the defaults 😖
tried to edit a theme and failed miserably
 
you leave the title bar visible...?
 
user7442629
Guys shouldn't this sort a collection `Applications` of a custom class `Application` by the names of every instance?
`Applications.OrderBy(inputApplication => inputApplication.Name);`
 
user7442629
Backticks don't work don't know why
 
oh hey apparently Android has data binding too
 
6:19 PM
hmm odd @ backticks
 
@Aleksbgbg Yes but LINQ does not mutate the collection
 
last time I had like 5829583 calls to findViewById
 
Applications test
 
you have to use the return value
 
i copy pasted your line and works
 
user7442629
6:20 PM
Oh I see
 
user7442629
Thanks
 
@Aleksbgbg multiline messages don't allow for markdown
 
Note this is true for all linq extension methods
 
user7442629
The name implied otherwise at first sight
 
6:20 PM
"Settings" and "Wireless & networks"
 
oh good catch millenium - yes don't use multiline with backticks (that'll trigger the Fixed font button)
 
the mutating one is just on List and is called Sort
in case you see that somewhere
 
@Aleksbgbg also: ReSharper warns on this
 
user7442629
Gotta get me some ReSharper then
 
also, once you make that mistake once or twice, you tend not to again :)
 
6:21 PM
says "result of a pure method not used" or sth
 
7:03 PM
@Kevin Yep, it's a bit like it.
Not the same - but you use markup.
There are a number of predefined layout controls.
 
@milleniumbug so does the analyzer :)
 
There's even a databinding library :)
 
so you want to create your very own button, equivalent of changing template in WPF... able to be done in Android... with a lot? of teethpulling?
 
Ah, you're asking about restyling?
 
just trying to get high level understanding with how difficult android is compared to wpf
 
7:07 PM
> you can apply a style for the button, which works in a manner similar to HTML styles to define multiple style properties such as the background, font, size, and others.
 
right
but what if you want a button that has... idk, a checkbox on it. lol
 
The bigger issue is that you're not just learning the XML for views -- you're learning Java Syntax, the Java Framework/Clases, and the Android Studio IDE.
 
are you making a game, or some other type of app that has advanced graphical requirements?
 
i can deal with that latter parts lol
 
if not, just use XF
 
7:10 PM
Right - you can create a composite control (they call them views) -- or you can subclass views to make your own (aka button w/ checkbox)
What we would call a window/control, they call a View.
 
well we want to use XF, but someone is not complying
 
Oh - and what we would call a:
Solution -- they call a Project.
Project -- they call a module.
Ah, so those are Android Studio monikers.
If using VS w/ XF, you probably don't need to know that.
 
lynn, slacked you
 
7:30 PM
Kevin, your avatar updated!
 
 
2 hours later…
9:01 PM
@LynnCrumbling as per your request Context Driven Views Sample
I'm not sure if i went overboard a bit.. I may have >.< I certainly won't class this is a beginner sample
intermediate perhaps
I feel better now that there's at least 1 contribution in there from me too :)
it should be reusable sample with new content just adding on top of the structure I'd imagine
(it mimics a login screen -> authorized view screen)
in honor of Kevin embracing gravatar, I've put gravatar in this sample .. so you know it's giving you proper authorized view :)
(assuming you gave it a proper email address it can work with)
with that.. it's 10pm and I'm going to sign off - please raise Issues in the repo itself with suggestions to modify if you feel I could have done something better (i'm sure the pattern I've used in there can use improvements but that's just how i do my things right now)
 
9:24 PM
@Maverik So - I'm opening this w/ 2015 and getting errors.
I would have expected that we support at least 2015 for examples.
Thoughts?
 
i just made it with 2017 but it shouldn't be limited to 2017
whats the error? you can edit the proj file to lower its version of VS
 
get => _childDataContext;
 
IIRC there's a line in the sln file that determines the version
 
thats c#6 not vs 2017
 
that should work in VS 2015
 
9:25 PM
indeed
 
not any version previous though
 
with update 3 installed at least it should work
 
I backed it down from 4.6.2 -> 4.5.2 ...
That is the problem, then.
I think I only have Update 1.
 
O.O you don't have 4.6.2? do you have update 3?
 
.NET framework doesn't matter
 
9:26 PM
O.O
yea it can be lowered but c#6 came in update 3 i think
 
Ah - I'm at update 2.
I'll update.
 
update 3 is so ancient, there should be an update 4 by now xD
 
@Kevin You see my slack reply?
 
also afk 20 minutes
 
Yeah, I'm going to start my commute at 6 Eastern.
 
9:28 PM
this can always wait till tomorrow :)
 
:) Yeah ... I've got my own problems at work to deal with, anyway
WTF. "No Live Cards on Test Merchant ID Allowed."
Ok, chief... but I'm not using a live card. I'm using a test card.
 
02:00 - 17:0017:00 - 22:00

« first day (1622 days earlier)      last day (2527 days later) »