« first day (3006 days earlier)      last day (1946 days later) » 
01:00 - 12:0012:00 - 00:00

12:10 PM
Can someone tell me how to convert nint to enum?
 
Whats nint?
 
System.nint
 
Also if it's a number, and your enum extends that type, just cast (any maybe guard against numbers not included in the enum)
 
ah xamarin thanks
 
12:12 PM
Simple casting is not working
 
Have your enum extend nint
The standard enum is int
 
ok not sure how though
 
in Java you'd simply get an enum's ordinal
 
instead of
public enum MyEnum
you go
public enum MyEnum : nint
make the enum extend nint
Or just use int
I'm smelling that smelly smell
 
we are the knights who say nint!
 
12:15 PM
It has an implicit conversion to long.
And implements IConvertible too, so you could probably call Convert.ToInt32() as well.
 
ok thanks guys
 
Shit I'm back at "how do I deploy my app from a CI runner to a gcp VM?". I got ftp...do I put ftp creds into the ci yml file?
 
@Squirrelkiller ssh! ssh! ssh!
 
ok, sftp
same problem: do I put creds into the repo?
 
No, you never put creds in the repo.
 
12:30 PM
do put an ssh key there?
 
You put them in the CI's configuration.
 
how can I authenticate the ci runner to put an app onto my vm?
ah I see
 
Yeah I have created 8 Private repo today xD
 
Wat why
 
Because he can, I assume.
 
12:32 PM
gitlab and bitbucket had those before.
 
The Files that says metadata
 
yes
 
that you cannot edit, those are from a dll?
 
I have created for the 1st time. Private repo on Github for free
 
hi guys
 
12:32 PM
hello Sadiq
 
i have seen ~/ before URL ... what does it refers to?
 
@Sadiq It stands for the web application root.
@QuicoLlinaresLlorens Yes, automatically generated from the DLL.
 
The problem is that I am using a dll generated from other project of mine
and I copied to the project I want to use the reference and, the reference it is not changing with the new changes I made
 
alright. I have path like Web/Features/VBIB/Views/Error/Error.cshtml in my MVC app.
I want to show it as custom error. how should I set defaultRedirect attribute for it?
<System.Web>
<customErrors mode="On" defaultRedirect="">
in web.config
 
12:41 PM
ok
 
@Sadiq set from IIS
or Redirect the page on error.
 
@bluetoothfx yes, but how
want to perform this in web.config
 
do a little search on google.
if you are not sure about how to write in config then just set it from IIS
 
ok
 
setting something in IIS will most likely write it to the web.config anyway
 
12:45 PM
yes agreed with MR. @Squirrelkiller
 
V.7
1:02 PM
Hey all
 
o/
 
V.7
Why would:

if (this.treeView1.SelectedNode != null)
{
Console.WriteLine("Node " + this.treeView1.SelectedNode);
this.Text = this.treeView1.SelectedNode.Text;
}

give child's text when selecting parent and parent's text when electing child?
On treeView1_Click
Also, the nodes are:
 
 
1 hour later…
2:09 PM
@MikeTheLiar Thanks for the tips! I'll look into that
 
2:24 PM
How to DeSerialize a JsonString to and Object when the JsonString only has some of the properties of the object and it lacks all the properties.
 
I think the normal deserialize will work, the empty fields will have the default value
(mostly null)
 
When deserializing JSON to an object, the answer is always NewtonSoft in C#
Beyond that, please create an MCVE
 
2:41 PM
Json.NET WAS always answer, .Net Core 3.0 will change it github.com/dotnet/corefx/issues/33115
 
@ntohl Yes It Worked Fine With NewtonSoft Magic!
 
Can you use link markdown in the room description?
 
try it
I assume not
 
Well this is what I got:
 
But you know what they say about assuming
 
2:46 PM
But that appears to be unrelated, because I got the same failure without including a link.
 
Yeah I get the same
 
room topic changed to C#: General discussions about the c# language, Squirrels, meme archaeology, and the intricacies of English Geography | gist.github.com - For Easy Code Pasting | stackoverflow.com/help/privileges/flag-posts - Please read the flagging rules before flagging a post as spam | Often mistaken for rubber ducks | Do not place panini in... questionable places | test [.net] [asp.net] [asp.net-mvc] [c#] [coreclr] [entity-framework] [linq] [visual-studio] [wcf] [wpf]
 
Missing tag [noscript] and [no-js]
 
Huh
Adding the link back in kills it, again
room topic changed to C#: General discussions about the c# language, Squirrels, meme archaeology, and the intricacies of English Geography | gist.github.com - For Easy Code Pasting | stackoverflow.com/help/privileges/flag-posts - Please read the flagging rules before flagging a post as spam | Often mistaken for rubber ducks | Do not place panini in... questionable places | test2 [.net] [asp.net] [asp.net-mvc] [c#] [coreclr] [entity-framework] [linq] [visual-studio] [wcf] [wpf]
Interesting
That "room topic changed" message is wrong
 
@J.Doe Why [noscript] ? Because noscript is so awesome? Still not the topic of this room.
 
2:57 PM
room topic changed to C#: General discussions about the c# language, Squirrels, meme archaeology, and the intricacies of English Geography | gist.github.com - For Easy Code Pasting | stackoverflow.com/help/privileges/flag-posts - Please read the flagging rules before flagging a post as spam | Often mistaken for rubber ducks | Do not place panini in... questionable places | bloop [.net] [asp.net] [asp.net-mvc] [c#] [coreclr] [entity-framework] [linq] [visual-studio] [wcf] [wpf]
That's correct, though
room topic changed to C#: General discussions about the c# language, Squirrels, meme archaeology, and the intricacies of English Geography | gist.github.com - For Easy Code Pasting | stackoverflow.com/help/privileges/flag-posts - Please read the flagging rules before flagging a post as spam | Often mistaken for rubber ducks | Do not place panini in... questionable places [.net] [asp.net] [asp.net-mvc] [c#] [coreclr] [entity-framework] [linq] [visual-studio] [wcf] [wpf]
Weeeeeeeeeiirrrrrrd
 
Lol link markdown just kills the save action?
 
@J.Doe How about yes-js and yesscript?
 
It's not just that
Because I'm getting failures without including the markdown
 
+1 for still mentioning pannini
 
room topic changed to C#: General discussions about the c# language, Squirrels, meme archaeology, and the intricacies of English Geography | gist.github.com - For Easy Code Pasting | stackoverflow.com/help/privileges/flag-posts - Please read the flagging rules before flagging a post as spam | Often mistaken for rubber ducks | Do not place panini in... questionable places | test [.net] [asp.net] [asp.net-mvc] [c#] [coreclr] [entity-framework] [linq] [visual-studio] [wcf] [wpf]
ffs
 
3:04 PM
@Squirrelkiller [noscript] cuz <noscript> HTML tag
@RoelvanUden Mby in your world
 
I'm betting you're using JS right now! :-O
 
room topic changed to C#: General discussions about the c# language, Squirrels, meme archaeology, and the intricacies of English Geography | gist.github.com - For Easy Code Pasting | stackoverflow.com/help/privileges/flag-posts - Please read the flagging rules before flagging a post as spam | Often mistaken for rubber ducks | Do not place panini in... questionable places [.net] [asp.net] [asp.net-mvc] [c#] [coreclr] [entity-framework] [linq] [visual-studio] [wcf] [wpf]
 
@J.Doe Why would we use an html tag in c# though
 
Why are we engaging, again?
 
Or im fetching chat to console and push response in other window?
@Squirrelkiller Because we can
 
3:11 PM
@Avner gotta find out if I'm still sane. He's a good baseline.
@J.Doe Nah thanks. I can also use dynamic everywhere. Doesn't mean I want to.
 
We should just switch to C, where no design is needed.
Also, fair warning, I'm posting on meta about the 500 error. If we get a bunch of people checking the transcript I expect you all to be on your best behavior.
 
V.7
No design? Sure ....
 
V.7
o/
 
Jun 7 '16 at 16:02, by Mr.Toxy
well at least in c we dont have to worry about design
 
3:18 PM
In 2016?
 
V.7
define "design"
 
2016 was also in the long-ago, the pre-Trump
 
What a wondrous time the past was.
@ShotgunNinja Before the dark times
room topic changed to C#: General discussions about the c# language, Squirrels, meme archaeology, and the intricacies of English Geography | gist.github.com - For Easy Code Pasting | [test](www.example.com) [.net] [asp.net] [asp.net-mvc] [c#] [coreclr] [entity-framework] [linq] [visual-studio] [wcf] [wpf]
room topic changed to C#: General discussions about the c# language, Squirrels, meme archaeology, and the intricacies of English Geography | gist.github.com - For Easy Code Pasting | stackoverflow.com/help/privileges/flag-posts - Please read the flagging rules before flagging a post as spam | Often mistaken for rubber ducks | Do not place panini in... questionable places | 1 [.net] [asp.net] [asp.net-mvc] [c#] [coreclr] [entity-framework] [linq] [visual-studio] [wcf] [wpf]
room topic changed to C#: General discussions about the c# language, Squirrels, meme archaeology, and the intricacies of English Geography | gist.github.com - For Easy Code Pasting | stackoverflow.com/help/privileges/flag-posts - Please read the flagging rules before flagging a post as spam | Often mistaken for rubber ducks | Do not place panini in... questionable places | 12 [.net] [asp.net] [asp.net-mvc] [c#] [coreclr] [entity-framework] [linq] [visual-studio] [wcf] [wpf]
room topic changed to C#: General discussions about the c# language, Squirrels, meme archaeology, and the intricacies of English Geography | gist.github.com - For Easy Code Pasting | stackoverflow.com/help/privileges/flag-posts - Please read the flagging rules before flagging a post as spam | Often mistaken for rubber ducks | Do not place panini in... questionable places | 123 [.net] [asp.net] [asp.net-mvc] [c#] [coreclr] [entity-framework] [linq] [visual-studio] [wcf] [wpf]
 
room topic changed to C#: General discussions about the c# language, Squirrels, meme archaeology, and the intricacies of English Geography | gist.github.com - For Easy Code Pasting | stackoverflow.com/help/privileges/flag-posts - Please read the flagging rules before flagging a post as spam | Often mistaken for rubber ducks | Do not place panini in... questionable places [.net] [asp.net] [asp.net-mvc] [c#] [coreclr] [entity-framework] [linq] [visual-studio] [wcf] [wpf]
@AvnerShahar-Kashtan I'm testing for meta
I'd do it elsewhere but I'm not an RO of the sandbox
And I'd move the message to the trash but I just linked them on meta.
The theory is that the description is too long, but it's not just that.
I appended 1234567890 to the end of the previous description, removing characters until it succeeded, then re-adding them until it failed.
123 and 12 failed removing characters, but succeeded when I added them back.
I think we might have to remove some of the memier parts, though.
 
3:31 PM
I think that should have gone to meta.SE, not meta.SO.
 
I can't reproduce on other SE sites, so
!!shrug
 
¯\_(ツ)_/¯
 
(At least) Two mods are aware of the question, they can move it to meta.SE if they're so inclined.
If nothing else, I got my question answered about whether or not we can use markdown links in the description.
 
"Message too long" would have been useful to propagate up to the UI, not only the admin logs.
 
bruh
It's chat
We should be thankful we got a custom error page at all
 
3:42 PM
Just a little fast question... imagine i have a dictionary with 38k entrys... and my server is written in c#... once i start my server it iterates over the 38k entrys... would that cause a crash ?
 
That depends on about a million things you haven't specified
Also what do you mean "my server is written in C#"?
 
@genaray If you're iterating over it, which is it a dictionary?
 
You can iterate a Dictionary
 
You can, but why?
(I meant to write "why" in hte original question, which I now noticed I futzed up)
 
You know you can make your own chatroom right?
 
3:53 PM
@Squirrelkiller No, i can not
 
I think he was talking to @MikeTheLiar.
 
V.7
@AvnerShahar-Kashtan you have an option of creating a background thread at start with progress view, so this won't cause a crash
 
4:15 PM
In EF code first with existing table, does it creates new table for entity I created that were not previsouly existing ?
 
4:40 PM
is it ok in c# to do a copy constructor?
or should I pass all the props in the parameters?
 
4:57 PM
copy constructors should be fine
another way (which I find cleaner) is to provide a "Copy()" method which returns the new object)
this way, you avoid the constructor
"Copy" can also be named "Clone"
 
5:14 PM
okeeei
thanks
 
 
2 hours later…
7:14 PM
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
maybeFullPath
What's the best way to get a DerivedType[] from an IQueryable<BaseType>?
DerivedType[] derived = (DerivedType[]) BaseTypes.Where(obj => obj is DerivedType).ToArray() doesn't look quite right...
Oh, and not all instances of BaseType in this example can or should be cast to DerivedType.
 
V.7
8:15 PM
Why do they use word "static" for static?
 
Off the top of my head: "static" = "unchanging" = "not instance-based"
 
hello
BJDataList.Select(x => x.SBCOUNT32).ToList().Count
this returns null, why does it not return 0?
 
V.7
Why not, i.e. "restricted", "secured", "restrained", "closed", "barred" ...
 
what?
 
V.7
static could mean that it's constant, but it's not ..
This could cause awkward things
 
8:22 PM
Those sound like access modifiers, which static is not.
 
V.7
Btw, @Adan try removing methods by one and check what's returning
 
>< if i set to public class or public void
i get an error on 'main'
'static main'
 
V.7
@Sinjai it's "like" access modifier ... i.e. static method is "not accessable" from object instance, but from Class
@Adan I'm about Console.WriteLine(BJDataList.Select(x => x.SBCOUNT32).ToList()); Console.WriteLine(BJDataList.Select(x => x.SBCOUNT32)); Console.WriteLine(BJDataList)
 
says 'sequence contains no elements'
 
static describes how a class variable interacts with instances of its class, whereas access modifiers describe how other classes interact with the class.
 
V.7
8:29 PM
@Adan which one command exactly?
 
Console.WriteLine(BJDataList.Select(x => x.SBCOUNT32));
 
V.7
@Sinjai then why not "non-associate" or "non-instantiate"
 
even this Console.WriteLine(BJDataList)
it's just null, 'sequence contains no elements'
 
BJDataList being null and it containing no elements is not the same thing.
 
V.7
^
 
8:35 PM
@V.7 You want to buck the trend for a longer keyword containing a hyphen... for what advantage?
 
it throws 'sequence contains no elements'
and there isnt supposed to be elements
because i know they werent filled, the problem is dealing with empty objects
 
V.7
Just curious, of course
@Adan then something is working with objects when they don't exists
 
exaclty
they 'can' exist, it's a random number that is generated
every time i run the code it'l generate a random number and depending, it'l fill only certain objects, not all of them are filled
how do i say 'if objectList1 != empty --> then'
 
You're trying to do a select transform over BJDataList when some objects are null, yeah?
BJDataList.Where(obj => obj != null).Select(obj => obj.SBCOUNT32)
 
V.7
What's BJDataList, btw?
I don't see such control
 
8:42 PM
@Sinjai interesting, that could work
 
If you wanted a null item in the list to result in a null item after the transform, you could do BJDataList.Select(x => x?.SBCOUNT32)
 
V.7
Hm, what's with your ava @QuicoLlinaresLlorens?
 
?
 
9:04 PM
@V.7 his avocado is just fine, thank you very much.
 
Console.WriteLine(BJDataList.Select(x => x?.BSBCOUNT32[0]).ToList().Count);
this one not working ><
 
1. What are you trying to do? 2. What are those data types? 3. Do you think we're psychic?
 
Console.WriteLine(BJDataList.Select(x => x?.FASBCOUNT32).ToList().Count);
this one does
 
sigh
 
i dont know im trying to figure it out
 
9:10 PM
You don't know the datatypes? Or what you're trying to do?!
 
 public static List<BJTable> BJDataList = new List<BJTable>();

        public class BJTable
        {
            public int ID { get; set; }

            public List<int> BSBCOUNT1 { get; set; }
            public List<int> BSBCOUNT2 { get; set; }
            public List<int> BSBCOUNT3 { get; set; }
            public List<int> BSBCOUNT4 { get; set; }
            public List<int> BSBCOUNT5 { get; set; }
            public List<int> BSBCOUNT6 { get; set; }
            public List<int> BSBCOUNT7 { get; set; }
 
r/softwaregore
 
  BJDataList = new List<BJTable>();
then i add values to BJDataList, these values are random and dont have to fill all the variables
  Console.WriteLine(BJDataList.Select(x => x?.BSBCOUNT32[0]).ToList().Count); returns 'sequence contains no elements' im like, yes i know but how do i deal with it and move on with the code?
 
I'm not sure what you're trying to do, but I'm fairly sure you're doing it wrong.
 
step 1: instantiate the list
step 2: using a random generator fill some of the variables
step 3: check what was filled
 
9:14 PM
Yes, I know you're creating a list and filling it with values. What I don't know is what problem you're attempting to solve with this approach.
 
error in step 3: trying to check if it's filled or not i get 'sequence contains no elements'
 
Because you can't do [0] on something that has no elements
did you want .FirstOrDefault
 
What I do see is an absolute mess of a class, full of horribly named properties. :O If that's not software gore, I'm super curious why.
 
Yeah, that LINQ statement doesn't make a lot of sense to me
 
 Console.WriteLine(BJDataList.Select(x => x?.BSBCOUNT32[0]).FirstOrDefault()); 'index was out of range'
 
9:16 PM
> Because you can't do [0] on something that has no elements
You still have [0], mate.
 
^
Do .FirstOrDefault instead of [0]
Or rethink what you're trying to do here
 
^
^^^^
 
fixed, this returned:
System.Collections.Generic.List`1[System.Int32]
 
Yeah, you gave Console.WriteLine a List<int>
It doesn't know what to do with that other than tell you the type.
 
What are you trying to count?
 
9:18 PM
fixed:
 Console.WriteLine(BJDataList.Select(x => x?.BSBCOUNT32).FirstOrDefault().ToList().Count);, returns 0
checks will now be successful when they are empty : ) thanks guys!
 
You don't need the ToList
 
@Grace, since he's silent on the topic, do you have any idea what his code could be for?
 
Can't you just do BJDataList.Count(x => x?.BSBCOUNT32 == null) or whatever
No idea, but it feels wrong to me
I feel bad for whoever has to maintain this.
 
@Grace didnt know you can set it like that
you really want to know what this is used for?
 
I do...
 
9:21 PM
statistics are ran that fill some of the variables
the ones that are present are then organized
 
My gut tells me there's a better way than having hundreds of ints and int lists.
 
Yeah, this is some smelly code
 
well i already have them
why waste time re-doing this?
 
Typically the argument is that you'll save time in the long run by doing it smarter
But whether doing that is practical depends on what the conditions are like
 
it's a hobby project ; )
if u have the time i would like to listen to a better approach at this
 
9:24 PM
Then you don't have a deadline to meet and should use this as a learning opportunity, IMO.
 
I have work to be doing, but have you heard about hash tables
 
i really dont like typing a lot of lines of code for variables, i know there is a faster way, i just didnt google it
 
or dictionaries, as they call them in C#land
 
yea i have worked with dictionaries b4
it's been a while
 
Or even arrays
You could replace all your BSBCount guys with an array of List<int>s, I suspect
and same for all these other guys
 
V.7
9:26 PM
@MikeTheLiar wut?
So, there's no "avocado" there
 
For instance, Adan, if all those ints are related, like all averages, you should represent the whole set with a data structure like List or Dictionary. Either way, those do not look like ideal variable names to me...
 
yea
if i have time im going to re-do this into a dictionary
 
@Grace Do you know what the best way would be to get an array of derived types from an IQueryable of base types? Derived[] derived = Bases.Where(user => user is Derived).AsEnumerable().Cast<Derived>().ToArray();
 
9:44 PM
You can probably leave out the .AsEnumerable call
 
"LINQ to Entities only supports casting EDM primitive or enumeration types."
 
bases.AsQueryable().Where(x => x is Derived).Cast<Derived>().ToArray() works on my machine
I guess you could do .Where(x => x is Derived).Select(x => x as Derived).ToArray() as well
 
Thanks.
 
@Grace when did you become a dog?
 
big tiddy cowboy cyborg dog*
 
9:59 PM
Have you been reading my dream journal?
ahem Yee-Haw
 
10:16 PM
I'll have you know I'm a skunk.
 
Not a big tiddy cowboy cyborg dog?
 
Yeah, it's a little more obvious when you can see the tail.
 
I'm an amorphous blob.
 
Or, for one that works in Edge
 
10:39 PM
I'm moderately scared to ask what's in her right hand.
 
It's a plug, obviously.
 
That's what I'm scaroused by.
 
V.7
11:13 PM
Can't see the difference
 
01:00 - 12:0012:00 - 00:00

« first day (3006 days earlier)      last day (1946 days later) »