« first day (2517 days earlier)      last day (2434 days later) » 

10:02 AM
@AvnerShahar-Kashtan excuses!
 
mr5
@AvnerShahar-Kashtan why are you so good at explaining things man. like, I can't argue with you
 
Cuz he's like mr 33+ guru man
 
Hah. 33. I'd love to be 33 again.
 
I'm pretty much exactly 2/3rds towards that, ha.
 
mr5
@AvnerShahar-Kashtan so you mean to say, you're 66 already?
 
10:09 AM
99, actually.
 
mr5
1 more level to unlock your next skill
 
btw, architercural / approach question
The way I have my DB set up is that the messages table has a response_message_id column, which is an FK to messages PK, message_id. Now, that means that scraping the transcript has to occur chronologically and nothing can be skipped, since that will cause errors when trying to insert messages with response_message_id pointing to a message_id that does not exist.

Is this generally ok and I should focus on enforcing chronological scraping, or you have a better general idea?
 
From a pure logical perspective, yeah, it makes no sense to have a "in-reply-to" field that points to data you don't have.
But in this case, you probably don't want to enforce it. If someone tries to get stats for yesterday, yuo don't want to be forced to scrape 5 years' worth of data just to get to it.
 
thats what Im thinking
so what I could do is on DB insert check if the given message_id exists and if not insert null into the response id
does that sound right?
 
No, that way you'll lose data.
What if tomorrow you will scrape the original message? You will have lost the link.
 
10:22 AM
hmmm
 
I would simply drop the foreign key, and enforce it at the application level, not the DB level.
 
hm that sounds right I guess, thanks.
 
Foreign keys are there to ensure data integrity. But here you explicitly don't want that level of consistency checking.
 
10:56 AM
Using EF6, I get: "Either the parameter @objname is ambiguous or the claimed @objtype (COLUMN) is wrong." The created SQL is: "...EXECUTE sp_rename @objname = N'dbo.TournamentUsers.Tournament_Id1', @newname = N'Tournament_Id', @objtype = N'COLUMN'" Is that N in there valid?
 
Yeah, The N prefix simply means the string should be interpreted as Unicode.
 
Thanks, should look a bit further then :D
Deleted a lot of migrations and created a big one. That fixed it I guess :D
 
 
1 hour later…
12:02 PM
hello
@anyone
i have an issue with xml formatting
but the answers given on SO are just not correct
 
@Wietlol give me 1,5 hours and ill check it out
 
0.o
why 1.5 hours?
 
am at work
have stuff to do
 
@Wietlol that's like saying the earth is flat :D what problems do you have?
oh the innerhollowearth theory is also interestingly absurd
 
12:21 PM
4
Q: XML Unicode Safe Encoding

Alexandre RondeauI'm looking for a way to encode an XML document using the #&233; encoding. Using this basic code var xmlDoc = new XmlDocument(); xmlDoc.Load(@"D:\Temp\XmlDocBase.xml"); xmlDoc.Save(@"D:\Temp\XmlDocBaseCopy.xml"); my Xml document pass from: <?xml version="1.0"?> <Tag1> <comment>entit&#233;<...

but i might have solved it already
gonna test now
well... nope
i really have no idea
something is messed up with the encoding
as the xml
<?xml version="1.0" encoding="us-ascii"?>
<root>
<bla> é</bla>
</root> is invalid because "é" is not an ascii character
@AvnerShahar-Kashtan @Nerdintraining @ntohl @RoelvanUden @ARr0w @KendallFrey @MadaraUchiha @mikeTheLiar @CapricaSix
 
Oh man don't do that
People are gon be mad
 
wow. you just summoned all the gods at once
 
you asked for it kamil
 
even Caprica
 
:D
 
12:27 PM
try with ő
btw é is not in ascii
 
—
 
so possibly yes. It's invalid bécősé öf thát
 
woot
 
@Wietlol Yeah, don't do that. Ask a question, and if someone can help and wants to help, they'll help. Pinging us (and this is a physical, audible ping in my headphones) is not appreciated.
 
ok
 
12:28 PM
@Wietlol whats with return HttpUtility.HtmlEncode("é");
 
@SebastianL i need it formatted
so, i cant really use HtmlEncode
because its one big xml string
 
You probably don't need it as US-ASCII, because US-ASCII can't display é.
 
then use unicode
 
Howdy
:)
 
@AvnerShahar-Kashtan i want it to not display é
i want it to display &#233;
 
12:30 PM
i am officially confused
 
i have the following string: "<root><bla>&#160;&#233;&#151;</bla></root>"
i want to format the string so it looks like this:
<root>
    <bla>&#160;&#233;&#151;</bla>
</root>
but it formats the string so it looks like this:
<?xml version="1.0" encoding="us-ascii"?>
<root>
    <bla> é—</bla>
</root>
which is not equivalent to the input string
so, its not good
 
So you want to indent it?
 
yep
format?
i also have to add the newlines
 
114
Q: Format XML String to Print Friendly XML String

GravitonI have an XML string as such: <?xml version='1.0'?><response><error code='1'> Success</error></response> There are no lines between one element and another, and thus is very difficult to read. I want a function that formats the above string: <?xml version='1.0'?> <response> <error code='1'> S...

Did you try this?
 
its basically the conversion from minimized to readable
@KamilSolecki same result
only missing the header
so, it could still be usefull at some point
hmm...
i guess im hitting a different problem here
this one also shows the characters
i guess dotnetfiddle is broken
well... that formatting function is not working as i need it
but dotnetfiddle is indeed also broken
 
12:40 PM
Wait, you want to format ` <bla> é—</bla>` to use HTML entities?
 
yep
 
Before it's put into the XML, or do you receive the XML as is?
 
i recieve the xml as is
(its actually html, but properly formatted xml as well, so i pretend its xml)
the html is a template that must be editted
so, i want to show it as it is, but still be able to minimize it and format it to readable xml
 
In an hour and a bit I will go home.
Put the kids at my mother's place
And pack
And tomorrow morning
Fly away
To a weekend
In Venice.
 
ok
 
12:49 PM
@Wietlol HttpUtility.HtmlEncode, as @SebastianL mentioned earlier, encodes the é for me.
It doesn't encode the entities before and after it.
It might be caused by my copy-and-pasting it, though.
 
but that also encodes the < > " etc
rendering the xml useless
 
Yeah, you'll have to encode the element text only.
These methods work on the data, not the XML structure.
 
but... that will never work
 
@AvnerShahar-Kashtan noice
 
You need a smart encoder that knows to handle data inside XML tags differently than data in attributes, and differently than the tags themselves. This means there's parsing involved.
Use XDocument or AngleSharp or soemthing to parse the document, encoding the node contents.
 
1:08 PM
i'll leave this here just in case:
4426
A: RegEx match open tags except XHTML self-contained tags

bobinceYou can't parse [X]HTML with regex. Because HTML can't be parsed by regex. Regex is not a tool that can be used to correctly parse HTML. As I have answered in HTML-and-regex questions here so many times before, the use of regex will not allow you to consume HTML. Regular expressions are a tool th...

 
@SebastianL Always important as a periodic reminder.
 
i can write antlr lexer/parser rules to parse the xml
:D
 
no You can't
 
but imho, this should already exist
i cant?
why not?
 
1:11 PM
he's not allowing it
 
because html in itself is not regular
combined with xml
 
i can write antlr lexer/parser rules to parse almost any language
 
ohh. Yeah. Parser is ok. Regex is not
 
ah
well ofc you cant just write some regex to get a proper lexer
that would first of all require a massive regular expression
one of these days, i will write an xml library just to not have to deal with the immense mess that the System.Xml libraries give
-_-
 
System.Xml.Linq is a marked improvement, I thought.
 
1:19 PM
still shit
cannot parse my xml
 
The problem isn't strictly with the libraries, but with XML itself, which has many arcane rules when it comes to schemas and namespaces and such, so that the libraries have to be over-complicated to account for it.
 
@ntohl Doesn't mean regex can't do it :)
 
one of these days, I will eradicate all xml in our company just for reasons
 
1:39 PM
I'd be happy if we had all our data transfers in xml. it's mostly custom built text files now, with delphi (ported from turbopascal) tools parsing & converting them...into another kind of custom text file.
 
 
either Json or Protobuf are the ones i use now
nothing else really fits my needs
 
My data transfers are excel sheets.
Like full on proprietary .xlsx
 
@TomasZubiri .xls is even wore as its binary :D
and not documented
 
1:55 PM
@Wietlol I don't know why you thought this was a good idea but it was not.
 
only 4 more to go
 
xlsx isn't that bad, when you figure out how to use the openxml standard
 
Whats protobuf, or how does it look like? What's the advantage over xml or json?
 
2:10 PM
@Metallkiller protobuf was invented by google and its like developers.google.com/protocol-buffers
its cool
 
@Metallkiller my protobuf is a slightly different version than google's though
but in simple terms, its a serialized version of the runtime data
json is a collection of strings
or numbers, or booleans
xml is literally just a collection of strings
storing a datetime for example will become tedious
 
<Timestamp>2017-09-06 16:15:30.0005 UTC+2, stuff (consistent, transient in a global scale, also java)</Timestamp>
Parse that -> DateTime
 
milliseconds?
timezone?
stuff?
consistency?
transient?
ow wait, thats java
 
For how long can I edit that? :D
 
"timestamp": 1504707421555
that is what I use in Json
in protobuff, its simply 1-10 bytes
 
2:17 PM
You cna use that in xml too. My way looks better though, in case nay human should ever have to read it.
 
iirc
you cannot use that in xml too
in xml, you have "timestamp": "1504707421555"
that is not "timestamp": 1504707421555
 
well, xml:
<Timestamp>20170906161800052</Timestamp>
 
but this gets complicated when you are going to use classes
for example, take an array
or a list
that gets easy right?
now do a linked list
and ofcourse, i want it to be parsed back to a linked list again
 
linked list = same as list, but with different deserialization process?
 
dictionaries become quite a pain as well
@Metallkiller thats pretty much true
so, you have to store the type of the list as well as its data
 
2:21 PM
<Dict>
  <Entry>
    <Key Value="1" />
    <Value Value= "Suck it" />
  </Entry>
</Dict>
And so on
 
the heck is that?
 
You have to store the type of the list anyway
 
MetaXmlKiller?
 
It's a dictionary in xml
 
KeyValuePair
 
2:22 PM
thats not xml
 
good point
I'm doing like 5 things atm, since our vpn connection to the datacenter is back, and we can use source control again :D
 
in my protobuf, I use 3 byte for the header as it is a complex type with generics and stuff then I have approximately 1 byte for the number of entries, then that number of keys+values which for strings are approximately 1 byte for the length and then x bytes for the content
aka, compressed data
resulting in 3+1+2+8 = 14 bytes to store that xml
and... it is read much faster
as it doesnt have to do string comparisons
 
Unless a human tries to read it
Then he'll just go "fuck this shit"
 
you dont read transfer data between applications
you read data that one application recieves
one of those applications is a viewer that shows the data for you
but on the other hand, the content is not only human readable data
 
What if the viewer has a bug though
 
2:28 PM
in xml, it only contains strings
those are human readable
runtime data is just bytes where most objects are non-human-readable
stream reader/writers, images, ui-elements (how ironic), collections of whatever type, etc
if the viewer has a bug... that is the same as when notepad++ has a bug
it means, "you are fucked"
... but you can still use other viewers
or even write your own
not that hard
all you need is the encoding file
bytes to string use Ascii, Utf#, Ucs#, Iso-#, Ansi, etc
protobuf bytes to runtime data uses its own encoding
 
probably a good idea
 
which?
 
own encoding
dont depend on devs from one region to know which encoding devs form another region (or their server) use
 
its basically the scheme of the headers
for example, the dictionary has the header 0x01
and integer has the header 0x02
and string has 0x03
etc
 
And a custom class?
 
2:35 PM
custom classes can also be added to it
that is basically the need for the schemes
note that if you properly want to deserialize custom objects if you dont have the library that contains the models (assuming you have the scheme) those objects will result in pretty useless objects
you can still read the data
they are just useless mostly
 
3:00 PM
Wtf
so
I copied a FOlder to a remote servers C:\
Over rdp
and executed a batch within
then disconnected the rdp to look at an option
then reconnected
and now the folder is gone - but hte batch is still running! (as it should)
Can't find the damn folder
 
ok
 
How is that even possible
 
git revert
 
server got a virus, had to revert the VM to the last backup...from 18.03.2016
trying to restore some stuff here
I'm off, gotta download Destiny2 at home. Cya tomorrow :)
 
HAHAHAHAHAHA
18/03/2016?
you are fcked up
 
3:54 PM
Heya, got a question. In 7.1, we can't compare to the default literal using ==, but it works with .Equals. I guess this is because default is a keyword and == doesn't know what to do with a keyword, whereas the compiler can figure out to convert the keyword into a value when it's referenced inside the .Equals method call. Do I have it anywhere close to right or am I confused?
 
I have a textbox and I want to have an event triggered on it if the user clicks anywhere in the app outside of the textbox. I tried LostFocus but it doesn't always work.
No, I don't got it.
 
@NWard I'm confused
 
4:20 PM
@KendallFrey Suppose you have object args. You can't do args == default, but you can do args.Equals(default)
 
Since when is that valid C#?
 
Which is not super useful, since often the default value is null, and then you risk calling .Equals on a null-reference...
 
huh.
So now what do you mean by "we can't compare to the default literal using =="
I mean, the article shows it being done
 
Ah, sorry - to be clear, it doesn't work for reference types, but does for value types
 
What do you think of Pluralsight's C# learning path? Most of the courses were last updated in 2014 IIRC. Can it be considered outdated?
 
4:29 PM
@TimurSharapov For most people and applications? No. C# has had stuff added in the last three years, sure, but to be honest, I would say if that course is comprehensive enough, you should be able to pick up the missing items very quickly.
 
@hil
@hilli_micha, thank you. Another question. How proficient should one be in C# to start getting familiar with ASP NET MVC?
 
@TimurSharapov As long as you're familiar with the basic syntax (classes, methods, variables, etc.) and programming in general.
 
In addition, I was recently told that ASP NET MVC can be skipped in favor of ASP NET Core. How fair is that? As far as I know, there are quite a lot of differences between the two
 
David Robinson on September 06, 2017

We recently explored how wealthy countries (those defined as high-income by the World Bank) tend to visit a different set of technologies than the rest of the world. Among the largest differences we saw was in the programming language Python. When we focus on high-income countries, the growth of Python is even larger than it might appear from tools like Stack Overflow Trends, or in other rankings that consider global software development.

In this post, we’ll explore the extraordinary growth of the Python programming language in the last five years, as seen by Stack Overflow traffic within …

 
@KendallFrey Well, I know the basics of syntax and have some experience in programming, but not in C#. Coming from the Javascript world, it takes some time to wrap your head around some things like interfaces. The first time I read about them I had very little idea what they are for.
 
4:36 PM
If you're just learning, Core is fine. If you're doing production work, I would avoid Core until it bakes a little longer
 
@NWard I'm just learning with a view to getting a job.
 
Core will probably not be mainstream in existing enterprises for several years, at least. I'd stick with ASP MVC 5.
 
I'm currently finishing C# Player's Guide. Should I then proceed with Troelsen's book? The latter one is huge, but I'm afraid there might be a lot of overlapping material.
Okay, thank you. I'll follow your advice then. Are there any relevant C# books apart from the commonly known C# in Depth or C# in a Nutshell that you would recommend to an aspiring C# programmer?
I know that it's practice that makes perfect, but, sadly enough, I have no idea how I could practice C# right now and I'm not yet confident that my skills are sufficient for building anything useful. This is why having a project based books or course would be superb at this stage.
 
@TimurSharapov Can't help you there I'm afraid. I'd say just do the usual dumb stuff for practice - make a calendar app, make a calculator, make a booking engine, etc...
 
@NWard There's one trouble with books aimed at beginners. They teach you the syntax, explain the basics, but don't show the right practices and conventions. I mean, despite knowing the syntax the idea of writing even a booking engine from scratch leaves me frustrated
 
4:51 PM
I'm trying to use MouseCapture like is shown here stackoverflow.com/questions/6761786/… but I can't get it to work. Does anyone know anything about it?
 
@TimurSharapov Try your best, then put it here: codereview.stackexchange.com
 
@NWard Thank you. I will try to.
 
I fucking love how VS freezes for a minute every time I start editing a file.
 
Isn't it really great when you're opening a solution and then it stops loading like it's finished, then you start working and then its like "OH I WASNT DONE, STOP RUSHING ME."
 
Here's the code that I have. I'm not sure what I'm doing wrong.
 
4:56 PM
By the way, how much is practically enough to comfortably work with VS? At the moment I have only 3 Gb, which makes it unbearable to work. Planning to buy a new laptop, but not sure if it's reasonable to pay more for a 16 Gb version now.
 
8GB should be fine. Even with gargantuan solutions, VS rarely eats up more than 1 or 1.2 gigs
More RAM is always better though
 
My laptop currently has 8GB and VS works just fine on it; the only reason why I'm looking into getting 16GB is because AutoDesk products are memory hogs like nothing else.
 
Then $700 should be enough for a decent laptop, right?
Considering that I am not and will never be a gamer.
 
For programming? Certainly.
 
Possibly excessive, even
 
5:06 PM
Thank you very much, @hilli_micha, @NWard. Honestly, I hadn't expected the atmosphere here so warm and welcoming :)
Feels like I met old friends at the end of the day
 
C# devs are well known to be the friendliest in the industry >_>
 
My personal recommendation is the Dell XPS 15, I shill for this laptop a lot, because it is good in virtually every aspect that matters. If you plan on using your laptop for your profession, it helps to have the best tool possible.
Its a little more expensive; but you might be able to find a decent one used. I got mine refurbed.
Maybe even a Dell XPS 13 if that blows your budget a bit, if its anything like the 15, it's fantastic.
 
@hilli_micha Yes, it's superb. I could probably take some time and buy XPS 15. It might be problematic to find a used one considering the limited supply in our market.
 
Again, if that is the case, the Dell XPS 13 may be a better option. A good bit cheaper and of similar quality.
 
user7480455
5:25 PM
hi all
 
For VS the biggest thing I noticed was when I went from using a rotating hard drive to a solid state disk.
I currently have 8 GB ram: I do have to say that when I open multiple projects more ram might've been nice. Especially resharper/pycharm tend abuse the ram.
 
Eh, I personally wouldn't blame Resharper. I've used VS 2015 both with and without and I didn't notice any particular changes between the two.
VS is just a bit bloated these days.
 
@hilli_micha Okay, I will try to find one. By the way, I've just found an ad by a guy who's urgently selling his MSI GT70 laptop. The hardware part is massive, which can't be said about battery life. I guess I could bargain for $600-650.
 
user7480455
do you have a surrogate do it for you Hilli? I can understand you not wanting to be involved...
 
@TimurSharapov MSI laptops tend to have pretty decent hardware, but in my personal experience the build quality has been not so good for the laptop themselves. I don't know if they've improved over the years or not. But my last MSI which I had about 4 years ago was mostly comprised of cheap plastic bits that fell apart quite easily.
@007 A surrogate, you mean someone else developing for me? No; I develop my software myself.
 
user7480455
5:35 PM
no.. I mean blaming reshaper... it was an attempt at a joke
 
user7480455
it failed... and I failed comedy.
 
@TimurSharapov As well, the GPU connector (it had a dedicated, Alienware form factor card) kept shorting out on it causing complete GPU failure. Had to replace it twice..so I'm a bit nervous about their overall quality control.
 
@hilli_micha This is a popular complaint as far as I see. I will wait until someone decides to sell their Dell XPS 13/15 then:)
 
5:50 PM
Actually I have nowadays a lot of trouble finding good hardware. - It seems like no laptop builder knows what it is doing anymore
I used to love hp laptops: but nowadays their cooling component is just terrible and the laptops overheat/throttle down constantly. - So I switched to MSI: but now that I have this laptop I'm not satisfied and won't buy a new one: the connection between screen & laptop is really weak and doesn't feel "crisp", each time I open it I feel like a slight wrong move breaks it.
 
@paul23 Seems like there's very little hope to find a decent laptop when you're on a tight budget
 
Also this laptop (after only 2 years of owning it) is suddenly void of a sound card, only using the CPU for sound rendering.
 
user7480455
they build in obsolescence and claim it is for form
 
user7480455
they idea that a laptop battery can not be removed in some of the HP units is dumb
 
user7480455
same thing with the mobile telephones
 
user7480455
6:04 PM
It does me no good that I can remove the bloody battery
 
user7480455
but humanity lets designers get away with those shenanigans by rewarding them with purchases
 
user7480455
if cardigan came without sleeves would you still buy cardigan?
 
Yeah, it's called a vest
 
@Wietlol say wat
 
user7480455
but its not cardigan
 
user7480455
6:11 PM
so why support anything that is battery powered with out the ability to easily remove the battery
 
A more apt analogy would be a cardigan that becomes thread-bear and unwearable after a couple of years
People buy those all the time (including me!)
 
I would personally not buy a new phone if a typical battery didn't die in 2-3 years. I had been using my Sony Xperia P for 4 years and had to say farewell it when it no longer retained any battery life
 
user7480455
:)
 
The same thing with my current laptop. I like it very much and would keep on loving it if only the motherboard supported more than 4 Gb of RAM.
I can't even remember which one is older, my laptop or my brother :) (joking, but it's really old)
 
user7480455
yeah its all scheme to get more funds from the purchaser...
 
6:33 PM
I'm trying to get set an event on a textbox to trigger when the mouse clicks anywhere else on the app. I'm following what this page says, stackoverflow.com/questions/6761786/… but I can't seem to get it to work. Here's the code I have so far. gist.github.com/anonymous/d4c22fd881c503d7cb10a9db7e794212
 
try to use LostFocus()
 
@007 Well with the persons who are right now in charge of the US it's only a matter of decades before that country is not longer the most influential country: then a new country will stand up and hopefullly it isn't driven by consumerism as much as the US is.
 
Yeah, that's the first thing I tried. That was kind of unreliable.
The textbox is set in a listbox, if that makes a difference.
 
btw on an itemscontrol's itemspanel, can I use a stack/dock panel where I let my items "overlap"?
 
can anyone help me with this question? stackoverflow.com/questions/46082233/…
 
user7480455
6:46 PM
all empires fail
 
user7480455
not one has lasted the test of time
 
he is old he knows...
 
user7480455
you one think that a species that claims so much intelligence could simply just get along like
 
That intelligence is not evenly distributed
 
user7480455
I am old I have seen so many transitions
 
user7480455
6:48 PM
well it is...
 
user7480455
but their is too much competition
 
user7480455
not enough co-operations
 
yes you are so old that we should read your name backwards :D
 
user7480455
700
 
user7480455
700007
 
user7480455
6:50 PM
I will say again... man will never do anything great unless he does it together with others..
 
user7480455
this world is so small and fragile and we fight over land power, influence.. it just makes no sense
 
user7480455
we have less than 17 miles of buffer between us and the nothingness of space we have basically a soap bubble protecting us
 
well you are wrong about that because the world is so strong it can wipe us all in a day, its just human mistake that they think they are so powerful etc
 
user7480455
it is sad really... makes an old man want to cry...
 
user7480455
6:54 PM
what do you mean mr moob.. Ithink we are on the same pages
 
> mr moob
 
I mean that we are the same for this planet as ants, if it will have to it will wipe us as easy as it will wipe the ants for example
 
user7480455
I think that was what I was typing as well
 
ah ok you just said that this world is small and fragile...
 
user7480455
yes
 
user7480455
6:57 PM
oh you are saying it is not
 
Sometimes I think how strange it is, everything is just a matter of perspective. We look at tiny ants and consider ourselves to be so huge and important. And those ants can't every realize the existence of something infinitely larger. The same could be with us...
 
> mr moob
I'm glad I was here for this.
 
?
 
!!urban moob
 
user7480455
well I don;t think other creatures see size they way humans do as it is more a limitation
 

« first day (2517 days earlier)      last day (2434 days later) »