« first day (2023 days earlier)      last day (2908 days later) » 
00:00 - 22:0022:00 - 00:00

12:12 AM
dumb question
doesn't the middle condition of a for loop get executed every time the loop iterates?
 
@Codeman it does
 
that is... if you put a function call in your 2nd condition, its result will be different each time?
for(int i = 0; i < Random.NextInt(); i++)
the random will be different each time
 
not guaranteed, of course
 
well yeah
but it will re-roll the die each time essentially
 
yes it certainly should
 
12:19 AM
@codeman yes, it does
you can see it if you do:
int next(Random rnd)
{
	var result = rnd.Next(100, 200);
	Console.WriteLine(result);
	return result;
}

...

	var rnd = new Random();
	for(int i = 0; i < next(rnd); i++)
	{

	}
 
@ErwinOkken Sorry for the silence. If you are going to do polling from the client, I wouldn't bother with websocket. However if you would rather do websockets, you can send updates from the server to the client instead. Essentially, in whatever method on the server you get data to put into the database, call a method that will send those updates to interested (subscribed) clients.
 
 
5 hours later…
5:37 AM
Hi guys
can anybody help me with this linq query:
0
Q: Getting wrong output with linq join query

LearningI have this data:Users UserId Name 42 Abc 43 Pqr 44 lmn 45 xyz Mappings: MappingId User1 User2 1 42 43 2 42 44 3 43 44 I want to get all user that is user2 which is not in user 1 and so the output will be below consider...

 
 
3 hours later…
8:36 AM
Goooooooood morning guys :)
 
8:49 AM
Helloo
i want to do something like this
string item = @"checkin.Contains(""Microsoft"")";
Dynamic(item);
}
public static void Dynamic(string item)
{
string checkin = "This is Microsoft";
if(item)
{

}
}
any possible way ?
 
What do you mean by "something like this" ?
strng item = ...Contains() cant work. Contains() returns a boolean.
 
i mean, i want to dynamically pass the condition
 
Ah wait.
I havnt seen dynamic.
Dont know about it, sorry.
 
okay
 
Wait. Its just a method.
Lol my bad.
If I understand right: If checkin contains "Microsoft" you want to pass what?
 
8:56 AM
yea
i want to pass the condition in the form of a string and the if evaluates that
 
But you cant pass a condition. You can pass the result of a condition, called boolean.
bool item = checkin.Contains("Microsoft").ToString();
Dynamic(item);

public static void Dynamic(bool item)...
Then you can do if(item)
 
what if i have multiple conditions like checkin.Contains("Microsoft") && checkin.Contains("this"
 
Its just like you've written it. bool isBothTrue = something.Contains("a Word") && somethingElse.Contains("another Word")
bool twoConditions = text1.Contains("foo") && text2.Contains("bar");
Func1(twoConditions)

public void Func1(bool areBothConditionsTrue)
{
    if(AreBothConditionsTrue)...
}

bool cond1 = text1.Contains("foo");
bool cond2 = text2.Contains("bar");
Func2(cond1, cond2);

public void Func2(bool isFirstTrue, bool isSecondTrue)
{
    if(isFirstTrue && isSecondTrue) ...
}
Both ways are legit.
Beginner in programming?
@Learning good morning btw.
 
9:16 AM
@C4ud3x:good morning sir
 
@user2511798 yeah, as a string won't work, but what you're talking about is called a delegate
Func<TArgument, TResult> is called an anonymous delegate. You can create one of those representing the condition to apply and pass that
Func<string, bool> condition = item => item.Contains("Microsoft");
 
o/
When I grow uuup, I want to be a foresterr, run through the moss on high heeeels. That's what I'll dooo. Throwing out a boomerang, waiting for it to come back to meeee
#weirdmusic
 
gud eve all
when i get response with chunked type of transfer-encoding , i can't able to read the response format.. System.IO.StreamReader Reader = new StreamReader(req.GetResponse().GetResponseStream());
var results = Encoding.UTF8.GetBytes(Reader.ReadToEnd());
 
9:32 AM
Coding in wpf since yesterday. Its awesome.
 
@Dinesh_Dini is the stream also compressed?
 
no.
 
What happens instead of what you're expecting?
Also, you know for sure the content is UTF-8?
 
yes the content is UTF-8 but reader.readToEnd() returns null string ..
Content-Type →application/json; charset=UTF-8
Date →Sat, 30 Apr 2016 06:46:40 GMT
Transfer-Encoding →chunked
 
Null, now that's kind of weird.
 
9:44 AM
this is what i'm getting response from restclient along with data,but i can't read the data in c#
 
When you say 'this' - do you mean the text you just posted or were you going to show the message body as well?
 
just posted above..
 
So is there a response body? If that's everything you're getting, the problem is right there - there's no data
 
{
"TOKEN": "123",
"SNDR": "dsddC",
"RCVR": "Esdss",
"OBTP": "RESPONSE",
"MGTM": "2016-04-30T06:46:40.206",
"VEID": "100",
"DATRECS": [
{
"ITEM_NR": "DINIVARIOSC1"
}
]
}
this is response data...
 
That doesn't look chunked to me
 
9:55 AM
but the tag recieved as transfer-encoding=chunked..
 
I've only looked at it once before though, maybe I'm not understanding something. Anyone else here ever used it?
@RoelvanUden you were doing a gzip stream thing over HTTP once, I think? That's chunked, right?
 
Perhaps it's just a quirk of the webserver. Your client should just wait until the entire payload is received before trying to do anything with it, typically. Right?
unless you're specifically consuming a stream
> The data transfer is terminated by a final chunk of length zero.
 
this is entire code looks like HttpWebRequest req = WebRequest.Create(URL) as HttpWebRequest;
req.ProtocolVersion = Version.Parse("1.1");

req.Method = dbresources.dbresouces.Method;
req.ContentType = "application/json;charset=UTF-8"
req.KeepAlive = false;
req.Accept = "application/json; charset=UTF-8";

byte[] r1;
string jsonString = JsonConvert.SerializeObject(ediconstant, Newtonsoft.Json.Formatting.Indented);
r1 = GetBytes(jsonString);
while using the URL in rest-client app.. it gives response and works like charm.. but i'm not able to receive in c# above code
 
which rest client?
 
google restclient & mozilla
 
10:09 AM
Unless it's automatically unpacking chunks and showing you the decoded response, I'm leaning toward the webserver lying, the response is not chunked, if it actually looks like that
 
{"TOKEN":"QZ5G0ssE6Zayx61m9tOdqUy/aAwCCB1j3x0VOYQ/1xmLgWLlMBS00rCcMMKunes+m8K+py‌​qOc8kEaz0rr6dAmQ==","SNDR":"gfff","RCVR":"hhhhh","OBTP":"RESPONSE","MGTM":"2016-0‌​4-30T06:46:40.206","VEID":"100","DATRECS":[{"ITEM_NR":"DINIVARIOSC1"}]}
 
10:22 AM
lo
Dreadnought is hard :(
 
wat
 
@TomW any solution? regarding how to receive the response data ..
 
@Dinesh_Dini I don't know, sorry
 
10:42 AM
@Dinesh_Dini this sounds like something that should be handled invisibly by the HTTP client. I guess this endpoint isn't publically available for us to replicate the problem...?
 
10:52 AM
@TomW Not by default.
 
@Squiggle the URL was set as confidential,may i know what type of details you want?
 
Just any url that transmits chunked messages
it's difficult to solve an issue when you can't replicate it
 
11:26 AM
         Method |     Median |    StdDev | Scaled |
--------------- |----------- |---------- |------- |
 ArrayOfDoubles | 71.6278 ns | 7.7433 ns |   1.26 |
         Vector | 56.9116 ns | 3.2178 ns |   1.00 |
surprised me that they perform the same
Maybe it boxes the returnvalue
 
Just saw a post where someone wants to buy an ultrabook which can run c# -.- :D
 
I can't get it, damn it, regex.
How would you capture everything including a new line (in multiline string) until next character appears?
 
Next character in next line?
 
i.e.
first line stuff 123 anything * = blah( ... )
{
// comment here
}
 
Thats your text??
 
11:39 AM
just an example
 
Yeah but its also code, confusing. :D
 
and then there are tons of such others ones
 
If you capture everything there is no "next character" ?
 
hang on let me make up better illustration
 
Sure.
 
11:43 AM
I really should get out of bed...
 
xD
Thats what my coworker told me at about 6am today...
 
yep getting up!!!
 
afk for a smoke.
 
That's an actual thing right now
it is MSIL
I have tried...
(?<indent> +)\.method\s+(?<Method>.+)\s+hidebysig\s+static\s+(?<ReturnType>.+)\s+(?<Functio‌​nName>.+)((?<Arguments>.+)) cil managed\s*?\{
and such
But "." doesn't match new line (\r\n) in multiline mode
 
12:00 PM
But \r\n matches \r\n :)
 
if I set regex to single-line mode, then it matches everything (until the last one)
so how would you write it?
i have tried [\r\n.]+
doesn't work
here some picture: i.imgur.com/ZntxAlJ.png
that's singleline+multiline mode
same happens in singleline mode, while in multiline mode it only matches a single method (the third one, ".method public hidebysig static void ExportedFunction3"...)
 
Hello guys, I could use some help with HTML for my gallery. Basically I got bunch of images in Database which I want to display in my Gallery page, I do also display them but this is the result when I have different size images. This is the result http://imgur.com/bP08viL and this is my Gallery.cshtml code: http://pastebin.com/CySETsyU

Any tips and tricks?
 
same there, doesn't match the second method, as it is across two lines
that's my problem >.<
 
Ah
 
12:15 PM
See
 
You mean getting all of them.
 
Yes
 
Oooooohm..... wait.
 
@Spiderix w3schools.com/tags/tryit.asp?filename=tryhtml_img_height set width and height attributes
 
12:26 PM
Yes but some images will look mashed together if I set it like that
 
Like that?
 
is there a way of implemeting aspect ratio, to prevent images not fitting the height and width from being squashed together?
 
@C4ud3x OMG
 
:D
 
Thanks to you :D
 
12:28 PM
@OmegaExtern Note that I've used global AND multiline modifier. You need both of them.
No problem.
 
@C4ud3x referencesource.microsoft.com/#System/regex/system/text/… There is no "Global" flag in .NET Regex, just have to specify multiline.. ;)
 
So its working this way?
 
@C4ud3x Yeah it does
 
Nice. Good to know, ty :)
 
If you wonder what I am doing.. Just rewriting "Unmanaged Exporter" (a.k.a. DLL export) program. In the first version I have worked with string[] (ReadLines), FindIndex, FindLastIndex. Now in v2, thanks to you I can finish it off using Regex :D
 
12:38 PM
xD
Yeah maybe a bit cleaner solution.
 
For those who wonders what I am talking about, see flylib.com/books/en/2.663.1.116/1 (as a reference)
 
Dont u think you are assuming a bit too much wondering on a saturday ^^?
 
crap, it is Saturday today?
 
xD Just noticed you've worked for nothing?
 
No, I was ment to quit eating sweets on Saturday
oh well, next Saturday
 
12:43 PM
Aaah.
For me it isnt depending on the day of week ^.^.
 
man i hate working with incompetent people...and it seems like most of the people are just that...incompetent
and good morning everyone
 
I am very incompetent and morning to you too.
But I know how you feel, I am working with 5 other people and only I and some other dude are programming, rest are still asking how to create a class (Java)
 
@Spiderix lets never work together, but hope you're having a nice saturday so far
oh wow, your situation is maybe worse than mine
 
haha indeed I am, learning about ASP.NET MVC 6 EF 7 Right now
It is ok though, the Java project is a school project, so by having the others do nothing I learn a ton
 
oh okay i thought you had people hired as java programmers who didn't know how to create classes
 
12:50 PM
Oh good lord no
 
well not too strange in reality. i was just given a project because the developers (5 of them) who worked on it before couldn't figure out what RetiredVersion, SensorNotRequired for google maps meant...and there are friggin link right there next to the error that explains it
they took 3 weeks and then came back and literally said "we have reviewed so many lines of code and can't figure out what's wrong. we suggest that this whole thing be redone or maybe some JS file is missing..." AYFKM
 
wow ok
 
1:08 PM
Hi all, Is .Net worth it to develop an application similar to Uber(just a reference)? People often say PHP is much better and all.Would anyone like to share his/her thoughts about this?
 
"PHP is much better." said no one.
 
0
Q: how to read chunked type transfer- encoding data response using streamreader in c#?

Dinesh_Dinii'm using httpwebrequest and streamreader to get the response from third party URL but i can't able receive the data using streamreader..using restclient in google i'm getting the response data headers like Content-Type →application/json; charset=UTF-8 Date →Sat, 30 Apr 2016 06:46:40 GMT Tra...

can anybody check on this..
 
One of my experienced friends said that since php is open source , it's easy ,cheap and fast way to develop apps
 
@Rishu PHP is much better at being PHP and that's about it.
 
@AlexH Is .Net worth it to develop an application similar to Uber?What's your opinion about that?
 
1:12 PM
lol
 
@Rishu you could develop an app like Uber in most modern languages.
 
I made Uber like app in Android :)
 
Just not PHP
lol
 
hahaha
 
Lol. Php was not my concern . .net was :P
 
1:14 PM
C# .Net is a nice easy language for server stuff. ASP.Net has a few conventions which take some time to learn, but overall it's a very forgiving and pleasant language to work with (when using Visual Studio).
 
Yeah, it is ! I am yet in the learning phase, hence the silly questions.
While developing any interactive web application, do we need to code it right from scratch or do we have frameworks/templates available which can be used to develop them?
 
Asp .Net? Is there a free setup btw?
Or is it a payed service to setup a server?
 
@Rishu ASP.Net MVC/WebAPI2
Anyone know why Entity Framework would claim that a context is changed when it's used from a different assembly in the same solution? Can't for the life of my figure it out.
 
Thanks @AlexH . Will google it learn what it can do :)
 
Eg: Website 1 -> use business layer to add an entity,
Website 2 -> use business layer to load entity -> crash and burn "the model has changed!"
NVM migration history table is to blame for some reason
 
2:24 PM
Alex is a PHP developer, don't listen to him ;)
 
'k.
 
2:36 PM
I wish I was.
 
Every language have pros a d cons
Why not java then
 
Java is acceptable for a lot of what C# is used for.
 
Why Java
 
Because if you search for top popul programming language then u will find java at the top
 
Because the majority are always correct?
 
2:42 PM
But I have read this on lots of website
 
find c# to have nicer IDE better package usage and better packages all around - mean there is the off shoot Itext or Nhib that were java born and come over to c#
 
@juanvan ditto. Nothing tops Visual Studio, and C# seems a cleaner more attractive relative of Java
 
how do you install a package in eclipse, have to download and add it manually every time - don't know if that is still how it is was 2yrs ago
 
See I would agree with you in that aspect that visual studio is more attractive but still I have heard from some of my friends that some java IDE too are excellent than visual studio
 
what IDE are they referring to?
 
2:47 PM
@Learning all comes down to preference. A lot of people drink the anti-microsoft cool aid. I find VS to be far better than any other IDE I have used.
 
what ever you select stick with it and use it till your more then comfortable doing multiple projects - there is no wrong answer both stacks are going to be around till we are dead
 
I think only jon skeet could give this answer like which is better java or c# and which have better IDE visual studion or java IDE
 
could if he uses a Java IDE too
don't think many of us here launch a Java Ide 40 times a month
 
Can I ask you some basic questions like actually I wanted to know what hapoens behind the scene when I run 1 simple program of addition
 
behind the smoke and mirrors?
 
2:53 PM
I am just so curious and always imagine what are thethimgs that could be happening behind whem I run any program
 
sure
mean do you know about the CLR and JIT?
 
Yes I have read about it but generally domt know what does it do practically
Clr is just iike jvm
Jit is compiler
 
yes and JVM run off it in the background
had to do some reading
 
But what is the role of operating system in this amd of course cpu
 
and you could add java at the top with C# F# etc
 
3:49 PM
bloop
 
4:02 PM
nap-tastic Saturday?
 
4:19 PM
feels great saturday~
 
to learn test driven development or go watch avangers all day..
 
4:34 PM
@SteveG blood
!!youtube blood
!!undo
 
4:47 PM
Guys using MVVM Light someone can teach me quickly how to pass a class between ViewModels?
 
5:01 PM
@tweray @Failsafe @RoelvanUden forums.mmorpg.com/discussion/450195/… Nice hack :D
 
5:13 PM
hmm, anyone have experience in Adobe premiere?
 
 
2 hours later…
7:19 PM
.
 
@SteveG Best operator in Haskell
 
i disagree
 
@SteveG What is then?
I expect an answer
 
Can someone help me with the connection string error? This is insane and can't continue code without it working >_<
 
What is it?
 
@KendallFrey $
 
I get this error, again.... SqlException (0x80131904)
 
whats the text
 
8:04 PM
@SteveG bo-ring
 
@KendallFrey lmao
 
that operator does literally nothing
 
What am I supposed to do? Using the connection string from App.config
 
@KendallFrey according to google it does something, so it literally does something
 
8:06 PM
a $ b = a b
 
Thanks Omega, I'll have a closer look
 
that's actually how it's defined
 
@Global No problem.
 
lol
somebody hook me up with one of their female friends
 
pinned for exposure
 
8:20 PM
@OmegaExtern Thanks again! Finally working. 2 hours.. Had to change to Copy of Newer. Still having problem with seeing the saved data in database. But when search for the data in program (datagridview) I can found it. Why is it like that?
 
@SteveG why do you assume that I have female friends?
 
This is actually what started it all, when tried to make it visible in db.
 
@StevenLiekens lmao
 
did the fine bros fly to japan just to shoot this
 
8:27 PM
japan is a nice country
 
i heard they hate the foreigners
they call us the "baka gaijins"
 
@misha130 Nope, they mention in the video that Babymetal is touring in the US
 
ill fly over and get a ticket asap :^)
 
bloop
 
blood
 
8:38 PM
I have a build error that won't show up in the errors panel
panic
apparently I have 3333 rep, that's cool
 
so look at the output window
 
@KendallFrey
 
loled
 
:D
 
I'm so drunk I accidentally closed visual studio
 
8:41 PM
oh you're drunk
we should fuck with you
 
no help me fix my build error
 
did you look on line 214
i'm pretty sure thats where the problem is
 
which file?????
I don't like how little documentation there is for .NET core right now
 
sorry that it was consensual? or sorry that you had sex w/ her?
 
8:47 PM
ci.appveyor.com/project/StevenLiekens/httportable/build/job/… my CI builds fail because IWebProxy doesn't exist in the dotnet5.5 framework profile :/ but visual studio says it does
 
did you look at line 214?
 
9:05 PM
lol
 
hidy
 
How come no visible data in Database, but visible in datagridview?
 
9:20 PM
you're looking at the wrong database
 
9:33 PM
Been looking in main folder and debug folder
And they're all to same path
 
user47589
well the data is coming from somewhere. find out where. your datagridview is connected to a datasource. find its connection string.
 
Is there some good way to find that out? Because it's connection string is the same as when I login
 
user47589
trace the code back to the datasource.
 
I mean, same as the App.config string
 
user47589
the data has to be coming from somewhere
 
user47589
9:41 PM
if the database tables are empty, its a different source.
 
user47589
the datagridview may not be using the connection strings in your config file. you'll have to trace the data back to its source, in that case.
 
hi
 
user47589
sometimes people put connection strings directly in the source code.
 
user47589
hi @BrianJ
 
yeah I've seen it in the config or app.xaml sometimes
I'm debugging my code @Amy looking for a second pair of programming eyes
 
user47589
9:44 PM
ok
 
so the scenario is..I have bound the selecteditem property of a list view to a navigation event
eg, selecting first item in list navigates to a page with the data for item 1
 
hi
 
what is happening during runtime is..I select an item from the list and it navigates as expected
 
problem Too many arguments to Public Sub New( ) error in vb.net
 
but if I navigate back and select that list item again navigation doesn't happen
although it does if I select ay other item in the list
 
user47589
9:47 PM
@BrianJ is this webforms?
 
actually I'll try to post a screen recording of what I'm trying to explain
nope win phone 8.1
 
user47589
ok
 
user47589
wow, the guy Mathematics who sometimes comes in here, asked a question on Workplace SE about how he can convince management to cut his coworkers pay.
 
user47589
22
Q: Am I presenting myself as greedy by proposing pay cuts to underperformers?

MathematicsI work in a small company of less than 50 people. We are currently not measuring any developer's performance in terms of quality or schedule, but there are few clear underperformers who are on good pay. Also, there are few who are doing really well. As an employee, I find it really difficult to...

 
That's so strange. Because in debug they're reaching the same path
same string variable
 
9:49 PM
There should be a show called America's Worst Driver
It'd smash Canada hands down
 
user47589
because americans are worse drivers?
 
yeah
 
and also has a larger pool to pick from
 
@Amy How do I manage to do that? Because I would need the data to be saved to Server Explorer DB and the datagridview should be using that source as well
So strange..
 
9:53 PM
uploading the vid @Amy nearly there..
 
user47589
afk 10 minutes.
 
okey
 
Brian do you know?
 
00:00 - 22:0022:00 - 00:00

« first day (2023 days earlier)      last day (2908 days later) »