« first day (1784 days earlier)      last day (3169 days later) » 
01:00 - 13:0013:00 - 21:00

1:18 AM
posted on September 04, 2015 by Scott Hanselman

The Butterfly Effect is everywhere, truly. The best part is, due to confirmation bias, once you start looking for it you'll see it everywhere. ;) The Butterfly Effect: This effect grants the power to cause a hurricane in China to a butterfly flapping its wings in New Mexico. It may take a very long time, but the connection is real. If the butterfly had not flapped its wings at just the

 
2:11 AM
felt like I should show up
 
 
2 hours later…
3:42 AM
oh for goodness sake hansalman is using the butterfly rubbish..
without stating that its not literal
 
4:03 AM
 
4:35 AM
Can someone explain me why a newbie would think that putting a file on their own computer would make it visible for their server 2000km away?
I can't even begin to understand why someone would think that their asp.net server modify the excel file on their computer and not on the server it's being ran on
It has bothered me for a long time. Seriously why would someone think running process.start("wmplayer.exe") on a web server would show them a video on their computer?!
It could help me to help better with such questions because It's hard for me to relate - can't see where they are coming from
 
5:23 AM
@Mystra007 "any technology sufficiently advanced is indistinguishable from magic"
they dont understand it there for magic
and sadly some people who truely dont understand end up programing for some reason.
 
They want to be web programmers though. Shouldn't they have at least a very basic understanding of how the web works and what servers are?
Are they paid to do this?
 
@Mystra007 sadly yes, in this day and age until you do something a bit more complicated you can make a fairly good website (for a very small company or personal) without any real knowlage
this then tends to get out of hand and you have someone who made a all html site in dreamweaver or something 5 years ago now a profecianal web developer without really expanding any of there skills
 
I see - I'm a bit shocked
I guess that's why I never see anyone with high rep attempting to answers questions which shows a lack of understanding the basics
My favorite is when someone said it's urgent or try to make us feel sorry because they hope peoples will overlook the rules...
My pet peeve is counting the number of questions asking how to do office interop on asp.net in a week ;)
and once in a while someone is doing Excel VBA and will label the question with .net
You?
 
5:56 AM
@Mystra007: Are you talking about a user, or a developer? (ah, nevermind, read your second post)
 
Just trying to understand some type of questions I see asked with the asp.net tag on SO
 
Most of them are just bullcrap yes, things that they could look up in a matter of seconds if they could even manage to google it.
Even more fun when people actually start out new web projects using webforms, and then don't know how to use it. E.g. doesnt know about the different asp: elements.
 
Morning
 
Then you'll see a bunch of really fubar code. Like generating markup in Page_Load() and whatnot.
morning @Loetn, what's up?
 
@scheien I'm good. You?
 
6:05 AM
I'm getting pissed off by this datetime thingy
 
Ow?
 
Stuff that has worked for years, suddenly a simple DateTime.ToString("HH:mm") gives me 13.00 rather than 13:00
Checked the thread culture, and it's still norwegian
Can't really tell why it's happening
Think I'll just try to reboot or something
 
6:39 AM
@Loetn: Seems that win10 messes with the current locale. Tried switching to an alternate representation of time, and then it removed the one I had, so the dropdown went from 2 items to 1. fuck ye
 
Morning Guys :D
Is the VS 2015 Ultimate Preview Stable/Usable or should i wait?
 
vs 15 is already out
its not in preview anymore
also ultimate is now enterprise i think
 
6:55 AM
if i go to my MSDN acc why do i have both, enterprise and Ultimate Preview?
 
no idea
maybe Ultimate Preview was the beta name for enterprise
13 ultimate -> 15 enterprise
and yes 15 is stable and usable and c# 6 is great
 
youre right, but still weird ^^
 
odd
 
@scheien I've to keep that in mind :)
 
o.O VS2015 needs 34GB (with all the options checked ^^)
 
7:08 AM
@SebastianL Shit, I've to upgrade my 20GB HDD then ;)
 
@Loetn 20GB?
it needs 8GB minimum ^^
 
@Loetn: Found the source of the error. It was a change a couple of weeks ago, override of InitalizeCulture() and manually setting it to nb-NO.
Thus nb-NO having two variants of time representation (we only use 1), and selecting the wrong one by default.
 
@scheien So, overidding the culture in the application caused it?
 
It's the entry point to the fault atleast.
 
@scheien Ooh, ok. Those norwegians -_-
 
7:13 AM
The problem is that we don't represent time like "14.00", like windows 10 has. We use "14:00". With those two options, it selected the first one, and things start to break.
So my guess is that selecting a locale with CultureInfo.GetCulture("nb-NO") uses the first one in the list for each representation.
Ignoring what the user has chosen through system settings.
Anywho, now I have someone to blaim for the hours I've used to track this crap down. :p
 
@scheien wait, are you saying that there are two cultures by that name, or that that culture has two variants to represent time?
 
No
Same culture, with two possible ways to represent time
 
ah
was about to freak out :p
 
but the fun part if that we only use 1 of them.
 
ye, I got that^^
99 little bugs in the code 99 little bugs in the code Take one down, patch it around 117 little bugs in the code
 
7:18 AM
 
Kendall's comment reminded me of that
 
Which comment?
The starred one?
 
7:36 AM
@scheien the one I linked to. I think it was starred
 
why C# doesn't support covariant virtuals?
 
78
A: Does C# support return type covariance?

Eric LippertIt sounds like what you want is return type covariance. C# does not support return type covariance. Return type covariance is where you override a base class method that returns a less-specific type with one that returns a more specific type: abstract class Enclosure { public abstract Anima...

 
8:01 AM
god the office coffee is lousy
 
8:17 AM
:(
 
8:27 AM
Hello, pals. WPF-related question incoming.
InputBinding seems to prevent an event from firing. Example:
<TextBox Text="{Binding Path, UpdateSourceTrigger=Explicit, Mode=TwoWay}" KeyDown="TextBox_OnKeyDown">
    <TextBox.InputBindings>
        <KeyBinding Key="Enter" Command="{Binding ApplyNewPathCommand}" />
    </TextBox.InputBindings>
</TextBox>
When I press Enter, KeyDown is not firing. Tho if I comment out TextBox.InputBindings part, it will be firing.
Is there a way to keep InputBindings while still being able to catch an Enter press with event?
I know, the code itself might look a bit odd. I am asking from curiosity mostly.
PreviewKeyDown works fine.
 
keeping pairs values in a dictionary instead of recalculating each time improves speed 5x times in Hierarchical clustering :D
 
9:02 AM
@Denver It's probably because InputBinding internally uses the KeyDown event
 
morning all
 
9:18 AM
IT'S FRIDAY!
 
9:29 AM
meh
 
y u no like friday?
 
9:47 AM
I forgot it's friday
I feel better now
 
@scheien because of rebecca.blackfriday
just got my Xamarin License for android and iOS :)
 
Hello all. Is there a difference between using Marshal.SizeOf (typeof (T)) or Marshal.SizeOf (default (T)) ?
 
I am inclined to say there should be. The size of an instance of Type is probably not going to be the same as the size of an instance of that type.
unless SizeOf does some special munging when given a Type in particular
 
10:03 AM
@TomW You really don't wanna know what urban thinks munging is.
 
Yes yes I know.
urban wrong. porgramer right.
 
Might change my linkedin to "Senior porgramer/devloper"
i rite php
 
I've heard people insist that because dyslexia often coincides with higher ability in non-verbal reasoning, good developers shouldn't be expected to be able to spell
 
10:17 AM
@Sippy ewwwwwwwwwwwwwwwwwwwwwwwwww. I frequently browser 4chan but that was unexpected
 
Example:
   private static int SomeT<T>(T val) where T : struct
    {
        return Marshal.SizeOf(typeof(T));
    }
    private static int SomeD<T>(T val) where T : struct
    {
        return Marshal.SizeOf(default(T));
    }
@Tom W, I'm sorry, I did not understand your answer
 
@SebastianL :))))))))))))))
@TomW Lol
I'm not dyslexic but I wish I was.
 
@FoggyFinder what's not clear?
and what are you expecting?
 
10:32 AM
@Tom W, Not clear, whether there are arguments where the return value of the two methods will be different. If not, then what better to use.
 
What? That sentence just looks like a random jumble of words to me
 
Oh, sorry
 
Yes, I think those two methods will return different values.
 
That was not what I expected. In that case, I think Marshal.SizeOf is doing something sneaky
> The size returned is the size of the unmanaged object.
Ah.
But do you see why the two methods are asking different questions?
Or they should be. Actually, SizeOf does do some trickery as I thought and it's finding the size of the object the type represents, not the size of the type as an object
 
10:50 AM
First - Returns the size of an unmanaged type in bytes., Second - Returns the unmanaged size of an object in bytes
 
Yeah, that statement is misleading. Type is massive. I'd expect its size to be huge. But that's not what the method does.
Trying to force it to find the size of Type is an ArgumentException
return Marshal.SizeOf(typeof(T) as object); << try that.
 
but object is not struct
 
11:05 AM
But according to what that description says, that shouldn't matter. It says it's finding the size of the type, not of an instance of that type. So the text is wrong.
 
Exactly
@Tom W, I can ask a question about F#?
 
@FoggyFinder I sure hope you're capable of that.
 
11:22 AM
@Roel van Uden, not sure I understand you correctly
 
uh oh.
 
@FoggyFinder Just ask your question.
 
^ is not a question
 
Can it be easier?
 
11:25 AM
@Sippy Ya, he lacks a question mark.
 
@Sippy, a long time choosing my words =(
 
@FoggyFinder Yes, this is F#. Next question.
 
I can't read that F# junk. It's a flaw of mine. I just don't get it.
 
@RoelvanUden I can't read it either
 
F# is jibberisch
 
11:27 AM
F# is nicer than C#
 
@Sippy I've actually tried to learn F# but the syntax completely throws me off each and every time. They specifically state that "designing a programming language that is easy to read for the first few hours is a bad choice" but I've gone WAY past a few hours and still can't read it. :-(
 
I totally gave up
0
Q: Post query object name is not included?

MathematicsI am making a post call to a service like this, var ms = [], url = myServer + "/government.svc/Users/Add"; ms.push({ ID: 210, UserID: "S-1-691534-18", Role: "1", StartDate: myUser.startDate, UpdateM: true }); var user = { Email: myUser.desc, FirstName: myUser.FN, ...

 
However, Haskell is nicer than F#
 
@KendallFrey I heard about it, but i don't know why its better then C#
 
@KendallFrey I can read Haskell, but I can't read F#
 
11:27 AM
@RoelvanUden :/
@Mathematics than*
 
@Loetn Haskell make F# look like cruft
 
I don't like the repetition of code
 
@Mathematics It's functional
and other things like pattern matching
 
| SpecificCall x (_, _, [lhs; rhs]) ->
    let lhs = countop lhs count
    let rhs = countop rhs count
    lhs + rhs + count + 1
| Call(exprOpt, methodInfo, [lhs; rhs]) ->
    let lhs = countop lhs count
    let rhs = countop rhs count
    lhs + rhs + count
 
I can't read it! I'm missing type annotations all over the place. It's gibberish to me. I can wrap my head around var and the way it interprets the types, but once you don't have parameter annotations or return type annotations it's just a big guessing game to me >_<
 
11:28 AM
@KendallFrey I know that, but OOP is better I heard
with ECMA 6 and ECMA 7, they are more getting into OOP....
away from functional programming
 
@Mathematics It's not the OOP that's the problem, it's the imperative
 
@KendallFrey I mean you can use it to do OOP
 
ECMAScript is not getting away from functional programming at all
 
@KendallFrey oh where TypeScript coming from then ? :|
 
But TS/JS is crystal clear.. Immutables? Crystal clear. Functional style? Crystal clear. It's just that the F#/Haskell syntax is near unreadable unless you're completely into it and grasp it completely I guess..
 
11:30 AM
TS != JS
 
@KendallFrey erm we all know that, but which direction TS going towards ?
 
@KendallFrey pedant
 
towards OOP...
 
The nice thing about functional programming is that it fits better with how programming actually works; Fitting small solutions to small problems together to make large solutions to large problems
 
Agreed. Functional programming is great. :-)
 
11:31 AM
@KendallFrey been there done that, without OOP it's all a mess
oh for an app like calculator , it's great indeed
 
There are other nice things about FP is things like function composition, which sound insane at first, but once you get used to them, you get angry when you can't use them.
 
@Mathematics For your issue, check the payload in your AJAX request using the browser dev tools.
It's likely that the format of the data is wrong, so the model binder is just giving up.
 
Put it this way: in C#, lambdas are a nice elegant way to create a function. In Haskell, they're just unreadable clutter, even though they have basically the same syntax
 
is there anyway I could debug or see errors @model binder {it's soooo hidden}


I am trying wcf diagnoses but it's useless in SharePoint ISAPI folder, no trace files are being created
 
Haskell also has a remarkable standard library
 
11:35 AM
@KendallFrey lol, I can see you going to work on C# for next 5 years, even after arguging about haskell this much..
 
@Mathematics Just use the browser.
 
I like C#
 
@Sippy it throws 400, and nothing else really
 
Not the response, the request.
do u even web dev
 
11:36 AM
One of the problems with Haskell is once you want to interact with the world, the code gets a bit clunky.
for good reason, but still
 
@Sippy I already added the request payload it's sending though in my Q
 
@Mathematics Is it in the right format for the model binder you're using?
 
Could anyone help me with this question please: Unable to copy file "obj\x86\Debug\ConsoleApplication.exe" to "bin\Debug\ConsoleApplication.exe". The process cannot access the file 'bin\Debug\ConsoleApplication.exe' because it is being used by another process.
 
Oh wow.
@Mathematics Your parameter names aren't even the same yo.
 
@user3201911 build again
 
11:38 AM
@KendallFrey Thanks, will try
 
@Sippy like which one
 
@KendallFrey doenst seem to work
 
@Mathematics Action expects pUsers, you're sending pUser
 
@Sippy let me check 1 second
 
@user3201911 Rebuild?
@user3201911 Or restart VS
 
11:40 AM
I rebuilded both option @ build
i will try to restart VS
 
@user3201911 close the application which is using it, for me it was unit test project or a console app
then redeploy
 
@user3201911 If that doesn't work: Did you try to turn it off and on again?
 
using it, i mean using this project's dll as a reference
 
thanks for all ur help btw :D
I rebuilded + restarted VS, still doenst work
I will try to restart my comp
 
@user3201911 Kill the ConsoleApplication.exe still running on your sys
 
11:42 AM
@Mathematics Change your serverside method's param to pUser
 
@Sippy I am not even sure when this happened :/, going to test it
 
Lol
 
@RoelvanUden I had that once and I couldn't even kill the process
 
No consoleapplication.exe running anywhere, i searched thru my whole task manager
 
Only restart worked.
 
11:43 AM
will restart the pc, thanks in advance if it works. Else i will come back :D
 
@user3201911 I read that as "If this works then fuck you guys I ain't coming back"
 
@Loetn logging out work as well
do you understand what happened ?
 
@Mathematics Or that :) Is that a question for me?
 
@RoelvanUden hahaha laughed so hard at this
But it sadly still doenst work :S
 
@user3201911 Can you clear your debug folder manually?
 
11:52 AM
@Mathematics Did it work?
 
@Loetn Yes
@Sippy Nope, now it doesn't hits method when debug lol
 
@Loetn can i clear the whole folder?
 
i think now it's throwing error @model binder
 
@user3201911 I guess so, it'll probably be added again
@Mathematics Ok. And yes, I do
 
@Loetn okay, gonna delete it
 
11:54 AM
@Mathematics Can you try data: JSON.stringify({ user }) please
 
@user3201911 Unless you've some manually added dlls
 
Without the trailing bracket as well
As the method has one param, it should just resolve itself.
 
@Loetn thanks mate, deleteing the debug folder was the solution
 
Hooray for me!
 
@Sippy it works now, all i had to do is fix spelling issue and then remove all of the empty properties I was adding
 
11:56 AM
!!Hooray
 
@CapricaSix Sleeping?
 
+10 for Loetn
 
can you answer on the post, so I would accept it ? thanks for the help though
 
@Mathematics Oh so it was the parameter?
 
seems so
!!hi
 
11:56 AM
@Mathematics yw
@Mathematics The only reason the model binder would be upset about those empty values is if some of them aren't nullable types
 
@Sippy trueee
 
Or possibly if you're using the wrong datetime type
But the data in your question wouldn't fit that one.
 
@Sippy add this one too, otherwise I will feel just stupid lol
 
I was trying to build a program which recognize my commands and work. I am able to make it but now I want to add a google search in this program. It will recognize my command and search for it in the internet.
this is my code
 
Format your code or pastebin it.
 
12:01 PM
^ plz
 
^ Ctrl + K
 
how to?
 
Actually just pastebin it.
I hate formatted code on this chat it's horrible.
 
it's fine for a few lines, but anything more than 5 just makes it really hard to read
 
sippy am sorry but nobody answered it .. so I came here
 
12:03 PM
Just gotta post it when people arrive at work lol
 
lol..
posted it yesterday
 
@JayitaRoy It's ok, you can ask it here. But just post your code using pastebin
 
how to use it Loetn?
 
@JayitaRoy Go to pastebin.com, paste your code, select syntax, submit, post link here, wait
 
@JayitaRoy Can you link to your question instead?
If your code is already on SO we can view it there lol
 
12:06 PM
okkkkkk :)
0
Q: Adding google search in speech recogntion program

Jayita RoyI was trying to build a program which recognize my commands and work. I am able to make it but now I want to add a google search in this program. It will recognize my command and search for it in the internet. private void Main_Load(object sender, EventArgs e) { cmds.Add(new String[]...

 
@JayitaRoy I don't understand what your question is.
 
@JayitaRoy why dont you just extend your switchcase?
 
@Sippy me neither
theres nothing in there about google searches
 
I want to add a google search
in default
whatever is not in my commands
it will go to google search
 
ahh i think i got it. she wants somthing like @CapricaSix does when you type !!define
!!define google
@CapricaSix still dead :(
 
12:10 PM
@JayitaRoy Add that to your default case
 
use the google rest api's
i guess
 
Sounds like the issue is more about how to integrate that with the speech recognition engine?
what engine are you using?
 
Loten I understand that I need to add that in default case but can't understand how to direct it to google
 
oh
 
Aah, there's the question
 
12:11 PM
seriously
 
That question is too broad for SO main but we can probably offer some advice here.
 
you need to use google search api
 
^
 
its a web service
you send params and recieve json
theres a shitload of api's too
im fond of maps myself
really easy
 
now I can't understand
 
12:12 PM
Gonna go get some lunch
 
@JayitaRoy have you used web services before? Are you familiar with them?
 
web service means?
 
oh
 
I'll take that as a "no"
 
@JayitaRoy Google it
 
12:13 PM
ok, my weekend started
laterssss
 
> A Web service is a method of communication between two electronic devices over a network. It is a software function provided at a network address over the Web with the service always on as in the concept of utility computing.
 
Loetn ah.. okay.. understood.. :) thank you
 
@JayitaRoy So your application will communicate with google's infrastructure
 
yes I want it to do it
 
@JayitaRoy google.be/…
Read documentation
 
12:16 PM
I mean suppose my commands don't have Stackoverflow now if I say stackoverflow it will open google search where I will see results with stackoverflow
 
so you basically need for formulate a request (containing the words someone said), send that to Google (using their API - their web service) - wait for the response and get your software to speak it.
APIs are awesome.
 
@Squiggle :D exactly
 
morning
 
oh - you want it to open the web page for Google?
or you want it to speak the google results?
 
12:17 PM
@Squiggle I don't think it has to speak it, but just show the results? We've to talk to the app
 
just webpage
 
ah then that's easy
 
@JayitaRoy use Google Search API to search for the term that was said, receive answer, open browser with google url
If it returns an url.
 
it returns json
im pretty sure
or xml
 
With an url? Or just some params?
Never used it before
 
12:18 PM
Like this?
http://google.com/?q=StackOverflow
 
yup
@Squiggle yup
 
@Failsafe Ok, it returns the whole set
I guess @Squiggle method is easier then
 
you guys are genius.. but I did not understand yet.. what should I do :P
 
finally friday )))))))
 
12:21 PM
use a UriBuilder
to build your URL
with your search terms or whatever
 
@JayitaRoy Try System.Diagnostics.Process.Start("http://google.com/?q=" + e.Result.Text);
 
@Loetn okay.. let me try
@Loetn it did not work properly
 
How about Process.Start("IExplore.exe","http://google.com/?q=" + e.Result.Text);
 
@Fa
@Failsafe will the program recognize any command not listed there?
I think it's not recognizing
 
don't you have to tell it what words to listen for?
 
12:31 PM
@Sq
@Squiggle that's my question
 
@Ja
 
:D good one
 
@JayitaRoy what speech recognition software are you using?
I'd consult the documentation for that
it's not native to .Net, is it? :S
 
it is :P
 
crikey
 
12:32 PM
@Squiggle Wut?
 
sweet
 
default :
System.Diagnostics.Process.Start("http://google.com/?q=" + e.Result.Text);
break;
I wrote this
 
Does it reach it?
 
@Loetn nah... :(
 
msdn.microsoft.com/en-us/library/… that's a place to start. Looks like the DictationGrammar is used for free-form speech recognition, whilst the GrammarBuilder forces it to listen for specific phrases that you have specified.
 
12:36 PM
@Squiggle I think you are right
 
01:00 - 13:0013:00 - 21:00

« first day (1784 days earlier)      last day (3169 days later) »