« first day (3414 days earlier)      last day (1519 days later) » 

3:01 PM
I used to have a cat but my ex took him when we broke up (even though we got him together, he was really always her cat anyway). I'd like another but my current girlfriend is allergic.
 
@RoelvanUden are you still here?
 
If I got a dog it would need to be a low-energy dog.
I like basset hounds except for the slobber and smell.
 
@MyWrathAcademia Yes.
@Hypersapien Get a german shepherd dog. Best, dog, ever.
 
dont get one of those tiny hyperactive dogs
they are terrible
 
What's great about german shepards?
 
3:03 PM
@Hypersapien Everything~
 
@Hans1984 those aren't dogs, those are overgrown rats
 
good point
 
Hyper intelligent, superb listening to commands, easy to train, well behaved, protects you and your family, low maintenance, can switch between low and high energy in 1 second, overall, great dogs.
Down-side: If you're not consistent in the dogs training, he'll walk all over you.
 
of course they are great
they are german after all
 
@RoelvanUden or she
 
3:04 PM
just kidding
 
@CaptainSquirrel Or she. :-)
 
we only produce quality
 
Some of my extended family had a GSD for a while
 
even doggos
 
I think the poor thing had a heart condition or something
They came home and she'd passed away in her sleep
 
3:05 PM
Aww. That's so sad.
 
i lost 2 dogs to cancer
 
'Twas a lovely doggo tho
Very happy and friendly
 
we eutanized one , the other one crawled outside in the garden and died there
it was terrible...
 
:(
Loosing a member of your family is horrid
 
yes
 
3:06 PM
it is like losing one of your family
 
@Neil that's because you are
 
I'm not
we're not related
 
Yes... I've had multiple dogs pass as well, it's terrible every single time. :-(
 
Well you could say that about an adoptive family member
Just because they aren't blood doesn't mean you aren't family
 
WTF is happening in this image???
 
3:08 PM
I have a cousin who isn't blood related and is only related to me by marriage, doesn't mean i'd be any less sad
 
Found it here (from HN link): laputan.org/mud
 
the black squirrel has risen !
 
Wafer thin mint sir?
 
I can't tell if those are fries or if its spahgett
 
I mean madame
 
3:10 PM
the look on his face
"Im gonna shove this in your mouth!"
they released all the ppl from the ship in front of japan now
japanese logic...
 
"lets wait until 90+ people are infected, then we'll let them go"
wtf
 
@BlackSquirrel he is serving "fucks given"
 
Ship owner gets bill for stationary diseased liner.... "Get these fuckers of my ship!"
 
here we go
:D
 
Worlds most expensive floating petri dish wastes a million pounds an hour
 
3:17 PM
We can convert 24 fps to 60 fps now apparently
 
I dont know why those links wont work
anyway
 
@RoelvanUden sorry I missed you.
I here now
Are you?
 
@MyWrathAcademia Not for long.
 
@RoelvanUden I noticed in the debugger that the objects in the hashtable are stored as AddressClasses.Line1 so I figured out that the hashtable does not store an object of specific type and I had to cast the object retrieved from the hastable to a Line1 object
 
@MyWrathAcademia Did it work?
 
3:29 PM
What I don't get is are objects added to a hastable stored as the class of the object or stored as an object of type Object? Do you know?
@RoelvanUden Yes it worked. Thank you
a million times
 
@MyWrathAcademia You're probably using a non-generic hashtable? Can you show me?
 
Hashtable address = new Hashtable() {{"line1", line1 }, {"line2", line2}, {"line3", line3}};
Is that what you wanted to see?
 
@MyWrathAcademia Yeah. That's old-school. It's what we used before .NET 2.0, I think. That's code from before 2005.
 
Image is Beatles, Magical Mystery Tour Movie, it is spaghetti. I think that might be Paul Mccartney or Ringo?
 
Great, so can you answer:
3 mins ago, by MyWrathAcademia
What I don't get is are objects added to a hastable stored as the class of the object or stored as an object of type Object? Do you know?
 
3:33 PM
@MyWrathAcademia You should use Dictionary<string, string> for that, instead.
Then getting a value out of it will be of the type you declared the dictionary was in.
Hashtable, if memory serves, just outputs everything as object. It's not very useful.
 
bye guys
\o
o/
 
what's the point of having a Hashtable in C# then?
 
o7
 
@Hans1984 o/
 
@Neil Backwards compatibility for .NET 1.0 code. That dark age before generics. We don't talk about it here. :-P
There's even a disclaimer on Hashtable's doc page saying you should use Dictionary :-)
 
3:36 PM
Hello, does anyone know if there's a way to get datatable.defaultView.ToTable() but keep the changes of the original table? I use to table cause i want to only get certain columns
 
ah, kind of like Hashtable in java
 
Yes I should have in hindsight, just wanted to play around with a hashtable. I forgot about the problem with using non-generic collections
 
Thats the hastable viewed in the debugger
 
I'm an idiot.
3
Yes I am.
 
3:38 PM
Does AddressClasses.Line1 etc. mean that the obects are stored as their classes because AddressClasses.Line1 is the address to the class Line1
 
Yeah.
 
If a hastable stored objects as the type Object then wouldn't the above picture from the debugger show Object instead?
 
Well, no. Because in-memory, it's still a reference to your class. But when you get it out using Hashtable's API, it just tells your code it's an "object".
It's just a problem of hashtable forgetting what type it is and just tell you "yeahh it's an object of some sort".
.NET runtime still knows.
 
So the screenshot above from the debugger shows what the values of the hashtable are in memory?
And in memory the values of objects are references
 
When .Net was first open sourced, you could see a comment in the source code: "The generic Dictionary was copied from Hashtable's source"
 
3:44 PM
The debugger shows you what's in memory, as understood by the .NET framework. The .NET framework always knows what type a thing is, because well, if it didn't, code wouldn't run.
 
You can "cast" the object to a AddressClasses.Line1 and it will work just fine
 
But everything is an object. So if you tell the code that, hey, "this here is an object", you're definitely right. You're also as unspecific as you can be, because you can't call a method defined in your class without knowing that you're dealing with an object of that type. So... object is pointless. And hashtable is for always giving object back. :P
 
But when we use that reference (with the the hastable API) to get the object out instead of getting out a specific object it just gets out an object (no specific, i.e. an arbritary object), not the type Object?
 
var person = new Person();
var personObject = person as object;
Console.WriteLine(person.Name); // Booh, compiler doesn't understand it.
That's basically what's going on for you right now.
 
Ryan Donovan on February 20, 2020
It’s now been more than 50 years since the first IFIP Conference on Software Engineering, and in that time there have been many different software engineering methodologies, processes, and models proposed to help software developers achieve that predictable and cost-effective process. But 50 years later, we still seem to see the same kinds of problems we always have: late delivery, unsatisfactory results, and complete project failures.
 
3:47 PM
var person = new Person();
var personObject = person as object;
var actualPerson = personObject as Person;
Console.WriteLine(actualPerson.Name); // Yay
That's what's going on by putting Person in a hashtable, getting it out, casting it, and then using it.
Pretty dumb.
 
@CaptainObvious thanks. That's what @RoelvanUden got me to realize using the debugger
 
TIL there is a specific optimized version for Dictionary<string,string> System.Collections.Specialized.StringDictionary
 
@RoelvanUden in c# is there an object of type Object?
 
making my first object in the website because the senior developer here doesn't like objects
 
I initially thought that a hashtable stored objects the the type Object, which is the root Object of all objects?
 
3:52 PM
@MyWrathAcademia Yes. new object() :-D
 
@RoelvanUden please staap using small case for a class name
 
@MyWrathAcademia That's actually a built-in, valid constructor.
Try it :-)
 
So what do you say about this:
2 mins ago, by MyWrathAcademia
I initially thought that a hashtable stored objects the the type Object, which is the root Object of all objects?
Is this wrong?
 
@MyWrathAcademia That's mostly right. It stores the references to the objects as the type 'object'. The objects in memory themselves still are of the type they originally were, they're unaltered, unaffected, by the weird reference to it.
 
see yall tomorrows byes
o/
 
3:55 PM
o/
 
> That's mostly right. It stores the references to the objects as the type 'object'.
aah that's why when you retrieve an object from a hastable it returns an Object type?
Yes or no?
 
When you cast the type Object to for example Line1 like I did, what happens?
 
If the type in memory is an instance of Line1, it'll be fine. If it's not... UnableToCastException
InvalidCastException, actually, that's the proper name
 
Is it like a unix directory where Object is root i.e. "/" and you just append a path (i.e. the object you a casting to) to Object so something like Object/AddressClass.Line1 ?
 
3:59 PM
Hmm.. no. It's far more complicated than that.
 
Nooooo.
 
If you just want the basics, remembering that a reference to an object and an object in memory are two different things is good enough. Otherwise, I recommend a deep dive into .NET memory management:
I'm off though. Hope that helps! See ya ladies tomorrow.
 
Atleast I understand that (a) a debugger shows things in memory (b) the values of a hastable are stored as references in memory (c) these references stored in the hashtable in memory are stored by the hashtable as the arbitrary type Object. (3) So you retrieve this abritray type Object any time you retrive a value from a hastable.
Is this all correct @RoelvanUden ?
 
I can hepl you a bunch too, I've become quite familiar with how things happen
 
3. You retrieve the arbitrary reference of type object
then ye
\o
 
4:05 PM
Thanks @RoelvanUden . Later
Thanks @CaptainObvious
 
Jack, learn roelidiot <>https://chat.stackoverflow.com/transcript/message/48643354#48643354
 
I've learned the command roelidiot
 
Sorry buddy @RoelvanUden
Jack, kieran
 
Feb 27 '17 at 16:02, by Kieran
Thank you for confirming im an idiot c:
 
So I am trying to get a timer to work for a blazor component. Im not sure if this is even the right approach but learning more about System.Timer.

Im running into an issue with starting and stopping the timer correctly. My code and output is here: https://gist.github.com/tarrzan33/277aca39a8f51dc5c8e7b2de7e067438
It seems like my stopTimer() call does not handle the disposing of the event correctly. But I call the method _timer.Dispose().. So Im confused on what its doing here
 
4:13 PM
@RoelvanUden I wonder if another way of thinking of it is that a hastable thinks it's a reference and since only objects have references lets just assume the value is an object?
 
4:31 PM
@RoelvanUden I got it! A hashtable sees a reference and says oh it must be an object since only objects have references so the hastable stores the reference as object. The reference is stored as object not the object itself. So when you retrieve a value using the key you do not retrieve the object whose reference you passed to the hashtable, instead you retrieve object which represents any objects' reference (i.e. object indicates/hints that a reference to an object is stored in the hastable).
object is the value type
@RoelvanUden object is the value type, not the object type because a value can be either a primitive or an object. So a value type of object means (i.e. indicates) that a value is an object not a primitive
 
@jcolebrand love your avatar
very funny
 
@RoelvanUden And when you cast an object retrieved from a hashtable you cast (i.e. explicitly convert) the object back to the reference the hashtable already saw when you added the object to it.
@Is my understanding correct (and sound)?
 
4:47 PM
if you casted it right you can go both ways
 
@RoelvanUden Are both my understanding of how an object is stored in a hashtable and what happens when you cast an object retrieved from a hashtable correct (and sound)?
@juanvan good to know, thanks.
If my understanding of a hashtable is right then a hashtable is a lazy collection since it doesn't bother with finding out or remembering the type of an object, it just takes the easy way out by saying "me see reference, reference means object. So this (value) must be object. So let us call it (i.e. the value) an object"
 
 
1 hour later…
6:12 PM
it just occurred to me that oldschool rs is 7 years old today x-x
 
@MyWrathAcademia Hashtable is just a non-generic collection, so it uses the base type object for it's key and value. It then uses a combination of the Equals and GetHashCode method to determine if a key already exists in the collection for that object. Objects in C# always know what type they are at runtime, but when you retrieve an object from Hashtable at compile time you only know it's an object, so you're required to cast it in order to access it's members when writing code.
 
6:59 PM
@Freerey olschool recordset?
 
run/escape
 
7:26 PM
is there a way to procedurally load a name for an object? say I have a loop that creates copies of an object, with each one being "obj0", "obj1", "obj2", etc...and the number is based on the index
 
you could use an array
 
that's what I'm wanting to do
but the idea is to take a string and turn it into the name of an object
so then it's like you assign the object name from a string array
but afaik, there's no method that allows you to be like "new obj.Name = names[0];"
 
like, you want to name the variable based on some string you came up with?
you can't really do that, no
this is probably a problem you want to solve with a dictionary
 
hm
 
Runescape is way older than 7 years
 
7:40 PM
emphasis on oldschool
 
just trying to catch up on the current convo brb
@ZackTarr I think you need to remove the ElapsedTimer before disposing the timer? So before dispaosing it call
Opps hit return trying to format lol
public void Stop()
    {
        if (_timer != null)
        {
            _timer.Elapsed -= NotifyTimerElapsed;
            _timer.Dispose();
        }
    }
Not sure if this might solve the issue, but I found I needed to remove the Elapsed event because it would double up f you did a restart on it.
 
I'm trying to back up my database to copy it to another machine. The database refuses to put the file anywhere except the default folder, which I can't get to.
 
Sounds fun
Who owns the machine?
 
I'm listed as Administrator. I'm trying to figure out where the Owner is listed.
 
7:55 PM
Which use are you using to login to the database? does the db have its own user?
 
I'm logging in under Windows Authentication
 
Logging in to what exactly? Web based UI, windows desktop?
 
Windows 10
It's SSMS
 
if you're an admin then surely you have access to the entire filesystem?
 
Then I don't understand why it won't backup to somewhere else
 
7:58 PM
I thought so. File explorer refuses to go to that one folder
 
exactly, SSMS allows you to change the "device" aka backup location in the options
 
C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\Backup
Yeah, and when I try that I get a Permission Denied error
 
Yeah so when you do the backup, in the big bix that has that as the destination, click remove, then add and put in the location where you want it to be saved
You want to Save to Device
IIRC that is
just punching up SSMS now to double check
 
You mean "Backup Device"?
 
Whic hversion of SSMS/Sql Server are you running?
 
8:01 PM
17.9.1
 
Actually, I have 18.2 on here. I only use 17.9.1 because Microsoft decided to remove the ability to debug code.
 
Shouldn't matter for this
 
Yeah. I tried that
 
just wanted to make sure you werent on SQL server 2005 or something
and you cant access any folder by going through the "Add" button and browsing to location?
or is it just error-ing out because its trying to access the original location?
 
8:04 PM
I get an "Access Denied" error
 
yeh got it
so can you browse to C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\
the parent folder?
 
It can make a backup just fine in the original location, I just can't get to the file.
 
oh wait im an idiot
 
Yeah, I can get to that folder, just not the Backup folder inside it.
 
totally forgot you can do this via a .bat file
well option 1 is to just modify the permissions on the backup folder from there, but I wouldnt recommend particularly if this server is in production environment
give me a minute I know a solution
 
8:06 PM
It's not. It's my own development laptop.
 
right, you should probably just go ahead and right click the backup folder and give yourself full control on the backup folder
if that doesn't work
take a look at this article, I hate the website but this is how I take backups on a scheduled task (sort of)
I dont use XCopy or anything, but use it to backup to a network share which gets picked up by the overnight backup system
that'll at least allow you to get a copy of the db
 
When I go to the folder properties it says that I need to have read permissions just to view the security tab
I don't have a network share.
 
in that case make a batch file (.bat) with the howtogeek link for reference, and run that. It'll bypass the gui which is causing you to not be able to make a backup as you cant change location, the other option is to go into the properties of the database and change the default backup location I think? I'd just go with the batch file, then reinstall SQL Server
doesnt need to go to the network share, you just give it a filepath
the example is using a network share, but its just a filepath so it can be anywhere that you have access to
i.e
C:\
or something
 
I got the file
 
Yay! You mean db backup file?
 
8:17 PM
Yeah
 
awesome
do a test restore to a new name DB
 
I opened up a CMD in admin mode and just did a move command
 
and check its all there
nice thinking
bizarre that would be the case, youve definitely got some fouled up permissions
just not sure if its against your user profile or the actually directory structure
Anyways, glad you got your data back :D
 
Oh god damn it.
 
?
 
8:23 PM
I had to do backup/restore of MSSQL DBs at my last company...I can imagine why he just swore.
 
The server I want to copy it to is running 14.00.2027 and my machine is running 11.00.2218. They're incompatible.
At least in that direction
 
hmmm
can you export it as csv?
 
At 12, there was a big security upgrade lol
 
Got VS enterprise subscription or something?
Then you can jsut install SQL Server locally
 
8:24 PM
Id do a csv import, you'll need to go write down the schema and column names for each table though because it'll ask you for them on import
 
A new one
 
or what quirrelkiller said lol
squirrel*
Can you link the server?
 
No, fuck it. I only made a couple changes since restoring that server's backup to my machine a few days ago. I can just copy the change scripts over manually.
 
Then you could just do a Insert Into [Table] SELECt statement
the joys of IT
 
Unfortuately when I did that it wiped out my "recent changes" view so I need to recreate that.
 
8:26 PM
this thing isnt working
I didnt change anything
oh its starteed working again after I changed a different file on another machine
 
Time for bed, cya o/
 
byeee o/
you can export it to a script mate
then just run that sql command on the restored one
and you'll get the view back as is (without data)
 
It's a view
 
can you not right-click -> export to script? or is that for tables only?
 
No, I can do it for views. It just means I don't need to worry about data
 
8:37 PM
hopefully that'll sort it
worst-case scenario you could always RBAR any data with a loop
takes a while though lol
 
8:57 PM
man I really should've invested time into learning dictionaries months ago cause this is awesome @.@
 
Dictionary objects? Yeah. They're really great.
 
yeah one of my coworkers and I are working on making the website more object-oriented -- a needed change because our senior dev does not like objects at all
partly as a result, we get errors on a lot of the pages he makes every day
not gonna be too hard on him, though; programming was never his forte in school
 
9:14 PM
@MyWrathAcademia An instance of a class is stored somewhere in memory. That instance has a well-known type, e.g. Person. A reference to that instance of Person is just a memory address. The rest of compiler magic. Accessing person.Name takes the memory address of person, goes to that, and then reads Name from that instance in memory. This works because .NET knows that memory address you stored is an instance of Person.
@MyWrathAcademia Now... let's imagine .NET forgets that your reference to a memory address is of the type person. What can it do with that instance of that object? Nothing much, it doesn't know more than that it is "some kind of object". That's what happens internally in Hashtable. It just made the reference to a memory address lose the type information. You still know where that instance it, you just don't know what it is. Does that make sense?
@MyWrathAcademia I'll be back online tomorrow if you have questions. This is a fairly complicated matter to truly understand as it involves memory management and memory addressing via pointers. Honestly, you don't even have to understand how it works, but if you want to know, grasping a little more about C/C++ really helps in that regard.
@MyWrathAcademia Recommended vid if you want to go deeper -- youtube.com/watch?v=CSVRA4_xOkw
 
9:43 PM
I just put a site on a new server and the formatting is messed up. I checked the network tab under DevTools and it looks like it's getting 404 errors on .woff and .ttf files. It didn't have that problem on any other server or on my machine. I checked IIS and those file types are listed in the mimetype list.
 
10:18 PM
Ok, I see why it's doing what it's doing. The css file that defines the location of the font file defines it as a relative URL. On my machine it's interpreting it as relative from the position of that css file. On the server it's interpreting it as relative from the root.
 
guys, when using the generic aspnetcore azure authorization, can you add custom claims to the token?

services.AddAuthentication(AzureADDefaults.AuthenticationScheme)
.AddAzureAD(options => Configuration.Bind("AzureAd", options));
 
10:31 PM
Do you have to use a class to get json settings out with Iconfiguration? Do I need a class for each json section?
 

« first day (3414 days earlier)      last day (1519 days later) »