« first day (1012 days earlier)      last day (3940 days later) » 

3:18 PM
hej @JohanLarsson
 
Writing slow stuff with richtextbox & flowdoc was easy
hi
 
Hi people!


Who does develop mobile apps using Xamarin?


Is it good product?
 
hey @GeloVolro
hw r u @JohanLarsson?
 
As close to perfect as possible, I think, been at the beach for 8 hours today
 
you lucky soul
 
3:21 PM
Insanely nice weather, 23°C and wind from the north that was refreshing.
 
very nice weather
in here temprature is 41° C
 
Can we have some Fahrenheits..
 
No! Stupid Murcans
 
Well it is 74F here
 
81F where I'm at, coolest it's been in a while
 
3:24 PM
It's air conditioned here. I am nowhere near a window or door.
 
in my office we have AC but not my house...
 
in here 105.8° F
 
thats brutal
 
@MRS1367 WOAH! where you at
 
3:25 PM
Probably India
 
@MRS1367 inside where you code?
 
I'm in Iran
this summer, weather is HOT... :(
 
I would move...
 
@JohanLarsson -> I can't understand. my English isn't very well. sry
 
@MRS1367 Is it 41°C outside or inside or both?
 
3:28 PM
in outside
 
in Inside weather is 36°C
 
That made me chuckle as well.
Still kinda warm inside...
 
stupid readonly textboxes
 
hope the best wishes for u mates
I must gotta go
see ya later
 
3:31 PM
@MRS1367 cya, best for you too
 
Hey guys, I want to create a regular expression that removes whitespace characters and special characters.
 
I wish a knew a little bit about regexes...someone should be able to help though
 
However, the text that should be considered needs to be of the form "WHATEVER!?":
 
@ProfessorElm Define 'special characters'
@ProfessorElm And what form is that?
 
Periods, Exclamation Marks, Question Marks
 
3:32 PM
So replace [\s.!?] with an empty string
 
Suppose my String is
string text = "\"This is what !!! SHOULD BE CLEANED!\" : something else that can go here. ";
 
So... what?
Only remove from inside quotes?
 
Right
 
huh, watch me write a horrible hack
 
output = "\"ThisiswhatSHOULDBECLEANED\" : something else that can go here.";
 
3:34 PM
@KendallFrey I'll get some popcorn
 
(?<!^([^"]"[^"]")*[^"])[\s.!?]
I think that should do what you need
 
Oh man. That looks intense.
 
I have written much intenser regexes :)
 
@KendallFrey Let me try it out Kendall.
 
You do that
 
3:39 PM
Is that valid? I tried trying it out on regexhero.net/tester and it says trailing whitespace detected.
 
Probably the way you copied it
Try removing trailing whitespace
Wow, that is an awesome regex tester.
 
Close.
What's missing is the fact that it should stop at the colon (no pun intended).
 
Seems backwards. Hmmm
nvm copied wrong string
Aw f*ck
(?<!^([^"]*"[^"]*")*[^"]*)[\s.!?]
Better
 
I think I once had a string constant with accidental zero-width spaces copied into it. Drove me mad trying to figure out why a test was failing.
 
@Mike zero width spaces? What even...?
 
3:44 PM
The zero-width space (ZWSP) is a non-printing character used in computerized typesetting to indicate word boundaries to text processing systems when using scripts that do not use explicit spacing, or after characters (such as the slash) that are not followed by a visible space but after which there may nevertheless be a line break. Normally, it is not a visible separation, but it may expand in passages that are fully justified. Usage In HTML pages, the zero-width space can be used as a potential line-break in long words as an alternative to the <wbr> tag. However, the zero-width spac...
Maybe it wasn't that, but it was some invisible character that VS was also hiding from my sight.
 
jeeze, and one of those made it into your string constant? So you couldn't see it? What encoding allows that?
 
That's not quite doing it for me, Kendall.
 
dudes
 
It's not matching all "Whatever":
 
@ActionHank dude!
 
3:46 PM
@akowalz Unicode
 
if I hop out of a textbox with tab, how can I catch that event? its asp.net
 
@ProfessorElm Show me?
 
Do I need this javascript everyone is talking about?
 
Probably
Don't you know JS?
 
3:48 PM
0
Q: Javascript on lost focus event for tab out

DotnetSparrowI have a javascript function like this: ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "watermark", "function WaterMark(txtWaterMark, event, text) {if(event.type == 'keyup') {var charCode; if (event.charCode) { charCode = event.charCode;} else { charCode = event.keyCode; } if(char...

 
@ActionHank You shouldn't need js, the textbox has the events you need.
 
@akowalz that's what I was thinking
 
OH, I just got why "blur" is the verb for leaving a field
because it's the opposite of "focus"
 
lol
It doesn't really make sense, does it?
 
@ActionHank It's probably more user friendly to use JS, the textbox events might cause/need postbacks to work
@Mike hahah, you learn new things everyday
 
3:50 PM
If you need to do anything in ASP.NET, you'll need a postback.
If it can be done in JS, you don't need to.
 
I'd have used an event name like "onneglect"
 
Right, so JS is probably clearer/more user friendly. It'd also be pretty dang easy..
onLossOfSelfWorth()
 
If you want to learn JS, don't be afraid to ask me questions. I'm a JS guru.
 
@akowalz erm this is about windows forms I just found out
@KendallFrey please, yes
 
In JS, "" == false Yay JS!
 
3:53 PM
when I leave TextBox A, I need TextBox B to fill with the exact same value
 
That can be done in JS
 
Yea, that's simple JS.
 
With the onblur event and value property
look up how to register an event
 
what I got now is: <asp:TextBox runat="server" ID="startNumberTextBox" onblur="halp()"/>
 
I think you need to define function halp() { }
 
3:55 PM
Kendall, I guess that I can explain to you the context of my request. I am getting JSON as a string. And would like to remove spaces in the keys. I wanted to be able to use RegEx to do so (along with removing special characters in the keys).
 
The inside there use document.getElementById
@ProfessorElm Don't use regex to parse JSON
 
When does FirstOrDefault() return a value other than null? When it it called on a non-nullable column? Will it always return null when called on a Linq object?
 
Sure, in .NET you can, but dont
 
Then switch to using jQuery and rake in the $
 
@Pyitoechito It returns default(T)
If there are no items
 
3:57 PM
@KendallFrey Ahh, so default(int?) is null and default(int) would be 0?
 
@Mike lol.
hey @KendallFrey, I'm a js noob, wondering if it's sorta become bad practice to use javascript for something you can use jQuery for? or is it still alright to use straight JS for DOM manipulation?
 
8
9
 
@akowalz IMO, don't use jQuery unless you have to.
It's all about opinion though.
 
alright, I'll do what makes me happy, then.
 
4:01 PM
Hmm, so what happens when you try to get a column from a FirstOrDefault() that defaulted? I.E. TableFoo.FirstOrDefault().Bar. Does it return default(TableFoo) or default(Bar)? Or maybe an error?
 
It will be an error if it returns null
NRE
 
Would this work then? TableFoo.Select(x => x.Bar).FirstOrDefault()
 
@KendallFrey I'm trying not to, but this is the last idea I have to get a POC ready. regexhero.net/tester/?id=c5208000-b8de-476f-b656-7e08b1044fd2
 
Awesome, thanks!
 
4:04 PM
@ProfessorElm What's the question?
 
Oh getting this thing to only replace it on those.
 
@akowalz It's a matter of framework preference.
 
@ProfessorElm On those what?
 
I wouldn't be surprised if jQuery comes with most browsers by default before long.
 
How does that even make sense?
You mean that if a page uses jQuery it won't be downloaded?
 
4:07 PM
Currently if you use Google CDN urls for jQuery, it will already be cached across apps.
 
Yea, that seems reasonable. How big is the library, anyway? It must be trivial to include it.
But I guess you could make the argument about any library....
 
I don't see why a browser would "come" with Jquery
 
in-document javascript is not very helping: 'Only Content controls are allowed directly in a content page that contains Content controls.'
 
Jquery is a JavaScipt library - not a framework. I could see a browser coming with a framework installed, but not javascript libraries.
 
oh I fudged up
 
4:12 PM
@ActionHank Yea, I thought that might be a problem. I'm not sure how to include javascript events on ASP controls. I thikn you have 2 options:

1) Make the textbook outside of your `Content` tags, us JS
2) Use the ASP.NET events for this (http://msdn.microsoft.com/en-us/library/system.windows.forms.control.lostfocus.aspx)
 
@akowalz hold on I'm on to something
 
godspeed.
 
Hey-a Hank
 
Will cmd.ExecuteScalar work if the thing I need is a string?
 
I think it will... correct if wrong anyone?
 
4:17 PM
hey @CC!
 
I'll give it a shot. if the code breaks it breaks
 
@akowalz solved it: $("#MainContent_endNumberTextBox").val($("#MainContent_startNumberTextBox").val(‌​));
 
@ActionHank Wassup? Doin' some ASP?
 
yeah, just finishing up
 
cool, cool
 
4:18 PM
I launched a new service last monday
 
user142019
I don't like jQuery.
 
got all kinds of requests now regarding the user interface
@rightfold I'm with you
 
y u peeplez haet on jQuery
 
user142019
It's too messy, esp. wrt single-element v.s. multi-element selectors.
 
@ActionHank glad it's fixed
 
4:19 PM
Ah... it can dramatically cut down on code though?
 
user142019
It's also too broad IMO; it tries to do a lot of unrelated things at once—AJAX, element selection, animations.
 
I'm with @CCInc. Using raw JS for DOM manipulation can get really messy
 
user142019
Would be nice if they were separate libraries.
 
user142019
I use getElementById, getElementsByClassName, querySelector and querySelectorAll these days for selecting elements.
 
user142019
I'm going to work on a simple AJAX wrapper in TypeScript ASAP.
 
4:22 PM
do you like typescript?
 
user142019
Yes. It's great slightly less terrible than JavaScript.
 
anyone ever use CoffeeScript?
 
user142019
Yes.
 
user142019
I'd love to see a hybrid of CoffeeScript and TypeScript.
 
your perfect punctuation is almost annoying, guess it is due to all the Vimming
 
4:23 PM
I have heard of TypeScript (googling...)
 
user142019
@JohanLarsson I think you mean “Your perfect punctuation is almost annoying, guess it is due to all the Vimming.”
 
user142019
@akowalz It's a JavaScript dialect that offers static typing.
 
user142019
Speaking of languages that compile to JavaScript…
 
user142019
I want to do something with Fay but I couldn't get it to work last time I tried.
 
Oh this is cool (TypeScript). Is it really that useful to have JS be typed
 
user142019
4:27 PM
JavaScript is typed.
 
user142019
It's a dynamically typed language.
 
ok, meant statically typed.
 
I always use static typing when I program JS, and thus always have compile errors and never know why :/
 
Are there any languages that aren't typed at all ?
 
user142019
Machine code.
 
4:28 PM
That's what I was thinking.
 
Dialect of microcode, theoretically.
 
user142019
The untyped lambda calculus has no types, but it can be used as a programming language.
 
Is assembly typed? I'ts been awhile.
 
user142019
Depends on the assembly language.
 
user142019
LLVM assembly is typed.
 
4:29 PM
True that.
 
x86...isn't?
 
how's @cc btw
 
I'm alright, how're you?
 
I'm hot, I don't like this weather when working
 
user142019
COBOL was untyped. Kind of.
 
4:31 PM
I know the feelin'.
 
it's freezing in my office.
 
@CCInc 1. How do you statically type JS? 2. How do you get compiler errors from an interpreter?
 
~cause I'm magical~tildetime for kendall~
 
Seriously. What you said didn't make sense for JS
 
he may be have been talking about TypeScript?
 
4:37 PM
In that case, it's not JS
 
what are you even talking about?
 
Who? Me?
 
Oh, I see it. Hm, i don't know.
@KendallFrey Yea I couldn't figure out which message you were referring too
 
dem arrows :)
 
does anyone else think this speaker looks surprised?
 
4:40 PM
Not really
 
It looks hungry
 
It looks like he's peering at something in the distance, longingly
 
user142019
"XMLHttpRequest". This has always bothered me. Uppercase "XML", but not uppercase "HTTP".
3
 
I just had lunch...
@rightfold Agreed.
 
user142019
4:42 PM
"XML" shouldn't even be there in the name.
 
guys, I'm finished for today
 
user142019
Just "HTTPRequest" would suffice; it has nothing to do with XML.
 
have a good one, thanks again @akowalz and see u later
 
Quick question:
I have:
Foo[] bar
A.B.Foo[]

Is it possible to shorten this:
bar = a.b == null ? null : a.b.Foo[];
 
4:43 PM
@ActionHank no problem :)
maybe look into null coalescing?
?? @RyanTernier
 
Thought about the ??, but can't do that against a.b and Foo[]
because if b is null, it will throw an exception for Foo[]
 
I can shorten it by 1 char
replace the second null with a.b
Oh, but that causes type issues
Nvm
 
You can remove that whitespace
 
user142019
@RyanTernier what is a.b.Foo[]?
 
4:46 PM
I dunno, it's already on one line, why not make it more readable instead of trying to make it shorter @RyanTernier
 
user142019
Isn't that a syntax error?
 
bar=a.b==null?null:a.b.Foo[];
 
You added an extra .
 
That won't work.
 
And what rightfold said
 
4:47 PM
undefined symbol bar=a.b==null?null:a.b.Foo[];
 
user142019
bar = a.b && a.b.foo in Ruby. :D
 
No such thing as syntax error pseudo code.
 
<3 Ruby. @rightfoldfold you do any Rails?
 
@rightfold in ruby wouldn't bar then be true?
 
user142019
@akowalz I did.
 
user142019
4:48 PM
But Ruby on Rails is terrible.
 
That's not what I was hoping to hear. Did you switch to ASP?
 
user142019
@RyanTernier No. && in Ruby yields either false or the second argument.
 
And I thought VB was fuckedup
 
@rightfold That sounds wrong
 
@RyanTernier So, bar is of type Foo[] and is also nullable, but a.b.Foo[] is not?
 
user142019
4:49 PM
irb(main):001:0> a = nil
=> nil
irb(main):002:0> b = { x: 42 }
=> {:x=>42}
irb(main):003:0> a && a[:x]
=> nil
irb(main):004:0> b && b[:x]
=> 42
 
&& in JS yields the first argument if it's truthy, otherwise the second
Does ruby do that?
 
a.b.c where c == Foo[] - that'll make it so you don't have syntax issues., was just using Pseudo to shorten i.
 
user142019
irb(main):001:0> a = 42
=> 42
irb(main):002:0> b = 13
=> 13
irb(main):003:0> a && b
=> 13
 
user142019
@KendallFrey No.
 
@KendallFrey I'm pretty sure you just discribed logical 'and'.....
Isn't there an and keyword in Ruby? Maybe that short-circuits?
 
4:50 PM
@akowalz Yes, but with JS flavour
 
Right ok.
 
What just happened...?
editstorm
 
user142019
@akowalz There is and but the only difference between && and and is the precedence.
 
OK, fuck Ruby
 
user142019
= binds stronger than and but weaker than &&.
 
4:52 PM
Oh alright.
hmm....
 
user142019
and and or in Ruby are obscure and should always be avoided.
 
53
Q: Difference between "and" and && in Ruby?

Jakub ArnoldWhat is the difference between the && and and operators in Ruby?

First answer says the both use short-circuit evaluation @rightfold
 
user142019
Yes, I know.
 
Oh, didn't you say && didn't?
 
user142019
Yes, but as you can see I deleted that message.
 
user142019
4:54 PM
I was confused; it does.
 
Oh, I'm dumb. my bad
 
user142019
>>> 8 > 7 > 6
True
 
user142019
This is why I like Python. :P
 
Yea that shit is really handy.
 
user142019
csharp> 8 > 7 > 6
(1,2): error CS0019: Operator `>' cannot be applied to operands of type `bool' and `int'
 
user142019
4:55 PM
:<
 
classic C#
 
user142019
In C, 8 > 7 > 6 yields 0, which is funny.
 
var a=""; var b=0; var c="0"; (a==b)&&(b==c)&&(c!=a)
 
I really like Ruby, I think the functional parts of it are really handy and elegant. Plus The syntax is just like beautiful
 
Classic JS
 
4:56 PM
@rightfold What about 8 < 7 > 6?
 
user142019
@Mike You should see PHP.
 
@Mike That's what you get for using == instead of ===
 
Waiiit
 
@KendallFrey That's generics with type 7
 
Does Python actually do comparisons like that?
 
4:57 PM
Yea it's fucking awesome.
 
user142019
@KendallFrey False.
 
Oh was I wrong...
 
user142019
PHP comparison operators. Green arrow from A to B means A < B, black line between A and B means A == B.
 
You could do that in JS, but it would be erroneous
 
user142019
@KendallFrey It does them like you'd do them in maths.
 
4:58 PM
Python
>>> x = 10
>>> 12 > x > 3
True
 
@rightfold Where's the JS one?
 
user142019
>>> 5 == 5 == 5
True
 
user142019
@KendallFrey No idea.
 
user142019
Non-transitive ==/!= operators = GTFO.
 
@rightfold Don't you mean black arrow/green line?
 

« first day (1012 days earlier)      last day (3940 days later) »