« first day (1419 days earlier)      last day (3545 days later) » 

2:00 PM
I was searching the vb.net version for it....
 
Hm?
 
@deostroll If you just spend a day learning the C# syntax you can use any and all .NET samples you ever come across and easily translate it into VB.NET. That said, if you are not maintaining legacy applications, I can't really come up with a reason to use VB.NET... like, ever.
 
@Sippy I believe this is what you're looking for stackoverflow.com/a/3936252/632736
That last message was for deostroll, no sippy
 
I hate VB almost as much as I hate PHP so I will be of no further use :D
 
@Sippy I totally get the hate for VB, but why the hate for PHP?
 
2:09 PM
var string = "string";
string = -1;
 
lol, that's allowed in PHP? Is it not type-safe?
 
Theres probably no way to do this other than some type of persistent storage but is there a way to make sure username hasnt already been taken when running FormsAuthentication.SetAuthCookie(username, false);
 
No.
 
PHP, JavaScript and large number of other languages are dynamic, yeah.
Not a very good reason to hate it though :P
 
That and the lack of a truly decent IDE
 
2:10 PM
PhpStorm, PhpED, ...
 
From what I've read, it's incredibly inconsistent in naming conventions, even within it's own codebase.
 
I've heard PhpStorm is pretty lacking
 
Apparently with SignalR I can identify a single client by "userId" which is IPrincipal.Identity.Name. I am setting that Name using FormsAuthentication.SetAuthCookie(username, false); correct?
Thus, I need to make sure username is unique correct?
 
Dunno, once I heard PHP jobs are lower paid than ASP.NET jobs I just dropped it altogether :D
Cos I dislike PHP.
I don't like how PDO looks like C++ either
-> makes me shiver
 
@Sippy I read that as well
 
2:13 PM
Instead of going on what you've read/heard, try it. These products offer free trials and the language itself is open source and free. PHP has come quite a way; in no way do I favor it, but you can't just dismiss it without having a very good reason (IMHO). PHP jobs here pay equally well to .NET jobs, though. :-)
 
@RoelvanUden Actually, PHP is on the low end bpodgursky.com/2013/08/21/…
 
@RoelvanUden I'd try it if I were forced into PHP development :P
I don't like weakly typed scripting languages
Let alone trying to build a whole application weakly typed.
 
@FreeAsInBeer It depends on region. I can get a PHP job that pays equal, better, or worse than my current job. Truly it's all in the same pay region around here. I imagine that's the case for most developed countries. :P
 
In the UK, PHP isn't worth as much.
 
Hmm... most really large, professional, income-generating web apps in the states aren't written with PHP anymore
 
2:16 PM
@Sippy Well, it also brings a whole range of benefits, and tooling is protecting you from a lot of trouble that is often associated to dynamic languages (the common pitfalls are covered through linters and code intelligence and inference).
 
Out of the top 20 websites, I think PHP was in there like 3 times
 
@RoelvanUden phpsadness.com
That said
I don't know whether I prefer to use PHP or Web Forms.
I think out of just sheer hatred for Web Forms I'd do something in PHP if I had the option to.
But ofc MVC is de winner.
I've heard RoR is actually really good as well
 
I really enjoy MVC.
Trying to get my coworkers to use it is not going so well
They're using web forms. A technology from 2002...
 
Tell them if they don't understand MVC and would rather use Web Forms they are stupid and belong in a museum!
Web Forms is so fucking awful :(
 
Lol, I was thinking of baking them a cake and handing them a card saying "Your choice of technology is great for a third grader. Or a WWII veteran."
 
2:22 PM
Lol
Viewstate is retarded
 
I've played with RoR a bit, mostly in a commercial setting. It's interesting. Similar to MVC, but it seems like there's already a plugin for most things you want to do. It seems like the beginning of every project is determining which packages you want to include in your project, then just gluing them all together.
 
ID mapping gets retarded when you have a lot of elementws
@FreeAsInBeer Nothing wrong with that :D
I've never used it but I heard it was much akin to ASP.NET MVC
And I might be tempted to try and make something of my own design with it.
 
Morning everyone.
 
Hey - liked that question, that was the a good answer
 
@Greg Hullo
 
2:27 PM
Hi all
 
@Skullomania, cabbage
 
Best way to fill your codebase with typos: Hire developers who just learned English
 
@Nathvi cabbage?
 
@Skullomania bananas, mostly
 
@Skullomania, it's means hello (From the python salad language)
 
2:28 PM
haha!
 
It's kind of a funny thing :)
 
@KendallFrey A bit like this?
 
I prefer REBEL./.+/$>$&
 
thats awesome!
 
bananas = awesome
 
2:29 PM
public enum DBAcion : int
{
	Add = 0,
	Delete = 1
}
 
yup, like that
 
That should definitely say DBAction.
 
@Skullomania, sopython.com/salad
 
it feels rather like a friday
 
Happy post-hump-day-hump-day!
 
2:30 PM
I have sort of a math c-sharpish question
 
?
 
@Skullomania ooh, I love those
 
I want to create a progress bar for my survey...

nStrProgress = 100 / RAC;
The problem is...
int RAC = Convert.ToInt32(ViewState["count"]) - 2;
so it will start out at 100
 
ew, Convert
 
and work its way down
 
2:32 PM
HE'S USING WEBFORMS
2
STAB HIIIIIIIM
 
lol
 
don't hate
 
Who cares, he's using Convert!
shoot him!
 
What's wrong with convert?
 
2:33 PM
@Skullomania :D
@Sippy It's a hack
 
What!?
 
yes, yes i know
 
What's the right way to do it??
 
use the normal builtin method
[Try]Parse
 
OHHHHHHH
Ok
Why's the other way a hack?
 
2:34 PM
Because it's not necessary
 
Fucking uni taught me to use Convert T_T
 
And I think it comes from VB
 
its quick and dirty but it works
 
Only thing I use Convert for is radixes and base64, because I don't think they are anywhere else
I never need radixes though
 
now...going back to the math issue....how can I get the number to reverse?
 
2:35 PM
what do you mean?
number = -number;?
 
so its starting at 100% and working its way down
 
@Skullomania, you mean a number like 123 to 321?
 
i need it to start at 0 to 100
 
So start at 0
not sure what you're doing
 
@Skullomania 100 - yourCalculatedValue? shrug
 
2:36 PM
how are you iterating?
 
i showed you...than you guys started freeking out on em
I want to create a progress bar for my survey...

nStrProgress = 100 / RAC;
The problem is...
int RAC = Convert.ToInt32(ViewState["count"]) - 2;
so it will start out at 100
i need it to start at 0
 
nStrProgress = 0?
 
i did that for the first step...but the second step it jumps to 100%
because the RAC becomes 1
 
If I'm testing for a drop down if it is empty, shouldn't this work?
if($("#ShipStateList").toggle($("#ShipStateList option").length = 0)) {
    $("#ShipStateList option").valid8();
}
 
You can still use 100 - whateverYouCalculated...
 
2:40 PM
shouldn't it be RAC / 100?
@RoelvanUden or that
 
@Skullomania I really don't understand your "so it will start at 100"
what will? why?
 
I meant to say that it WAS starting at 100
 
i think he's trying to say it's starting at 100, but wan't it not to
 
@FreeAsInBeer yes!
 
but why?
 
2:41 PM
@KendallFrey what he said
lol
 
and what?
 
d'oh
 
"it, it, it"
headdesk
 
Furthermore, I feel ignored. :-/
 
@RoelvanUden i am testing it
 
2:42 PM
@RoelvanUden I'm trying to teach him something, stop repwhoring :P
 
@KendallFrey Go on and teach about the proper usage of "it" and contexts. :-P
 
I'm trying
The best way to teach is to help someone learn.
 
and the best way to learn is to teach someone how to teach to learn
 
but master yoda says I must unlearn what i have learned
 
aka, teaching a teacher to teach ai
 
2:46 PM
@Nathvi say that 5 times fast
 
lol
 
Shouldn't teaching teacher already be taught?
 
Fuck this philosophical bullshit!
Y'all givin me brain aids.
 
XD
 
Yeah, let's discuss quantum physics
 
2:48 PM
fuuuuuck
 
teaching teacher is taught only if teacher hast taught the teacher to teach
 
I actually get some of that
 
oh, wait, that's even more philosophical
 
lol
and yes i meant to use hast
 
most learning comes down to function approximation
 
2:49 PM
@Skullomania I think you meant to use 'hath'
 
@Sippy noone noticed play along damn you...haha
 
Lol
 
The only thing I sort of know about quantum is tunneling, which apparently, is why the fusion in the sun works.
 
your computer runs on it
 
Quantum teleportation is a funky topic.
 
2:53 PM
Someone have a moment to help me with some jQuery?
 
@Sippy quantum teleportation is impossible
 
@KendallFrey Since when?
Last I heard they'd done it.
 
It's not teleportation, that's just what they call it
 
Not in terms of transferring matter, but for transferring information
 
^ yep
 
2:55 PM
Could be pretty useful for quantum networking
If there is such a thing
 
the problem with it is the number of entangled particles necessary
I think you need to have one entangled pair for each qubit you transmit
you might as well transmit the particle you want, instead of transmitting the entangled one and the classical information
 
Mm maybe
 
@Greg sure
 
But who says you need to create a new particle for every qubit?
Why not have a set of particles and transmit information in chunks?
 
because entanglement is destroyed by measuring the particle
 
3:01 PM
I never thought of that.
I'll leave the quantum thinking to people more qualified for it :D
I hope I get to see that stuff working before I die though
That'd be really cool
 
I wanna see a grand unified theory
physicists have a funny job
They are trying to find a theory of everything, but if they do, they're out of a job
 
Theoretical physicists*?
:P
Physicists just shoot lasers at stuff, don't they?
 
it all comes down to theory eventually
 
True.
If they did figure out the theory of everything, they'd still be needed to understand it
 
Psychology is biology is chemistry is physics is math
 
3:06 PM
omg.
<asp:CheckBox ID="chkFitForPupose"
 
Everything is based off of math
math and logic
 
I might just start taking random letters out of my var names
It's probably considered good practice here
 
The thing of imaginary numbers being real is pretty weird
 
I suppose
 
@Sippy var pants, shit;
 
3:08 PM
hooray, finally completed my task for work
feelsgoodman.jpeg
 
From what I remember on the history of i, imaginary was used as a derogatory term
 
@KendallFrey var pans, sit;
 
@RoelvanUden thats a long story...started a project vb ... too lazy to c# it...
 
@Sippy two letters?
 
Two vars.
 
3:10 PM
Most populated room. #number1language
 
you took two letters out of shirt
 
2 mins ago, by Kendall Frey
@Sippy var pants, shit;
Lol
 
!!whoosh
 
I should've clicked that if you meant pants shitting
You'd have written pants.shit()
fml.
MISSED THAT ONE.
 
3:11 PM
@deostroll That was a pretty short story.
 
@RoelvanUden Too long, didn't read.
 
@Greg No longer need jQueryz help?
 
3:28 PM
@FreeAsInBeer I figured it out, forgot a =.
I do have a question, where could I get a book that teaches me how to do elaborate SQL Injection, DDoS, and other malicious items. That way I can build software that keeps it in check.
 
I don't think you'll be able to keep DDoS in check very easily
There are companies that make their lot dealing with DDoS attacks :D
a = are? wtf brain?
 
@Sippy Yeah I know, but it looks like someone has been trying to do SQL Injection and DDoS on one of my sites.
 
Probably some skiddy practicing using a tool he found on a hack site.
I hate skiddies.
 
So far my code is enduring, but I'd like to learn more about those attacks so I can properly handle it.
 
@Greg XSS
If you let me at your site, I'll let you know of any vulnerabilities I find
 
3:32 PM
@KendallFrey I'll have to get clearance from my supervisor, but I'd like to learn. Can you teach?
 
I know a little bit about security
look up videos of people hacking stuff
they often cover the basic entry points
 
@KendallFrey I'll need to pick your brain about it.
@KendallFrey Looks like a hacker actually built an automated bot to crawl a web-site.
Then try to inject it.
 
The first things to make sure are that you escape everything in the URL string, cookies, form data, etc, before evaluating it
SQL parameters are a good way
 
@KendallFrey All I know at the moment, is SQL Parameters and encoding.
 
@Greg Yesterday I saw a hacker using a tool designed to find SQL injection vulnerabilities. If there is one, they can brute force find it
 
3:39 PM
@Greg we put a check in place if the users IP is out of the country - and if they view over X pages over X time with X clicks they get blocked from using the service
 
@juanvan That is cool.
 
so all I they need to do is attack via zombies in the country?
 
I'd like to build a tool to combat it.
 
Ya but it is a pain - if someone is blocked at 7pm and we are not here to unblock them they have to wait till the script on the server runs to clean the table
 
I'm doing a linq to entities query with a one to many join which duplicates all the one-to-one records after I call .ToList(). I can fix this in memory with a group by and taking the first of the one-to-one stuff and a list of the one-to-many. Is that a good way to go about it or can I make it faster by having the query return a list of the one-to-many table somehow?
 
3:43 PM
@juanvan, yeah but what about people using proxies ?
 
u mean when that ip address is block? like a vpn goup ip?
or like tails that flips ip?
 
@Greg I read an article a while back that showed how to use phony parameters that, if they were changed by a bot, would indicate that something fishy was going on. Then just cut that user off.
 
If you block me by ip, it's trivial to get a new one
 
ya there is a list of perm blocks
people that do just that - like china
 
I mean shit, ip spoofing, mac spoofing, it's all trivial setting a value to something random
 
3:53 PM
@FreeAsInBeer Hm.
Yeah, alot of information to go through. To learn.
 
There are so many attack vectors, it would take a long time to learn enough to feel secure.
 
Worth the time, good skill to have.
Especially for my industry.
 
Yeah, great skill to have. But, opportunity cost.
 
@Nathvi ya - but once they are blocked a new ip does not come back doing the same activity so it works for now
 
4:32 PM
Question, if I'm using Web-Form and I'm accepting data from a text box. What would be the a way to encode it into a string?
Just use UTF8?
 
4:47 PM
I am trying to implement grouping in that class in the link above, any help?
 
?
 
0
Q: Implementing grouping in a custom WinRT ListCollectionView class

DemCodeLinesI am using the ListCollectionView class provided at the following link: http://www.codeproject.com/Articles/527686/A-WinRT-CollectionView-class-with-Filtering-and-So However, it doesn't seem to support grouping the items. I tried doing the following to group the items, but it would throw an err...

 
 
2 hours later…
6:31 PM
Is there a simple way to have a standard input on a page, that when the page loads is actually checked based on a value in the code behind?
Or better yet, the best way to push data from code behind to the DOM for the DOM to use.
 
ajax
 
You have an example?
 
you want to test say a text box for ?
 
checkbox.
 
6:52 PM
so if checked - will go to the server - check some value and report back say in a label that value
 
@juanvan When the page loads, it checks the database if the value is one then check the box at page load.
 
setting it in the code behind would be best; check the value - set that checkbox to checked before sending the response
 
Well, my question though. Is since it isn't a normal asp control how can I push something directly to the DOM from page load?
 
set a hiddenfield to the value and then have the java read that value to set the checkbox(?)
or ajax would have to be after the page loads
what is the control it's not asp:?
 
7:08 PM
Seems kind of ghetto, no way to push an object straight to the DOM? The control is just a normal <input type="checkbox">
 
ya hiddenfields are for cowards like bcc in an email
 
@juanvan Yeah, I was trying to avoid ScriptManager but that will be best bet more than likely.
 
Oh ya did not think about that - ScriptManager.RegisterClientScriptBlock
 
Yeah.
 
ya or ajax when the page loads just to do a DB call to get that and report it back
 
7:12 PM
1
A: Simple regex-matching

GregThe reason your receiving the issue, is because the /D is to capture non digits, so it detects two separate numeric values (2 and 000) because of the _. So that is how it is grabbing the data. So you have a couple of choices: Break the string into manageable portions, then anchor to the array...

@juanvan Eh, trying to avoid the Post all though I could potentially call a Get. With the .ajax.
 
yep just change the ajax to get
 
@juanvan Have it call a Web-Method. Then boom, should be done. Or am I missing something?
 
ajax is a plumbing nightmare
have to have your ajax call, your await for the to come back and the call in the server side of the page
 
Yeah, I should really just do ScriptManager.
 
My code finally compiles. I dread running tests...
 
7:18 PM
or you talking using the ScriptManager b.c looks like the easier of the 2
 
7:30 PM
134 failed tests. yay...
 
@KendallFrey haven't seen a build that looked that stable in a while
 
How many tests do you have?
134 is over half the tests
 
~1.3k
IIRC
most of them garbage
 
Could someone look at my code in the question I posted above and tell me what's wrong?
 
7:56 PM
If I have the following:

<input id="chkInternational" type="checkbox">

Why doesn't this work?

$("#chkInternational").prop("checked", "checked");
This person never accepted me :( stackoverflow.com/questions/9926683/…
 
8:08 PM
Well, I figured it out... It is a bit field that isn't coming back as a 1.
 
8:53 PM
well fuck...
some stupid kids must have sat on my hood last night at my parents. There was gum stuck to the hood, and there's a dent in it now
 
@Pheonixblade9 so maddening...
 
not even 4k miles on it
and it's got a dented hood, dented bumper, a curbed wheel
 
:( what car?
 
fuck buying new cars
 
my car's still in the garage
 
8:56 PM
that car
some kid must have sat on it and dented it with his fat ass
 
I'd dent his ass
 
:(
I didn't see him
but there was gum stuck right on the hood
 
Thats a nice Mercedes CTS Type-R
 
9:32 PM
it's an Impreza WRX
 
@Pheonixblade9 Can you have do this without an error?

using(SqlCommand command = new SqlCommand(query, connection))
     using(SqlCommand secondary = new SqlCommand(@"proc_todb", connection))
 
what's the error..?
also whoa... the default Chrome font changed
that or the Windows Font fixer thing is off
ClearType
 
@Pheonixblade9 Well, it could be because I've got this:
using(SqlCommand command = new SqlCommand(query, connection))
     using(SqlReader reader=command.ExecuteReader())
            while(reader.Read())
                if(reader[@"invoice"] != DBNull.Value)
                    if(invoice != reader[@"invoice"]
                         using(SqlCommand secondary = new SqlCommand(@"proc_todb", connection))
 
@Pheonixblade9 I think I know a Bently 370Z SRT when I see one
 
9:48 PM
@VictorioBerra ಠ_ಠ
@Greg you need to use curly braces for that
 
@Pheonixblade9 I think I made it nicer.
Tell me what you think:
 
also you're getting an error because you're trying to execute a command on an already opened reader, I think
 
        foreach(string invoice in invoices)
            using (SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings[@"CommerceDB"].ConnectionString))
                using(SqlCommand validateInvoice = new SqlCommand(query, connection))
                {
                    connection.Open();
                    validateInvoice.Parameters.AddWithValue("@Invoice", invoice);
                    using(SqlDataReader reader = validateInvoice.ExecuteReader())
                        if(!reader.HasRows)
 
curly braces are for chumps!
 
@Pheonixblade9 What you think of that?
Ah, the reader has to be closed first. :(
 
9:52 PM
yeah, I think so
you can't nest SqlCommands
 
@Pheonixblade9 It does.
Hm
@Pheonixblade9 If the query doesn't return a row, the reader shouldn't return any row with HasRows right?
 
HasRows shouldn't be used. If I remember correctly, it always returns true
Neat. I just got "Famous Question". Second gold badge :)
and only 3 upvotes. Lmao
 

« first day (1419 days earlier)      last day (3545 days later) »