« first day (2516 days earlier)      last day (2436 days later) » 
01:00 - 11:0011:00 - 22:00

mr5
1:23 AM
o/
 
1:55 AM
 
hitler cat gone horribly wrong
 
Trump vs Mayweather PPV
C is so sharp that I just wanna C# right now!!!
 
What is it about C# that yields itself so well to utterly abhorrent puns?
 
2:15 AM
yield return new AbhorrentPun();
 
any idea why I get 403 when I uncomment this to my httpclient
    Client = new HttpClient();
    //Client.DefaultRequestHeaders.TryAddWithoutValidation("Accept", "text/html,application/xhtml+xml,application/xml");
    //Client.DefaultRequestHeaders.TryAddWithoutValidation("Accept-Encoding", "gzip, deflate");
    //Client.DefaultRequestHeaders.TryAddWithoutValidation("User-Agent", "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36");
    //Client.DefaultRequestHeaders.TryAddWithoutValidation("Accept-Charset", "ISO-8859-1");
 
2:39 AM
interested in HybridDictionary
 
@nyconing What's what? Sounds intriguing.
 
Implements IDictionary by using a ListDictionary while the collection is small, and then switching to a Hashtable when the collection gets large.
 
disturbing
 
mr5
Me: sticks to raw array
 
I suppose you also use hotdogs to lift horses
 
2:43 AM
Array cant add items :P
 
not with that attitude
 
hotdog?
horse are vege
 
Just an analogy of "using the wrong impossible tool for the job"
 
mr5
Me: implements wrapper to add items in raw array
 
Human:Meat? Horse:Uooooo~~~
 
2:45 AM
me:wat
 
Nope I think it is somewhere possible and reasonable to use.
Thats why .Net created this class
System.Collections.Specialized.HybridDictionary
 
wait that's real?
 
 
2 hours later…
4:48 AM
How about changing entry point of WPF..
Well...deleted the App.xaml and creating entry by myself...
 
 
1 hour later…
5:58 AM
o/
 
Hi guys, how I can call c# method in javascript function ?
 
ohayou
 
mr5
Hi guys, how can I solve my problem?
 
you mean call you api or something?
 
6:13 AM
god making an msi is painful
 
@hsimah Eh, really?
 
yes
unless there's some magic I am missing
 
That's fair, in that Microsoft don't actually provide a first class way of authoring them. WiFi is good though
That's fair, in that Microsoft don't actually provide a first class way of authoring them. Wix is good though
 
msi?
 
mr5
I have used some 3rd party msi creator before and as I recall, it just took me less than 30 minutes to package my app with several dlls and image resources included in it
 
6:21 AM
i installed some vs2017 extension
it's working... but I can't figure out how to change the default install location. it uses [ProgramFiles] as a placeholder for Program Files
but other env variables dont work
i need it to go to %userprofile%\documents\windowspowershell\modules
it's okay, I will get there
 
Wix is good yeah.
 
if I don't get this in the next 15 mins I'll give it a go
I think I just found what I need
 
GoOoOoOoOoOoOoOoOoOoOoOoOoOoD mornin' neglecterinos!
 
Morning peoples of c#!
 
:o I was at work bevor you for the first time in a while !
 
6:34 AM
@Nerdintraining Why are you here already?!
 
because my wife isn't allowed to work anymore and she can bring our son to the kindergarden
 
And I've technically been at work since 8:20, I just 1. unsuccessfully tried to login to my new local admin account 2. got a coffee 3. had a talk with IT about how to update or deinstall stuff with an admin account I can't login to (turns out I cant).
 
@Metallkiller well I've been here since 8:01 so.. YOU'R MY BITSCH!
 
Oh so every evening you come home to a nice meal ready to be eaten cooked eagerly by your loving housewive?
Damnit :P
 
@Metallkiller nah i come home to a nice beating ny my loving wife.
 
6:37 AM
lol
 
@Nerdintraining "my wife isn't allowed to work anymore" what
 
someone has to take care of the kid*
 
@RoelvanUden Pregnant and works in a Kindergarden. -> Risk of Redfiever (Röteln in german) wich would make the baby retarded.
 
oh you got another one on the way? that is number 3?
 
No #2 ^^
 
6:39 AM
oh i thought the second one was born recently :O
 
Nah it's on its way
 
@Nerdintraining Yeah, I get that. Spending all your time around little kids sure makes you retarded as well.
 
@RoelvanUden I am feeling great and stuff!
 
@Nerdintraining But congrats man :-P You have confirmed you are fertile. I'm happy for you.
 
@RoelvanUden ^^ yes we had allot of fun aswell! Thank you allot :)
 
6:42 AM
Bwhahahaha :-D
 
Good morning.
 
Mornin'
 
mr5
aaaaa
 
Such a cheerful morning
I was scraping so hard yesterday that my SO dark theme nearly came off
 
Morning @AvnerShahar-Kashtan
 
mr5
6:53 AM
is SO dark theme a browser extension?
 
rlemon's one, only for Google Ultron though
 
mr5
Google Ultron?
 
oh maaaan, you are missing some quality pasta knowledge
 
mr5
you mean Google with some extension shits?
 
mr5
6:56 AM
nope. not gonna install that Ask extension
 
its a great, quality read
100% guarantee you will love it
 
mr5
will read later
 
this is the correct link
for both parts
since google ultron is in part 2
 
why did i read that?
 
I am wodnering that aswell Proxy
 
7:14 AM
its top notch
 
"\u001f�\b\0\0\0\0\0\0\u0003��{S���\0�ҕ��3[+L_�I'���\u0002��8*����
this is what I get when I add additional headers to HTTPClient object
    Client = new HttpClient();
    //Client.DefaultRequestHeaders.TryAddWithoutValidation("Accept", "*/*");
    Client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
    Client.DefaultRequestHeaders.TryAddWithoutValidation("Accept-Encoding", "gzip, deflate, br");
    Client.DefaultRequestHeaders.TryAddWithoutValidation("Accept-Language", "en-US,en;q=0.8");
    Client.DefaultRequestHeaders.TryAddWithoutValidation("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36");
I get json as usual when I don't add any defaultrequestheaders
 
Perhaps because the response is deflated and you don't inflate it? :-P
 
7:30 AM
What does the server send as the media type? Maybe it's text/json, rather than application/json?
 
@RoelvanUden I was trying to fix another problem for which I was trying to replicate the exact headers I saw made in browser by fiddler, but I guess browser has ability to inflate response and in code will require extra step :)
removed accept encoding header for now :)
"{\"code\":200,\"message\":\"success\",\"data\":{\"products\":{\"0\":.....
Newtonsoft.Json.JsonSerializationException: 'Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.Collections.Generic.List`1[MainConsole.Product]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly.
 
That's because it's not a List<Product>.
To begin with, it's not a list.
From a casual glance, it looks like a JSON object that describes the HTTP response. It includes a value called data, which includes a value called products, which, itself, is badly structured as an object instead of a list.
With the index being the object's property names.
 
true, it's awful, I am trying to do some automation @Third party website
 
So instead of deserializing it into a List<Product>, deserialize it into a JObject, access data, access products, and deserialize that into a Dictionary<string, Product>.
 
mr5
7:45 AM
Have you guys memorized the text besides the User-Agent header? (and I wonder why they don't just simplify it like Chrome, IE4, Opera, Firefox, ...)
 
@mr5 I've never really had reason to change it. I'm guessing @Mathematics has to because the third party service does stupid browser checking.
Stupid, because he's requesting data, not a web page.
 
Anyone got am Idea why my scheduled task cant find a file I want it to delete?
It has only one action:
rmdir /S /Q "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root"
And it says the syste mcant find the file. Wtf?
 
I am doing this because when I make a request for a operation from browser it works fine I get right result...
but when I do it from code... I get code 100 which means continue,

So I am trying to replicate request made by browser as shown in fiddler
 
Run byl ocal admin, with highest privileges checked
 
@Metallkiller Maybe it has already run and erased it?
 
7:52 AM
It's still there, have the parent folder in explorer and F5 every time I run the task
 
@Metallkiller maybe in use?
 
wait, rmdir? rmdir isn't a file, it's a shell command.
 
Exited all VS instances; no idea if there is some system stuff accessing it, but with local admin rights I was able to just delete it from explorer
@AvnerShahar-Kashtan well technically it is a file
 
maybe you need to run cmd.exe /c rmdir <params>
 
Hi guys
 
7:55 AM
I'll try
 
Below is my url :
 
Try putting the RMDIR command in a batch file, and executing the batch file instead.,
 
Hi @Learning
 
@AvnerShahar-Kashtan thats what i was thinking
 
@Metallkiller I don't think it is. Like dir, it's implemented by cmd.exe, it's not an executable.
 
7:56 AM
http://root/test/get?page=1&pagsiz=10
 
oh ok. thought its like xcopy, it sown program somewhere in system32
 
Now user commited mistake in the name of query string parameter for Pagesize
So it is a bad request or it would be 404 not found?
 
@Learning It shouldn't be a 404, because a 404 says that the resource isn't found. But the resource is http://root/test/get.
 
If it's a wrong parameter, I'd say bad request
 
Either 400 or 500, I think.
Though 500 is usually a cop-out.
 
7:57 AM
Ok so i think bad request will be fine rght
right
 
Dont you should just ignore it
 
@AvnerShahar-Kashtan It workd :D thanks
 
since that was not a important param
 
@Metallkiller Cool. The error was confusing - it was "rmdir" that wasn't found, not "root".
 
yeah but if some user tried to change it
 
7:59 AM
can someone explain me asp.net logic?
 
@Wietlol Sure bruh. Read tools.ietf.org/html/rfc2616
 
I dont get the logic behind the UI and the code behind
 
@Wietlol Are you talking about ASP.NET Webforms? ASP.NET MVC? ASP.NET WebAPI?
 
webforms
afaik
aspx files
 
8:01 AM
ikr
basically, that is my situation
I open a web page
 
The idea was to make it easy for VB/WinForms developers to write web apps, so it simulates the event-driven model from WinForms, but over the web.
 
2 new instances are made
and on postbacks, 2 more instances are made and the postback is done on one of the new instances
so... i have 0 persistence
 
Why two instances? There should be one on each cycle.
 
i get 2
 
@AvnerShahar-Kashtan but since it was malformed request, shouldn't it be 400 explaining the error/bad query?
 
8:03 AM
the issue is that the web elements made in the code will then be gone
and I cant create new ones because I need them to keep their values
 
Because the client and server are running on separate machines, you can't have a persistent object in memory. So persistence is handled in one of two ways - a Session cache on the server that can store data between page reloads, and the ViewState bag, which is persisted inside every page request, which contains specific variables.
 
i tried to solve it with an update panel around them, but that didnt do shit
 
If this is a new project.. pack your things and run. Work with MVC instead.
 
its a 6 year old project
 
The whole concept is terrible and has been scrapped, at first with update panels, and then, thankfully, by scrapping WebForms and moving to an architecture that fits the web paradigm.
 
8:05 AM
and im pushing really hard to get a full rework and start from scratch
even using a different language :D
 
That's unlikely to be approved by the business people, and besides, throwing away 6 years of bug hunting usually means you'll be making the same mistakes again.
 
currently, every change we want/need to make is a jenga game
and noone knows how the code is set up
original programmers dont work here any more
which were 2 just graduated students
i think starting from scratch can give quite a big improvement
but it also depends on how we do it
 
Yeah it can certainly fan out well. It can also be a fuckin' shit
 
i doubt it can be worse than it currently is though
@RoelvanUden im pretty certain we cant go worse than that :D
 
Well, client-side code in strings on the server side is how WebForms does client-side code.
 
8:17 AM
"where asp.net controls from the html file are being referenced using reflection"
but it is horrible to work with
 
It was part of Webforms' attempts to pretend that client side code didn't exist, or at most, was for tiny things like confirmation boxes.
I'm glad we moved on since.
 
on a pet project, I used GWT which has quite a good design behind the screens, even though Im not really sure how it works :D
a website without client side code is pretty shit imho
 
Back when WebForms was released, javascript wasn't a tenth of what it is now.
 
i dont need fancy js features
except... 64 bit numbers
and bytes
 
I don't think you realize just how basic javascript was in 2001.
 
8:21 AM
im not sure about the primitive types it had, nor the html api
but classes, prototypes or whatever are fancy features I dont need in Js
only promises might still be a must as it doesnt have a multi thread api
 
For instance, HTTP requests weren't a standard part of the DOM. I think in IE you had to create an XMLHTTPRequest COM object and call it from javascript.
 
on a side note, in 2001, I didnt even know what javascript was :D
im not that old
 
Promises? That wasn't even remotely considered. To do async requests, you created a second HTML page with javascript code running setTimeout, and loaded it in an IFrame to get parallelism.
The fact that there are still WebForms projects alive today is actually a testimony to the framework's stability. It's crappy by today's standards, and I think the design goal behind it was never really achievable, but compared to where PHP was at the time, or things like ColdFusion? It wasn't that bad.
 
pls dont make me cry... at least not more than im doing now
 
The point is that many of your pain points are simply how WebForms work. But "technically stupid" isn't a reason to switch technology. You'll have to show management how these things prevent you from achieving business goals.
 
8:28 AM
do you know the term technical debt?
 
i guess that explains
 
This isn't exactly that, because it's not bad decisions made, "borrowing" from the future. This was simply the state of the art, 10 years ago.
 
we are literally playing jenga here
0 documentation
every change brings more bugs
code that noone understands
 
Something like "The new features X,Y,Z will take us this many months to achieve in WebForms, with these risks to stability. Reimplementing the whole system in <blah> will take so-and-so months, but will allow us to be more responsive in the future".
To make the case, you have to measure the pain in delivery delays, service uptime and customer satisfaction, not developer pain.
 
8:38 AM
@Wietlol No wonder your code sucks, when you're literally playing jenga while coding.
 
actually, my code doesnt suck that hard
most of the places I come, I fix quite a lot of bugs
 
Code wont suck so much when having a good frameworking and managed architectures.
Thats why good teams always having a/more leader that managing the projects architecture.
When I alone in project, Im spending more time on frameworking and architecture instead of actual coding.
The inline will never in my project unless targeted to performance, but rare.
 
Shouldnt the compiler know when to inline and when not to anyway? Why do we need an inline keyword, why would we know better than the compiler how it affects performance?
 
I wrote a driver printing the images using GPU. In
 
@Metallkiller You're talking about C/C++ here, right? C# doesn't have an inline keyword.
 
8:50 AM
Not keyword, just a term to say the program workflow all in a method/class..
 
@nyconing Not sure exactly what you mean.
 
hmmm.... Lets say the calculator are actually can be writing in a method.
without any framework, classes
 
Yeah, I know what inlining methods means, I'm not sure how it related to project architecture and frameworks. It's more of a low-level thing
 
Offcoz it is related.
inline too much causing big chance of bugs
 
What? Inlining, the compiler trick for performance, does not introduce bugs.
It increases the PE size in favor of less instructions to execute
Tradeoff memory vs cpu
 
8:56 AM
6 mins ago, by nyconing
Not keyword, just a term to say the program workflow all in a method/class..
 
Writing a huge ass-method is a recipe for bugs, yes, but that's not a problem if inlining, but of not properly extracting methods in the first place.
 
It shouldnt change the workflow of the program , by all means
 
Think again before saying.
@AvnerShahar-Kashtan thats right
If there has a limit not to using classes and methods, the workflow can be entirely difference.
 
@AvnerShahar-Kashtan I meant the Attribute you can place on a method to tell the compiler to inline it.
Question still stands: Shouldn't the compiler know best, how many references to a method I have, and compare the tradeoff?
 
@Metallkiller In most cases, the compiler will produce better output than a human-optimized attempt, yes. But like all software, it's not perfect.
 
9:02 AM
But all Im want to say is, managing a good project architecture, and sticking the project framework strictly. Then project wont sucks so much. In codes.
 
Tom
Why can't I find System.Threading in references in a .NET 4.5 project?
 
@nyconing I absolutely don't understand how inlining may change the workflow, maybe I don't understand something about inlining?
Can you make a simple example?
 
No example, just imaging how to managing object reference and memory inside a method (forget inline, because youre stick to the keyword)
 
@Metallkiller It might not be able to inline because the method has some property that makes it impossible to statically determine that there will be no conflict. But you, the developer, can tell that in practice, there won't be a problem, so you want to nudge the compiler to do it anyway.
 
I'm not stuck at the keyword, since there is no such keyword in c#. I'm stuck at inlining a method.
 
9:05 AM
nope, I mean project.
 
Tom
?
Why can't I find System.Threading in references in a .NET 4.5 project?
Or System.Threading.Tasks
 
@AvnerShahar-Kashtan What happens if there is a conflict anyway? Compiler error? Runtime error?
 
@Tom are you using system?
 
@Tom Do oyu have the System assembly in your References?
 
Tom
yes
 
9:06 AM
@Metallkiller Depends. Let's say, you have a method that calls System.Diagnostics.StackTrace to find the name of the method that called you. Now, at runtime, your method is inlined, and the result willb e different.
 
@AvnerShahar-Kashtan Oh, I see.
 
@Tom What type of project?
 
Tom
@nyconing Just a .NET library. Target Framework ist .NET 4.5
@nyconing I want to install a nuget package and get this: The package 'nClam' tried to add a framework reference to 'System.Threading' which was not found in the GAC. This is possibly a bug in the package. Please contact the package owners for assistance.
 
@Tom Can you use System.THreading in code?
 
Tom
@Metallkiller yes
 
9:10 AM
Rebuild, then restart visual studio
(Rebuild your solution, not visual studio)
So clean coding dojo says: Make interface like that:
	interface IFolder
	{
		string Path;
		long NumberOfFiles;
		long TotalBytes;
		int Depth;
	}
 
Tom
Whats interesting: on the other which is a ASP.NET MVC project also targeting 4.5, I have System.Threading in the references list. And installing the package works there.

Ok I try
 
But it's and interface with fields in it....wut?
 
Tom
@Metallkiller Also deleted bin and obj folders before. Still get the same error :(
 
Wait...where do you have System.THreading in the reference list? The list of your project? Or a using in a file?
 
System.Threading is inside System reference..
 
9:16 AM
Because I don't have that
exactly, I thought it's inside the standard System ref
 
or inside mscorlib in Xamarin
 
which reference references mscorlib?
Because that's where system.threading is.
 
or install through NUGET
 
http://ccd-school.de/coding-dojo/library-katas/verzeichnisstatistik/
How to make that IFolder?
 
Tom
All my projects are targeting .NET 4.5.

The main project is an ASP.NET MVC project. There I have System.Threading in the references list. But I also can't see that entry in the list when I want to add references.

Another project, where I put my business logic is just a dll. There I can't see System.Threading in the list. This project is referenced by the ASP.NET MVC one.
 
9:20 AM
@Metallkiller This is a good question and I no idea what is that, it is reference but cant be selecting manually, if user remove mscorlib reference through .csproj , all the type like string, int will missing then put project codes in volcano.
 
Tom
@nyconing In that business-project, I already tried to install System.Threading via nuget, but I still got that error trying to install the nClam package.
 
@Tom make sure your target framework is correct
 
What is nClam package
 
Tom
@Taurib Should be correct. I am targeting ".NET framework 4.5" in all my projects in that solution. And the nClam nuget package is compatible with that framework version. nuget.org/packages/nClam
 
Youre sure your project is really in NETFramework 4.5?
 
Tom
9:23 AM
@nyconing It's a nuget package. API for the ClamAV Virus Scanner.
@nyconing yes 100%
 
I had a case, where one of my DLL managed to set itself as .net standard 1.4
so just a heads up on that
had random build errors because of this
No, I didn't have build errors, but scaffolding didn't work for creating MVC views, got some weird error message with that
 
Tom
Just tried to add <Reference Include="System.Threading" /> manually to the .csproj file , but failed.
 
Is that new project?
Create new project again and add back your codes
 
Tom
@nyconing No its not. Ok I could try that.
 
Not a new project then when this happen and what you done
 
mr5
10:28 AM
@KamilSolecki just wanted you to know that I read that all shit. fucking hilarious xD
@KamilSolecki haven't read this one yet. will continue at home
cya negroterrorinos!
 
@Metallkiller make it a property?!
 
@Nerdintraining But then it's not like in the ccd!
 
@Metallkiller deal with it
 
I need good answers, my apprentice is asking me questions and my only answer is "Yes, that is wrong" :(
 
@Metallkiller Wich seems to be correct
Thats why you always copy pasta
 
10:37 AM
Nothing quite like pervasive concurrency bugs caused by someone doing a half-assed job when modifying code. :-(
 
half-assed job?
Moar locks! Blame the guy doing a half-assed job.
 
@Metallkiller what is the question?
 
@Wietlol Trying to build IFolder as the ccd has it, which seems impossible: ccd-school.de/coding-dojo/library-katas/verzeichnisstatistik
Should I mail die ccd to change it?
 
We had a server service (let's call it the ActionService) that, on startup, dynamically loaded a bunch of classes (Actions) to memory. Plugins. Simple enough. Later, when GetActions was called, it returned the list. Simple.
The actions were stored in a simple member field ` private List<IAction> _actions`.
No, at some point, someone changed GetActions. They wanted the actions to be loaded dynamically, if someone added a new DLL to the folder. So GetActions now, instead of just returning _actions, now reloaded the actions. How did it do it? It first cleared _actions = new List<IActionProvider>, then loaded the DLLs dynamically, searched for the classes, instantiated them, and added them to the list.
Result: For an unspecified amount of time, _actions was empty. Or had only one action. Or two. If a different thread called GetActions during ReloadActions, it would receive a number of actions between 0 and n.
Which, naturally, caused all sorts of errors.
 
@Metallkiller indeed, that doesnt work
as is shown in the interface above it, you can make properties in interfaces (even though they suck hard)
but fields in interfaces is a no-go
it violates the stateless contract
 
10:46 AM
@AvnerShahar-Kashtan that would be a great example of why work with immutable structures in concurrency heavy environment
 
you have to lock the GetActions()
and you have to make all plugins (or w/e) that use GetActions() not keep the list in their memory but call GetActions() over and over again
for that reason, it might be a good idea to not make GetActions() reload every time its called, but instead make the reload a different function or prevent reloading if the reload was done less than x minutes before now
 
Make a FileSystemWatcher that reloads the actions, in case a dll is added. Go back to the static _actions.
And of course lock the GetActions() method while the actions are reloaded, in case someone adds a dll and immediately wants to use it.
 
@Wietlol no. It would make asynchrony useless. And the lots of locking making the synchronous pair of the same code faster. Let the different users have an incomplete state sometimes, with the incomplete _actions. But don't clear the variable. Whenever reload happens fill up a new list, than when it's complete swap out the reference of _actions with the new one. This way it can't be between 0 and n.
 
the function that updates the plugins should be synchronized
the function that returns the list of loaded plugins should not
idc if you put that in one function
 
it shouldn't. Only if the risk is too high
 
10:55 AM
(iDunno if C# can do that)
 
01:00 - 11:0011:00 - 22:00

« first day (2516 days earlier)      last day (2436 days later) »