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

1:30 PM
!!c#
 
May 5 '16 at 15:17, by BoltClock
THIS ROOM IS OUT OF CONTROL
 
!!tell Mr.J urban crud
 
@Mr.J Crud One of the most useful words used for 'Crap'. Kids use it so the high-strung parents won't throw a fit.
 
what is the difference between typeof and gettype?
@CapricaSix ooooo
got it
I have another basic question
anyone?
 
@Mr.J typeof gets the type of a class. GetType gets the type of an object.
typeof(string) vs. "stringinstance".GetType()
 
1:45 PM
@Mr.J don't ask just paste
erm..
what i ment is
!!echo Mr.J Don't ask if you can ask a question, just ask the bleedin question - insert protpepr qupte here
 
@Nerdintraining That didn't make much sense. Use the !!/help command to learn more.
 
when I simply type

int i = 10;
What really happens?
 
Mr.J Don't ask if you can ask a question, just ask the bleedin question - insert protpepr qupte here
 
@Mr.J that gets inserted into whatever you're typing into
 
1:46 PM
Close enough :D
 
@Mr.J Your fingers press down on the keyboard keys, causing an electrical connection to be made.
 
according to me, int is a class belonging to System.Int32
 
Guys , I have a problem , I have angular project (like mvc)
I put static content under wwwroot folder
sometime i can access http://localhost:60218/app/index.html normally
other times can't access and it said in the console window , file not found 404
when i press on sources tabs
all files under wwwroot folder are not exist although i have them in Visual Studio !
 
so I am basically creating a reference right?
 
If you want a specific answer, ask a specific question.
 
1:47 PM
and value 10 is stored on stack
so i is a reference?
 
i is a variable
 
no object is being formed here, right?
 
@Mr.J int is a C# keyword signifying a 32 bit integer variable. It's often a shorthand for the .NET Framework's System.Int32 type.
 
yeah so it belongs to a class right?
 
1:48 PM
it's like writing System.Int32 i
 
"belongs" doesn't mean anything here.
 
^i is the reference?
 
"Reference" is a loaded word.
 
@Mr.J ^ is xor
 
sorry "belongs" is a wrong word, it is that itself
 
1:49 PM
Guys you are confusing the poor bloke Mr. J
Be nice!
 
my question is there is no object being made
 
How hard is this? int i is an int variable named i
 
int i = 10; does two things. It defines, in the local function scope, a variable of type int/Int32, which is a value type that takes up 32bits in the local memory.
It then assigns the value 10 to that variable's memory.
 
C# is object oriented?
everything is class and object
 
Not everything. The variable i here is a primitive data type.
A value type. A simple value in memory.
 
1:50 PM
BUt!
int i = 10;
 
when I press i.( I get a list of methods of the Object class)
that I can override? SO it is basically a class right?
 
That's because everything can be treated like an object
 
Read up on "boxing".
 
ints behave like objects without actually being objects at runtime
 
1:52 PM
oh dear, i remember that from way back when i started programming.
Wasn't that someinting abount Conversion between the pritive Datatype and the class?
 
@Mr.J C# attempted to improve on Java's rather clunky handling of primitive types (in Java, int is, indeed, a class and the value is an object) by having special handling for primitive types.
 
--> int.Parse() is slower than Int32.Parse()
 
@Nerdintraining No, those are just two calls to the same static method.
 
@Nerdintraining That doesn't sound right
 
Help
My parents (avni and kendall) don't agree on one thing
 
1:53 PM
Boxing means that if you do object x = 10, you're "boxing" the integer into an object, meaning it's allocated like a reference type, not a value type.
 
@Nerdintraining What thing is that?
 
No, Kendall was right on the last one - I'm not sure int i = 5; i.ToString() actually does any boxing.
Boxing is when you wrap a value type in a reference type - like if you add an int to a List<object> - it has to be treated like an object, a reference type.
But in the simpler case, the compiler and framework have explicit optimizations. When you call int i = 5; i.ToString(), there's no boxing involved, just optimizations.
 
When a value type is converted to object type, it is called boxing and on the other hand, when an object type is converted to a value type, it is called unboxing.
object obj;
obj = 100; // this is boxing
 
int i = 5;
object o = i;
int i2 = o;
 
right?
 
1:57 PM
What happens here is that you define a local value i. Then you allocate a reference type o and copy the value of i into it (boxing). Then, we create a new local variable, i2, and copy the value from o to it (unboxing).
 
@KendallFrey mind blown
 
(Unboxing can occur when you do (int)o - the scope is simply more localized)
 
Guys , I have a problem , I have angular project (like mvc)
I put static content under wwwroot folder
sometime i can access localhost:60218/app/… normally
other times can't access and it said in the console window , file not found 404
when i press on sources tabs
all files under wwwroot folder are not exist although i have them in Visual Studio !
:/
 
This is so intimidating
Sorry, but so...Automatic boxing is taking place?
 
ALso yes, int i = 10; puts an int on the stack and makes its value be 10.
 
2:06 PM
as @AvnerShahar-Kashtan you say C# deals with primitive types specially.
 
Boxing just happens if you put a value type into an object yourself
 
the reason I am getting i.(object methods) is because of boxing or some magic done by c#?
 
No, it's because of intellisense
 
int isn't a reference type - you can pass it to a method, but that method can only use the value, not change it.
 
@Metallkiller byref parameter passing has nothing to do with reference types
 
2:08 PM
@KendallFrey Jup but that's something else^^
 
What you described is more like immutability
 
WHat I described is pass-by-value for a primitive type compared to a reference type
 
@KendallFrey So what is intellisense really thinking?
 
Haskell is actually quite readable
 
@Metallkiller nah m8
 
2:10 PM
Haskell's list comprehensions feel more natural than Python's
 
Wait ok I actually didn't express myself clearly. You're right.
 
@Mr.J Anything you can do to an object, you can do to an int
 
And hi everybody
 
That is being done specially by c#?
 
2:11 PM
Intellisense? That's being done by visual studio
Well and other IDEs too
 
An architectural question: Should the business with the database engine be done by the model?
 
alright Thank you very much!!
 
@RonaldMunodawafa Yes
 
@RonaldMunodawafa no
 
Damn wth is wrong with me today
Doesnt the model describe what the data structure looks like and do the DB accessing?
 
2:14 PM
@RonaldMunodawafa maybe
 
Why would you want the model to access the DB?
I would have the DAL create the model
 
Because that's its job in an MVC environment?
Possibly by using an extra class so I don't have to write every sql statement in the model itself, but the model would still be the part which accesses the db
 
Is it?
 
You make me even less confident, but yes.
 
Why isn't MV* independent of the DAL?
 
2:20 PM
@Metallkiller That's a very common misconception.
 
I read the GoF section on MVC and it is defined for user interfaces
 
MVC is a UI design pattern. It describes the interactions between views and controllers. The Model describes that data that is displayed, but MVC, by itself, doesn't know or care how the model is created.
Whether the controller reads XML files off the local disk or accesses a DB or calls a web-service is immaterial to MVC.
I think Microsoft really added to the confusion by using the term "ASP.NET MVC Applications" which makes people think the whole app is MVC, whereas it's just the UI pattern.
 
In the context of your average web application. where does the the MVC part of the architecture interact with the DAL
I hate Microsoft for that
 
@RonaldMunodawafa I would have the controller call a business logic service to retrieve models.
 
So it would MVCD?
 
2:24 PM
The controller shouldn't have business logic. It's supposed to be in charge of UI logic.
The D would be?
 
DAL
So business logic should not be part of the MVC part of the architecture right?
 
@RonaldMunodawafa Exactly.
 
As models are just data bags
 
A small app might have the controller do the BL work itself, since there's no real point in inflating your architecture for pure principle.
 
There are a lot of that go well beyond the scope of what MVC was designed for. The architecture Microsoft seemed to have nailed down was MVVM
@AvnerShahar-Kashtan I'm an architecture Nazi. I believe purity is correctness
Joking
 
2:26 PM
@RonaldMunodawafa MVVM is the same thing. It only describes the UI. Your ViewModels shouldn't handle business logic either, they should delegate that to business logic services.
 
I am in agreement
 
But generally speaking, your overall app architecture is [Front-End] - [Business Logic] - [DAL/RA]
 
After reading a lot of articles, I ended up reading the section from GoF
 
The fact that the front-end is implemented as MVC or MVVM or whatever is relevant for development, but architecturally speaking, it's a black box.
 
The section has no hype and is simple to understand
 
2:28 PM
The DAL/Resource Acquisition layer might use Repositories or Unit Of Work or whatever - again, that's a design decision that shouldn't affect your architecture much.
 
Black-box abstraction for me is king when it comes to diagramming architectures
I might want to write an MVC framework entirely in JavaScript
For the front-end
I will use AJAX for my controllers
 
I also suspect the the MVC part of the architecture should not overlap too much with the server part of the overall architecture
 
user7480455
Hi all
 
Rails calls itself an MVC framework but it boasts about database connections on its homepage
This is something that I hopefully haven learnt
The closest thing we have to MVC on the web is something like Angular and React
Because the model has to update the view
 
2:51 PM
@Metallkiller need your help in whatsapp
 
user5500750
3:03 PM
How can I rewrite this using .Foreach on a list
 
user5500750
foreach (IWebElement pageLink in pageLinks) {
paginationLinks.Add(pageLink.GetAttribute("href"));
}
 
user5500750
Supposing List<IWebElement> pageLinks = new List<IWebElement>()
 
user5500750
Instead of using the foreach. How can I rewrite it to get;
 
user5500750
pageLinks.ForEach...
 
I've used quite a few source controls systems over the years. SVN. TFS. Perforce. But I've never caused quite as much damage as I do fumbling around with git.
 
user5500750
3:08 PM
Found it;
pageLinks.ForEach(s => paginationLinks.Add(s.GetAttribute("href")))
 
user5500750
I am curious if it is possible to add multple expressions.
 
my first loud cursing here was playing at start with TFS. I can't imagine someone with deep knowledge of source control system not preferring git to TFS
 
@Nerd had no more charge, had to finish my break first and then connect the phone^^
 
TFS couldn't roll back... Because insufficient space on hard drive
 
Git introduces a lot of concepts with non-intuitive names that take a while to understand. When you rebase, what do you rebase onto what? Which is the source? Which is the destination?
Trial and error.
 
3:11 PM
@Metallkiller Okay, no charger availididididibibidi
 
and it took me a week to make it into a consistent state again.
sometimes it just goes offline, than hell knows what are You missing from Your repository. Than I tried to unmap/remap, so it can find out the new stuff. One of my project went dead. Super dead. Couldn't open it anymore.
Nov 22 at 11:17, by ntohl
We have solved the problem. There is an ancient command line incantation with great power, which can purge the files from the TFS server. Admin used the correct spells. And there be empty. Uploading the solution from the backup worked.
 
:40400959
List<IWebElement> pageLinks = new List<IWebElement>();
paginationLinks = pageLinks.Select(s => s.GetAttribute("href")).ToList();
 
@KorVet ctrl+k makes :##### links unusable
Also don't go .ToList(), unless you actually need it. Enumerables can improve performance. And stuff. Keep the IEnumerable as long as possible.
 
3:30 PM
as long as Resharper doesn't warn You about possible multiple enumeration
 
Jup, then you better go ToList or ToArray
Actually, is there any reason to use an array over a list?
beside the tiny performance advantage
 
Any1 worked withe nlogger bevor?
 
I did
 
I'm off, cya tomorrow!
 
user5500750
3:50 PM
What packages do you use when creating installable releases?
 
user5500750
At the moment I am wondering whether advancedinstaller is worth $400 or whether there is something better.
 
4:05 PM
We use the simple free Setup project
under other project types -> Visual studio installer
 
fEIERABEND
CYA TOMORROW BIATSCHIZ
 
user5500750
4:35 PM
I will tryout Setup Project from Visual studio installer. I think I have used it before but found it limited.
 
user5500750
Has anyone tried Telerik UI?
 
user5500750
Is there any limitations in UWP compared to WPF?
 
user5500750
...besides being limited to Windows 10.
 
there are a lot
I think I couldn't fire up reflection in UWP
and UWP doesn't have the concept of GridView
maximum ListView
no DataTable
only if using specific control library like Telerik or Devex
 
user5500750
4:56 PM
Maybe Microsoft has not perfected it yet.
 
user5500750
Or is it just focused more towards mobile phones.
 
user5500750
I've read UWP is going to replace WPF and Microsoft is focusing a lot on UWP.
 
user5500750
So maybe lots of features will be coming out very soon.
 
5:31 PM
 
 
5 hours later…
10:03 PM
if i installed .net 4.5.2 it upgrades 4.5.1, right? it's not like the old days where you needed 1, 2, 3 and 3.5 if you had applications targeting those versions
 
user7480455
I think that is correct
 
god damn ops guys
they're haranguing me because someone has an app that targets 4.5
they keep saying 4.5 is installed and a security risk. i said upgrade the app to use 4.5.2 or higher.
 
user7480455
yeah it's very odd how MS did that
 
user7480455
it is not very clear at all
 
user7480455
the version will say a lesser version but when you bring up an error page it will show that is 4.5+
 
10:10 PM
yeah
 
 
1 hour later…
user5500750
11:29 PM
How does c# handle;
 
user5500750
try .. catch ... within try ... catch
 
user5500750
try {
try {
try {

} catch (Exception e){

}
} catch (Exception e){

}
} catch (Exception e){

}
 
user5500750
I am sceptical about using this in a program although it is obvious.
 
I don't know why would you do that. Because with a single try you have the option to handle multiple types of exceptions like catch(FileNoteFoundException) etc. So I don't really see a need to nest try catch.
2
 
user5500750
If the first try catch catches an exception does it affect parent exceptions?
 
user5500750
11:35 PM
Let's day you're reading an XML document and going through all the nested nodes.
 
No it dosent't affect the others unless you are throwing the exception from inner ones
 
user5500750
You may want to find out whether a an element exists in the document and if it exists you create a new thread to do some tasks.
 
00:00 - 13:0013:00 - 00:00

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