« first day (2613 days earlier)      last day (2351 days later) » 
00:00 - 13:0013:00 - 00:00

12:16 AM
hi @HamreenAhmad.
I'll split this image, locate both pieces like it's one image but modify only one piece.
 
12:36 AM
OR
in two cycles
for (int i = 0; i < bmap.Width; i++) {
for (int j = 0; j < bmap.Height; j++) {
instead of bmap.Width and Height use chosen area coordinates, relatively to width and height of your bitmap.
 
 
4 hours later…
mr5
4:29 AM
o/
What happens to an uncaught exception thrown by Task?
Do the app crash?
 
if you have an async function F() that throws, and you await on the returned Task from that function, then the exception is propagated to you
and you can catch it
 
mr5
why is this still not crashing?
 
4:50 AM
async void functions are "fun"
it's probably handled wherever it's executed on
if you did that in a WPF or ASP.NET Core application, you'd see a crash in the top-level exception handler
and also you wouldn't be able to catch it by wrapping DoSomething() in a try/catch
^ painfully realised this around 2 weeks ago
Basically use async Task functions instead of async void wherever possible
 
mr5
ahm. I'm kinda lost with your explanation
I have changed the function to Task and still won't crash.
same link
it finally crash
 
5:08 AM
well, now you're waiting synchronously on that Task
so yeah, the exception is propagated
C# 7.1 allows async Task Main() which is great
 
mr5
oh boi
I'm totally lost here
I guess I still don't know how async, await, Task works
 
I don't know where the exception goes in the console programs either
blog.stephencleary.com <- all things async
 
mr5
once you wrap something inside Task, does it run on the same thread it was called? My colleagues says it will only crash if the Task.Result has been accessed in the main thread
 
Task<T> is not a thread
 
mr5
and I am accessing the Result in my example right?
yeah I know
 
5:14 AM
Task<T> is a fancy synchronization primitive
the rest of the code after the await is translated by the compiler so it's put inside a lambda expression and passed to .ContinueWith(...). The code that's there must be executed somewhere
that's called the synchronization context
WPF probably puts this in the event queue
console programs probably use a default context which would be some kind of thread pool (with background threads, so they don't stop your program from exiting)
 
I'm having a hard time formatting some data from an EF model into a scaffold template. Pretty simple, just trying to learn the basics, anyone want to lend a hand?
 
^ this is pure guesstimation, someone correct me if I'm wrong
 
I have a set of CRUD methods created by the scaffold, and a model created from a local table. I have a partial class generated automatically and don't want to erase my format if I make a change to the database. ie:

public partial class DailySchedule
It contains a field like this
public System.DateTime Time { get; set; }
Then I have another class as follows:
[MetadataType(typeof(DailySchedule))]
public partial class DailyScheduleMeta
with a field like this:
[DisplayFormat(DataFormatString = "{0:hh-mm}", ApplyFormatInEditMode = true)]
public System.DateTime Time { get; set; }
You can see I'm attempting to format the datetime field into a time format.
I also tried this:
@Html.DisplayFor(model => model.Time, "{0:hh-mm}")
I don't (necessarily) need the data to be editable, so I've replaced the EditorFor with DisplayFor
But neither formatting seems to work.
What am I doing wrong?
 
mr5
5:42 AM
@SeventhSon since you're having an issue with formatting, the readers of your problem have now those issue as well ;)
 
Yeah yeah
 
CS1703: Multiple assemblies with equivalent identity have been imported: 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\vs\37d113ce\2b0f6a00\assembly\dl3\2102a99e\3edf5c9e_0447d301\System.Runtim‌​e.dll' and 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime\v4.0_4.0.0.0__b03f5f7f‌​11d50a3a\System.Runtime.dll'. Remove one of the duplicate references.
anyone has idea?
 
@Sajeetharan Did you check your project references.
?
 
I have an architectural question
 
Shoot, Ron.
 
5:45 AM
@SeventhSon yes
 
Good morning, by the way
 
@SeventhSon is there any other way to check?
 
You could try cleaning the solution, removing and adding the reference.
 
I understand the traditional MVC architecture. In the context of web applications, when you change the state of the program via the model, does this mean that the model is responsible for connecting to the database and updating whatever needs to be updating?
 
@SeventhSon this solution has 10 projects :(
 
5:51 AM
Because MVC as far as I know seems complete for user interfaces but incomplete for anything else
 
I have a question
anybody?
 
I'm anybody
 
I was reading about out keyword
it said that out tells the compiler that the value being passed would be initialized inside the method
but when I pass the value without initialzing say, in Main method
show(value). It shows error saying passing unassigned variable in the method
so what is the whole point? If I am supposed to be passing an initialized value already in the method
 
ref tells the compiler that the object is initialized before entering the function, while out tells the compiler that the object will be initialized inside the function
 
But aren't I supposed to be initializing variabled as well?
isn't it a good practice?
 
5:59 AM
I don't know though, that was copy/pasta. I have never used out.
 
*variables
 
@SeventhSon any solution
 
No Saj, sorry
 
Ah, alright!
 
I have used ref many many times but never out except in SQL. I had not heard of it honestly.
 
6:02 AM
ref and out parameters are used for storing values in predeclared variables by not explictly returning those values
Think of it as different forms of passing the pointers to variables in C
 
alright! :)
I always get confused what actions are checked at compile time and what at run time
any reading material for this?
 
6:17 AM
@Mr.J
maybe it will help:
https://stackoverflow.com/questions/1944725/compile-time-and-runtime
 
Thanks
 
7:11 AM
"An anonymous method, declared without parenthesis can be assigned to a delegate with any signature."
What does this means?
A anonymous method since is a method should be having parenthesis? RIght?
 
@KendallFrey I have decided to start working on Haskell
 
I have one more doubt
it says out can return multiple values
What is that supposed to mean?
I type return value1, value2; at the end of the method, it shows error
 
7:27 AM
no the values will be passed out justy like ref
 
2
Q: Returning Multiple Value with the 'out' Keyword in C#

WonderfulWonderI'm currently struggling to understand what it means when it's stated that with the 'out' keyword we're able to return multiple values. For example from the msdn site (https://msdn.microsoft.com/en-us/library/ee332485.aspx): "...The following examples uses out to return three variables with a sin...

 
GoOoOoOoOoOoOoOoOoOoOoOd Mornin' neglecterinos!
 
this was helpful!
Good Morning! :)
If someone could clarify what did that statement meant?
"An anonymous method, declared without parenthesis can be assigned to a delegate with any signature."
 
@Mr.J By passing multiple out parameters, assigning them new values in method, you have effectively returned multiple values
A cleaner way of returning multiple values is using tuples
Or structs or defining a class especially if you are going to passing around the same bundle of values all over the place
 
@RonaldMunodawafa wouldn't pass by reference work just the same?
 
7:31 AM
@Nerdintraining Yep it would
 
yeah it seems similar when I do with ref
it is just assigning values to the field
*s
 
The difference between the two is whether or not the argument needs to be pre-assigned
With out parameters, the argument must be assigned before being passed to the method whereas with ref it's not necessarily the case
 
So it is a bit like Constructor? Lol
 
@RonaldMunodawafa does it really?
 
@Nerdintraining What is 'it'?
And what 'does'
The only way you can find out is to load up a C# REPL or get a C# compiler
And test it out
That's if you're a mechanic
If you're smart, this is in the Language Reference
 
7:42 AM
int i;
setIntegerbyOutCall(out i);
If i am not mistaken that works
 
docs.microsoft.com/en-us/dotnet/csharp/language-reference/… is very clear and should be you goto for all questions regarding C#
@Nerdintraining value types have defaut values. For int, that value is 0.
Try this
 
setIntegerbyOutCall()?
is that really a method? I don't find it even on google!
 
@RonaldMunodawafa nah you got it wrong, ref needs to be intatiated with out it doesn't
 
Try a string
 
It is like the ref keyword, except that ref requires that the variable be initialized before it is passed.
 
7:45 AM
Sorry got the two mixed up
 
"With out parameters, the argument must be assigned before being passed to the method"
Maybe you meant the calling method
 
I double checked. I haven't used out and ref parameters in three years
 
Ye$, i win!

WHERE IS MA COOKIE?
 
@Mr.J I checked the Language Reference. It's actually vice-versa
 
It's ok
 
7:48 AM
My first day back at work and i get to be a smartass on the internet.
This is life!
 
haha
@Nerdintraining what does that method does?
 
@Mr.J don't know, i just made up a methodname for context resons.
Heyy kamil
!!timetoduel
 
yeah I literally searched it on google and msdn
3
 
7:50 AM
ayy :P
 
@Mr.J xD
 
DuelMasters was better!
 
What evs that is
 
sure, but gimme at least some time to get my work stuff started
 
anyone has idea? CS1703: Multiple assemblies with equivalent identity have been imported: 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\vs\37d113ce\2b0f6a00\assembly\dl3\2102a99e\3edf5c9e_0447d301\System.Runtim‌​e.dll' and 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime\v4.0_4.0.0.0__b03f5f7f‌​11d50a3a\System.Runtime.dll'. Remove one of the duplicate references.
 
7:53 AM
Remove one of the duplicate references.
 
^
reading error messages is often helpful.
 
7:59 AM
Heyho avni
 
8:11 AM
is overloading by access modifier possible?
of constructors specifically
like can I have public ClassName(); and private ClassName()?
 
@Mr.J I believe it's not possible.
 
How would that make any sense?
How would you differentiate which is being used?
 
Yeah, was just pondering about the possiblity.
 
Yeah, its not a thing because there is absolutely no reason for it to be :P
 
So I guess overloading by changing return type AND Changing Access modifier is not possible.
yeah xD
 
8:15 AM
@Mr.J you wrong again =)
 
again?
 
first you asked about possibility of overloading by access modifier
 
While overloading on the return type is a thing in the CLR, they decided to not expose that feature. Why? It can be easily imagined to be really bad practice, and C# has a tendency to not allow things like that
 
private int hello();
private string helIo();

I am a devious bastard!
If you have the wrong font enabled
 
Most features are geared towards protecting against casual abuse, not determined abuse.
And generally speaking, I like Eric Lippert's answer to "why doesn't C# [or any language] have Feature X": "All features are unimplemented by default".
> The absence of a feature does not need justification. Rather, all features must be justified by showing that their benefits outweigh their costs.
 
8:26 AM
+1
@AvnerShahar-Kashtan you lived in isreal right?
 
@KamilSolecki For other languages
You can fork C# and support return type method overloading
 
@RonaldMunodawafa oh please do that, i love to programm in clusterfuck :3
 
@Nerdintraining Still do.
 
@AvnerShahar-Kashtan What is your opinion on trumps most recent global decision?
 
@Nerdintraining You really want to bring politics into the room?
 
8:30 AM
@AvnerShahar-Kashtan Si claro, never stoped on that topic in the past :)
Aswell i want to know the opinion from an israeli and you are the only one i have contact with.
Well more or less contact
 
Well, I believe it's a meaningless declarative statement, just like the last time a US president made the exact the same statement in the 90's. It serves no purpose except to distract, divide and destroy chances for goodwill.
 
@RonaldMunodawafa for the things I imagine that useful, one can work with generics
 
Or if C# supported sum types and match expressions, then all this jazz about overloading as a language feature would not be needed
It's such an old feature, it should have been in C# if they didn't try to make C++ programmers happy
 
@RonaldMunodawafa So they need to make Haskell programmers happy instead?
They need to make C# programmers happy. They do that by careful adding some features from functional languages while keeping the OO and imperative roots of the language. Most of the time, I feel they strike a good balance.
 
@AvnerShahar-Kashtan No. They need to make C# programmers happy
 
8:34 AM
Thats what he said :D
 
Slow Internet
Forgive me
 
Again, the answer to "why doesn't C# have [my favorite feature]" is because no one made the case for it, wrote up a spec, designed it, implemented it and tested it. You can go on github and see a lot of language proposals (including sum types, I think) that haven't made it there yet.
 
Pattern matching did
 
@RonaldMunodawafa Yes, it did. Because it made it through those stages. Probably not to make C++ developers happy.
 
@LANimal How AM I wrong again though?
ah alright
 
8:40 AM
@Mr.J Yeah, you can overload functions by changing it's returning value.
 
Yeah just checked above answers. It wasn't allowed in java though
 
a piece of happiness to C++ developers =)
 
ohayou
 
@AvnerShahar-Kashtan C++ programmers will always be happy with anything as long as they don't pay for it. I should have said Java programmers are the ones the C# team cares too much about
From what I understand, C# discriminated unions were going to be incompatible with F#'s
 
8:55 AM
I'm really not sure why you're framing it in the context of "developers in other language we're trying to suck up to".
 
That is the way of it often is phrased when people describe how they wanted programmers from X platform to migrate to theirs
 
@AvnerShahar-Kashtan What happend in the 90s
 
@Nerdintraining In 1995, US Congress passed a bill declaring Jerusalem the capital of Israel. I believe Clinton never officially signed it into law, but it was about as meaningful as the current declaration.
@RonaldMunodawafa Well, since I'm not in the C# or Visual Studio sales team, that's not really an interesting metric for me.
@Nerdintraining Oh, here we go:
> The bill became law after Clinton declined to sign it for a 10-day period while Congress was in session. He, George W. Bush and Barack Obama all postponed the embassy move every six months for each of the 22 years since the law was enacted.
 
9:19 AM
Good morning :)
Guys i need help, i have to design a gui :/
and my sense of design is like my sense of fashion
(not existing)
any tips or resources?
 
Well now it's signed into law and it's the offical standpoint of the US.
Arabs are sure hating it ^^
@SebastianL Make background black and foreground yellow
catches the attention
 
@AvnerShahar-Kashtan In other words, Trump was the only one who actually applied the law
The issue in Israel and Palestine is complicated and should be left to political scientists, not computer scientists and software developers
 
Hey all. I just set the startup-project for my solution to Project2. However, when I run that in Visual Studio, it also runs Project1 first (and if i close that console window, it runs Project 2). Anyone knows how this could be resolved? I only have 1 startup project.
 
@AvnerShahar-Kashtan It should be interesting to you because it influences how your language will evolve
 
9:35 AM
good (ugt) morning
 
@SebastianL desktop\web\mobile?
 
@SebastianL my boss always say: Copy from iPhone.
 
@SebastianL Use a standard. It doesn't matter which. Choose one and stick to it.
e.g. use Material design and guidelines
 
If you're hard pressed, do whatever the guys at Google say is good for the web
 
9:51 AM
@RonaldMunodawafa Political scientists != politicians.
@RonaldMunodawafa No, he didn't. He just made an empty declaration.
Reiterating the previous empty declarations.
Nothing has actually been done.
Let's put it this way - I'll believe the actual embassy will be moved to Jerusalem when I first see it, open, in Jerusalem, and not a moment before.
 
@AvnerShahar-Kashtan I didn't say politicians. Trump and Jeremy Corbyn are politicians. Adam Habib is a political scientist.
 
mr5
o/
 
@AvnerShahar-Kashtan What is your take on the Israel/Palestine conflict?
o/
 
mr5
the old members are here! :D
 
Who are the old members
 
10:00 AM
@RonaldMunodawafa Political scientists are probably the last people you want running things.
Just like you wouldn't want physicists doing construction.
@RonaldMunodawafa Yes, let us compress the whole issue into a comment in a technical chat room. :)
 
@AvnerShahar-Kashtan I support Israel because I think they'd be a better ally than Palestine
 
There, that's a perfect way to over-simplify the issue.
 
Well, I thinkt that countries should sort themselves out unless we have a vested interested in them. In this case, for me, Israel would make a wonderful addition to the allies
I don't think that's a simplification. That's choosing what to care about
 
hello
 
I don't like Nethanju (i hope i've spelled him correctly)
 
10:08 AM
Guys i need to understand Dependency Injection , there are many articles on the internet but i am still confused ,

Does anyone have any recommended link that describe DI with example ?
 
It's a simplification, as realpolitik usually is, because choosing to ignore history, sociology and morality in the pursuit of an abstract "interest" usually means that the results of a political choice are rarely what you think they are.
 
mr5
Welcome to C# Politics Chat Room
 
Havn't read through it maself but i will do in due time
 
@RoelvanUden @ntohl @LANimal it's for a desktop application. Thanks for the suggestions ^^ i'll try material design guidlines, they do look simple enough for me to implement ^^
 
mr5
@Bassem try to work with Xamarin. DI is very useful here since you need to make a code that varies platform per platform. DI can be described as implementation switching
 
10:11 AM
How do you guys get better in coding?
 
@mr5 I am working with ASP.net Core ( MVC ) and WEP API
 
I feel dumb asking stupid questions. When I study a topic I tend to go in very depth and just loose everything
 
mr5
write code everyday or asks stupid questions in SO? (same as what I did)
 
@Nerdintraining yes already checked it , but need more examples :/
 
@Mr.J You don't get better at coding. You just realise you are worse than you thought you were and you have a longer way to go than you thought you did
 
10:12 AM
Welp the problem is, that there are some idiots in both parties wich are igrnoring history and call out the other party as heretic and evil.
If I'm not mstaken
 
@mr5 I am no longer able to ask question in my other account
 
@Mr.J Start implementing clusterfuck on purpose.
 
lol
My brain would explode.
 
@mr5 smoke weed write code every day
 
mr5
@Bassem I don't know how DI would help on web since most implementation can be generalize there
 
10:13 AM
too many details a big program has
 
@mr5 hmmmmm , Thanks mr5 , I am checking . .
 
a single topic has too much depth..I keep getting drowned in the details without coming back to surface and implementing it
^I hope you understand
@mr5 You don't get many chances to ask stupid questions
on SO.
 
@Nerdintraining Sure. Never said it's a simple issue.
 
mr5
@Mr.J I did
look at what I did years back
 
@mr5 Implementation switching is the most concrete and easy to explain use of DI, but it's not what DI is necessarily about.
 
mr5
10:16 AM
I even ask how to make a browser from scratch :P
 
It's about a different architectural mindset, enforcing coding to contracts rather than coding to concrete members.
 
haha
 
@Mr.J it works because mr5 has a picture of Finn the Human
 
mr5
@AvnerShahar-Kashtan yeah I totally missed that.
 
never watched adventure time.
 
mr5
10:19 AM
If you integrate DI library in your codebase, the way you architect your system would be totally different.
 
I checked you out! Nice Apps! _
I wish I could make those as well.
 
@mr5 DI on the web would help you generalize the actors involved. A naive architecture would be "my controller accesses the DB to get the data, so it creates a DAL object and calls it to get the data". This usually doesn't scale well for larger projects. You create a DAL based on the needs of the controller, but then suddenly a second controller needs it too, so it creates second instance. But then you want to cache them, and you suddenly need to share instances, and it's a mess.
With DI, you don't think of the DAL as a class that the controller creates to get data, it's a service that it depends on. Each controller says "Get me the DAL, please" and gets a DAL - it could be shared, could be separate. But the DAL is an independent service that's used by a controller (or anyone who needs it)
 
hi guys
how can i check with windows service that when did a pdf file opened in MS edge browser
 
5
Q: Windows Form application on Visual Studio Code?

Syed Mohammad Iqbal Al-QudsiI am currently studying Visual Basic .Net but I'm currently using Linux Mint 18 Mate and the only Visual Studio that's available is Visual Studio Code. I was wondering if it's able to create Windows Form Application?

^ Is it possible?
 
mr5
Create a Windows VM?
 
10:31 AM
That is too much!
 
@Nerdintraining
 
Hello, guys i write in a file using AppendAllText and i think there's no flush or something cause i send it via mail after writing and the file isn't uptodate
Is there a flush i can perform somehow?
 
@MarioR. No, File.AppendAllText should close and flush the file properly.
 
Are you sure? I'm calling a c# consol app via vba and the file is created and written inside c#, the vba sends the file via mail and it's still not uptdate
when i send it the file should already have been flushed if appendalltext does it
 
10:44 AM
Yeah, quite sure. AppendAllText does an Open, Write, Flush and Close.
 
Hello Senpai-Sensai-Samachucan
 
Is it possible you're reading the wrong file in VBA?
 
Heyho! Whats up sharperinos?
 
@AvnerShahar-Kashtan No, because if i want to get logs again in the mail the logs are correct
Problem is i even waited 5s and the file still wasn't updated so i have no idea what's the problem
 
10:59 AM
is assembly same as package in java?
 
@MarioR. I had similar issues one time. I think I changed to File.Open, and writing within using. That solved the issue
 
you mean like using(filestram file... this?
@ntohl
 
yes
 
please answer my doubt
 
mr5
answers your doubt
 
11:10 AM
I am reading about access modifiers and it is talking about assembly
8_8
 
mr5
when it has internal in it, the scope is assembly-wide
 
what exactly is an assembly?
 
.exe is an assembly
.dll too
 
assembly is a full project basically?
so an assembly is a single project or many projects?
 
Wow no idea it doesn't make sense, i wait 5seconds after i close the file and it's still not updated
but if i show a message box it will getu pdated even if i close the msg under 5s so wth
 
11:15 AM
@Mr.J 1 assembly is 1 csproj
 
Yeah, FInally Thats clears a lot of things! :)
 
@Mr.J when You right click on the proj, and properties, there, You can set the assembly name for that proj
 
ah
 
mr5
y is dis room full of mr* now? stop copying me
 
Lol
@ntohl I am using visual studio code
not sure the option is there
 
11:18 AM
@MarioR. did FileStream helped?
 
@Mr.J javas package is the same as namespace in c#
 
I know that MetaKiller.
 
no @ntohl
 
@mr5 Should I have given your name Final Mr.
or better, static final
 
11:37 AM
@Metallkiller Crud you man
 
Was I funny?
 
11:54 AM
 _______  _______           ______     _______  _______
(  ____ \(  ____ )|\     /|(  __  \   (       )(  ____ \
| (    \/| (    )|| )   ( || (  \  )  | () () || (    \/
| |      | (____)|| |   | || |   ) |  | || || || (__
| |      |     __)| |   | || |   | |  | |(_)| ||  __)
| |      | (\ (   | |   | || |   ) |  | |   | || (
| (____/\| ) \ \__| (___) || (__/  )  | )   ( || (____/\
(_______/|/   \__/(_______)(______/   |/     \|(_______/
 
I have a stupid question to ask again
anybody here?
 
just ask
 
I wanna understand the work flow of this code
when is the get property being called?
 
12:12 PM
@Mr.J you wana take a wild guess bevor i answer?
 
Well get method would be called whenever I call the Name property
but in print method it is directly printing the name which has been set by the Name property.
I don't see any role of get in the example
am I right?\
 
yeah.
 
Yeap pretty much
 
but take note: name is only accessible in that class. Outside of the class, You must use ac.Name to reach the variable
 
hmm
 
12:17 PM
It also should be Print() if you want to follow coding conventions
 
and the class should be Pascal too... Access
 
oh! I remember it being different in Java!
Imagine If I was asking such small questions on StackOverflow I would have been criticised so much
You guys are amazing! :')
 
Writing Documentation is 100 times more fun when you are listining to this at the same time:
@Mr.J CRUD YOU TWO! ♥
 
Yeah but I need to understand what the tech by my side is saying while he reinstalls my pc for me @Nerd
 
@Metallkiller Havn't you finished yet?
 
12:30 PM
Gotta fill out abbreviations and glossary and stuff
 
CRUD?
 
Yes.
 
I remeber this term used in database
why 'crud' me?
Create Read Update Delete me two?
 
Complicated
This might be the beginning, but this one might be aswell.
Also don't forget this one
 
Hi everyone
 
12:38 PM
Hi
 
Does any one knows how i can print just a div in a html page? (i have found one solution but after printing the javascripts on the page dont work any more :( )
 
Like...in asp.net?
 
yes
i have done s.th like the link above
 
I bet You are rewriting the div with the id, so You can't find the root div anymore
 
Just wanted to make sure.
I have no idea about asp.net.
 
12:44 PM
rewrite? maybe , i am not sure
let me take a look
prtContent.innerHTML = strOldOne;
 
@Metallkiller -_-
 
this line disables the jquery functions, without this,everything is fine
@Metallkiller :)
 
@Mr.J 👌
 
Now I crud you!
 
00:00 - 13:0013:00 - 00:00

« first day (2613 days earlier)      last day (2351 days later) »