« first day (2048 days earlier)      last day (2899 days later) » 

9:00 AM
==
 
.Items.Any(x=>x.Name == naam)
 
@MaartenWachters it`s not F# :p
 
what is F#?
 
Programming language
 
@RoelvanUden .any doesn't work, c# says Itemcollection does not contain a definition for it
 
9:02 AM
@MaartenWachters using System.Linq
 
in F# a comparison operator use "=" instead of "==".
 
@MaartenWachters Is this WinForm or WPF?
 
@FoggyFinder to program for windows or other platforms?
 
@MaartenWachters what?
 
9:02 AM
What what?
 
@AndréMarques This language family .NET . You can use it instead of C#.
 
what you said
 
click the <- thingy
on the message
 
with WPF, too
 
9:03 AM
ELI5 means Explain like I'm 5
 
oh I see
"GroupBy method;

Groups the elements of a sequence according to a specified key selector function and projects the elements for each group by using a specified function."
"Any method, it returns boolean;

Determines whether any element of a sequence exists or satisfies a condition."
 
lol you had to explain the ELI5
 
oh like he's 5
damn it
ok
wait
 
whos a good boy
 
I will explain it, just gimme a minute
 
9:05 AM
@RoelvanUden Using the using system.linq; , it still doesn't seem to get recognized in the itemcollection, and neither does
30
Q: C# Determine Duplicate in List

kakridgeRequirement: In an unsorted List, determine if a duplicate exists. The typical way I would do this is an n-squared nested loop. I'm wondering how others solve this. Is there an elegant, high performance method in Linq? Something generic that takes a lambda or a comparer would be nice.

 
@FoggyFinder hmm ok
 
@MaartenWachters What type is this ItemCollection?
 
List absolutely has .Any o_o
Wait. List<T> right?
 
@MaartenWachters This is because Items is of type ItemCollection, which annoyingly implements IEnumerable but not IEnumerable<T>. You can call Items.Cast<object>().Any().
 
9:09 AM
I think I'm confused with the syntax then
 
if(lbTrainer1.Items.Any)
                    lbTrainer1.Items.Add(Pokeman.Last().Name);
 
yeah see in sample you posted
 
I have a quick query regarding arrays.
 
var list = new List<string>()
 
9:10 AM
@MaartenWachters !lbTrainer1.Items.OfType<Pokeman>().Any(x => x.Name == name)
Also, is Pokeman some funky rip-off from Pokemon?
 
Is there a way to ignore an exception or break in code when looiping through an array and simply move onto the next item?
 
Catch it.
 
No it is just so I can easily distuingish between list name and list<name>
 
I do catch it. But the program stops at that point. It doesn't move to the next item
 
9:13 AM
Thx @Mr.Toxy
 
oh forgot to mention that .GroupBy orders by a specific key
 
Bookmarked it for future reference
 
I will updated it
 
@MitchelStuartFountaine Catch it inside the loop.
 
°_°
Agh! Watch out! https://t.co/6avIUyQH2x
 
9:15 AM
:30753015 foreach (var item in array)
{
     try
     {
          DoSomethingWithItem(item);
     }
     catch (Exception ex)
     {
        // handle exception
     }
}
 
Thanks for the response. Trying that now
 
@MaartenWachters sketchboard.me/TzWmOhxXisVB updated
 
You're awesome, thanks @AvnerShahar-Kashtan
 
@RoelvanUden Thanks, the syntax works now. Still got a weird bug but I'll try to figure it out first
 
hope the skecth helped to understand? :s maybe?
 
9:21 AM
Yes it helped understand your bit haha
 
yey :D glad I could help
^^
damn I know its important to be as detailed as possible when explaining how a function works but damn it why writing so much? :s
 
Still need help:
Can I set a TextBox (asp.net mvc) to check that the entered value is not empty?
 
@FoggyFinder it has c# behind so yes
 
I tried that:
    @{
        var rules = new Dictionary<string,object>();
        rules.Add("data-val-required", "field is required");
        rules.Add("data-val", true);
        foreach (var x in Enumerable.Range(0, Model.Count))
    {
       <tr>
       <td>@(x + 1)</td>
       <td>@Html.TextBoxFor(z => z.Some[x],rules)</td>
       </tr>
    }
But it's not working.
 
why dont you create an asp control instead of html?
 
9:26 AM
@FoggyFinder if (!textbox1.length =0)
 
asp.TextBox am I right? I dont use it a while now
 
I need client-side validation
 
if(string.IsEmptyOrWhiteSpace(textbox1.text))
 
@Mr.Toxy it is not Web Forms
 
8
Q: Checking if a textbox is empty in Javascript

user2020911This is my code which was supposed to raise an alert message if the textbox is left empty: function a(id) { var n=document.getElementById(id).value; if (n.length < 1) { window.alert("Field is blank"); return false; } } The bug I'm getting is that the field is no...

 
9:28 AM
Guys I wanna extend a control (winforms). Do I have to create a userControl for that?
Its just about overriding a single method.
If I have to, is it possible using the default design? I dont want to create a new one.
 
@MitchelStuartFountaine but I want to get the usual error, rather than a pop-up message
 
@C4ud3x what do you mean by extend?
 
@Mr.Toxy Whats told in the second line. Overriding a method ^^.
 
oh hahaha yes
 
@FoggyFinder What is the usual error?
 
9:29 AM
@C4ud3x I think so? Have you tried it?
 
^
 
If I create a usercontrol that inherits from "numericUpDown" the design is cleared.
Its not using the default one.
 
@MitchelStuartFountaine those shown by @Html.ValidationSummary ()
 
Couldnt I create a partial class or something for numericUpDown?
 
I thought it was all fairly straight forward. msdn.microsoft.com/en-us/library/7h62478z(v=vs.110).aspx is numericUpDown a default framework control?
 
9:31 AM
@C4ud3x yes you can I think, you can inherite that class after to use the control
 
@Squiggle It is.
 
yes its default in winForms
hmmm a quick question, functional wise is it best to make a try catch when calling a function or can I jsut put it in the class?
 
It tells about just creating a userControl, inheriting from the original control and overriding a method.
BUT I cant use that inside the designer then. Throwing error it cant be loaded.
 
bogus
 
Dont I have to delete the constructor?
Oh no. I dont.
 
9:41 AM
this. this. this. this. this. this. this. this. this. this. this. this. this. this. this. this. this. this. this. this. this. this. this. this. this. this. this. this. this. this. this. this. this. this. this. this. this.
 
But InitializeComponent(); will load an own design wont it?+
@RoelvanUden Come down its copy & paste.
 
I solved the problem through HTML5 - pattern
 
this.IsGood
 
@RoelvanUden Here flame this guy with his 135k rep who wrote it: stackoverflow.com/questions/5921446/…
 
this.IsHandy
 
9:41 AM
:D
 
this.IsQuick
 
TOPIC TOPIC TOPIC TOPIC >.<
Sorry.
 
this.IsLove this.IsLife
 
THIS.TOPIC
 
@ntohl damn you I was thinking exaclty the same thing :o
 
9:42 AM
tho I love K&R style
 
So no one got an idea?
Nope.
 
@C4ud3x create a class and just inherit it
 
@Mr.Toxy Thought so too. But with a normal class I cant inherit it :/
"NumericUpDown" couldnt be found.
 
@C4ud3x can you show the class pls?
 
Type or Namespace ""NumericUpDown" couldnt be found.
 
9:46 AM
try to create a class, not a partial
 
@C4ud3x Just another example how rep is entirely meaningless.
 
put it like this
NumericUpDown {get; set;} then just get the control when u need
or set
either way
 
I'd like to refine my statement. I love K&R style, and everything that goes with it in Resharper... So private fields are prefixed with _, and this. is not needed
 
@Mr.Toxy Already did. Not working.
 
@C4ud3x rly? o.O
@C4ud3x I will try wait
 
9:50 AM
Cant inherit in normal class.
Sure. Im afk for a cigarette anyway. Just a 5 min break.
Im back.
@Mr.Toxy Anything new?
 
public static NumericUpDown num { get; set; }
I was able to access it
 
Oo
 
im not sure if it is in the same context as you intend but anyhow, creating a class and have the control like that you can access it
 
user3956566
do you guys look at questions?
 
user3956566
I've never been in here before and don't know the code of conduct
 
user3956566
10:01 AM
btw g'day
 
we usually look above them
!!welcome
 
@ntohl Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
user3956566
thanks!
 
@Mr.Toxy That sounds strange to me.
 
Caprica alive!
 
10:02 AM
@Mr.Toxy How should I reuse the original design?
 
@C4ud3x why? try it. see if it works for you.
 
user3956566
just wondering if anyone has any ideas about this stackoverflow.com/questions/37432905/…?
 
Caprica is giving the wrong room welcome :3
 
She only has one
She wasn't initially designed to be a bot for SO chat, just for one room :P
 
@Mr.Toxy If using this style prntscr.com/b875pm how should I force my userControl to use the original design from NumericUpDown? Also how should I override its methods? As the class is a custom class, I cant create a override this way for NumericUpDown !?
 
10:06 AM
@C4ud3x hmmmm thats a good question, let me think for a minute
 
MSDN still tells to use a UserControl.
Its sounds easy there. But not working this way.
 
yeah they just inherit
nothing else
weird that not working
 
does anyone else find this funny??
user image
2
 
omg.
 
10:10 AM
that's... awful
 
@Mr.Toxy I've left a feedback on msdn for this. Anyway.... still confusing whats missing.
 
@C4ud3x ikr I dont see why it doesnt work for you as well.
@Squiggle ohh but but ok :( tell zoidberg to me. Shame one me
 
@Mr.Toxy Ill post it as a question on so.
 
@C4ud3x yup thats a good idea, maybe we are forgetting somerhing
 
@Squiggle can't help but smile though right? :P
 
10:15 AM
well my logg is well done but looks confusing
can you write in bold to a text file?
 
@Sippy I didn't even crack a slight grin.
 
user3956566
@SamyS.Rathore that made me smile
 
:|
^ me
 
hahahahaha
 
@Yvette props to your SO Chat profile 'about' message.
 
user3956566
10:18 AM
@Squiggle lol
 
user3956566
hang on what does props mean?
 
porps = congrats
*props
 
@Yvette +1 for considering that there might be a code of conduct
 
sometime of congratulation
 
Well considerably more than +1 really
 
user3956566
10:19 AM
@TomW thanks ducks :D
 
-- for the intimidating "about" on SO profile
 
user3956566
@Mr.Toxy I think I'm hilarious, but my family think I'm really not funny
 
user3956566
@Mr.Toxy ooh which part?
 
@Yvette "I'm a member of every SE site, to work with Smoke Detector. We are alerted to profanity, spam and a few other things from all over SE" this screams: "If you say anything thing I'll just wreck your sorry ass" hahahahahahaha
 
user3956566
@Mr.Toxy bwa hahahahahahahahaha yes! you have fallen into my trap!!! and Now I am here!!! BWA HAHAHAHAHAHAHA
 
user3956566
10:21 AM
nah, it's for the trolls and the creeps that stalk the place
 
hahahaahaha Im a stalker :P
 
Hahahaha that's an about that is so true it hurts. +1 @Yvette
 
[Route("api/{Home}/{id}")]
public HttpResponseMessage Delete(int id)

{
//code here that returns sttaus code ok
}

how to write RHINO test cases for above????
 
@Mr.Toxy Just in case you wanna know: stackoverflow.com/questions/37434319/…
 
@C4ud3x starred to check later :p
 
10:26 AM
^^
 
user3956566
@C4ud3x is your name Claude?
 
Nope. Its C4ud3x ^^.
Obvisoulsy. Why this question?
 
@Squiggle Some'tin smells
 
@Yvette @Mr.Toxy no I mean the 'about' on her Chat profile.
> "Whoever said women are more emotional than men, never visited Stack Overflow Meta."
THAT made me roffle
@Sippy what did you do this time?
 
user3956566
@C4ud3x Claude is my son's name and it looks like Claude with numbers, missing an L lol so not really the same at all
 
10:30 AM
"Whoever said women are more emotional than men, never visited Stack Overflow Meta."ok +10 for that hahahahahaha
 
@Squiggle smells like bullshit m8
 
@Sippy sorry, what? I'm lost.
 
@Squiggle You said you didn't laugh
Mate do you even click the reply link
Or look at it
 
@Yvette >.< So I just nvm.
 
user3956566
ok you mottly crew, I came here with a C# question and all you do is yabber and have fun :D
 
10:36 AM
XD Sure. What else should a chat be good for? Questions can be posted on so directly ^^.
 
user3956566
I'm teasing :D it's all good
 
Nah posted questions are posted question. This is more like a place for discussions. I guess its an either-or thing when having a question :p.
 
@Sippy :|
 
@Yvette Careful with the accusations, we'll get in trouble again!
 
triggered
 
user3956566
10:45 AM
@Sippy ooooh soz, you are such a serious minded, studious bunch of people, learn to have some fun will ya LOL
 
@Yvette so is the class variable not updating, or the database?
 
user3956566
@ArtOfCode the database
 
user3956566
if the database updates, then it works
 
user3956566
when I try to update it using the static class variable it won't work
 
user3956566
I find this curious
 
user3956566
10:47 AM
It doesn't make sense, as the same static variable will carry the values of the db variable
 
@Yvette I keep reading it as Claude as well.
 
Right. Which line is it that's supposed to update the DB - the db.Where... or the Lockin.HasProdSummaries = ...?
 
user3956566
savechanges
 
user3956566
@ArtOfCode ^^
 
user3956566
    lockin.HasProdSummaries = ProdSummary.HasProdSummaries;
    db.SaveChanges();
 
user3956566
10:49 AM
it hits that line
 
user3956566
but does not save
 
user3956566
I refresh the data from that table and nothing
 
user3956566
I can also test it when I refresh the browser, but that then does instatiate a new prodSumm
 
That's the DB commit - which line actually does the update?
 
@Yvette How did you setup your context? It may be unaware of the change.
 
10:50 AM
I'm assuming the assignment, since the db.Where is just a SELECT
 
user3956566
lockin.HasProdSummaries = ProdSummary.HasProdSummaries;
 
user3956566
@RoelvanUden it works when I use a local variable
 
so you use the static class var and it fails, but you use a scope var and it works. Odd.
 
user3956566
yes!
 
user3956566
I know right!
 
10:52 AM
I've never seen that happen. Are you sure they are different values?
 
user3956566
I find it really curious
 
user3956566
different values how?
 
Not that both are "hello" for example, because it wouldn't change much then..
 
I see one difference: you declare the class var as typed (Lockin Lockin), but the scope var as dynamic (var lockin). What happens if you declare the class var as dynamic (if it'll let you)?
 
user3956566
hm I'm not sure if it will
 
user3956566
10:53 AM
I will try
 
user3956566
nah it's not liking that @Art
 
Okay, go the other way. If you declare the scope var as a Lockin type, does it fail?
 
user3956566
ok will try
 
@C4ud3x theres a promissing comment on your question. have you tried it?
Im hungry af, boss told me he wanted to see something came here talked for a bit, left to talk on the phone. now Im waiting for him and Im hungry af...
T.T
#SadLife
 
And another idea: will it let you declare the class var as dynamic Lockin?
or does that really screw with things
 

« first day (2048 days earlier)      last day (2899 days later) »