« first day (1525 days earlier)      last day (3424 days later) » 

12:17 AM
Half an hour left of work for the year
 
rub it in, why don'tcha
 
@SomeKittens I lived and studied in Texas, does that count?
 
Dunno, ask @GeorgeJempty
 
12:33 AM
@AwalGarg It is..
 
@monners one more day for me
 
I have a question:
When you go to popular websites (facebook, stackoverflow etc.) and look at their javascript source code, it doesn't look organized at all. Just everything one after another. Why does it show it that way? Do they actually go and remove all line breaks in their files?
 
it's done by a minifier
this is what I use
 
No, they write code like that
 
That's why they get paid so much
 
12:37 AM
it was an honest and genuine question. but whatever, make fun of me.
 
I'm sorry
 
@DemCodeLines That's why we get paid so much
 
@DemCodeLines or you know, look at my answer
 
Make up sex?
 
I did go there. But what that tool basically does it put everything on one line and remove line-breaks.
 
12:39 AM
and "uglifies" it
in any case, 'minifier' is what you're after
 
@rlemon I'll look those up, but what's the point of it?
 
makes the files smaller
smaller files === less bandwidth
 
how do they alter the code then? reformat, make changes, reminify and save?
 
it is the last step in deployment usually
you develop it nice, and before you put it online you minify it
 
@DemCodeLines Look at what happens when you compile true
You get !0, which is 2 chars shorter
it's clever that way
 
12:42 AM
and you can get these tools from the command line
so you don't have to goto a website every time
 
I usually use Aptana Studio for web development. Not sure if that's the best software out there, but oh well...
 
@DemCodeLines WHAT?!?!? YOU USE A DIFFERENT EDITOR THAN ME!?!?!? YOU'RE TERRIBLE AND MUST CONVERT?!?!?
 
vi or gtfo
 
idk how to :(
 
So when they minify false I'm presuming it's !!0 cuz plain old 0!==false
 
12:46 AM
!1
 
Railsbridge uses WordPress. Wut?
 
yes even better
 
Rails is too unstable obviously
 
Didn't hotmail used to run on *nix?
 
probably before ms buyout
 
12:49 AM
Atom.io
 
And the Windows kernel is posix compliant
 
copy, it was under used and I think they are dropping it
And also only available in Ultimate (or server). And no one bother to compile anyhting on it, they just used Cygwin instead.
windows with a proper terminal and a gnu environment is a dream of mine.
wel.. it was.. then I went OSX..
 
Fascinating story
 
OSX is irritating.
 
Good evening, everyone!
 
12:54 AM
@John 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.
 
Heh, well you mentioned posix and windows.. a topic that makes with sigh.
 
What IDE do you guys (pros) use?
 
Kittens, Yes, it can be. I use windows and osx on my pcs. They both have ups and downs.
Dem, for my JS-only projects: atom.io
 
@Luggage Work with VMs and have the best of both worlds
 
Well, of course. I have a windows VM but don't need it often
 
12:56 AM
@DemCodeLines Sublime Text 2
 
Windows: Microsoft Pinball, Linux: The rest
 
Are these official (not the best word choice) chat rooms? Or are these created by everyday users?
 
@Luggage Windows: Elite Dangerous, Linux: everything else (on home PC), OSX: dayjob
@John Um, sorta official?
They're run by us users, but are still within SO
 
@SomeKittens I don't want to be that guy, but Google Images makes Sublime Text 2 look like a notepad that has code coloring capabilities
 
@SomeKittens Do all chat rooms have the same rules?
 
12:58 AM
@DemCodeLines That's what I like about it - it's incredibly powerful without lots of extra things that get in my face.
 
I use Komodo Edit it's great not just for Javascript but also Python Ruby Tcl Perl etc.
 
@TeguhSupriyadi 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 usually don't even have the sidebar (left) or minimap (right)
There's a comprehensive package management system, keyboard shortcuts for EVERYTHING, and it's cross-platform.
I store all my configs in dropbox, so I have the same tweaks everywhere.
 
@SomeKittens Yea, I use the big 3 (windows, linux and osx) and like them all for certain roles. I have an annoying friend that runs linux for everything and won't just use windows for some tasks (e.g. Games) where it jus makes sense.
Atom.io is like sublime. Only better in every conceivable way.
 
1:01 AM
@Luggage HA
Atom struggles with large files. I haven't found anything it does better than ST. (inb4 highlighting)
 
It does. Fortunately I don't have that problem. Sublime is no good for LONg files, too, like log files
for log files, on windows, i use notepad++
I've wondered if 'brackets' is any good.
 
Does someone mind helping me with some debugging that I can't figure out?
 
@wyattbergeron1 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.
 
@CapricaSix : I don't get..
hihi
 
@wyattbergeron1 You already broke our only rule!1! :)
 
1:08 AM
omg
I feel stupid now
Ill go reread them
 
j/k :)
It was the "don't ask to ask" a few lines up. Anyway, what's up?
 
I have some newish code, and my document.innerHTML command is changing the page to show the wrong content
Ill make a fiddle if you need one
 
In what way is it 'wrong'?
 
It changes a <p> tag to be just an image, but it displays the wrong image. I'm not sure If I had some if statement wrong, or if the link broke, but it displays the completly wrong image
 
crazy.
 
1:14 AM
want a fiddle?
 
so.. you say.. `document.body.innerHTML = '<p>hi</p>' and it displays you pictures of cats?
if you have one, sure.. is it a problem that's that isolatable?
 
@wyattbergeron1 Generally, don't use innerHTML
 
what should I use instead?
 
well, let's see what his problem is before suggesting other mthods
 
Let me see the fiddle first
 
1:16 AM
unless innerHTML is known to chosoe new images for you
 
Ill finish the fiddle and link it
 
sweet
/me likes JS games
 
groovy
and css games? flukeout.github.io
 
here's the fiddle: jsfiddle.net/Laqt934a
The problem is in the function cameraChange
 
Protip: Put your JS in the JS section
 
1:18 AM
Good idea
I had it in a seperate file, and I combined it cause I usually do for postings
 
Mine has bad reception.
 
In the current case, you'll need to select nowrap in <body> on the left menu
 
fixed
 
otherwise your inline event handlers can't find the actions
 
1:19 AM
me?
 
Though, you should move to put all of your event handlers in the JS (keeping like things together)
@wyattbergeron1 yes you!
 
@SomeKittens well ... that's what I have been watching today
=D
 
nowWrap?
 
noWrap
 
1:21 AM
ih
oh*
where's that? I can't find it
 
i wonder if my script is still working.
 
(plugged nose vape)
.. wait for it!
 
plugged nose lol
 
1 message moved to Orphan GIFs
 
1:22 AM
brb
 
\o/
 
The 'if' block starting at line 105 - there are 3 images but only two possible outcomes.
 
Ok
let me fix that
wait... What do you mean?
Actually
I found it
 
It sets an image, but then starts a new if (line 107) that will change it to one of two other values.
 
Yeah
I can't believe I didn't see that
Thanks
 
1:26 AM
Was that your problem?
 
I thought so
Still doesn't work, but it might be my fault
 
well, you know the image you WANt to see and the image you ARE seeing. look at the code at that spot
 
I don't know what i'm looking for. It all look sthe same to me.
 
1:28 AM
In these situations, I like to add a lot of console.logs to sanity check the data (make sure the values being passed around are actually what I think they are)
 
in fact.. it doesn't do anythign at all for me..
and yea. console.log all the things. (but take them out later)
 
ok
fiddle script doesn't work with the html, im testing it in my files.
 
m59
I'm doing some refactoring in my node/express code. I could use some tips on handling a mysql connection
 
global variable. :)
 
m59
LOL
 
1:31 AM
use psql
 
goddamnit still doesn't work
 
(postgesql)
 
Ill start logging it
 
ohh, rlemon, were you one of the ones that kept saying that when I talked about mongo? because.. I did.
 
no, that wasn't me
but postgres is amazing
does all things
 
m59
1:32 AM
@rlemon kinda late for that
 
and i have the code he needs for postgres
'use strict';

var pg = require('pg'),
    bluebird = require('bluebird'),
    connString = process.env.DATABASE_URL;
bluebird.longStackTraces();
bluebird.promisifyAll(pg);
bluebird.promisifyAll(pg.Client.prototype);

module.exports = function(fn) {
    return pg.connectAsync(connString).bind({}).spread(function(client, close) {
        this.close = close;
        return fn(client);
    }).finally(function() {
        this.close();
    });
};
see if you can adapt it to mysql
 
it's not too late. I just ported a project from mongo to postgres in like.. 20 hours.
 
ohh, and use promises ofc
 
@Luggage Uncle Bob would be proud.
 
I used bookshelf.js anyone use that?
 
m59
1:33 AM
module.exports  = mysql.createPool(config[config.mode].mysql);
// this is what I was going to do
var pool = require('that-file^');
 
fucking logs don't work
Ill fix it later
bye
 
no bluebird?
 
m59
@rlemon well, that too, yeah
Presently, my code is kinda like that, but I did some nooby things.
@Luggage 20 hours. You jerk.
;D
from mongo to sql in 20 hours, depending on the size of the project, affirms I'm very slow.
and I don't have 20 hours anyway.
 
no, it's a smallish project
but it was late enough into it that i had my doubt about the wisdom of chaning DBs.
anyway.. if iw as going to change form postgres to MySQL today i could because i'm using an abstraction layer
anywho.. all you pasted was exposing a connection pool as a module in node.. What was the question?
 
m59
I'm just always afraid of the unknown, I guess.
I like confirmation that I'm not doing something stupid.
@Luggage I have 49 files that interact with the database, some are 1/2 lines of mysql, some 5-10, and there are several that are 50-100 lines. Not sure what size of project that is. It's only the fundamental functionality and it feels big to me, but I'm inexperienced.
 
1:44 AM
anyone here use git?
 
m59
@redshift I'd be surprised if anyone here doesn't use it.
 
im just starting to use it for first time...n00b...but have a workflow question about it
i have several photoshop psds that i keep in the same working directory. Should I be telling git to ignore those files?
 
m59
make a .gitignore file and put them in it
 
@m59 Are they organized in a sense that makes sense to you and you feel would bl recognizable to someone else?
 
@redshift That depends. Are they part of your project?
 
m59
1:45 AM
@Luggage I did an awful thing, which I am refactoring ;D
 
yes
 
Do you want these files 'versioned'? If so you don't want to ignore them but be warned that git isn' tthe most efficient with that files type (binary).
 
m59
It's not non-understandable, but it is fail.
 
@m59
Just rafactor in waves, makgin sure you get everythign working before doing the next layer.
 
1:46 AM
@Luggage something for me to think about
do most people ignore graphics files when working with git?
i'm not sure how far to go with git
 
m59
This is my first node project and I didn't really understand how to use modules, so I ended up putting one route per file, and put the route's logic directly inside of it.
I've come a LONG way since I started it, so no worries now, just gotta go back and apply what I've learned.
 
If they are 'output' from some process and able to be re-generated, then ignore them. If these files are 'source' and something that can't be created automatically, then you want them to be in git or backed up in some other system.
you can put binary files in git just fine, if they are part of your 'project' then they may belong.
it's jsut that binary with lots of changes may be make your git repo large, but that true of all source control.
 
m59
There are graphic designers that use git solely for versioning psd files
 
Yup.
 
@m59 oh wow
 
1:50 AM
so it all comes down to.. are these files something you consider part of your project, or just some 'debug files' that you work with but can throw away at any time?
 
sometimes im working on the master branch and will need a graphics file (psd) that is in another branch, i kind of feel too lazy to checkout the other branch and look for the file
 
was that a question? :)
 
@Luggage not really
 
@redshift You shouldn't be storing different files in different branches
 
1:53 AM
@SomeKittens should i ignore those files then?
 
No. He(or she) is assuming that you are using branches as separate repositories, which is 'wrong'.
 
^
<-- Dude
 
can confirm (mostly)
 
lol
 
A branch is to store an 'alternate timeline' or a change that you want committed to the repo, but aren't sure you want to commit to the master branch, yet. Anyway.
Are PSD;s your main content? IF so, commit them all. don;t ignore
 
1:55 AM
'alternate timeline' is a good way to think of a branch
 
m59
 
it's the same project, but with a different state
 
awesome, thanks for the discussion
 
Even if not your 'main' content.. are they made by a human? commit. Are they made with a script that's commited, then you can ignore.
 
hello js people,
 
1:58 AM
hello ? person.
 
does array will crashed if 50000 or more in loop?
 
but you can cause a crash by doing something crazy in that loop.
possibly.
 
m59
@redshift this is my .gitignore file
    node_modules
    bower_components
    temp
    tmp
    *.log
    vendor
    dist
    build
 
We don;t knwo what kind of project he's working on. That might not be relevant
 
2:00 AM
well, I have application that will draw google map marker,I draw the marker through loop,now if I have 30,000 or more points to draw my application will crashed,but less than 25,000 it will draw
 
m59
You could add *.psd or put them in a certain folder and ignore it
@ashTon it's not the loop per se, it's what you do in the loop.
 
yea im just working a basic webpage...standard css...js files...images...
 
@m59 I'm not sure ignoreing is what he wants.
 
m59
It's what I want for him!
 
I ge the impression these are possibly important PSDs, not compiled output
 
2:01 AM
using it to test out various ideas for different pages, and also as a backup
 
m59
kidding, yeah I think he should just add them. That's what I do.
I mean, if you go to a new computer, git clone the project and they are there. Why not?
 
This isn't opinion, it's "are they something you want to keep?"
 
I don't know how can I show my code here so that you can help me guys
 
jsfiddle
 
2:02 AM
any of you guys work full time from home?
i did that for almost a decade and coudlnt' take it anymore lol
 
I like working in an office
 
I could, but i go into the office because i don't have self contorl
 
gives me a nice quiet (most of the time) place to work away from the temptations of home
 
m59
@redshift I work at home, which is epic since I have narcolepsy.
 
2:03 AM
i think for me the key is 1-2 days at office, the others at home
 
(ftr I also could, but I choose not)
 
@m59 what's narcolepsy?
 
I often choose to work form home on mondays.. just can't bring myself to go in :)
 
can I post my code here?
 
m59
@redshift sucky sucky fail
 
2:04 AM
I would have to go into work sometimes however, because I work on hardware and have to program the cards
 
@redshift A tasty alcoholic beverage.
 
m59
@ashTon you were given suggestions ^
I'd rather work at a place with a team of people, but it's hard to work that out. My wife would have to stop working to drive me and it'd probably be an hour drive there and back.
 
i live about 4 mins from where i work but i'm ready to move out into the country...can't take city life much anymore lol
 
@m59,but my data is in my database
 
then you better work form home, you'll hate commuting otherwise.
why spend extra hours/day driving?
it's life-changing
 
m59
2:07 AM
@ashTon I'm not sure what you're trying to say.
@Luggage yeah, it would suck. I really like what I do now in every way except that I don't have any devs over me to help me grow.
That's why I'm here help vamping all the time.
 
I was talking to redshift, mving to the country
yea, i prefer an office with the option to work form home when i feel like.
 
@m59,I'm asking where I can post my codes so that i can get help,but someone suggested jsfiddle but my problem is the data that I am fetching is in my server
 
but i also want a short-ass drive
 
@Luggage yea i hear ya
 
m59
@ashTon and how do you presume that posting your code anywhere else is going to solve that?
 
2:09 AM
We don't need a complete working application, just a bit of code to see what "adding a pin to the map" involves
 
m59
We're obviously not going to be able to run your code in this case (learn about mocking, btw)
 
@m59,okay I will try to post my loop
 
What I need os to go do my own damn work.
:)
 
do you guys work for a small company . self employed or big ass corporation?
 
m59
If you write your code very modular, it's easy to mock whatever it needs. @ashTon
@redshift I'm the only employee hheheh
 
2:11 AM
big ass corp during the day, self employeed at night
I call masturbation 'self-employed'.
 
m59
(aka superhero)
uhh...well that changed the meaning.
MASTERMAN!
 
lol
 
j/k, i have a contract job at night, making a new internal app for a company aroun dhere.
during the day, Xerox.
 
man i used to work 24/7 like that...nearly killed me...figured you can always make more money, but not more time.
 
yea, it was a mistake
 
2:13 AM
but at least you are self aware
 
I don't have it that bad, hour-wise. just ~10 extra hours per week, but it made more of a difference in my life than I thought.
 
me...i kept working hard like that to feel validated
so which one of you guys is working for north korea?
leave sony alone
 
m59
@Luggage you might say it makes you feel like you're carrying around some extra luggage?
 
<roll eyes>
 
m59
xD
 
 
1 hour later…
3:40 AM
nice hour difference jesse
 
user3949359
4:13 AM
Can anyone help me with playing a video with a button? I'm thinking about using jQuery. The video is in the background and needs to be started when a button (not from the original embed code) is clicked. What should the callback in the click function be? The video is in an iframe
 
is it a youtube video?
 
user3949359
it's Wistia
 
user3949359
but it should work the same with jQuery
 
Is WinJS worth it?
 
user3949359
@rlemon how do I "click" the iframe with jQuery one my button is hit?
 
4:20 AM
if it isn't the same origin and there is no api you can't
afaik
 
user3949359
isn't there a way to simulate a click on a div with jQuery?
 
not in an iframe you don't own
 
Hi
 
user3949359
It's in a div
 
need little help
 
user3949359
4:25 AM
something like $('button').click(function(){
$('div').something
})
 
you can look into .trigger
 
6
Q: CSS3D matrix generation

DramorianI am trying to achieve following effect using css3 and javascript when we move mouse to center div (MouseOver effect) I have created small library which accepts 3 arguments element,sourcePoints,destination points and returns css3D matrix and update element. here is my javascript code. var BLE...

 
user3949359
@rlemon sounds promising
 
user3949359
$( "div" ).trigger( "click" ); Is this going to click my element?
 
user3949359
button.click
div.trigger(click)
 
4:38 AM
This is more of a back-end question. Well, I'll ask it here anyway.
I'm creating a “contact user support” form. The idea is to prompt the user for specific pieces of information. Then format it into an e-mail and sent it to support@example.com . So far so good. I have figure out how to send a simple e-mail.
I'd like to have file attachments too. I have figured out how to upload a file to a fixed directory, and I have figured out how to send a file as an attachment.
The interesting part begins when several users compose e-mails at the same time. I can't pile attachments from different users into the same fixed folder, because of possible file name collisions. I could create an individual folder for each user. Perhaps, I could use GUID to make unique folder names.
Surely, I'm not the first person with this question, and I'm trying to avoid reinventing the wheel.
 
5:09 AM
@wyattbergeron1 sorry, back late, just after the lunch time.
@wyattbergeron1 I think jquery mobile will override min-height
Hi, Anybody know when jquery mobile will add min-height attribute on data-role=page div?
 
 
1 hour later…
6:29 AM
hello
 
@towc Hello
 
6:45 AM
anyone used grunt here?
In the twitter bootstrap project, especially in the non-minified file, how does the jQuery vertion validation appear there...its not there in any of the js files...
 
7:10 AM
how does jQuery wrap the dom ? in the source, I see,
function jQuery() returns a new jQuery.fn.init(selector, context), so It creates a new instance of the init function and returns it, but what the init() function does is what I can't understand, (starts from line 2730)
    elem = document.getElementById( match[2] );
          // gEBID returns nodes no longer in the document (#6963)
        if ( elem && elem.parentNode ) {
         // Inject the element directly into the jQuery object
        this.length = 1;
       this[0] = elem;
   }

 this.context = document;
this.selector = selector;
return this;
what does this[0] = elem do
 
@argentum47 is this the full code of init function?
 
no
where jQuery.fn is = jQuery.prototype
 
I think, $.fn.init the context is like $() element
 
yes
$() calls the init
 
@argentum47 this[0] mean get the first selected element
 
7:16 AM
oh ok,
 
@argentum47 $() will not return null, it return a list of selected element
 
ok
so init returns a NodeList and then they are saying NodList.prototye = jQuery.prototype ?
no
its returning the jQuery.makeArray
ok I will be back after I rad a little more
 
@argentum47 good luck
 
:P
but how would you generally implement that functionality on a small scale?
 
7:40 AM
wuut?
!!> "9" * 4
 
@towc 36
 
@towc Is that surprising ?
 
@dystroy I never knew about it
 
more funny in fact is "9"+4
or this :
!!> "9"+4-4
 
@dystroy 90
 
7:45 AM
can anyone tell me what kind of variable is this? Can't seem to access it..
 
Is that a serious question ? A guessing game ?
 
@Sisir how did you get it?
 
it get returned from an ember function.. still looking into it. It has properties but undefined when I try to access..
 
try typing: typeof emberFunction()
where the function is your function
 
let me give another detailed screenshot. Is it possible that properties has protected access?
 
7:54 AM
well, there are some browser-stored objects...
like window, you can try to reassign it to anything, but you won't be able to
 

« first day (1525 days earlier)      last day (3424 days later) »