« first day (1251 days earlier)      last day (3698 days later) » 
00:00 - 18:0018:00 - 00:00

12:37 AM
sweet jesus
 
Is it worth it to use async in a console app, if there's not really any parallel activity?
As in, I want to make a bunch of HTTP requests sequentially, then do something else
darn, I could swear I saw Reed in here a minute ago
 
 
2 hours later…
2:29 AM
anyone here?
 
 
2 hours later…
4:26 AM
C#
 
Yep.
 
4:47 AM
hi all
 
5:07 AM
hi all
need help
anyone der?
 
Don't ask, just ask
 
ok fine
I am writing a service which connects to exchange server
and it works on https
what i need to do is to get the cetificate which exchange server is using
if it is not present in the machine which in which my service is running I need to download the certificate
I am facing issue in geting the certificate from the exchange server and validating it
with the ceritificate in the machine which runs my service
can anyone help out with this issue?
 
6:07 AM
Hi guys !
Any idea upon this :
Could we have 2 different sockets on single port ? I have a p2p application which is listening on a single port. It is an async application , and hence i am using BeginAccept and EndAccept methods of the Socket class. In this case EndAccept creates a Socket on a Random Port , I need to know whether this will be able to Reuse Ports or not ...
 
6:37 AM
is it possible to assign a customized path for installing nuget package?
i am using asp.net mvc 5 and by default when i install-package in package manager console, the downloaded script file will reside in Script folder, i want change this path to my Content/MyFolder, is that possible? thanks in advance.
 
guys, how to convert List<dynamic> to List<string> ?
 
7:14 AM
hi guys :) how do i connect my c# app to sql server remotely, app is working on local server machine, also i've dynamic ip, do i need a DNS host? thankx :)
 
just use ip of your remote server in your cennection string?
i am not sure i comprehend ur mean correctly~~~
 
@nitesh.kodle123 thanks, i am also providing suggestion to @geek007 's question, just at him, :o)))
LMAO
 
no9
7:31 AM
good morning
 
ty guys, if im using this connection string "Data Source=X.X.X.X,1433;Network Library=DBMSSOCN;
Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;" what i've to put in X.X.X.X ? cus my server ip change often, as i've searched they say use no-ip.com how do i do that?
 
no9
having server on dynamic IP is a nogo
you would need to use a hostname of change to static
 
@geek007 you can put the server name also there if ip changes no issues DNS would take care of the rest
 
hi there, just need lil advice, I am developing WIn Forms App, and I did not first created class library project. Instead I written all my classes in my main project but in neat namespace hierarchy, referenced external DLLs and then run the app. So I am not having separate DDLs corresponding to my classes in Debug folder.
 
no9
i presume tha server and client are not on the same LAN....
 
7:38 AM
I think all that code is now encapsulated in exe. Am I interpreting things right? Is this approach ok. I did not created separate library project since my app do not involve large number of classes.
 
@no9 thats where i'm struggling, i've no ideal abt DNS host, how it works
@no9 yest, its in different network, if i use Hamachi as VPN, what i've to chnge in connectionstring?
 
no9
if you use VPN the server will see you in its LAN, so you can use its internal IP
or server name for that matter
 
i tried that, when i do its says error 26: error locating server and timed out
 
no9
What you'll need to determine is what port your SQL Server is listening on. Then you'll need to get with your networking/security folks to determine if they allow communication to that port via VPN. If they are, as indicated, check your firewall settings. Some systems have multiple firewalls...
If all of those are correct, verify the server doesn't have an IPSEC policy that restricts access to the SQL Server port via IP address. That also could result in you being blocked...
 
hi there can I get anyones precious response mine is very noob-query
 
7:46 AM
i've opened 1433 and 1434 ports in both system and created firewall exceptions also
 
no9
also make sure SQL Server is enabled for TCP/IP
 
whats IPSEC policy, how to check that?
TCP/IP enabled, i did with config manager
 
no9
192.168.1.22\SQLEXPRESS use this in your connection string (with the correct IP and instance name)
it is provided with a link @nitesh.kodle123 provided
brb
 
8:23 AM
anyone here???????
I need a help
in c#
 
i'm expert hope i can help :)
*not
 
no9
back
 
9:14 AM
morning all
 
goodday all!
 
good evening all!
@dav_i good evening
@Elegiac Good Evening
 
is it possible to create a wcf service without asmx,svc files ?
 
no9
9:34 AM
svc file is pure IIS requirement
when service is hosted within IIS
but i think that even that is not required anymore...
<serviceActivations>
<add relativeAddress="MyService.svc" service="MyService"/>
</serviceActivations>
using this does not require physical svc file
here is an example
 
yow
 
no9
9:54 AM
ellow
 
@All hi
can anyone help me in knowing what is unit of work in repository pattern
 
10:19 AM
hi guys...kindly help me out about this.....stackoverflow.com/questions/22526741/…
 
hello
 
10:35 AM
hello
 
10:57 AM
i need a help from @KendallFrey
 
11:34 AM
@Elegiac well hello
 
yo @KendallFrey
 
yolo, what's up?
 
i need a help from you but i know youll might be mad because its still the same thing like lasttime haha
about regex ...
^^
 
lol
what is it?
 
i need to save all linenumber that was in multiline comment like
1 /*
2 asdasdsd
3 asdasdasdadsasdasd
4 dfgdfgdfgdfgfg
5 dfgdfgdfgdfdfg */
so in sample above i need to save 2-4
 
11:47 AM
are line numbers included in the string?
why not 1 and 5?
 
i already have regex for multiline but idunno if its good
(/\*)(?>(?:(?>[^*]+)|\*(?!/))*)(\*/)
and this solution right here:
 
ugh, atomic matches
 
30
A: Regex to strip line comments from C#

TimwiBoth of your regular expressions (for block and line comments) have bugs. If you want I can describe the bugs, but I felt it’s perhaps more productive if I write new ones, especially because I’m intending to write a single one that matches both. The thing is, every time you have /* and // and li...

but the regex above does have conflict for singleline comment i think
it still match /* even if its ///*
 
this is why you should have built a parser ;)
 
so thats my prob since i guess multiline comments has conflict for singleline same as quotation
lol
any other options aside from building a parser?
can regex do this ? haha
 
11:50 AM
@KendallFrey does Roslyn not have anything for this?
 
i wanna build a parser but
 
not for JavaScript
 
ah didn't realise @Elegiac was talking about JS
 
(?<=\n[^/]*)/\*(?:[^*]|\*(?!/))*\*/
that should fix the ///* problem
 
cant do it now seriously because of timepressure ... but maybe nexttime when i have more time to do a parser ... ill try to beat visual studio haha
;)
 
11:54 AM
Problem is, it doesn't look that much faster to hack your way through it.
Point that out to your boss.
 
@KendallFrey i found a bug
it doesnt match
/*asdadsadsasd*/ asdasdasd /*asd*/
 
huh?
oh, on the first line?
 
it gets only /*asdadsadsasd*/ but not /* asd*/ theyre in singleline
 
(?<=(?:^|\n)[^/]*)/\*(?:[^*]|\*(?!/))*\*/
@Elegiac The more you require, the harder this gets
How much do you require?
 
it only gets 1 set of /*asdasd*/ per line @KendallFrey
 
11:59 AM
Is there a requirement against that?
 
yep when i need to have 2or more multiline comments in a single line
e.g:

/*see*/ /*sharp*/
 
anybody here....
 
something like the multiline comment for visualstudio
 
I need a help
in C#
@Smrutiranjanjena
 
12:01 PM
Anybody here know Sql....I need a help..
 
(?<=(?:^|\n)(?:[^/]|/(?!/))*)/\*(?:[^*]|\*(?!/))*\*/
 
@Illaya yup proceed
 
@Smrutiranjanjena doubt in nAudio waveform
anybody help me to solve this
 
how to convert byte type to image in sql server query?
 
in C#. Am using nAudio version 1.7
 
12:04 PM
it worked on regexlab :D thanks man ...
ill try it applying to my project now ...
 
@Smrutiranjanjena I have the same pbm
@Smrutiranjanjena But I solved this
 
thanks @KendallFrey :D
 
if (!string.IsNullOrEmpty(Convert.ToString(contactDetail.Photo)))
{
var bytes = (byte[])contactDetail.Photo;
string Base64String = Convert.ToBase64String(bytes, 0, bytes.Length);
Image1.ImageUrl = "data:image/png;base64," + Base64String;
}
Source
anybody here.....................???????????????
@Smrutiranjanjena I am also from Chennai
 
hi everyone
can anybody suggest me with good web pages scrapping library for asp.net web application
?'
 
What do you want to scrape?
 
12:19 PM
i want to extract information from site by providing customer id at runtime
from few websites
 
Thankx @Illaya But I need casting byte to image in sql query not in coding side.
 
deja vu
 
@KendallFrey i want to extract information from site by providing customer id at runtime
from few websites
 
@Smrutiranjanjena oh ok. Where are you from.? chennai?
 
@Illaya..basically I'm from Odisha..now I'm settled @ Chennai.
 
12:24 PM
@InderpalSingh import.io will be adding that functionality in Q1 this year
...so I guess in the next week if they're on schedule :P
 
@Smrutiranjanjena Oh ok. Nice to meete you. Where are you working?
 
@dav_i isn't the any opensource library? i tried to use HTML Agility pack but it doesn't allow me to crawl the page.
 
"doesn't allow me to crawl the page" what does that mean?
 
adding a cust id in textbox and simulate click on a button @dav_i
how ever it allows me to send http requests but i don't know much about requests in detail as to simulate these requests
 
1:12 PM
Hi guys, i'm getting this error. "Possible mistaken empty statement"
 string dateString = "";
            string dateString2 = "";
            if (startDate.SelectedDate.HasValue)
            {
                dateString = string.Format("{0}{1}{2}{3}", startDate.SelectedDate.Value.ToString("yyyyMMdd"), startHour.Text.PadLeft(2, '0'), startMinute.Text.PadLeft(2, '0'), startSecond.Text.PadLeft(2, '0'));
             if (DateTime.TryParseExact(dateString, DateFormatString, CultureInfo.InvariantCulture, DateTimeStyles.None, out _start));
            }
            if (endDate.SelectedDate.HasValue)
 
@linguini on which line?
 
At this line: if (DateTime.TryParseExact(dateString, DateFormatString, CultureInfo.InvariantCulture, DateTimeStyles.None, out _start));
At this line as well: if (DateTime.TryParseExact(dateString2, DateFormatString, CultureInfo.InvariantCulture, DateTimeStyles.None, out _end));
 
my guess is that your DateFormatString is empty
 
@linguini Why is that if there if it doesn't do anything?
@dav_i no, it's a compiler warning
 
@KendallFrey ah okay
oh right it's because he's doing if (something); so it's telling him off
 
1:22 PM
@KendallFrey yes, it's a compiler warning because of this my application crashed on windows 8
 
@linguini No
Compiler warnings do not cause crashes
3 mins ago, by Kendall Frey
@linguini Why is that if there if it doesn't do anything?
Please explain your code
 
@KendallFrey What am i trying to do, get the date value from the calendar if it's if not get the empty string value.
 
Please answer my question.
What is that if statement for?
There's nothing in it
 
@KendallFrey yes..there is nothing in it. I should remove that
 
Yes, you should
 
1:28 PM
@linguini in words your code is saying "if I can parse the string into a date time then." when it should read "if ... then I should do this"
 
@KendallFrey yes, i removed it
@dav_i yes, i'm stupid
 
@linguini if you don't expect it to ever not be a date, then just use DateTime.ParseExact otherwise use a if-else statement to handle cases where it doesn't work
 
@dav_i understood
@dav_i Removing the unnecessary if statement, it's working.
 
@linguini are you using TryParseExact still though?
 
@dav_i No
 
no9
1:44 PM
anyone using AnkhSVN in VS?
@KendallFrey
 
 
1 hour later…
3:13 PM
!!unmute 851498
 
@KendallFrey Unmuted user 851498
 
3:44 PM
hey whats the main difference between tcp and udp ports ?
any significant purpose ?
 
@shakthi udp is faster but less dependable
 
ahem thats what i read.. i want to send files via port. so i better stick with tcp.
thanks @Mike
 
I've mainly seen udp used in games.
And video streaming
 
yeah, it still guarantees a data packet if connection available.
 
105
Q: When is it appropriate to use UDP instead of TCP?

Jeff LSince TCP guarantees packet delivery and thus can be considered "reliable", whereas UDP doesn't guarantee anything and packets can be lost. What would be the advantage of transmitting data using UDP in an application rather than over a TCP stream? In what kind of situations would UDP be the bette...

 
3:47 PM
may be the problem is order, udp is unordered.
thats a good link. :D
 
2
A: How Much Faster is StringBuilder respect of concat operator + in C# .Net

GregThe Microsoft Developer Network has a great comparison: Although StringBuilder and String both represent sequences of characters, they are implemented differently. String is an immutable type. That is, each operation that appears to modify a String object actually creates a new string. ...

Some questions, like wtf.
Hopefully I gave a good answer though.
 
will this work ?
netstat -na | find 3080
 
So my employer has a number of customer-facing sites. Let's call two of these sites A and B (they're on different subdomains).
A is an ASP.NET mvc app in azure, and B is an on-premises PHP app.
My coworker thinks it would be a good idea to have site A detect site B paths (anything matching a /hurr/View.php?... format)and redirect to site B, to "be nice to the user".
Am I the only one who thinks that's wacky-ass shit?
 
not only you.
 
@Mike You could always do something clever with your 404s and say "it looks like you're looking for your page on our sister site" this way it doesn't fsk your SEO or your mind
 
3:59 PM
Yeah, I suggested updating our 404 page to have a variety of links.
 
@Mike well in your 404's logic you can do the check you were going to do automatically "were you looking for /foo/bar.php on baz.site.com?"
 
If someone is typing in a derped url, it probably wouldn't be because they manually typed in "/hurr/View.php?ItemID=127197&Context=1112" with the wrong domain.
 
@Mike yeah but you could always append the QS couldn't you?
 
@dav_i I guess. But I don't think I've ever seen any site do such a thing.
 
@Mike the easiest thing would just to 404 and be done with it - KISS
 
4:06 PM
Yeah I'm seeing a microscopic use case here
 
Are more than 5% of your users going to use this feature? Yes = implement. No = don't implement.
 
@dav_i lol, at my last job I had to spend tons of hours on a couple admin features that would realistically be used by only like 3 or 4 people at most (on an app designed for many thousands of peons).
 
Hi! Is there a way to make JsonConvert.SerializeObject() ignore some properties by setting it dynamically (i.e. not via [JsonIgnore] attrubute)?
 
@dav_i That's not how we work.
Is the customer going to pay for it or will we make it up in increased sales? If so, implement it.
 
@KendallFrey I was being very very simplistic :P
 
4:14 PM
If the 1% are who give us money, then they get the features
 
Does anyone by chance use the Semantic Logging Application Block (SLAB)?
weird-ass stuff is happening
 
has anyone ever done any versioning of entities in a database? e.g. keeping a history of changes
 
Can someone kindly tell me what can be the reason my web.release.config file is being ignored?
I have this in it:
<compilation debug="false" targetFramework="4.5.1" batch="false" />
But still the DEBUG symbol is true!
 
@gdoron Build > Configuration Manager change to "Release"
 
4:30 PM
@Shoe done that already
 
@dav_i Are you talking about keeping particular database stuff in source control? (e.g. records that correspond to enums) Or are you talking about history tracking of normal entities?
I've seen it all done a number of ways.
The worst was having each table of interest set up with triggers that copy the rows to a staging table on the main database, and then an overly complex MS SSIS ETL job would migrate them to a history database.
And then when a user clicked a "history" link for a particular thing in the ui, it would wind up querying the history database.
 
@Mike Yuck
 
And then we had code that analyzed the incremental differences between each revision to show the user what changed.
 
Not versioning the database but the latter one
 
You can always make a new table that tracks changes
 
4:34 PM
The answer is going to be "it depends"
Maybe you just need certain columns in the history. Maybe you only need the history to be tracked on certain actions rather than triggered on all changes, maybe you need "activity" logging rather than history data.
Or maybe you just need regular backups for data archival
 
I was thinking having a "Parent" field and a "Timestamp" field in the entity so the data would look like

Id    Parent    Timestamp
1     null         null
2     1            20140101010101
3     1            20140201121212
 
Ah yes, a single table where each row is essentially immutable, and they're chained together
 
Easy enough but makes queries yucky
 
One approach is to have both a "PreviousID" and an "OriginalID", along with some sort of "IsActive" column
 
@Mike oh so like an "ImmediateParent" and "Ancestor"?
 
4:40 PM
@dav_i exactly. The ancestor is helpful for "find me all previous nicknames of this object"-type queries.
 
If you're using EF all you would need is "ImmediateParent"
 
@Shoe not tooo bad I don't think foos.Where(x => x.Id == id || x.ParentId == id).OrderBy(x => x.Timestamp).Last() or similar
 
A lot worse than foos.FindAsync(id);
 
posted on March 20, 2014 by Scott Hanselman

Before I went to work for Microsoft a few years back, I was given the "MVP" award for ASP.NET. I didn't go out and seek this award, it just happened. The MVP awards are backward-looking in that they look at the work that you've done in the previous year, not what you're going to do. The idea behind these awards has been to give some recognition to folks that have volunteered their

 
hey hey
 
4:47 PM
you you
 
whats up
 
@Shoe Well I can always wrap it in a sensible method :P
 
When wrapping anything, use bacon
 
@RyanTernier public Foo Bacon(int id) { return foos.Where(x => x.Id == id || x.ParentId == id).OrderBy(x => x.Timestamp).Last(); }?
 
Yes
make sure you have:

public class Bacon : Exception

so you can always catch bacon as well
 
4:53 PM
throw new Bacon()
 
Men would line up for that more than the Garter toss
 
catch (AllTheBacon e) { eat(e); }
 
@RyanTernier public class TheFlu : Exception
@Steve ha nice - have your logger called Eat
 
:p
 
5:05 PM
Hello
 
So, I was wasting time on youtube and... youtube.com/watch?v=QiqqC_fbP1c
 
I like how the subtitles made him say something incorrect
 
@Steve You read about design patterns, right?
Are you smart about best practices too?
 
@KendallFrey yup
@KendallFrey depends
 
I'm kind of looking for feedback on something
Is there such a thing as having too many small classes?
Or taking SRP too far?
 
5:22 PM
i assume so, i mean you could over-modularize, which could make maintenance a nightmare, there has to be a good balance
 
I've got 6 classes in Ninja Echo now, just to log in to Stack Exchange. Too much?
 
i can't say
I can't just say "hey, theres six classes, thats too much", because to be honest I would just be talking out of my ass at that point
 
lol
I'm wrapping WebRequest and WebResponse for ease of use
That's the part I feel least happy about
But it would be nice to do client.Request("http://google.com").Get()
And then the other thing...
Using async with method chaining doesn't work very well, amirite?
 
What I do, is just try to create a good balance, but I'm not always successful, some times I do it too much, some times too little, but with more and more experience I feel l'm getting closer to hitting that point
 
Not expecting you to say anything profound, but if you can please do. :P
 
5:28 PM
Why is it when I cancel a get latest on redgate source control it refreshes the entire list?
I swear...
 
@KendallFrey no idea, I have only used async programming in learning environments, never in production
 
Shift end doesn't work either.
When selecting all the changes.
 
I've threatened myself to make an API that I can do await foo.SomeOperationAsync().FurtherProcessing()
 
@KendallFrey The difference between a successful person and others is not a lack of strength, not a lack of knowledge, but rather a lack of will.
</profound>
 
There's no "uncheck all" option.
Redgate sucks.
 
5:30 PM
I think I'm good now
 
@KendallFrey Method chaining with async methods can work fine
 
@ReedCopsey oh, good you're back
 
you can even use extension methods on Task<T> that use await internally to simplify it
(was never gone...?)
 
That's kind of what I was thinking
 
did I go somewhere?
 
5:31 PM
I asked a question about async just before you left yesterday I think
 
oh, what was that?
 
17 hours ago, by Kendall Frey
Is it worth it to use async in a console app, if there's not really any parallel activity?
17 hours ago, by Kendall Frey
As in, I want to make a bunch of HTTP requests sequentially, then do something else
 
In a console app, not really
since you can block with no side effects
so might as well just use synchronous calls
 
yeah, cool
I'll probably want async later on in the server-ish part though
about that extension method thing...
lemme show you what I'm thinking
 
@Shoe His all life breaks down to oen word hehe
 
5:36 PM
var foo = await something.SomethingAsync();
var bar = foo.SomeResult();
// vs
var foo = await something.SomethingAsync().SomeResult();
 
0
Q: Is there a way to make VS pro insert a dummy code lens?

Johan LarssonWe have a mix of VS 2013 Ultimate & Pro in our project. That leads to a problem: When writing with Ultimate we have stopped adding empty lines between properties & methods because the code lens inserts ~empty rows~ (see pic). The problem is that it looks like a wall of code when someone using...

 
That would be possible to make an API like that with GetAwaiter
but is there a nicer way of doing something similar?
 
Are you writing the SomeResult method?
 
yeah
 
MS uses uservoice to help guide it's development at time. Through user voice they're investing using the ? coloscape operator inline.
 
5:48 PM
voted, post it as an answer for visibility imo
+1 on the answer :)
and +3 on the votes
and 84 stylecop warnings left
 
00:00 - 18:0018:00 - 00:00

« first day (1251 days earlier)      last day (3698 days later) »