« first day (1495 days earlier)      last day (3447 days later) » 

12:06 AM
ok i have made this site nvoids.com, pls rate the UI out of a scale of 1 to 10
and the javascript's role in it in a scale of 1 to 10
 
Off topic: Anyone have any good resources for MongoDB, specifically: Patterns for dealing with lack of transactions and trying to make sure that a workflow remains in a consistent state?
mark that NSFW, please, @PradyutBhattacharya
 
@PradyutBhattacharya still a mild 2, as it were a few minutes ago when you asked in the html room
@Luggage mongo can be ontopic here, V8 in the core, so.. cool
 
I mean lets be honest here; off topic can be on topic here...
 
true
 
:) certainly not disallowed
 
12:20 AM
@Luggage I'm not even sure that's possible.
if you want ACID, go with postgres. They've even got a JSON datatype.
 
I have considered changing to relational, but it'd be a bit of a hassle at this point.
There are patterns for making something LIKE a transaction, e.g. cookbook.mongodb.org/patterns/perform-two-phase-commits
Fortunately, I don't need much of that. Almsot all my updates are single-document
I just need something like that to handle my situation, which is (simplified example):
* Make new record(s) in "EmailsToSend"
* Update Schedule document's status to 'Published'
All atomically, of course. I can make it myself, but it feels like "add message to queue and update object" would be a common need and therefor a common pattern or library.
 
@PradyutBhattacharya It's among the worst designs that I've ever seen
 
I've seen worse.
 
12:39 AM
@PradyutBhattacharya Really though, you should spend some time trying to figure out a better design
 
I don't have a design at all, yet, unless you mean 'mongo' as a choice.
 
Damn I pinged the wrong guy sorry
 
ah
 
There we go
 
why does exercise have to be so exhausting :/
I found you a friend!
 
12:55 AM
I love the folks who are always willing to explain why it's not their fault.
 
Link?
 
My coworker
"Why didn't the tests catch that?" - guy who never writes tests
3
 
Lol
 
@SomeKittens just found out it takes querystring with '&'
 
@SterlingArcher around?
 
1:02 AM
@SomeKittens found out that there was a backend issue with switch statement in php without break in the proper place
@SomeKittens as you said, backend issue.. thanks anyways
 
@JoeSaad There you go. Tests!
 
@SomeKittens More pings
 
byee @all
 
1:22 AM
arg. I want to chew him out. He's not on the frontend team anymore and as such, shouldn't be dictating how the codebase evolves.
 
@SomeKittens actually a correction.. the querystring doesn't work unless you put it in params as mentioned in the articles sent but the $GET will work
 
@SomeKittens you guys should maybe just accept his opinions as opinions and choose the direction yourselves
 
@CSᵠ We are, and we're moving the codebase in a healthy direction.
but it doesn't make his unsolicited opinions any nicer.
 
dat feel when you pwn a noob and they ask for your setup and you tell them it's just the default :}
 
@KendallFrey BF4?
 
1:32 AM
LFS
I figured I'd check out some online racing for the demo version
 
Linux from Scratch
 
Who knew that noobs play the demo cars?
 
!!> 234/43
 
@SomeKittens 5.441860465116279
 
^ Q:A ratio. Vamp?
 
1:34 AM
!!>[355/113, Math.PI]
 
@CSᵠ [3.1415929203539825,3.141592653589793]
 
!!> 281*285
 
@KendallFrey 80085
 
wth codecombat.com is awsm!
 
1:53 AM
> A programmer must have the deepest commitment, the most serious mind. ~ Yoda
 
2:22 AM
> Soon you will be master of programming!
 
@monners dw it's just barbie
 
There's no such thing as just Barbie.
 
@KendallFrey I'm 28 years old. Do the math and let me know how many left I have to give.
 
I mean, it's a children's book meant to show little girls that they can be computer engineers
 
2:56 AM
@rlemon about 30,000 a day
 
That's a lot of progress right there
 
> Run, Skipper! Run from the haunted flash drive!
10/10 would read
 
3:20 AM
10/10 would read again
 
3:30 AM
Best line:
> When you hold the book in your hands to read a story, the opposite book is upside down, facing out. So the final insult to this entire literary disaster is that when you read “Barbie: I Can Be a Computer Engineer,” it appears that you are so fucking dumb, you’re reading “Barbie: I Can Be an Actress” upside down.
For all the criticism of that book though... it was written by a woman. It's lazy writing, more than it's misogyny, I think.
 
3:55 AM
@Meredith It that what it's showing them? Really?
 
4:09 AM
@monners If you don't look into it too much, yeah
 
@Meredith Would you recommend that to someone's daughter?
Hi! I'm Barbie! I'm a Computer Engineer because I draw things and then get boys to turn those drawings into real things!
 
O-o
 
@monners No, but mostly because people tend to give strange looks to adult males recommending Barbie books
 
Pffft, gender stereotypes. I grew up with Barbie and look at me now! I'm a computer engineer!
 
Yay engineer!
 
4:15 AM
But no; I really don't think that book is the Literal Hitler that people are making it out to be.
 
I also have a deep, subconscious desire to move to Malibu and find a rich toy boy.
 
I mean, I have nothing against girls being Software Engineers... but I think I might have something against Barbie being a software engineer, for one.
 
@Retsam The problem with it is that it's a children's book. These kinds of gender divides and established at a young age. That kind of message, however unintentional and/or sloppy, is a very damaging one.
 
angularjs or any other technology.. is there a way you can pass extra data via ajax post?
 
@JoeSaad ...yes?
 
4:17 AM
Extra?
 
@Retsam Software is hard. Let's go shopping!
 
As in, more than the default nothing?
 
i'm using this: $http.post('../php/dml.php', {
"Raction": "add",
"Entity" : "BB",
"Title" : $scope.title,
"Barcode" : $scope.barcode,
"Author" : $scope.authorID
})
and the backend cannot see Raction nor Entity and gives ajax error right away.. the minute i remove both, everything works fine
 
I got through to the letters P H and P then promptly stopped caring no idea
 
@JoeSaad That looks fine
 
4:18 AM
@monners This gets into political territory (well, the whole conversation has been) but I don't think "gender divides" are necessarily "very damaging" either.
 
when i stop retrieving Raction and Entity on the backend, everything works fine..
 
@Retsam Ummm, what? You're most definitely going to have to elaborate on that one.
 
but when i try to retrieve them, i keep getting errors
 
@SomeKittens I'd remove that gif but someone took my room super powers away
 
4:21 AM
@monners What part?
 
@Retsam gender divides not being very damaging
 
@monners Umm, which word of that sentence isn't clear?
 
in the backend.. $data = json_decode(file_get_contents("php://input"));
$val1 = $data->Barcode;
$val2 = $data->Title;
$val3 = $data->Author;
$val4 = $data->Entity;

#echo $_POST['Entity']; // failed
#echo $data->Entity; // failed
 
@Retsam Oh, I don't know... How about where you said gender divides not being very damaging! Are you kidding? Why would anyone say that? Ever?
Yay! Inequality for all!
 
@monners Look, repeatedly restating that you think my position is ridicululous isn't the same thing as actually having a reasonable discussion
 
4:25 AM
@Retsam You're right, and you've yet to elaborate on why you hold that stance, which is what I asked you about to begin with.
 
I don't think the idea that "girls like pink and boys like blue" has killed anyone.
Things can be different without being inequal.
 
@Retsam The Supreme Court disagrees (as do I)
 
The Separate but Equal doctrine was thrown out a while ago.
 
@monners As a form of government policy (specifically towards racial segregation), yes.
They weren't ruling that you couldn't have a girls' aisle and a boys' aisle in Walmart.
I'm not advocating that we legally bar girls from entering the boys' aisle of Wal-Mart if they want to buy a Power Ranger (which is what your comparison to the Separate But Equal doctrine suggests)
I'm simply arguing that the existence of a "girls' aisle" isn't necessarily sexist.
 
4:30 AM
@monners I think if I had a daughter, she'd know that women can be engineers
 
@Meredith #1 reason women went into software? Parental support.
 
Really?
 
in other words how can i pass data not into the form via post ?
data which is not in the form already
and be able to retrieve it on the backend
 
@Meredith Yep.
@JoeSaad You mean through a form submission?
 
As in because their parents wanted them to?
 
4:37 AM
@Meredith Because their parents supported them in doing it.
 
eys
yes
 
That's probably true for most fields though
 
@SomeKittens That seems a backwards way of looking at it; because you can only support something after a decision is made.
 
@Retsam It's less "That's good honey" and more parents sticking with their decision through all the tough stuff.
 
@SomeKittens Yeah; but isn't the more interesting question why they made the decision in the first place?
 
4:41 AM
@SomeKittens trying to access what i thought i submitted gives all kinds of errors
 
0
A: Django Query Filter using Try: Except:

Peter GrahamDaniel Roseman helped me figure this out. The filters were not throwing the error. Calling an index on an empty query was. If you put other_user[0] inside the block, it won't throw the error all_users = User.objects.filter(gender=user_preference).\ filter(preference=user_gender).order_by('?'...

^ upboat pls
@JoeSaad Does the backend code you're running have tests?
 
have tests?
 
@JoeSaad Yes.
 
what does that mean?
i'm writing it myself and i'm not able to access the posts {} that are not in the form
 
Does your backend have unit tests that cover a reasonable (>80%) amount of the code?
 
5:00 AM
 
Sim
what am i doing wrong? jsfiddle.net/3t7bq7gt/1
 
function was spelled wrong
also need to set it to use jquery in jsfiddle (look in the top left area, under Frameworks & Extensions)
 
Sim
quick question how do i get direct src link from jsfiddle for frameworks & extensions?
@Loktar thanks
 
np
hmm a direct link?
not sure what you mean, like a link to the CDN they are using?
 
@Sim Or you could not use jQuery
3
 
5:15 AM
if you check out the sources tab in chrome you can see where they are pulling from
 
Sim
on fiddle if you were to click on "frameworks & extensions" it has list of sources
example jquery 2.1.0
 
yeah if you look at sources tab in the devtools jquery pulls from http://code.jquery.com/jquery-2.1.0.js for example
 
Sim
got it using developer tools
 
Sim
thanks @Loktar
 
5:20 AM
great minds think a like I guess lol
@Sim np
 
@Loktar lol, didn't see that
 
ASR
5:47 AM
@hi all
any one have idea?
Is there any method to check the phone number is landline ?
 
what county?
 
ASR
6:06 AM
@CSᵠ for any country
to check the given phone number is land is there any method?
 
6:31 AM
The less I use jQuery, the more I love JavaScript
4
@SomeKittens @rlemon Jealous?
 
WOW dude!
want!
 
I just got sick of the shitty monitors my office give us, so I figured I'd put my recent bonus to good use :D
When this bad boy arrives I'll effectively have my dream work station
 
just a bit expensive
 
There is that, but it's something I'll be staring at 8 hours a day, so...
 
I want to know that a few things I know are right. If the js is loaded at the head, and, the body isn't properly loaded, then when the browser parses the JS, then there is a chance that the elements which are not loaded but has a EventListener attached to it throws errors in JS or doesn't get the event registered to it at all!!!
 
6:46 AM
2 displays work good enough, but one of them being that completely different ballgame
 
Yeah, it's actually going to be a slight reduction in screen real estate for me, but I reckon it'll be a hell of a lot nicer than wrestling with two shitty 24" displays
 
@Heihachi the boy or the girl!!!
 
wat
 
@monners dude, replace just one of them
 
I'll actually be using it along with my retina macbookPro screen
I also have a Wacom Cintiq 13HD, so that might also come into the equation, but I really wanna get rid of the 24"s
Depends on whether one stupidly large screen can take the place of two appropriately large screens
 
7:17 AM
@monners yep, jealous
But two screens are better than one
!!> 3 > 2
 
@SomeKittens true
 
!!> var Mon={Curved_LG: (~~(3440*1440/1e4)/100)+'K', Twin_Full_HD: (~~(1920*1080/1e4)/50)+'K'}
 
@CSᵠ "SyntaxError: missing ; before statement"
@CSᵠ "ReferenceError: assignment to undeclared variable Mon"
@CSᵠ "ReferenceError: assignment to undeclared variable Mon"
 
var Mon @CSᵠ
 
@CSᵠ "undefined"
 
7:28 AM
fu!
 
Morning Folks
 
lol
!!> var Mon={Curved_LG: (~~(3440*1440/1e4)/100)+'K', Twin_Full_HD: (~~(1920*1080/1e4)/50)+'K'}; Mon;
 
@darkyen00 {"Curved_LG":"4.95K","Twin_Full_HD":"4.14K"}
 
huh noobs.
 
How to add a new folder in github
I traversed to repository
But I couldn't find add new folder, I could add new organization, repository, issues etc
 
7:31 AM
@monners no loss ^^^
 
@darkyen00 still about, just ping me :D
 
hey man :D
where have u been ?
 
Getting my shit together :D
 
ASR
@mikedidthis hi
 
7:37 AM
@ThiefMaster Are you here ?
 
ASR
@mikedidthis getNumberType(number); in libphonenumber is not working in libphonenumber.googlecode.com/svn/trunk/javascript/i18n/…
 
@ASR that is a cool story.
 
@ASR You should write a book
 
ASR
@mikedidthis :)
 
@SomeGuy 100 ways to get kicked from chat.
 
7:39 AM
@ThiefMaster A few months ago we were promised a shirt with the SO logo. I was so excited I trashed all my other shirts. Now winter is coming and I'm getting cold. Did you receive your shirt already ?
4
 
@mikedidthis Hahaha
 
ASR
@SomeGuy any suggestions, my requirement is i need to validate the phone is mobile or landline, but getNumberType() is not working,
 
Well, you have to define "not working"
 
Send it a text and see if it works
 
Make a demo on JSFiddle. Maybe someone will help then
@Meredith Hahaha
 
7:44 AM
@dystroy so much knowledge, so much time, so many ppl helped, so much info... for a simple shirt to keep the guy a bit warmer... life
 
@ASR You're using code.google.com/p/libphonenumber right?
getNumberType only returned FIXED_LINE_OR_MOBILE for my number
So I don't think there's any way to get it to be certain
 
8:15 AM
@dystroy I think I didn't "order" one since I already had one from some time ago
 
@ThiefMaster I didn't order anything, SO just said they would send one to 100k+ users and asked for our size. Was it just an evil plan to know if we're fat or not ?
3
 
I know, but I'm pretty sure they asked for your address, too
with "ordered" i meant "filled out the google docs form"
 
ok
 
@SecondRikudo Is it useful to have several spam flags for the same question ?
 
@dystroy Yes
6 spam flags insta deletes it
 
ok :)
 
And incur a 100 rep penalty (which is not applicable in this case since OP has 1 rep)
 
8:34 AM
woke up 4 minutes ago...
 
I don't think I ever saw a user with rep do a question spam
 
I had a call at 9:30...
 
@FlorianMargaine Good
 
@dystroy Which is why I suggested multiple times that users that registered in the past week which had their only post flagged as spam to be instantly burned to ashes.
 
@SecondRikudo You mean with only one flag ?
 
8:36 AM
@dystroy No
If you match all of the following you are instantly burned: You registered recently, you have no upvoted posts, one of your post was marked as spam (with 6 flags).
3
Q: Dealing with SPAM: 6 (or more?) spam flags should destroy the user instead of the -100 penalty

Second RikudoBefore you downvote, I don't propose that any user that gets spam flagged would be instantly destroyed. Read on. In the recent spam wave, I've noticed how the flagging system works. People very quickly reach the magic 6 spam flag count, and the post gets annihilated. That's good. However, there...

Original proposal
 
ASR
@Meredith yes I am using that one only when i write like this var phoneNumberType=phoneUtil.getNumberType(number);
 
@BenjaminGruenbaum SE API doesn't send the body in a useful manner... i.e. you don't have <pre> tags :|
 
@FlorianMargaine BenjaminGruenbaum is afk: sleep
 
aaand no image either.
 
ASR
its not showing anything
 
8:42 AM
shucks.
 
@FlorianMargaine What ? I get the body right
 
there should be an image in the middle + the code doesn't have <pre> or anything indicating it's code
 
what's that ?
 
@dystroy Probably for Benji's challenge.
See top pinned message
 
8:44 AM
In Miaou SO question boxing you see images, and there's pre, code, and so on
@FlorianMargaine you need to pass a filter
 
@dystroy y no css?
 
@Unihedron Hu ?
 
@FlorianMargaine You can get the image from /posts/ids - example api.stackexchange.com/2.2/posts/…
 
8:49 AM
@BenjaminGruenbaum no...
an image should be in the middle of the body
0
Q: Script in a loaded html with ajax doesn't run

user3690260I'm having a major problem here and I'm running out of options. I hope someone can help me. I have a link (script Number 1) that loads a html file (single-project.html) in a div after it is clicked. I'm using jQuery (script Number 2). But the script number 3, that is in the single-project.html ...

 
Ah - I thought you meant the author image
 
and even when getting just the question by id, you don't get the body...
 
Well, you got to do with what you got to do, if you want to set up a backend you may
 
you mean having to scrape SO itself?
 
8:53 AM
k
 
Also, you can not display images.
 
@BenjaminGruenbaum But the app displays images
 
What you're trying to do is an extra, not a requirement of the challenge.
 
And the app works on the API
So there should be a way.
 
8:56 AM
@BenjaminGruenbaum ah.
I mean, if the API returned markdown, it'd be fine
 
@SecondRikudo talked to Sharon BTW, beer at 7?
@FlorianMargaine yeah, it would've been fine
 
@BenjaminGruenbaum Cool with me
What about our horse-mask-friended-mustached awesome face?
 
We're not supposed to talk about them here, also - probably not coming.
 
@SecondRikudo you should ping "them" on hangouts though maybe "they"'ll change "their" mind.
 
user1642556
9:00 AM
I'm looking for a nice web based IDE, something like codio, that I can "connect" (ftp or something) to my own server, preferably not need to host it
 
@Erik Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
Now you're reminding me of 50% of all animes on the planet
 
@Erik c9.io is probably the most reputable and most advanced.
 
"Oh noes! He's gonna use that weapon"
@dystroy I weep at the poetic beauty.
 
There are others, but it's completely web (it runs in your browsers), connects to GH and bitbucket, has uploads etc, a real terminal and other goodies.
 
9:03 AM
@BenjaminGruenbaum Is it any good?
 
It's great compared to other web IDEs.
 
Worth to use for small projects over sublime and the such?
I probably wouldn't use it, mind you. I work offline a lot.
 
It's great compared to other web IDEs
It's no webstorm
Use it for a day, see for yourself
 
@BenjaminGruenbaum I'll use it for the JS challenge :)
Knockout and c9, 2 birds with one stone
 
user1642556
so how do I host the files on my own server?
 
9:06 AM
@Erik Use git
 
@Erik use ssh
 
9:19 AM
@Erik use heroku
 
Morning!
What's the fastest/easiest way to convert an object that contains numbers as keys into an array?
{ 0: ..., 1: ..., 2: ... } => [..., ..., ...]
 
In Java you can do .values() on a map.
 
Object.keys
oh wait
 
Good morning guys. Could anyone tell me if it's possible to do 'getElementsByTagName' on a value in an input?
 
you can just change the prototype to Array.prototype there
@DavidH what?
 
9:23 AM
^
 
Say you have an input field, you paste an html element. Then you want to 'getElementById' or any other get method on that element inside the input.
So actually getElementById on the input value.
 
you paste an html element in the input?
or you mean a string of html?
 
 if (Object.keys(obj).map(function (c) {
       return parseInt(c);
 }).indexOf(NaN) === -1) {
     obj.prototype = Array.prototype;
 }
 
The entire element so just like: <div id="test"></div>
 
@FlorianMargaine Something like this?
I creates a strange object: {0: ..., 1: ..., prototype: ...}
 
9:26 AM
well, can you call .map etc on it?
 
I've made a function that kind of filters out some junk and parses something else from the element that I paste in the input.
Although i'm not sure how to get information from an input value
 
@FlorianMargaine No..
 
You had helped me get far with this yesterday Florian
 
@IonicăBizău my bad, it's obj.__proto__ = Array.prototype that you need
make sure you set the length prop though... not sure what happens w/o it
 
@DavidH why?
 
9:31 AM
@FlorianMargaine Thanks, this solves the issue, but JSON.stringify still returns something weird. I think I will modify toJSON function. :-)
 
@SecondRikudo I had gotten an assignment that'd make pasting some parsed and calculated info from a 'polygon' and 'rectangle' into an 'area' element easier.
I've gotten as far as being able to do what I want if the element is on the page but not yet when it's in an input
 
@DavidH you mean this?
 
@FlorianMargaine No not really, I guess I can fiddle what I have so you guys would understand what I mean
 
(@SecondRikudo don't hate me)
 
h all
hi all
 
9:36 AM
function map(obj) {
  var keys = Object.keys(obj).map(function (key) {
    return parseInt(key, 10);
  }).sort();
  var arr = new Array(keys[keys.length - 1]);
  keys.forEach(function (key) {
    arr[key] = obj[key];
  });
  return arr;
}
var a = {0: '0', 2: '2', 5: '5'};
map(a);
@IonicăBizău Something like that? ^
 
what it t?
 
@RoelvanUden function toArray(o) { o.__proto__ = Array.prototype; o.length = Object.keys(o).length; } is simpler
 
@RoelvanUden Yes! An enchantment would be make it recursive. +30, from me. ;-)
 
@FlorianMargaine Simpler, perhaps, but doesn't produce the expected result for {0: '0', 2: '2', 5: '5'}
 
This is what I have, basically the rect/poly are elements that are there of which it rounds the numbers and replaces the spaces into comma's. As well as calculating an area for the rectangle.

Now the problem is that these are elements pasted into the body, what I'd essentially want is to make the function work when pasting the poly/rect in the input field and then to execute on button click. Although i've yet to find out how to define the variables polygon and rectangle so that it gets from the input value first.
This really isn't full text, only the link is below it :P
 
9:41 AM
function map(obj) {
    var keys = Object.keys(obj).map(function (key) {
        return parseInt(key, 10);
    }).sort();
    var arr = new Array(keys[keys.length - 1]);
    keys.forEach(function (key) {
        if (typeof obj[key] === 'object' && !Array.isArray(obj[key])) return (arr[key] = map(obj[key]));
        arr[key] = obj[key];
    });
    return arr;
}
@IonicăBizău ^
 
any one free
 
@IonicăBizău It could spasm on null tho, I'll leave that to you to catch :P
 
generators in chrome 39!
 
@FlorianMargaine Link?
 
@FlorianMargaine Cool! Does that mean it will also soon land in node-webkit and possibly PhoneGap? (Or is PhoneGap using the installed browser version...?)
 
9:46 AM
@SecondRikudo uh read it on my phone...
chrome 39 beta ^
there should be a more recent announcement somewhere
@RoelvanUden phonegap uses the installed browser version
node-webkit.. no idea
 
Did anyone know how I could solve my issue?
I essentially need to be able to getElementsByTagName from an input value.
That's kind of the last thing I have to get to work
 
I still don't understand a thing
 
@DavidH document.getElementsByTagName(input.value)?
 
Well if you've seen my fiddle, you'd see that it just calculates and parses some data from a polygon/rectangle. But that's when it's in the body, what I want it to do is work when it's pasted in the input
I should try that but I think the 0 index might get in the way?
 

« first day (1495 days earlier)      last day (3447 days later) »