« first day (1518 days earlier)      last day (3656 days later) » 

18:00
@juanvan It didn't work using margin, any ideas
@Greg If I understand correctly you may need to have something like: lnkEditExisting0,lnkEditExisting1 etc.. same goes for ccid and rdoBranch
Well, CCID is auto populated based on the branch.
I'm not sure how else you can make the groups unique
@Greg Ah ok. I thought it was hardcoded
So it is unique for each card?
Humm
@KendallFrey we would end up having global functions as well
18:03
@juanvan I tried putting margin 0 on both divs
making a fiddle
@LewsTherin It isn't.
@LewsTherin Any thoughts?
@juanvan it worked in the fiddle
i will have a look
@Greg Best to confirm with Travis. But the naive way is to append an index to the ids/names etc
cheers
18:11
@LewsTherin Yeah.
@TravisJ Where are you, Master of Javascript.
@Greg I know a place where you can find tons of JS Masters (and Rockstar Ninjas)
@KendallFrey Javascript room?
18:31
@Tommo1977 man I screwed around with that and got nada :-\
18:50
Does anybody here know if it's possible to get a formcontrol in WPF that allows you to group some controls together, like a formgroup?
@BenjaminDiele What is a formgroup?
Like a group box?
@NETscape can't bind columns. Tried to inject inheritance context. Failed attempt.
You mean like this:
18:53
I don't think a groupbox is right. A groupbox allows for multiple items in the box, but you can select them etc. I just want something to organize my controls in a semi-logical way, somewhat better than just putting a border around it
no, not like that
WPF panels will let you lay out your controls in any way you can think of
@BenjaminDiele What's the difference?
It looks like a groupbox
@KendallFrey a GroupBox is for interaction. I want something for presentation
I'll look into a panel, thx
GroupBox doesn't define interaction at all
Its just a titled Border control
@KendallFrey - The problem with the JS room is that it has people like Florian and Benjamin who set a very conniving tone.
Selection would be a ListBox or similar
18:55
@Greg - What is your js question?
@TravisJ ??
@KendallFrey - ...
Florian and Benjamin are two of the most knowledgeable people in that room
@BenjaminDiele A groupbox is nothing but a border, like you can see with Employee Data in the picture
@KendallFrey Oh man, I thought they wanted to show the "Select your name" control
They do know JS rather well, but that has nothing to do with their lack of communication and community skills.
18:57
well, silly me
@TravisJ I really have no idea what you're talking about.
Yes indeed, a Groupbox does it. Just annoying i have to put in another grid with columns and rows
@KendallFrey - Okay. Well, I am not going to get into it if you haven't noticed. It is all in the transcript. Those two conspire and actively attack users on a weekly if not daily basis.
Right, GroupBox usually needs a panel as its child
O.o I think I'll just ignore that...
19:00
But you'll find that thats pretty standard in WPF
@BradleyDotNET Yeah, but it's getting annoying I have to define several grids just to show some information. Each grid with their Row* and ColumnDefinitions.
If its truly getting bad, then I would suggest you are doing it wrong
@KendallFrey - Feel free
Can I tempt you to look over my xaml?
Remember that there are other layouts as well
Sure
19:03
I think I do 70% with grids. 20% Stackpanels and 10% rest.
@BradleyDotNET Where do I paste my code? Here? It's 186 lines long
You could do a paste bin or gist
name it .xaml so you get syntax highlighting
@Greg - your while loop doesn't work because you do an assignment instead of a comparison
I see a couple places where you have a Grid whose only child is another Grid
You could remove that nesting
user862319
Setting up brand new domain in the clouds. Best Friday ever.
Like around line 107
@TravisJ there was one time I asked a non-trivial question about the semantics of POST. Florian's response was 'learn how HTTP works'. He wouldn't accept that was unreasonable even when it became apparent that he hadn't understood the question. I know the singular of 'data' is not 'anecdote', but that's my experience.
@BradleyDotNET Removed that one and the one below. Any other improvements or is it just that unwieldy?
19:14
@TomW - Yup, happens all the time. POST has more to do with forming a request than the entire http pipeline anyway
@BenjaminDiele Nothing off the top of my head, but I just skimmed it. Honestly, your code doesn't look bad at all
or "unwieldy"
If it weren't for Zirak, rlemon, and like minded people to them that place would fall apart.
@BradleyDotNET Hmm, then it's just me
The gist being 'the standard supports query strings on post requests, but everyone seems to hate this. How bad is it to design an API like that, and should I expect any help from [insert framework] or just give up?'
@BenjaminDiele I guess. You don't have much nesting, the code is pretty clean/short
I've seen far worse
19:16
@TomW - Well you shouldn't use querystrings for post, it should be placed in the request body. querystrings are for using get
I know that
oh sorry
but apparently some API designers don't
@BradleyDotNET Well, thanks :) I think I'm going to ask on CR.SE for some tips as well
Good plan
They might look a bit closer as well.
19:19
Yeah, it's my first real project in WPF
XAML :( Is that for rendering a desktop app on win7? a win8 app?
it's for a WPF desktop application for windows 7 / 8
@TravisJ What do you have against XAML?
@BradleyDotNET - Nothing, just am not familiar with it.
Ah
If you ever learn WPF, I think you'll like it
Using it and HTML, I'll take XAML any day
19:29
brr, html
19:45
!!google MSVC constexpr
17
Q: constexpr not compiling in VC2013

DamianThis constexpr code does not compiled in Visual Studio 2013 version 12.0.21005.1 REL Is there a newer Visual Studio compiler that works with constexpr? #include <iostream> constexpr int factorial(int n) { return n <= 1 ? 1 : (n * factorial(n - 1)); } int main(void) { const int fact_th...

@MoonOwlPrince constexpr support will be in 2015
@ReedCopsey - Excited for hats?
19:54
Not really
I'm not answering much nowadays ;)
been too busy with F# Software Foundation stuff
Not like that matters lol you will still get it all by past posts
oh geez, another thing that I'm going to want to do but not have time to
@ReedCopsey - Software Foundation?
@KendallFrey - The only part that takes time is one day of rep cap
19:55
no
I mean like any time
@ReedCopsey - Is that your site or are you a contributor?
I'm the Executive Director of the Foundation ;)
I don't even have time to spend 5 minutes answering a question, because I have so much other stuff to do after work
@ReedCopsey - Cool, that looks like a fun endeavor. Good idea incorporating in Nevada ;)
How do people have time to do things?
19:57
@TravisJ yeah - was something I pushed for - adds some complexity, but nice
@KendallFrey - Multitask
working on 501c3 status, which is a pain
Fully
I work until 5PM, then I can get in like an hour of games and an hour of programming
Nice once you have it though
Especially for things like donations and write offs
19:57
yes, and it adds more legitimacy, too
@KendallFrey - You can rep cap in an hour rite?
but it's an insane amount of work to get - easy to keep, though
@TravisJ jesus, I wish
I'd rather spend an hour relaxing gaming or coding
Hi, I was wondering if I should convince my PM to get us ReSharper?
Yes or no? we are a small company
ReSharper is meh
20:00
why?
@KendallFrey - How many hours of sleep do you get average?
I have never used it but one of my coworkers has a personal license and he says it's great
@KalaJ It's like a girlfriend. It can do useful things for you, but nags about stuff that isn't really important.
@TravisJ 8 or so
at least that's the goal
lol
hm
@KendallFrey - See, drop that to 6 and you will end up with 2 extra hours :)
20:03
Well some people need 8 hours of sleep
@TravisJ I can't manage 6 hours if I have to get up before 7
I'm a zombie in the morning as it is
haha :)
Coffee!!
@TravisJ Why doesn't Model View Controller like concatenation here:
@juanvan I also cheap, can't afford a coffee machine
also don't want to get addicted
20:05
request.open('GET', @Url.Content("~/Home/GetEditContent?ccid=" + data.value));
Does anyone else use ReSharper or nah?
@KalaJ Yes - though I frequently disable it
ohh really? hmm
So, I should not ask my PM to get it
I don't want to waste their funds if it's not as useful as just using basic IntelliSense
Depends who you ask, some developers wouldn't be without it
I think there's a trial? Use that, and devote some time to understanding its features
20:13
Yeah my coworker has it and he loves it. My other coworker never heard of it
Most of them I don't use, a few of them are really handy
Yeah I think I will try out the trial
Which features do you use?
I don't hate it as much as I used to
the refactor menu mostly
it's a lot smarter about being able to move classes, into new files, into different namespaces etc
Anyone here know if this already works without the workaround? (the bug is closed, so it should mean it's fixed, right?) stackoverflow.com/questions/6707215/…
@KalaJ It can be very useful - and very good if you leverage it fully
20:16
@Greg - data.value is client side context, @() is server side context
a lot of the refactorings can help you learn other approaches
I don't agree that they're always "better", but it's good to see what you can do
though many are - ie: simplifying LINQ, etc
@TomW Yes, definitely - it can save hours if you want to refactor across namespaces
Yeah that's good to hear. I'm a junior dev, so I still have A LOT to learn xD
@TravisJ So does that mean I should just pass it all Client?
request.open('GET', '@(Url.Content("~/Home/GetEditContent?ccid="))' + data.value);
room topic changed to C#: If you code it, they will come. Read this: csharpchat.com [.net] [asp.net] [asp.net-mvc] [c#] [entity-framework] [linq] [visual-studio] [wcf] [wpf]
Okay, thank you. How do you grab a href value?
20:21
from where
document.getElementById("myAnchor").href
var pageUrl = window.location
@ReedCopsey I hope they write a new compiler. Lesson: Predict for when your codebase becomes so complicated (not necessarily complex) that it is difficult to extend it
@MoonOwlPrince I wouldn't hold your breath
they have too many (now required) extensions that'd have to be written, too
@TravisJ Well, this is what I did:
    function getInput() {
        var element = this, input;
        while (element && !element.classList.contains('Container') ) {
            element = element.parentNode;
        }

        input = element.querySelector('.rdoBranch');
        this.setAttribute('href', '/Home/GetEditContent?ccid=' + input.value);

        var edit = $$('.Popup-Edit');
        var request = new XMLHttpRequest();
        request.onreadystatechange = function () {

            if (request.readyState != 4 || request.status !== 200) {
C++, as a language, is pretty nasty to implement
And Bjarne Stroustrop knows that
20:24
add C++/CLI and C++/Cx plus all of the Win32 C++ extensions, etc - and it'd be a beast to try to replace
That is why I like the idea of reference implementations like what we see with C#
@Greg - classList isn't supported enough to use.
@Greg - input an input element?
input = element.querySelector('.rdoBranch');
        this.setAttribute('href', '/Home/GetEditContent?ccid=' + input.value);
I want that same input.value added to that request.
@ReedCopsey what Microsoft are facing with implementing C++ is a software engineering problem that should be documented for many years to come
@TravisJ Does it make sense what I'm attempting to do?
20:48
@TravisJ Hm...
@Greg - Yes, that all makes sense. Does it work?
@TravisJ No, it only uses the last ccid of the model loaded.
Usually if you are going to add an attribute to an element which does not natively come with it, such as an input element having href, you would use data-href. Also, when querying with that specialized format (I really don't think it is very friendly) and you look for a class selector, are you sure it isn't a set returned? That would require [0] to access the match.
@Greg - As opposed to which ccid?
2
the html has multiple ccid based on the radio button.
@TravisJ input.value always shows 3 no matter which one I select.
@Greg - are there multiple elements with class="rdoBranch"?
20:56
Yeah.
I would like to reiterate my criticism of the $$ hack.
??
It slices the matched elements and only returns the first one. I would assume the first element with class="rdoBranch" has a value of 3 and that is why you always get it
@TravisJ Yes, it does.
But I didn't use the $$ on that.
Oh
It is here
input = element.querySelector('.rdoBranch');
Ah, you are right =/ lol
20:58
Whew, I was like... Your about to make me feel stupid.
This is similar
There is .querySelector and .querySelectorAll
The former will return only 1 match, the latter will return every match.
input = element.querySelectorAll('.rdoBranch').filter(function(elment){ return this.selected })[0];
Still not fond of $$ :P
Hm, it now doesn't read the CCID at all.
Folks, am I imagining things or did there used to be a way to build an .msi installer using Web Deploy?
I can't find it anymore in VS2012
@Greg - testing
apparently filter doesn't work on the set from querySelectorAll
Oh.
21:08
Only basic iteration :(
1s
@Greg - http://jsfiddle.net/yujy3zgo/
var inputSet = element.querySelectorAll('.rdoBranch');
for(var i = 0; i < inputSet.length; i++){
if( inputSet[i].checked ){
input = inputSet[i];
break;
}
}
It isn't always checked, it's if you hit Edit
I am using sql to LINQ.

I have a date field in database table in mm-dd-yyyy format.
When i want to display, its displaying with time format too, but i dont have time in `date` column

Below is the code

` select new { du.DocumentUploadsID, name = es.FirstName + ' ' + es.LastName, rDate = DateTime.Parse(du.Date).ToString("MM-dd-yyyy"), du.FileType, du.DocumentPath, es.UserID };`


I tried

rDate = DateTime.Parse(du.Date).ToString("MM-dd-yyyy");
rDate = du.Date.ToString("MM-dd-yyyy");

but not happens.
Wouldn't that only be for a Radio Button?
@Greg - Isn't it a set of radio buttons?
@TravisJ It's:
21:17
@Rafee "d" will give you mm/dd/yyyy
        <div class="Container">
            @foreach (BCCP.Models.Card content in Model) {
                <span><input type="radio" class="rdoBranch" name="ccid" value="@content.Id" />@content.Holder ending in @content.CardNumber</span>
                <span>@content.Name</span>
                <span>
                    @if (DateTime.Parse(content.Expiration) < DateTime.Now)
                    {
                        <span class="Expired">@content.Expiration</span>
                    } else { <span>@content.Expiration</span>}
?? I didnt get it.
ToSting("d")
will get you mm/dd/yyyy
not working.. now my grid is not display at all.
@TravisJ Does that layout make sense?
21:23
what is the string date you are passing
Date
can you provide an example of the data
@juanvan ToString("MM/dd/yy");
@juanvan If you don't do captial MM you'll get minutes.
what data?
TryParseExact will work with that as a pattern
21:25
.
@Rafee What are you trying to do?
@Greg - So what is wrong with checking for .checked since they are radio buttons?
i tried that to..
@TravisJ They might hit edit without actually selecting a radio button?
21:26
@Greg I want the output in MM-dd-YYYY
not in MM-dd-YYYY hh:mm:ss
@Rafee DateTime.Now.ToString("MM-dd-yyyy");
@Greg - input ? input.value : "None Selected"
@TravisJ ?
Replace None Selected with the default value or check earlier to force them to select before clicking edit
@Greg not todays date, date coming from databse
21:27
In other words, you need to handle the situation where they didn't select a radio button, and that exists when input is undefined
you could also use typeof(input) === void 0 if you were exhaustive
@TravisJ Replace None Selected?
what is the string du.Date that its not coming in as a proper DateTime
@Greg remember, theres europe... yesterday was 11/12/2014 to them
21:29
@juanvan it throws an error
the fiddle?
yes
also remember cultureinfo
could be it, would the fiddle know?
In that, i want to display only MM/dd/YYYY
cultureinfo, does work either.
21:32
is that wpf or winforms?
@Rafee Try this:

DateTime date = DateTime.Now();
DateTime.TryParse(paramDateDB, out date);

Then place `date.ToString("MM-dd-yyyy");` and see if it uses the current date or your database value.
you have to set the formatstring for the column
Telerik.
@TravisJ So how do I circumvent that check?
Telerik what?
WPF or WinForms
21:34
sorry, I have no idea on that.. I know that, I am using asp.net..
I am just new to this.
what country is your machine set to?
US
@Greg - circumvent? Either set the value to something default or just return from the function before calling the server if the value isn't set.
21:35
if( typeof(input) === void 0 ) return;
@TravisJ Do you have an example.
Compiler Error Message: CS1502: The best overloaded method match for 'System.DateTime.TryParse(string, out System.DateTime)' has some invalid arguments
@Rafee okay, what is the column type?
GridTemplateColumn?
@Rafee Convert it to a string, sorry.
paramDateDB.ToString()
@NETscape Date
@Greg I converted to .ToString()
21:37
@TravisJ Something like this:
        input = element.querySelectorAll('.rdoBranch');
        for (var i = 0; i < inputSet.length; i++) {
            if (typeof (inputSet) === void 0) {
                return;
            }

            input = inputSet[i];
        }
@Rafee dude, there is no GridDate, or GridDateColumn
var inputSet = element.querySelectorAll('.rdoBranch');
 for(var i = 0; i < inputSet.length; i++){
  if( inputSet[i].checked ){
   input = inputSet[i];
   break;
  }
 }
 if( typeof(input) === void 0 ) return;
great.. I got an aternate stuff, changing it telerik column
<telerik:GridBoundColumn DataField="rDate" HeaderText="Uploaded Date" UniqueName="rDate" SortExpression="Date" DataFormatString="{0:MM/dd/yyyy}" >
thanks guys
DataFormatString="{0:MM/dd/yyyy}" solves all
did that fiddle fail for anyone else?
21:45
no it didn't fail... he was just doing the wrong thing and explaining the wrong thing
in JavaScript , 52 mins ago, by SomeKittens
@rlemon C# would pound Java flat.
That needs to be here
#1 cause of requirement failure
@TravisJ Where did you set inputSet?
var inputSet = element.querySelectorAll('.rdoBranch');
This stupid task
I've spent probably over a month now
21:53
@TravisJ Thank you.
@TravisJ I shall try.
Yeah, I am just new to telerik
If Bjarne Stroustrup, rlemon, Rob Pike and Kendall Frey are not quite fond of Java, that is a sign we should be happy Sun sued Microsoft
1. Do work
2. Debug failing tests
3. Be unable to continue, or have a higher priority task
4. Return to task later
5. Discover new issues
6. Go to step 2
7. Someone forgot the terminating condition
It must have happened at least 3 times now, that when I resume the task after letting it sit for a few days that something new is happening. Errors keep popping up as fast as I can fix them.
Grrrrrrrrrrr
Java sucks
i rather write C
I'd rather write machine code

« first day (1518 days earlier)      last day (3656 days later) »