« first day (1683 days earlier)      last day (3259 days later) » 
00:00 - 17:0017:00 - 23:00

12:05 AM
@SteveG \o thanks for being a vet!
 
 
4 hours later…
3:52 AM
0
Q: C# : How to manage captured variables in threading

ElaheLook at this sample code : private void StartProgram() { for (int i = 0; i < 10; i++) { if (true) // some conditions { int Temp = i; // every thread has different memory location for Temp variable. ...

 
4:12 AM
@juanvan no worries, but remember, today is the day to remember the ones who didn't make it back :(
 
Hi everybody! Has anyone used Akka.NET yet? Any story? Comparison to Erlang? Pros & Cons?
 
YAY TUESDAY
 
 
2 hours later…
6:28 AM
Shit, missed a click in excel, printer wouldn't stop printing. Now I have a printout of a CSV. On 30+ pages.
 
6:56 AM
hahaha
good use of company resources :-P
Good morning
 
morning!
 
been working on some shitty vb6 code
I have vb6
its the worst!
 
7:19 AM
hey all
anyone knows about MATLAB
i've a question about it
 
May 9 at 20:36, by Roel van Uden
Kittens die if you ask whether you should ask a question. Save kittens. Ask your question directly.
 
@RoelvanUden -> I know that
cuz here for C#
I said it
and based on ur words...
I've some codes like this:
 
7:36 AM
classdef (Sealed = true) LwieaAlgorithm
    properties
        r
        d_n
    end

    methods (Sealed = true)
        function ET = Test(this, arg1, arg2)
            // some stuffs

            this.r = floor(arg1);
            this.d_n = arg2;

            // some stuffs

            Test = this.r + this.d_n;
        end
    end
end
it's a sample code
when a user instantiates from this class and uses that function like this:
obj = LwieaAlgorithm();
obj.TotalEnergyDissipation(1, 1)
the code works correctly
and my question not about how code lines work
my question is:
when I set the value for that properties:
this.r = floor(arg1);
this.d_n = arg2;
and the function ends
I want the set values for that properties, store in the created instance of the class too
I want to know how can I get this.
tnx in advance
for example:
in this situation that I mentioned above(after ending the function):
obj.r // []
obj.d_n // []
and I want this:
obj.r // floor(arg1)
obj.d_n // arg2
 
7:52 AM
@BenjaminDiele: haha :)
 
@MRS1367 Ah, no idea. Never seen OOP in MATLAB
 
@scheien even though it's tuesday, i act like i do on mondays
 
@RoelvanUden -> tnx mate :)
 
8:11 AM
@BenjaminDiele For all intents and purposes, it is monday.
 
@RoelvanUden Jup, my whole week will be a mess of mistakes now.
 
"I don't like how arithmetic works, my favourite language should do it differently"
 
8:45 AM
Oh. It seems to be a joke.
 
@RoelvanUden -> in which chat-room(s) I can find some MATLAB expert persons?
 
How do I make a button call a method? usually it has worked just to do
private void button_click(object sender, RoutedEventArg e)
{
method;
}
 
Do you get any error/exception?
 
"Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement"
 
maybe a pair of parentheses would help
method();
 
8:55 AM
New error, "No overload for method 'method' takes 0 arguments"
 
Make sure that you are passing the correct parameters (type/count) to your method.
 
@Slyre You might also want to take up a book about programming
 
@MRS1367 Ask as a Q on main SO? That's how I got my MATLAB answers
And thus a series of meetings begins.
 
 
2 hours later…
10:49 AM
in here, can ask about SharePoint too?
in Sugarcube Corner on Meta Stack Exchange Chat, 22 hours ago, by MRS1367
query.Query = String.Format("<Where><Eq><FieldRef Name='Title'><Value Type='Text'>" + properties.AfterProperties["Title"].ToString() + "</Value></Eq></Where>");
SPListItemCollection splicFoundRecord = mySPList.GetItems(query);
my problem have been described in there
 
11:06 AM
I found the solution for my issue in MATLAB:
in F#, 16 mins ago, by Atomic_alarm
@MRS1367, hello. You need use Handle class not value.
 
11:56 AM
Anyone experienced with this VS extension - visualstudiogallery.msdn.microsoft.com/…
 
12:17 PM
Sanka room, ya dead?
 
@RoelvanUden RIP
 
Hi there
I have a quick question: a stack of size capacity should accept size or size - 1 items?
 
 if (count < capacity - 1)
 {
     data[count++] = item;
 }
I'm gonna open a PR. :)
 
@IonicăBizău It's not wrong.
 
12:20 PM
var stk = new Stack (2);
stk.push (1);
stk.push (2);
When pushing the second element, it throws an exception.
Because 1 < 2 - 1 is false.
 
@IonicăBizău Oh yes, correct, but I wonder what the deal is with count++
Does it use the index AS IS or increments it BEFORE using it?
For the sake of clarity, nobody sane would write it like that.
data[count] = item;
count++;
 
Hey, it's my uni teacher. :D :D :D
 
Makes sense now.
@IonicăBizău Sorry, he's weird.
 
count++ returns the value before incrementing the value.
 
Then that's fine sure, but I still find it extremely funky to read. I had to think about it..
 
12:23 PM
True.
Thanks for answer, btw.
 
np :P
 
THE
12:35 PM
always been confused with static classes
 
Hey guys, I refactored two methods I think are an issue on performance but seems it helped a little bit but not too much. The methods I refactored are in my controller, if performance is still an issue, what do you think I should look into? I am using the firebug profiler to get the milisecs.
 
THE
@KalaJ !! google code review stack exchange
!! google code review stack exchange
 
@KalaJ You refactored stuff you think was slow. That's not how you fix performance problems :D
 
@KalaJ Did you actually profile your server?
 
12:38 PM
Isn't firebug for measuring request-response timings, and not much more than that?
Try profiling your code itself
 
Firebug can profile browser events too, like time to paint, to ready, to load, etc.;
But that says nothing about the server ofc
 
Well yeah, it does the client-side stuff (which is pretty normal if you think about it)
 
Still, Firebug is old and dated. The build-in tools are better now.
 
I profiled using firebug :S
I used code review for help on the refactorign actually @THE
Should I just use a stopwatch
 
Use a profiler. They were made for profiling. It's even in the name.
 
12:41 PM
@KalaJ Firebug profiles client-side stuff. Doesn't really help when you're having server-side performance problems
 
profiler in .NET?
the profiler for firebug identified my controller methods lol
 
@KalaJ It's build into your VS if you've got a decent one
 
It didn't identify my js methods???
no, it's not
 
@KalaJ No it didn't. It identified your ROUTE.
 
ahh yes. my route
because the names of the methods are in my controller
and not in my js
so I assume it identified my actions in my controller
 
12:43 PM
It's not huh? :P
 
wait what
how did you get there?
 
ALT+F2
 
so don't use a stopwatch haha?
 
Tick Performance Wizard on, and go. Run your code a bunch of times.
Then stop it and wait for the report to roll out.
Then identify your bottlenecks. Profiling ;-)
 
@RoelvanUden important for cache warmups!
 
12:44 PM
It's opening up in IE, can I force it to open in firefox?
 
@BenjaminDiele Exactly. Running it once is unfair.
 
my debug is set to firefox
 
Set the default browser but it's completely irrelevant tbh.
Who cares what hits your page.
 
We are having problems on IE and Chrome for our web app, I might not get to that step I need
 
Haha you might want to consider tackling that before performance issues.
 
12:46 PM
yeah some other people are taking care of it :/
how can I rerun the profiler?
okay let me see how far I get with IE
okay weird... the peformance isn't that bad on IE :O
 
Hi All, How to get the current text after each key press in a Winforms TextBox? plz insists me to use textchanged event or keydown or keyup events for ex:if i enter 'pradeep' i am getting current text values as 'pradee' in keypress event
 
Functions with most individual work are: System.Linq.Enumerable.ToList... Is that a bad thing?
 
1:01 PM
'lo all
 
@KalaJ That's weird. What are you even doing?
@KalaJ Not per-see, so long as you use it correctly. Just like everything.
@Pradeep Text + currentKey?
@Squiggle Hi :-)
@Pradeep Or just use text changed event from the text box. Makes more sense.
 
Hi @RoelvanUden i dont want to use textchanged event ..any other alternate???
 
@Pradeep ... Why not? That's what it is designed for?
 
o/
 
I think I need to learn how to use the profiler built in lol
like e.g., what is the Avg Elapsed Inclusive Time?
 
1:07 PM
hey guys
 
hi
sometimes that time is high (91) or low (0.04) for the same function. I'm not sure how this profiler is dividing up the method calls
 
There is something I need to clarify in mvc EF Database-first approach and modifying the database schema.In this answer stackoverflow.com/a/9071939/2083526 the respondent said you should simply add a partial class and it will implement the validations for example.What I dont understand is why not just add the partial class with the data annotations instead of adding that [metadata} attribute ?
 
@KalaJ I don't know, but that sounds pretty google-able
 
Performance problems are awesome to solve if there's enough budget to fix it. Not much tops the feeling that you fixed up something slow and clunky into something fast and lean.
 
1:17 PM
@KalaJ Seems pretty straightforward. Does that explanation make sense to you?
 
yes, but the measure is ticks... I'm not familar
what ranges are good or bad?
so the times in VS profiler are also measured in ticks?
 
@KalaJ Doesn't matter. The biggest values are the slowest. Fix those and your stuff goes faster.
 
Hello every one, I would like to know how to get an address of a string object in vb.net
we have an equivalent method in VB6 called StrPtr(strObj), but when converting to Vb.Net
 
@KalaJ hover over the column header and you will see
 
I got stuck at this point and I am getting some exception like this
 
1:20 PM
Actually it seems like "Elapsed Inclusive Time" and "Elapsed Exclusive Time" are percentages but I am wondering what is the unit for "Avg Elapsed Inclusive time".
 
@Ganesh "address of a string object"? You mean the memory address?
 
!!tell ganesh google Obtain the Address of a Variable in C#
 
because values for the latter can be up to 4000!
 
but 4,000 what?
 
@Ganesh that MSDN link looks good...
 
thanks @CapricaSix
let me have a look at them once
 
@ton.yeung thanks for the link last week, I upgraded to DOCSIS3/50down.... so much better
 
@Ganesh She's a bot.
 
1:22 PM
@RoelvanUden
what do you mean by "She's a bot"
u mean not a "human", then how can "she" answers my question??
 
just literally "she's a bot"
 
@Ganesh Uh.. @CapricaSix ain't human. It's a cylon. A bot. A robot. A machine.
 
@Ganesh I told her to tell you the results of a google search.
 
a sexy robot
 
Because I'm lazy ;)
 
1:23 PM
beep beep
 
haha... good @Jeremy
 
but that doesn't stop my love on her
 
I have used the same piece of code
but I am getting some kind of error
so would like to know like
whether I should be free up the gcHandle object after usage??
 
Understanding something before throwing random copy/paste code at it usually does help, yes.
@Ganesh Why are you even touching the GC?
 
@RoelvanUden
"Why are you even touching the GC?" What do you mean by this??
 
1:26 PM
@Ganesh I'm not sure you need to use GCHandle. Look at the MSDN link here: msdn.microsoft.com/en-gb/library/zcbcf4ta(v=vs.110).aspx
 
Okay
 
is there anyway to edit/add implementation template like IDisposable?
 
@Ganesh If you don't have a very good reason for touching the garbage collector, you have absolutely no business dealing with anything related to it. Furthermore, if you need to ask how to do something with the GC, you often have no business dealing with it at all either. Hence the question, why?
 
k k,
in my case I need to get the address of a string
 
@RoelvanUden on the other hand, how would one learn about the GC without asking questions?
 
1:29 PM
@Ganesh Why?
@BenjaminDiele Hence the often.
 
so I am using the handle and ever thing which I found in some google
 
@Ganesh I think @RoelvanUden is right to ask why you need the string's address in the first place.
Is there another way to solve some business problem without getting the address of the string?
If not, then you need to do some reading about this stuff and make sure you understand what the code does before you use it.
 
it is doing the memory copy
and I have given a dump of code and asked to convert it to .net from vb
 
@Ganesh Stop focusing on the problem ("How do I get the address of a string?") and start focusing on what is the problem you are trying to solve. I am 99% sure you're getting along solving whatever problem you have the wrong way.
 
where I am investigating an equivalent piece of code in .net
 
1:33 PM
@RoelvanUden Sounds like he's a part of a team-wide effort to convert VB to .NET code method-by-method.
 
@Ganesh A memory copy.. you want the bytes of a string? Get the bytes then.
@Jeremy An incredibly wrong way to recreate an app.
 
@RoelvanUden I agree, but he's not likely to be able to change that.
 
And still widely used unfortunately
 
If that's the case I'm dropping all support right this instant :P
@CharlieBrown Anyone sane could tell you it's a bad idea, no?
 
Surely, but since when is management sane and contract workers questioning?
 
1:36 PM
private sub CopyMemorey Lib "Kernel32"
Alias "RtlMemoryMove" (ByRef Destination as Integer, ByREf Source as Integer, ByVal lenght as integer)
 
Stop doing stupid stuff.
 
this is the sub-routine name
I have n't written any piece of code yet, @RoelvanUden
it was existing already partially converted by some one and I am on it now
 
@CharlieBrown At least here more so than in India ;-)
 
:/
@Pheonixblade9 HI HELLO HOW IS YOUR 6 AM MEETING
Oh man. IT is inflicting terror on my poor, 120GB SSD C: drive :(
New scheduled task that updates a 20GB folder nightly...
 
@CharlieBrown if you want to add data annotations to an ef class in db 1st approach how should you go about it so you don't have to repeat it when ef model updates?
 
1:48 PM
@Gotalove Partial classes, all db-first are already partial, so you make a matching partial class for annotations you need
 
I dont get why they use the metadata attribute here stackoverflow.com/a/9071939/2083526
 
@Gotalove Metadata is often used for the client side MVC
 
I usually just create partial classes in models folder then in controller I do sth like return View(u) where u= from * in efdb.table select new myclassmodel{ }
but is this the right approach
it means everytime I remap to my model
 
The majority of the time, using a separate model for the view is the correct approach
In very simple cases, it may not be needed, but it provides a separation of concerns and allows the two (entity and model) to vary independently of each other
 
so in that case am I really using partial as it shuld?
 
1:54 PM
@Gotalove I dont have enough information about what your trying to do to say if you are or not
 
okay
 
Even if you are not... you can always refactor later
 
let me create a simple pastie to illustrate how I approach it
@CharlieBrown like this pastie.org/10208142
 
@Gotalove Looks good. You should probably have [stringlength] on both the model and the entity, but otherwise that is the most favored approach
 
what of the naming convention?should they be the same
I have usermodel and user class
instead of both as user
 
2:06 PM
I use the same names, if it makes sense
You should likely not have the Password and Password salt fields mapped though
 
so it shouldn't clash
why?
 
You dont want that sent out to the browser
 
ef sends evrything mapped to the browser?
 
Its MVC at that point, but only map what you need
For login, your model would typically be something like class LoginModel { public string UserName{get;set;} public string Password {get;set;} }
 
but what of the edit user in controller pastie.org/10208158
 
2:12 PM
For edit, you would use your UserModel, public ActionResult EditUsers(UserModel model)
 
at this point dont I end up requiring the items left out?@CharlieBrown
 
Yeah, you dont need the salt since you dont use it, or password since your not using that either
Instead of checking form fields directly, string old_password = Request["oldPassword"], add those to your Model
 
so does this mean i would have to create 2 different classes? if I use it in 2 seperate ways?
depending on the different view requirements?
 
You need one model for each different view
They don't neccessarily line up or relate to your entities
ActionResult Login(LoginModel model)
ActionResult EditUser (EditUserModel model)
ActionResult ChangeProfilePicture(ProfilePicModel model)
 
wow so you will have as many models as views.this I dint know
 
2:16 PM
Close to as many anyway, some will be reuseable
 
I basically created like one llarge model accomodating nearly everything
 
Entities are 1:1 to db tables.... Models are 1:1 to views
 
except where I had two or more entities on views required like employee schedules
then I would have a viewmodel
 
Correct, 1 view model that has the props you need for an employee schedule
 
@CharlieBrown You don't name them ViewModel?
 
2:18 PM
so okay when will you need to have a view model
 
@RoelvanUden I do, personally
 
folder
 
@CharlieBrown Ah'k :-)
 
then you should advice me to do that :-P
 
@Gotalove When to make folders? Same rules as making any namespace folders, logical groupings
 
2:20 PM
let me see if I can find a project online that has this conventions and see if you approve then I can have a reference anytime I am unsure
 
@Gotalove I can shoot you a link
 
sure
 
Shoot... I dont have it uploaded, just my EF code is...
 
snap
I dont like the nerd dinner or mvc music store examples
but do any of those really apply
 
imo, they dont show anything real world
 
2:27 PM
yea
plus music store isDB 1st
@CharlieBrown if you get to upload it I will check in tomorrow.Have a nice evening.Thanks for your guidance and patience.
 
Have fun
 
definitely hometime
 
2:42 PM
From the minds of some of my best programmers (sarcasm fully intended), in a Windows Form code behind :

if (this != null)
 
:D
 
FUCK YOU ONEBOX, MAGICALLY FIGURE OUT ITS A PIC PLS
 
!!google onebox
 
2:54 PM
anyone knows if there's a way to edit and add implementation template?
 
posted on May 26, 2015 by ericlippert

I briefly discussed copy-paste errors in code earlier; though this is a rich area of defects that I will probably at some point go into more detail on, that’s not for today. Though this is a trivial little issue, I … Continue reading →

 
@ton.yeung I did get a couple more Mbps out of it after swapping out, but the biggest improvement was upload speed
then I upgraded to 50Mbps down / 5up...which I couldn't do with my older modem
hes doing it wrong
 
my commute home
mine's wetter
:-]
 
3:12 PM
to me
@ton.yeung flooding in texas? never see that in news
 
heh
 
Ooh, northern italy forecast looks nice next week
:D
 
@ton.yeung wow that's actually pretty bad. do you need me to mail some swimming suits over?
 
you lost your roof?
 
3:33 PM
so you guys still have to attend office?
 
hi all. What reasons are there for websites not allowing other people from accessing secure webpages after you've logged out of your account? I know it's to protect your security/privacy, but I've been told that that isn't correct. So now I'm not sure what to think.
 
@ton.yeung Oh. Do insurance companies do that for the same reason that they replace windshields with hairline cracks?
 
@SE505 I'm not sure I understand the question. If you've logged out, you're unauthenticated. There's now way for the website to know who you are, thus it won't let you access anything which requires authentication.
 
@SE505 define what you mean by "secure webpages". if you mean https pages, there's no point to do that, google serve every single page in https
 
^ also that. HTTPS is not the same as authentication.
 
3:43 PM
Guys, the point of the question is that IF a website does not actually log you out when you click the logout button, why is that bad? And I told them bad shit can happen because if they think they're logged out but they're not - other people can access their account info and steal shit and pretend to be you, etc etc. But apparantely my answer was wrong. So now I'm just thinking... WTF?
 
@SE505 Who is "them"?
 
If you don't log out, then the browser may retain the authentication. The website doesn't know who is sat at your computer or using your mobile phone...
 
MY FUCKING COLLEGE. They really piss me off. I have given them accurate and technical answers, and I have confirmed them to be correct, but the teach says they're wrong. He's really getting on my nerves.
Another example is, last year, he graded me well for "How do you write a single line comment" where my answer was // this is a single line comment. but then he graded me as partially correct for multiline comments which is: /* this is a multi-
line comment */

so wtf? again. wtf???
I don't understand this shit
don't ever come to learn in Australia. the teachers area fuckin shit
they can't teach
they just bitch and moan and say things that don't make sense.
 
Your teachers at your particular school represent all teachers in Austrailia do they?
 
@SpencerRuport I have been to many schools and colleges. And 90% of them are the same. Our standards are too low. We have so many teachers at universities who can BARELY SPEAK ENGLISH - IN AN ENGLISH-SPEAKING COUNTRY.
Ignorance doesn't belong in this world.
 
3:49 PM
That's pretty common in the tech sector. Difficulty speaking English I mean.
 
@SpencerRuport Doesn't make it right. And I don't really care if it's common. That just pisses me off even more. I don't want to have to put up with that shit. You know... My last teacher couldn't say "Development" he kept saying it like "Debebebe" WTF was that? It took me 1 week to realise he was saying Development because the other words in the sentence didn't make any sense either. There was no context I could rely on to guess the right word in many cases.
 
@SE505 - I'm saying it's common in the industry. If you can't handle it in school you're not going to be very useful once you graduate.
 
I'm not saying foreigners shouldn't teach here. I'm saying they should be more strict with their hiring requirements. And if they do have issues talking, I dunno, make them do an English speaking course first or something.
 
I had a great teacher for maths at uni. I learned all about "tooth tables".
Binary algebra was also fun. "P aa Q aa Q not P aa P aa P not Q tautorgy"
 
I did well as a freelancer. The issue is not me. it's them. How am I supposed to make sense out of something new to me when what they're saying isn't even in fucking English?
 
3:53 PM
Agreed, though. Communication is vital if you're a teacher.
on that note, I have language lessons now. ttfn.
 
And why am I paying out the ass for third-world education? by people who come from third world countries? It doesn't make sense. That probably sounds racist, but that's not my intention. It's just illogical and stupid. You don't get an indian with an extremely thick indian accent who can't pronounce words properly to teach an aussie person English in highschool. (that's what my highschool did)
@Squiggle lol, have fun
 
4:19 PM
@Squiggle Those taut orgies though
 
4:47 PM
@SE505 Is switching school an option?
 
@SE505 - Come to the US
@SE505 - Do you know that AUS and the US have a special visa agreement where you are guaranteed to be granted a 1 year visa which can be renewed if you apply?
 
There a visa like that for Canada?
 
I am not sure. For whatever reason that part of the H1 visa (I think it is clause E) is only with AUS and Ireland.
I don't think it should be hard to get a temporary visa as a Canadian though.
 
I think it would be way easier
 
Well, the H1 is a 16 page document.
So in relation to that, it may be similar
But coming from anywhere else it is a massive annoyance.
Like Germany for example.
I wish it was easier to get visas to people who should be working here.
 
00:00 - 17:0017:00 - 23:00

« first day (1683 days earlier)      last day (3259 days later) »