« first day (1320 days earlier)      last day (3854 days later) » 

15:00
You don't need English to explain a programming problem
string x = "ABCD|1234|GKHJJ|67676|jhjhgjhgj|jkj|hjhjhjh898|jhjhj"
x[0] is ABCD
x[1] is 1234
No it's not
so i need a string
x[0] would be 'A'
it is
i mean im splitting by "|"
15:01
Okay?
so i need to get from x[2] which is GKHJJ
so you have an array with "ABCD", "1234", ""GKHJJ", etc.?
to x[n] so in this case "n" is 7
yes
i need to get from x[2] to x[n]
x.Skip(2).ToArray()?
15:02
ever heard of substring?
You can't skip? Or concatenate your array?
i made with substring
You have an array with the value, so you can manipulate the index however you want. I've got a meeting, be back later.
@KendallFrey yes but then i need to get the bytes through that string and the "x" isnt a string anymore is a string[]
maybe a for loop would be more allright?
yeah, if x is a string[] containing "A", "B", "C" then it will return an array containing "C"
15:06
yes but i need that Encoding.UTF8.GetBytes(x));
ups not this
So in my string
i need to determine the x length
and from x[2] to x[n] where n is the last word splitted by "|"
and a string should get a value of this
yes, go on
so basically
i need from x[2] to how many x's are there
put into a string all
like string y += ...
string y += x[2] to x[n]
You mean you want a|b|c|d|e to become cde?
15:08
yes
I'm curious why
is complicated a little
in this case "a" is a word "b" a file path" and from "c" to the last is bounch of bytes
I suppose you could do string.Join("", x.Split("|").Skip(2))
and this is the best how you thought: You mean you want a|b|c|d|e to become cde?
are you sure?
Am I sure what?
15:11
Maybe they need to raise the rep requirement to enter chat
that i could use that to: from |a|b|c|d|e to becode cde
To be honest, if you can't figure out this simple string manipulation it probably isn't going to make much difference in it working.
@user3313264 What do you mean am I sure it will work? Code always does tha same thing. It doesn't change.
i mean here because you said
string.Join("", x.Split("|").Skip(2))
but it needs something x[n].Split
15:16
x is the original string
yes
the string x = " a|b|c|d|e"
so that i wont get cde out
if we dont know how many is? for ex: string x = "A|B|C|D|E|....|N"
then the string y = "CDE...N"
Stop asking me questions and actually read the code, try it out, see what it does.
Here, if you are too lazy to use your own computer, try it here: dotnetfiddle.net/XD8459
@KendallFrey He is still trying to figure this out? Didn't we already tell him?
15:22
Yes, but he doesn't seem to believe that it will work
i didnt said that
it just didnt work
What do you mean, of course it works
Look at the link above
because at me the x is a string array
7 mins ago, by Kendall Frey
x is the original string
i saw that link i used to use it in school
yes is the origonal string but its an array
15:24
if x is actually str.Split('|') then change the code appropriately
and im trying to avoid the x[0] and x[1] and get from x[2] to how many x[] it is
@user3313264 Something cannot be 2 things at once. It's either a string or an array
the x is an array
@user3313264 AND I'M TELLING YOU EXACTLY HOW TO DO THAT
@user3313264 Then you don't need split, simple enough
no, you are always mad on me
i dont need split yes but i need the rest of the indexes
15:25
Do you not understand the code I wrote?
from that link?
If not, did you try?
i tried and is not working becaus is an array
basically i have like this
Just change the code to work with an array...
It's not so hard
x is "A|B|C|D|E|...N"
15:27
THAT'S NOT WHAT YOU SAID
and i have siwtch case cmd[0]
like case "A"
how is that relevant?
ok so i tell you the code as it is
My name finally changed.
15:28
string cmd = "Get|img.png|87676|87678687|87676|654564|jh876876|8787"
case cmd[0]
means if is "Get"
string a = cmd[1]
No, something is horribly missing
and the rests
Anyone here pro at XAML / C#?
after cmd[1]
Noob question here
15:29
i need to get it into a string
If you're going to give code, at least give proper code
this is the code
If I give you code, the least you can do is try to understand it
@RobVious Go ahead, I'm about finished with this other guy
i understand it but it needs to work with an array
Thanks sir. What I'm having trouble with is posted here: stackoverflow.com/questions/23902199/…
15:30
@user3313264 If you understood it, you would have made it work with an array 5 minutes ago
Basically, I'm trying to wire up a back button for a two-page W8 app
only on the second page, is this needed
but I can never get my click handler to get hit
I have a feeling it's something silly I'm doing wrong
@RobVious - If you set a breakpoint does your click handler get hit?
It does not :/
15:33
@RobVious - It is possible there is a layer above it
@TravisJ I'll try and upload it later today.
but the function resolves in the XAML, as far as intellisense goes
@Greg - Okay, just let me know
hi there guys
anyone here has ever created an usb dongle for licensing an application?
@RobVious - I think that you may have an invisible layer above the button
@RobVious - Is that possible?
@FrancescoDS - No, but that sounds interesting
15:34
Will do.
Hmm, I'm following a universal app pattern, so I have Shared project, Windows 8.1, and WP8 projects in the solution
@TravisJ the Shared has no views
Travis, I'm looking for some tutorial...but I haven't found anything googling around...
@RobVious - So the button is in a shared view?
@TravisJ the button is actually in the Windows 8.1 view only, the one I'm working on
the click handler has been named something unique as well, so I don't think there's any collision going on
@RobVious - are you using z indexing anywhere?
15:37
just checked, it appears not
@FrancescoDS you ever look at HASP
@TravisJ not sure if this matters, but I have my <AppBarButton> defined right after a <Grid.RowDefinitions>, and right before a <StackPanel>
@RobVious - Okay, did you try the suggestion in your answer to add the attribute Click="ClickGoBack" to your appbarbutton?
yes, with the Command property both left and taken out, still doesn't hit the breakpoint
The command property shown doesn't seem to reference the click handler by name
15:38
everything looks great on the UI, I just get zero feedback on click
@RobVious Where is GoBackCommand defined?
yeah, I added "Click: Click_GoBack" in that empty space
"NavigationHelper.GoBackCommand", shouldn't that be "NavigationHelper.ClickGoBack"
No, I don't think so
15:39
@juanvan I've heard about it...does it imply that an usb key is plugged in?
I think it's part of the NavigationHelper code
it's not custom
or is a virualization?
I don't think ClickGoBack should exist at all, unless it's getting called from the command
It is a USB key/LPT port Key
hi, has anyone here used ELMAH for logging? Do you know how to extend it to log to Windows Event Logs?
15:40
right, my understanding is that no custom code should be needed to handle this, but my Click_GoBack function was a hail mary, which isn't working either
Thank you for the help, by the way
Where is NavigationHelper.cs?
Is it in your project?
thanks juanvan
@KendallFrey it's located in a Common folder in my W8.1 project
The command has a property ElementName=pageRoot
15:42
Where is the command defined?
and my page has x:Name="pageRoot"
in case it matters
in the XAML element - the <AppBarButton />
Show me
<AppBarButton Grid.Column="0" x:Name="backButton" Icon="Back" Margin="10,26,0,-1"
Canvas.ZIndex="100"
Command="{Binding NavigationHelper.GoBackCommand, ElementName=pageRoot}"
IsEnabled="True"
Visibility="Visible"
Foreground="Green"

AutomationProperties.Name="Back"
AutomationProperties.AutomationId="BackButton"
AutomationProperties.ItemType="Navigation Button" Grid.Row="1" Grid.RowSpan="2" VerticalAlignment="Stretch"
/>
Now, what's weird, is that somewhere else on the page, I have this:

<Button Content="Go Back" Style="{StaticResource NogButton}"
Command="{Binding NavigateToHub}"/>
inside of a <Grid> - and that works
No, where is the command defined?
but it's bad UX, back button in the middle of the page
oh - NavigationHelper:123
it's not custom code
if I copy the <Button> into where I'm using AppBarButton, it doesn't work.
Which appears to be because NavigateToHub only works when defined within a <Hub>
15:54
do you guys log to windows eventlog or database for asp.net web application? Which option is useful over the other or should it be done to both of them?
But- if I bind Click: Click_GoBack to the <Button>, the breakpoint gets hit!
getting closer... so moving the <Button Click="Click_GoBack"> from where it is when it works to the uppermost grid breaks it - I get no feedback on mouseover or click
I'm at a loss
Maybe Travis was right, and something invisible is hiding the button
What could that be? A style?
I have no idea
Hit testing would probably confirm
so livefyre's SSL security seems to have expired, and it powers comments on Pluralsight, so trying to login with G+ or Twitter gives me an error from auth.livefyre.com. Should I proceed anyways 0_o
conspiracy to force users to create livefyre account? hah
16:21
I've grown quite fond of saving .sql files and then File.ReadAllTexting them instead of inlining strings because it lets me execute the query in an isolated environment if I need to - is there any way I can do something similar with EF?
New question posted: stackoverflow.com/questions/23916965/… RE grid hiding the button
(Class)(ling list) or Select new {props } are they both anonymous or is the cast a boxing?
@juanvan Neither of those are C#
using a linq return
what?
If you have a question about some code, post it
16:30
^
     var result = (from p in partnumbers
                                                         where p.partnumber == pn.partnumber
                                                         select new { partnumber = p.partnumber, description = p.description, qty = p.qty }).FirstOrDefault();
    Is this the same as  var result = (PartNumberr) (from p in partnumbers
                                                     where p.partnumber == pn.partnumber
                                                     select p).FirstOrDefault();
is P always an Anon? or only in the first example
no, one returns a PartNumberr, the other does not
the first one return a generic Anon?
*anonymous type
16:32
The second one returns p
so the first is an anonymous partnumber the second is an p.typeOf(partnumber)
I don't know what that means
it returns whatever you give it, anonymous type or no
use select new PartNumber {} and it will be fully typed
16:37
Musings of the Junior Dev.... makes the SEnior want to pull out his hair
It does ^
They're not equal
Unless someone overloaded the .Equal method without telling you
@ton.yeung Cordova and Microsoft are in bed with each other, the same as Microsoft and Xamarin. MS Is helping each
@RyanTernier He asked for a comparison, not an equality check
16:39
Xamarin is about the C# code base, where cordova (from what I have seen) relies more on HTML/CSS/JS/etc.
With .NET 4.5.2 you can deploy on *nix machines because of Mono - which works well with Cordova
@ton.yeung Saw massive demo's at Tech Ed. Sat down with the guys that wrote xamarin and those that are working with apache
Xamarin is all about sharing C# and making device-specific UIs
Whereas Cordova is 'one code base to rule them all' with JS/HTML
You don't have native stuff in Cordova
with .NET 4.5.2 (roslyn/ryu) you can build and target a nix machine so your code just runs on it
Xamarin just released version 3 today, i already downloaded it on my surface
@ton.yeung I met a developer at xamarin, i have his card. I'll shoot him a message asking for a comparison :) (of course it'll be biased) but now i'm curious haha
Uck. Warning to the wise-to-be, don't let your regex become massive monsters.
sliding. window.
16:54
@RoelvanUden toooo late :)
@RoelvanUden I just avoid it
@ton.yeung - Nope, almost, but no
@MikeAsdf Haha :-)
I just had to alter an existing regex and ended up with this new monster :-( (Vol\.\s*(?<Volume>[0-9\.]+))?\s*(Ch\.)?([a-z]+)?\s*(?<Number>([0-9\.]+[a-z]?|E‌​xtra|Omake))(\s?-\s?[0-9\.]+)?(\s?v\.?[0-9]+)?(\s*\(?Part\s+(?<Part>[0-9]+)\)?)?(‌​\s?(-|\+))?\s*(Read Onl?ine|:?\s?(?<Title>.*)?(Read Online)?)$
Have you read the post about regexing html?
16:56
Regexing html is just a bad idea through and through
What are you regexing?
Our solaris boxes have the following passowrd requirements:
-min 12 characters
-upper, lower, number, special, and spaces must be used
-no 2 characters can repeat (example: 11 is not allowed)
-no 3 characters in a row can be similar to the previous password.
----so old and new passwords cannot have the word "the" in them as that's 3 characters in a row
@TravisJ Comic titles :-)
my passwords usually are quite vulgar and show my hatred towards the person who made those rules
@RyanTernier Funny that the more restrictions you add to passwords, the easier they can be brute forced.
17:00
@KendallFrey THat, and the fact that everyone runs KeepAss in order to save these things. So rather than having tight security, their security is now in the hands of another company who creates software for holding passwords
I had this crazy idea where instead of passwords you just have a document on your computer that you download from the application and it acts as your password via upload when you sign in. It didn't work very well though.
That sounds like SSL?
It seemed like a cool idea. If you need one it would just email you the file in case you are on a different device. It had a huge password that could be used as plain text once uploaded to "save credentials" once logged in if desired
answer is 42. Screw the question.
> it would just email you the file in case you are on a different device
I hope it would be more complicated than that
17:03
@ton.yeung - nukes
@ton.yeung Air force has Jerry Maguire
hey guys
@ton.yeung Jack Nicholson says that in A Few Good Men
@ton.yeung and the air force has the SAS, I think
yeah you're right
United States Air Force Special Operations Command (AFSOC) is the special operations component of the United States Air Force and the US Air Force component command to the United States Special Operations Command (USSOCOM), a unified command located at MacDill Air Force Base, Florida. AFSOC provides AF Special Operations Forces (SOF) for worldwide deployment and assignment to regional unified commands. AFSOC was initially established on 10 February 1983 as Twenty-Third Air Force (23 AF), a subordinate numbered air force of the Military Airlift Command (MAC), with its headquarters at H...
AFSOC, sounds like the Wikileaks Task Force (WTF) the US created
Reactions to the United States diplomatic cables leak included stark criticism, anticipation, commendation, strong support for, as well as outright threats against people involved in the leak, satire, and quiescence. Official reactions Asia *Finance minister of Afghanistan Omar Zakhilwal warned that leaks would damage his country's relations with United States Government and there would no longer be "business as usual". He denied his remarks in the U.S. embassy cable dated 26 February 2010 as "absolutely, categorically wrong and false". *According to member of the National Assembly ...
17:18
Yup. Wikipedia has an entry on it, so it must be real ;)
PAX registration is open
!!wiki roll off the tongue
@RodrigoSilva No definition found for roll off the tongue
@RodrigoSilva The Wikipedia contains no knowledge of such a thing
To proceed into oral expression in a manner which is fluent, appealing, or glib
That's a weird expression
@ton.yeung yes, and it's an Army unit.
17:46
oh! I figured out my knee issue, I think. Patellar tracking disorder. Means my outer quads are too strong, need to strengthen my inners.
Glad to hear it doesn't require surgery
@ton.yeung good article on Cordova here thenextweb.com/microsoft/2014/05/12/…
18:03
yeah... hopefully that is it
hard to be 100% sure but it makes sense.
IN DELETING IT!!!!!! mWHAHAHHAHAHA
so I met Jeremy Foster yesterday. I mentioned I knew Reed and he said "oh yeah, I know Reed! Great guy!" haha
Jeremy Foster...?
@RyanTernier dev evangelist for MSFT.
So not the priest?
18:16
nope.
18:40
aww
Is there a one-line code to split a line into n pieces?
If the split is less or greater than n, take n anyway (with null or empty strings)
you can call F#'s windowed :)
2
A: Is there an equivalent to the F# Seq.windowed in C#?

BenjolYou could always roll your own (or translate the one from F# core): let windowed windowSize (source: seq<_>) = checkNonNull "source" source if windowSize <= 0 then invalidArg "windowSize" (SR.GetString(SR.inputMustBeNonNegative)) seq { let arr = Microsoft.FSharp.Primitives.Basics...

dunno if that iss good, did not read it
user1804599
@RoelvanUden array_chunk(str_split($myString), strlen($myString) / $n)
user1804599
:P
user1804599
18:56
from i in Enumerable.Range(0, myString.Length) group myString[i] by i / n;
user1804599
Something like this perhaps.
clever
I'd still warp it in an extension method if it works
I'll go with something like that :-)
user1804599
Make it into a generic function plix.

« first day (1320 days earlier)      last day (3854 days later) »