« first day (1524 days earlier)      last day (3418 days later) » 

12:01 AM
good night people
 
this answer is 2 gud
1
A: The maximum message size quota for incoming messages (65536) has been exceeded

Florian GerhardtYou need to make the changes on the server and on the client.

 
Good might everyone
 
good maybe
 
@CarrieKendall sooooooooo
good with SQL?
 
meh with it, what's up?
 
12:13 AM
i'm trying to figure out a query that will delete duplicate rows but leave one of them in tact
                                  Table "public.players"
  Column   |          Type          |                      Modifiers

-----------+------------------------+-------------------------------------------
 id        | integer                | not null default nextval('players_id_seq'::regclass)
 dayid     | character varying(30)  | not null
 profileid | character varying(300) | not null
Indexes:
    "players_pkey" PRIMARY KEY, btree (id)
that is my table.
1    1    123
2    1    123
3    2    123
4    2    456
5    2    789
so say this is my data right now. I want to delete one of the day1 id123's and that would be it
simplified example ofc
 
a less complicated solution would be to select all distinct by whatever is duplicated and write those record to a new table, truncate the original table, then copy the temp table back over
 
that still sounds pretty complicated to me :/
 
set up a sqlfiddle.com with your schema
 
nvm
I just exported all of the data
seems there is so little I can just purge it by hand
disregard
 
can I depend on these results of 0 + null and null + null between browsers?
 
12:23 AM
@Luggage why are you doing null + null?
 
sweet
data is all sorted
 
i think i'm only doing 0 + null, actually
 
:D
 
in a reduce
 
o + (null || 0);
 
12:24 AM
i'm having an issue with this tutorial where the data within the div isn't getting deleted. what am I doing wrong?
http://www.developphp.com/view.php?tid=1143
 
since presumably the null comes from a variable
 
I had "|| 0" but then foudn that + null was ok without that
and was jsut wondering if i coulddpeend on that bahavior
 
@13375 no clue
 
I wouldn't, and it's not very intuitive and that means it's hard to maintain
 
new data can be loaded, but i can't seem to get rid of the default data when it changes
 
12:27 AM
i wouldn't say 'hard to maintiain' but I agree that there isn't a good reason NOT to just put on || 0
to be ultra-clear.
 
user1648409
Bah, does anybody know why "undefined is not a function" keeps popping up for if (map == "" || tileMappings.empty()) {
return;
} ?
 
user1648409
i just want to see if map is not yet initialised ...
 
@13375 Not gonna wathc the video. paste the line of code that you are using to delete the contents.
or are you appending new contents?
 
the code is below in the javascript portion
 
'empty' is undefined?
 
12:29 AM
or <script type="text/javascript">
function swapContent(cv) {
$('#body_div').html('<img src="loader.gif"/>').show();
var url = "other/page_loader.php";
$.post(url, {contentVar: cv} ,function(data) {
$('#body_div').html(data).show();
});
} </script>
 
user1648409
i tried map == undefined first and it still gave the same error
 
ok, so .html().. data is an html string?
 
@Shiuyin - that's not the issue, tileMappings.empty() is undefined
 
echo " <div id='body_div'>";
require_once "home/index.php";
echo"</div>
 
user1648409
@adeneo oh ok ...
 
12:32 AM
i think i got it now XD
 
$('#body_div').html(data) should replace the contents, not apped to. You are right there.
 
@13375 - that's not a very good tutorial, there's no doctype, it uses old methods, old version of jQuery, the language attribute and inline event handler with javascript:. It's basically a "what not to do", today !
 
Agree. I was going to say something like "don't manipulate the DOM, manipulate a viewModel" but decided not to. It could confuse matters if someone is just starting out.
 
but it uses jQuery
jQuery does all things
 
No idea of knowledge leve.
Like all really helpful utilities, it's easy to overuse and abuse, jQuery.
 
12:39 AM
i think i am addicted to the hats
 
user1648409
Btw why does console.log(testObj) output this: [a: "TEST", b: "TEST2", c: "TEST3", d: "TEST4", e: "TEST5"] and testObj.length at the same time is 0 ?
 
@rlemon - True, even old versions of jQuery are great, it's like a fine wine, it just gets better with age.
 
Don't listen to the jQuery hate. If it does what you want, go for it. Some people have 'moved on' and find it less relevant than it once was, but it's pretty prevalent and useful to know. It's everywhere and you will encounter it plenty.
 
someone go downvote me, i need this
 
@Shiuyin - objects don't have length, and you have an object, not an array.
 
12:42 AM
@CarrieKendall done
 
Now.. php. Drop that shit. :)
 
@Luggage I mean, you should listen to the jQuery hate; they've got some good points; but you shouldn't blindly follow the jQuery hate
 
user1648409
@adeneo but i instantiated it with var testObj = new Array(); ?
 
@Lucio easily my best post, nice
 
I've moved on from jQuery, too. But sometimes someone asking basic jQuery questions doesn't want to hear about how they should be using templte engines and other junk.
They just want to learn a popular and common libary.
 
12:44 AM
@Shiuyin - but you still used keys, arrays don't have keys, so that makes it an object.
 
it's worth the mullet
 
user1648409
oh ok ..
 
@Luggage - you should never move on from jQuery, it does all things !
 
I still use it as e dependency, becuase it's a common dep of other libraries, but I find it less useful.
 
12:45 AM
@CarrieKendall and beside that, I'm being honest. .NET is easy to hate
:P
 
lmao
oh snap
holy cow, that avatar is perfect
 
inorite
 
this has seriously back fired
 
for every single one
 
12:49 AM
still crab eyes
 
Any cool browser add-on to see JSON responses pretty formatted?
 
yeah, javascript
 
@phenomnomnominal i.imgur.com/RzG0LEE.png
 
@CarrieKendall am gonna upvote you
 
12:51 AM
@Lucio Using chrome? it can display JSON decently, and collapse, expand.
 
you have a good gut, not I'm not
 
I assumed tht firefox and even IE had that these days
 
@CarrieKendall that's awesome, but people who knows me wouldn't do that. I'm that lazy
 
give you a link that answers your question?
 
@Luggage lol
 
12:53 AM
@rlemon that's how we roll
 
wrist fatigue?
 
I want a browser add-on
 
So your browse doesn't have debugging tools?
what browser are you on?
 
maybe maxthon ?
or one of those OSX browsers
 
Back when i used forefox, i think getfirebug.com did what you want.
 
12:55 AM
Firefox 34
 
@Lucio press F12
 
@BenjaminGruenbaum still up?
@BenjaminGruenbaum Dr. Dreidel
 
@tereško done
 
well ... the debugging tool should be opened now
 
mm.. it certainly does
 
12:57 AM
The humbled egg glamorizes all my elephants. Doesn't make sense ? Well... maybe you can figure it out.
 
ok.. gotta change the channel. Tired of hearing about Cuba.
 
get a downvote and a bounty on the same answer on the same day <-- should be a hat/badge
 
this, this is how you resume
take notes kids
 
@jAndy The Game
 
F12 works in IE and Chrome, too. they all have decent dev tools.
 
12:58 AM
Caprica is so smart !
 
@rlemon should add to skills: well-received resumes
 
That's the opposite of a 'You're Fired' cake.
 
10/10 would request references pie
 
@jAndy doubtful
but it's on my "watch later" list
 
@tereško wat
 
1:10 AM
oh .. you were refering to the bot
 
she has a 0.5% chance to 'the game' him every message he sends
she often trolls him and does it
 
Woo, dropping IE6 support from one of my apps as of today.
40% of my traffic is the horrid IE 8, though.
 
ouch
 
seems number of Tor users are increasing
 
Hospitals and Health insurance companies are my users and hospitals have OLD computers.
I'm actually surprised that only one hospital was still on EI 6.
it was much higher 6 months ago
 
1:15 AM
ah
 
@taco cat is taco cat backwards. think about it.
 
Now I can understand your face @Luggage
 
IE 6? yea. That's why
ok.. now to take an array or arrays, and push up every value to the aray before it, intot he same index, if it's null (or any falsey value).
input  = [
    [1, null, 2],
    [2, 2, null]
];
output  = [
    [1, 2, 2],
    [2, null, null]
];
i'm sure some combination of lodash calls can do it in a line or two...
 
Goddammit, I remembered what the word in your name means, and now I'm thinking WHY
Who uses luggage as a nickname?
 
It's a character from a series of books, Discworld, by Terry Pratchett.
A sapient trunk or chest with legs.
It's not important. It's just a name. I'm used to it
 
1:26 AM
@KendallFrey _\\//
 
I'm looking at that, but I can't figure out what it's supposed to be, unless random text
 
live long and prosper
 
oh, yeah, um, Bones move
 
aha, _.zip()
 
I can't do that either
 
2:09 AM
Hey guys, can you help me with something?
 
@Godisgood 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.
 
I just spent a lot of time on an answer to a question. It has had no views, comments or votes. Could you look at it and upvote it? Or at least give feedback on it so I can improve? There are a lot of answers to this question, and I want it to rise higher in the question. I felt like I could do a better job answering.
I wonder. Is that even an appropriate question? I guess it seems like I'm asking for free rep ...
 
No one ever reads that far down
 
@SomeKittens That's why I'm asking for some upvotes. It's a higher quality answer than the others. I want to bring it up to the top.
 
Using overly large amounts of formatting doesn't make your answer good
 
2:18 AM
> I recommend using .innerHTML instead.
here you go ... a nice -1 for you
because that is a really bad advice
 
@tereško Why is that?
 
well .. learn about it
 
Umm that's why I'm asking.
 
Use textContent for text and something proper for HTML
 
I use innerHTML all the time.
MDN suggests it in some tutorials.
So does w3schools.com
 
2:21 AM
Then fix MDN
w3schools advocates many bad things
 
Such as?
 
innerHTML
 
lol
 
Also, where does MDN feature innerHTML?
 
leaky globals
 
Well, thanks for your help, @tereško. If I use textContent instead, will it be a good answer?
 
no, because the problem has nothing to do with setting the text in a tag
it's about building a DOM tree
and innerHTML is the shitty approach for that
 
don't flag that
seriously
it is a shitty approach
lol
why are you flagging such useless garbage?
 
2:46 AM
Off-topic, but has anyone else seen a lot more instances of "the following pages are unresponsive" for pages that aren't unresponsive, in Chrome?
 
3:37 AM
heh
that was an interesting discussion
LOL poor dude
> hey could you just idk give me some upvotes?
> hmm? no, but here are some DOWNVOTES YEEAH!
woah weird
you can't put +1 or -1 in your comments anymore
 
 
1 hour later…
4:55 AM
hi
 
@Neocortex 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.
 
5:07 AM
Folks, $(document).ready(function () {...}); fires after the page has been loaded an displayed. Right? Is there an event that fires after the page has been loaded but before it is displayed?
I'd like to dynamically initialize positions of some of the divs from JS. Right now, I assign new positions in $(document).ready(...). The elements are first displayed in the positions prescribed in the hard-coded CSS, and then jump to the positions assigned in code. The jump doesn't look too appealing. That's what I'm trying to address.
 
"Before it is displayed"?
Browsers read from top to bottom
 
@SomeKittens Okay. I've got the message. Cheers.
 
5:31 AM
i was about to ask about some java script error on stack overflow but now its fixed =/
 
@compski 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.
 
5:53 AM
@CapricaSix ok np
 
6:26 AM
@rlemon You've got a typo
> to or ThinkGeek Amazon
(On 12days)
 
7:18 AM
Hey
 
Hello!
 
7:42 AM
Hi
 
@BenjaminGruenbaum Did you get a chance to look at towc's challenge?
 
No, link?
 
I'd pinged you with it. I'll try to find it
16 hours ago, by towc
user image
 
Why wouldn't you be allowed to use trig? D:
 
It's just a restriction he came up with
And apparently expansions of trig functions don't count either
 
7:55 AM
yeah, which leads me to believe this question is stupid.
 
8:09 AM
@towc I've tried a few things yesterday, I'm pretty sure it's not possible.
You can do all the relations you want, but without adding the angle parameter to the equation, you're always one step behind.
 
8:21 AM
@SecondRikudo That's what I thought as well. Ergo => stupid question
 
8:33 AM
@monners You should join GoodReads.com
 
8:48 AM
@SomeGuy I think I will
 
@SomeGuy How good are the reads?
 
Crazy that we both decided to finally read HHG
 
@monners Haha yeah, curious timing
@SecondRikudo The reads are pretty good
 
I don't read as much as I would like to lately.
 
Finally understand what people meant by how much of the book was lost in the movie (I do still like the movie though)
Love the sense of humour
 
8:50 AM
I haven't watched the movie
But yeah, I love how funny the book can be
 
So many turns of phrase applied to things they often aren't
 
I wanna read HGG :(
 
Do it!
It's a pretty short book too
 
Ze time! Zer is non!
 
Hahaha, I'm sure you can find some time
@rlemon started reading while pooping (on slides) IIRC
 
8:53 AM
@Loktar Picked up a 3DS XL today
 
@monners \o/
What'cha playing?
 
@SecondRikudo Smash brothers. That's pretty much the whole reason I bought it
 
@monners My brother's pretty strong into ASOR
 
I event picked up an amiibo (Pikachu, of course)
 
8:54 AM
Hahaha
 
@monners do they still exist?
 
@towc go back to your cave.
 
OK sir
 
@SomeGuy Done
 
you still haven't finished the hitchiker's guide?
 
9:01 AM
No, and I've had 27 years to do it!
 
9:11 AM
Guys, xhr.onload will be invoked with 304 Not Modified as well, right?
(just making sure)
 
should, yeah
 
I made a thing whatthedude.com/game
12
 
9:41 AM
hehe
thank god for the ads :D
 
@SomeGuy Well played, but I have auto pause.
 
strange, even in inspect element I can't see youtube link
 
@Mr_Green Probably a server-side redirect.
 
Na, it's a meta redirect
You should see it in the source
 
9:58 AM
 
10:11 AM
o/
 
Is anyone familiar with watchify? For each change, I get the update event twice.
 
@SecondRikudo :(
 
@PeeHaa Even mods can't
 
Stupid...
@Loktar can I steal you snow? :D
 
crap time
*crab lel
Soo, I have been informed this morning that there is plan to move over to Node.js. I am not going to lie I AM PANICKING
I have no idea about Node at the moment, and am a JavaScript novice ....
 
10:21 AM
Move from what?
 
PHP and Apache, using standard web based javascript
I am the "server guy" and backend developer. So I am soooo going to be lost with Node
 
You might like it.
But probably not.
 
I do like JavaScript, I am just not as familiar with it as other languages
 
Did you decide on a stack? What do you typically use in PHP?
 
What do you mean by stack
 
10:29 AM
@JustSteveKing Why do you switch ? what are the main reasons ?
 
Typically in PHP I code everything myself and no framework - we have a particular way of doing things
@WalleCyril The main reason is that the lead developer really likes JavaScript lol!
 
Well.. I assume you're doing some kind of separation of concerns..
Or are you just mixing everything like the regular n00b-PHP-haxx0r? :-/
(Sorry if that offends; I hope it doesn't)
 
hahaha! I have my own mini frameowrk which I built
 
Basic routing, controllers in separate files, MySQL via raw queries, include a view after prepping global state in the controller. Am I close?
 
@JustSteveKing Perhaps you could convince him not to if you write a table where you compare the evaluated time to switch with cool new features you could implement in the same duration
 
10:32 AM
@WalleCyril It is more of a case of I kind of agree - and prefer JavaScript over PHP these days anyway
@RoelvanUden Basically, but all we use PHP for nowadays is getting data and outputting JSON to be used by JavaScript.
 
@JustSteveKing Ah, well, it won't be quite as harsh then. express and sequelize got you covered.
 
@RoelvanUden It is just trying to understand it the way I do linux and PHP O guess
 
I like Javascript too
it is freedom
 
It is much nicer than PHP that is for sure
 
nicer how?
 
10:41 AM
Well PHP in an OO style just feels a little clumsy compared to JS objects
 
hi all
 
@Julo0sS howdy
 
i have to dynamically display a .svg in 4 different divs
 
hey
 
in my .svg, i have, (since it can be the same svg image in these divs) elements with the same id
that's not really a big problem
but
what i need now, is a way to get the svg element by id INTO a specific container div
if i do document.getElementById("myelement"), it'll return 1 or more elements (if same svg displayed in multiple divs)
the specific container has a unique id
 
10:44 AM
you can't have multiple element with same id in a page.. use class instead
 
i know, but here in my case, there's no other way
 
there is another way
think about the xy problem
 
my .svg file, is an image file, into it, there are several items with UNIQUE id (but unique IN the svg)
 
split your svg into multiple svgs
 
the idea is a "map" selector,
my svg is a building map with multiple layers
i can add 4 maps on a page
i have to select the maps i want, and check or not the layers
If i decide to add 2 maps of the same building but with different layers displayed,
then, i have to "display" the map twice... so, id of elements i display are no more unique...
 
10:48 AM
can i call function that is inside another function? for example b() is inside a(). can I call b()?
 
@chalist 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.
 
anyone here with experience on EmberJS?
 
Can i pass an array to .then ?
 
@darkyen00 .then([1, 2, 3])?
 
@Sisir no sorry :( I know backbone though xD
 
10:52 AM
no
 
@Sisir Not likely. Asking on the main site will give you more chances of an answer.
 
@SecondRikudo .then([removeCSRF, getNextToken, doSomeOtherFilter, convertBinaryDataToNumbers]).then(doSomething);
 
@darkyen00 Bluebird?
 
I hate first 2/3 weeks when I start learning something new :/
 
dunno if it supports taht
 
10:53 AM
Promise.all([removeCSRF, getNextToken, doSomeOtherFilter, convertBinaryDataToNumbers]).then(doSomething);
 
no no no
they all need to be executed in sequence
after teh request is resolved
.all wont do it.
 
no looking for any specific answer though only chit chat :)
 
@darkyen00 You want reduce.
 
@SecondRikudo doubtful
 
reduce acts in sequence, so it's what you want
I think he made something more clear though
 
10:55 AM
I have officially stolen your snow script @Loktar. Added a link back to your codepen codepen.io/loktar00 if that is ok
 
yeah, he made .each
@darkyen00 @SecondRikudo ^
 
@FlorianMargaine Yeah, that sounds like it.
@darkyen00 normally you'd do something like
 
// Source: jakearchibald.com/2014/es7-async-functions
function loadStory() {
  return getJSON('story.json')
    .then(function(story) {
      addHtmlToPage(story.heading);
      return story.chapterURLs.map(getJSON);
    })
    .each(function(chapter) { addHtmlToPage(chapter.html); })
    .then(function() { addTextToPage("All done"); })
    .catch(function(err) { addTextToPage("Argh, broken: " + err.message); })
    .then(function() { document.querySelector('.spinner').style.display = 'none'; });
great example :)
 
@FlorianMargaine That's not what he wants though
He doesn't want to iterate the results, he wants to iterate over the promise generating functions
[removeCSRF, getNextToken, doSomeOtherFilter, convertBinaryDataToNumbers].reduce(function(prev, curr) {
    return prev.then(curr);
}, Promise.resolve(resultFromThisPromise));
@darkyen00 ^
Returns a promise that resolves after all of the promise functions in the array were invoked serially.
 
@SecondRikudo and that looks ugly as hell
 
10:59 AM
It's your only option IMO.
 
@FlorianMargaine ^ ?
 

« first day (1524 days earlier)      last day (3418 days later) »