« first day (1375 days earlier)      last day (3574 days later) » 

6:01 PM
What could cause my unit tests to freeze up? Sometimes VS just stops stops doing anything in the middle of running unit tests. It's not running a unit test, and it's not progressing. It just sits there, and never runs the remaining tests.
 
@ton.yeung Can you supress the urge to punch someone?
 
Is there a way to do an Ajax post through Javascript, but to only reload a particular user control or do you have to reload the entire Page? I know there are supposed to be some differences between Page / Server in the ASP.NET Page Life Cycle.
@ton.yeung If that doesn't work?
As I'm trying to push text to the database to find those results.
 
@ton.yeung Interesting, I had a friend who had similar issues, I think his were more serious though. He often punched walls and other stuff for no apparent reason.
He got really pissed off, he once broke a calculator (we were in school) in the middle of the class
I exercise regularly, it keeps my head clear :P
And routine is good, I guess
@ton.yeung You could try less demanding sports, or just running (or walking)
 
what type of yoga are you doing?
 
You could run at a slower pace, or walking faster :P
 
6:16 PM
Astanga's my favorite
brutal when done correctly - but still my favorite
 
@ton.yeung If I do:

<a href="#" onclick="location.reload(true)"> How would I add that event once a button somewhere else is clicked that is further away from the control?
 
hatha is probably the best, too, if you're "newish" to doing it - much easier to learn technique in hatha classes
 
location.reload()?
@ton.yeung Yeah, update panel broke it all.
Well, I have a txtBox that I need to grab data out of my SQL Data Source.
@ton.yeung The user does after the page is loaded.
 
6:41 PM
@ton.yeung I don't have an Update Panel. I've got a .ascx and it will contain a textbox, which has several jQuery functionality. Now, I need the click event to trigger that update for the data source.
 
wtf =/
So I was using visual studio, and then this popup randomly shows while I am typing
and it will not go away
 
restart
 
I am more curious how it got there than worried about it.
 
-------------------------------^
 
@ton.yeung - No add ons, I prefer the light side
 
6:44 PM
It is summer
 
@ton.yeung Nevermind, the Stored Procedure the DBA did had an error.
 
Sigh, I figured it out.
It was some sort of issue with the title attribute of an element. It must have got stuck for whatever reason.
@ton.yeung - The dark scheme is actually harder to read on a projector.
@ton.yeung - Easier on my eyes.
yes
@ton.yeung - I project onto the wall at work (although at home I use a screen). The wall area is 3'x4'. I sit 7' from the wall with two file cabinets near me and 2 tv dinner tables with a wireless keyboard on one and a wireless mouse on the other
It is a little fun, but more than that it is really nice on the eyes. I can do this for like 16 hours a day if I had to and not develop any eye strain or discomfort.
lol
 
7:12 PM
look here if you've used PrintQueue.GetPrintCapabilities before stackoverflow.com/questions/24895753/…
that 5 seconds you'll never get back
 
8:08 PM
          wow
                           many dead
much  crickets
                so  boring
                           very  question
such  killed chat
 
what order?
it's random
!!doge 1,2,3,4,5,6,7,8,9,0
 
       wow
so 1
                 very 2
                         many 3
such 4
           much 5
                           such 6
very 7
             so 8
                         many 9
much 0
 
WTH is that?
 
doge!
 
anyone know what the "Blocking Issue" check box means when reporting a potential bug?
 
8:13 PM
Bug in what?
 
It probably means that you are unable to work without a resolution
 
If that is correct, don't abuse it just to get a quick response, you're going to suffer in the long run.
 
thats what i thought too but wasn't sure
 
Can someone tell me why my code doesn't work:

        string search = txtSearchPlattU.Text;
        var values = new List<string>();

        int initial = value.IndexOf(txtSearchPlattU.Text);
        int index = 0;

        while ((index = value.IndexOf(search, index)) != -1)
        {
            int end = value.IndexOf(".", index + 1);
            values.Add(value.Substring(initial, index - end));
        }
 
it doesn't even have like a Yes/No. its just a checkbox lol
 
8:16 PM
@Greg is it getting into the loop?
 
@Greg Can you tell us what you mean by "doesn't work"?
 
I get an error for a non-integer being larger then my collection, which I fix the index + 1 then I get another error with the index - end.
 
Why don't you start by telling us what the code is supposed to do?
 
@Greg so - the problem is, if you go back to the code I pasted you, you need to check/handle no trailing .
 
Is it an off-by-one error?
 
8:17 PM
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: startIndex
Index and length must refer to a location within the string.
Parameter name: length
 
I put a comment in there saying something like // Does this need to be handled?, and it looks like yes, it does ;)
 
@ReedCopsey I didn't see that :)
 
Why did it happen though?
 
// Error check for no "." required?
basically, you had your search term, but there was no "." following it
 
8:18 PM
Still get:
 
so if you searched for "foo", it found a "foo" that didn't have a "." after it at the end
 
Length cannot be less than zero.
Parameter name: length
 
yeah - if there's no ".", then end becomes -1
 
@ReedCopsey I was trying to grab the whole sentence that had the search word in it.
 
        while((index = value.IndexOf(search, index)) != -1)
        {
            int end = value.IndexOf(".", index+1);
            if (end == -1)
                break;

            values.Add(value.Substring(initial, end - initial));
        }
yeah - but you have a search term that's not in a sentence
or it ended in "?" instead of "." maybe?
or "!"
etc
 
8:25 PM
@ReedCopsey True.. Hm.
 
Anyone want to have a discussion on testing? We have a slight dilemma here.
Actually, that would solve the problem at hand
It's a performance problem
 
@KendallFrey I'll try to
 
The real issue is right now we're doing expensive setup and cleanup before every test, and we want to (I think we should) reduce this to once per test run, not once per each test
However, this means tests will need to clean themselves up.
If they don't, they will cause other tests to fail.
MSBuild
how would distributing the tests help?
Seems like way too much cost for so little benefit
If it involves multiple machines, that is
@ton.yeung Also, the teardown isn't the expensive part, it's the setup
If we can get tests to nicely share a connection to the service, that would be ideal
 
@ReedCopsey So, that does fix it- But it still doesn't show the description. It basically returns no data.
 
@KendallFrey You can use [ClassInitialize] to handle that msdn.microsoft.com/en-us/library/…
 
8:32 PM
Tomorrow I will have discussed it with the team
 
@Greg Well, I just broke out in that error case
 
@ReedCopsey Yes, that's not the issue I'm concerned about
 
if you need to handle ? or ! or other things, you'll need the logic in there
@KendallFrey Should let you make a single setup call for the run
 
At some point, somebody will write a test that fucks up the state
 
make the state immutable?
 
8:33 PM
Their test will pass, others will fail
@ReedCopsey Ah, such lofty dreams
 
Would it potentially be easier to just grab the word and the next 50 characters?
 
@Greg or grab the word up to ".", "?", "!", or the end of hte string :)
 
Hey fellas. If I want to call a class library function some arbitrary period of time from now (say a week), what tool should I use to do this?
 
@NWard Windows Task Scheduler with a simple app wrapping the library is my preference
 
@ReedCopsey Yeah, would be the best to handle that? a switch?
 
8:35 PM
@Greg probably easier with if statements - you'll need to find the index of all 3 options, and pick the smallest of them
and if none exist, go to end of string
(smallest non -1 value, that is)
 
@ReedCopsey So basically a small console app that wraps calls to the WTS API?
 
@NWard Just a small console app that wraps the library functino, and schedule it as needed
@KendallFrey Problem is you can't have it both ways - you can do one setup (class init or assembly init) and one tear down, but then the state will always exist through all of the tests, or you can setup/tear down per test
 
@ReedCopsey OK, thanks - I'll give it a shot. Cheers
 
@KendallFrey if you make it immutable (or wrap in an immutable facade), you can be safe in that - otherwise, that's a risk
 
We do have a method that's sort of designed to deal with this
We also dealt with this with database stuff, and now build the database once, not before every test. No real safeguards there though
It's really a problem though. Build times are about 19 minutes.
So almost anything would be better
 
8:43 PM
@ReedCopsey Will I need to call the value.IndexOf a bunch of times?
 
@Greg pretty much
I'd make the search character array a static, too, to avoid reallocating in that loop
 
@ReedCopsey ?
 
Rather this overload, since you need a starting index: msdn.microsoft.com/en-us/library/56y4ddbk(v=vs.110).aspx
it works via String.IndexOfAny(arrayOfChars, index) - if you create the array of chars each loop index, it'll generate a bunch of garbage
adding a static char[] sentenceEndChars = new[] { '.', '?', '!' }; and using that will make it quicker
 
So something like this:

    protected string FilterSummary(string content)
    {
        string value = string.Empty;
        if (content.Length < 5)
            return content;

        string search = txtSearchPlattU.Text;
        var values = new List<string>();

        int initial = value.IndexOf(txtSearchPlattU.Text);
        int index = 0;

        char[] punctuation = { '.', ',', '?', '!' };

        while ((index = value.IndexOf(search, index)) != -1)
        {
            int end = value.IndexOfAny(punctuation, index);
 
8:59 PM
yeah - you could change it to: if (end == -1) end = value.Length - 1; if you wante dto grab the end of the string
 
Which line?
 
the if statement
 
Oh.
 
:) "You cannot delete this audit message" =/
 
@ReedCopsey Weirdly, it still doesn't return anything.
 
9:12 PM
that's interesting you can edit it
 
@NETscape You know what gets hit enter on a textbox what it triggers? I want to call it through jQuery.
 
@Greg pull out one field and test manually in linq pad
or something - may not have an exact string match
 
@ReedCopsey Good idea.
Is enter the same as mouse click?
 
edc
@Greg mouse enter is when the mouse pointer hovers over your target element.
assuming you are talking about javascript/jquery
 
I am.
Can I make a mouseclick basically do enter.
 
edc
9:22 PM
mouse click would be the click() function
@Greg hmm, I guess you could, but I don't think that's what you really want to do. What are you trying to achieve?
oh just read your earlier message, it would be something like
`$('#element').mouseover(function() {
// do something
});`
 
@edc Well, when I hit enter in the textbox it refreshes the data source. When I hit the button, it doesn't.
 
edc
oh ok, then you should implement the click() event of the button
does hitting enter in the textbox call a javascript, or do a submit?
 
It does a submit.
Honestly, I don't know.
I just want that my current jQuery.click isn't actually calling the data source.
 
edc
@Greg hmm, so you want 1) enter on textbox to refresh data source; 2) click on button to do something else.
 
@edc No, I want them to do the same thing.
Right now, enter does the search as intended. The jQuery button doesn't.
 
edc
9:33 PM
oh ok. let see, what kind of code does the textbox enter event does?
does it run jquery, server code, or a blend of both?
 
As of now I'm in an .ascx I hit simply have a <asp:textbox>
Which is linked to a SQL Data Source.
 
edc
maybe change the button to be a submit button, then wrap the two in an update panel
(it's been a while since I used pure asp.net controls :()
 
@edc Eh, I'm not to keen on the update panel.
Do you know what the textbox does with an enter?
 
edc
your page has a script manager right?
if I understand correctly, your page does what is called a partial postback, meaning it knows to only refresh the control that initiates the refresh
 
Can anyone tell me why if I submit this in the post body {"accountNumber":"12345"} and have a method signature of (string accountNumber) I get a 404 error using WebAPI.
This approach would work fine in MVC so I'm not sure what to do.
If I take the parameter out then I don't get a 404 issue.
 
9:48 PM
@edc In ie the enter key doesn't even work . But Chrome is doing it hm
 
@SpencerRuport - That is because webapi is retarded.
 
edc
@SpencerRuport try create another signature (int accountNumber); maybe web api automatically convert the string to a number?
 
@SpencerRuport - More specifically, your method signature needs to have an attribute marking accountNumber for whatever brilliant reason in order for the mapping to work properly.
Can't remember the specific attribute
 
I hate these new frameworks.
They tack on one stupid feature and 100 unnecessary changes and suddenly everyone's like "OMG WEBAPI IS THE FUTURE WE MUST CHANGE"
 
@SpencerRuport - ([FromBody] string accountNumber)
 
9:50 PM
@SpencerRuport Are you using attribute routing in your WebAPI?
 
@NWard - I have no idea.
 
@SpencerRuport I think @TravisJ has it actually.
 
alright I'm trying all your suggestions hang on.
 
@SpencerRuport If your request was /api/{accountNumber} it would pick it up from the URL, but if it's in your POST body then it needs the [FromBody] attribute in the method signature
 
Are you serious?
>_<
 
9:52 PM
@SpencerRuport Yes, actually I think that's consistent with MVC. If you POST to a controller action that's looking for accountNumber, I think it defaults to the querystring and not the request body... But I'm not sure
 
edc
@Greg I tend to avoid using the good old asp.net controls now, but a blend of pagemethods, regular html controls and jquery to get things done
 
the API in webapi stands for Aggregate Performance Inhibitor
 
edc
for simple pages, that is
 
So in Internet Explorer, the enter key doesn't actually trigger. Chrome does, which works. Is it possible to see what Chrome is doing to trigger that?
 
@SpencerRuport "'123451'" maybe otherwise? meh idk
 
9:53 PM
@edc It's the only default control on the page.
 
@NWard @TravisJ - So it doesn't cause an error when I use the [FromBody] attribute but the parameter is null.
 
edc
@Greg try ctrl+shift+i and check console
 
@SpencerRuport So it's hitting your action but not deserializing the POST properly, right?
 
Apparently.
 
@SpencerRuport Is there a reason for sending the accountNumber in the POST body and not in the request URL?
 
9:56 PM
Because I think Rest is stupid.
 
@edc Weird, it is doing a POST.
 
And I don't like having to switch between POST and GET.
So I always do POST.
 
@SpencerRuport Oh, huh. So do you switch behavior on the action depending on the POST body?
 
I don't follow.
 
edc
@Greg and not the same on IE?
 
9:57 PM
@SpencerRuport Nevermind, doesn't matter.
 
Is there something in WebAPI I have to config in order to get it to deserialize parameters from a JSON body?
 
@SpencerRuport No, it will do it by default. But I wonder if it doesn't know how to deserialize your JSON because it's a more complex object than a string?
@SpencerRuport E.g, an object with an "accountNumber" property rather than just a string
@SpencerRuport Irritatingly the deserializer just fails silently and returns NULL if it can't figure it out, rather than throwing a serialization exception or something.
 
That's how I do it with MVC so I can pass in multiple parameters
{ accountNUmber: "blah", someOther: "blah" }
 
@edc No, it doesn't call the POST because I really don't have the trigger on it.
 
@SpencerRuport Try changing the type of accountNumber from string to object and see if it still comes in as null.
 
edc
10:00 PM
@Greg hmm. either way, I gotta leave work. Sorry for stopping in the middle
@Greg I am sure other folks here can do a much better job helping you ;)
 
@edc No problem, thank you for the help.
 
10:15 PM
@NWard - Yeah you are right. Changing the signature to a class that matched the structure of the object worked. Very fucking annoying.
 
@SpencerRuport Glad it worked.
 
Apologies for my dirty mouth. I tried objecting to using WebAPI since it's really just ASP.Net MVC without Razor but to no avail.
 
@SpencerRuport WebAPI works very nicely for building REST APIs ;) But I think you'll need to fight the default behavior a bit to make it work with a different scheme.
 
Is there a fast way in jQuery to post right back to the same page and just modify the query string, or do I need to right a huge long ajax post?
 
There's the $.post function which is a bit quicker to write than the full $.ajax syntax
 
10:29 PM
Could I do the .submit?
 
$.submit is an event handler registration isn't it? I don't think it causes a post by itself
 
@NWard Nah, just read jQuery documentation. Sigh-
@NWard what do you do to append query string to a URL?
 
hi
 
hola
 
10:45 PM
@Greg The first argument of $.post is the URL that you POST to - just construct your full URL (with new query string args) and stick it in there
 
@NWard Should be this correct?
        var form = $('#<%= txtSearch.ClientID %>').val();
        var url = $(location).attr('pathname');
        var posting = $.post(url + '?search=' + form);

        posting.done(function (data) {

            var control = $('#<%= txtSearchPlattU.ClientID %>').val();
            $("#Search-Message").text("Search results for: " + control + "\t").show({ width: '50%', display: 'inline-block' });
            $(".Delete-Icon").show();

        });
 
I suppose so, are you registering posting to a button click or something to trigger it?
 
Yeah, it actually didn't post the URL though :/
 
What's your registration look like?
 
@NWard ? It is a method, that has a click event.
 
10:54 PM
I guess it's not clear to me if your registration is firing correctly and your $.post isn't working, or if the registration isn't firing and your $.post never gets called
 
whut up crazies?
you gotta be crazy ... you're developers right ...
I'm seriously tempted to start learning the DX12 API
 
@NWard It just has the var posting as Object object no URL.
 
start my voxel engine from scratch ... but I don't know if I can be arsed to learn sooooo much
 
@Greg Hmm not sure. Your line var posting = $.post... should be triggering the postback.
 

« first day (1375 days earlier)      last day (3574 days later) »