« first day (1566 days earlier)      last day (3396 days later) » 

10:00 PM
hopefully xD
also on the same topic, if I open source the project the API key would be public... How do applications handle that?
 
@ZachSaucier maybe just show a small map with the large map on the next page?
 
worst case I'd do that
 
You also don't commit your api key to a public repo. It's just like any other credentials you wan to keep secret
it'll have ot be part of the project setup for others, obtain an api key.
 
I'd manually remove the key each commit?
 
10:05 PM
.gitignore
 
config.js (in the gitignore)
config.sample.js (in the repository, with no sensitive information)
Or, you know, whatever...
 
there's a nice technique in projects at work
if (file_exists('settings.local.php')) {
    require_once('settings.local.php');
}
and put the sensitive information in the settings.local.php
so it's explicit what you need in it
 
alright, thanks for the heads up. I'm sure I'll have more questions later
 
@FlorianMargaine why the file_exists check and require_once?
Why would a file maybe exist?
 
SOME ONE HELP ME
 
10:12 PM
@BenjaminGruenbaum the conf isn't always necessary
 
LOL
 
I mean, it's part of the conf
 
Oh, we do what @RyanKinal does generally. Except internal source control.
 
not the entire conf
 
Took way longer than it should have to figure out date comparison in CF
0
Q: Canvas image moves slightly to right onload

cclervilleI am working with the signature_pad lib to accept signature for my web app. I am having an issue after loading a saved signature. Assuming I am working with a blank signaturePad, I create some signature and save it. After refreshing the page, this is what shows up. Notice it moves to the right...

canvas question
 
10:23 PM
@rlemon
 
@SomeKittens rlemon is afk: i.imgur.com/9rJYCek.gif
 
@SterlingArcher love that song
also love America
 
I'll check it out, they're very Manson looking though lol
 
eh yeah I've never watched one of their vids tbh
 
hey friends!
 
10:29 PM
but America is a good song
 
I haven't shown you guys my wookie robe yet, have I?
 
Well I found an adorable subreddit guys
 
@FlorianMargaine aww
 
guys, what would be the best way to send error messages back using .load()? Say I try and .load() a php file but with in that, I want to send an error message back that I can use in the .load() callback
 
@SterlingArcher I assume you're aware of unexpected thug life right?
@SterlingArcher as in reddit.com/r/unexpectedthuglife
 
10:34 PM
most definitely lol
 
and unexpected jihad lol
Stuff like this made me lol.
 
oh my god lol
 
There is a whole reddit called unexpected jihad
 
@BenjaminGruenbaum Where the hell do you find those stuff????
 
10:39 PM
@SomeKittens nice
 
T-T-T-T-T-TRIPLE KILL
 
!!afk gnight :D
 
@BenjaminGruenbaum Why does that make me smile?
 
@KendallFrey BenjaminGruenbaum is afk: gnight :D
 
OH MAN I LOVE THAT TASTING ONE
 
10:50 PM
@SecondRikudo damn he went for it
Goddayum
Aww man that donkey kicked the shit out of that dog :(
 
is there a benefit to using .ajax() vs .load()?
 
load uses .ajax internally
 
so basically I can just use .load rather than .ajax with a callback? sort of an alias?
 
but why would you?
I mean, sure you can. but why?
 
11:02 PM
well that's what i'm asking. what's the benefit to using one over the other?
 
.ajax comes with less overhead
            self.html(selector ?

            // If a selector was specified, locate the right elements in a dummy div
            // Exclude scripts to avoid IE 'Permission Denied' errors
            jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector) :

            // Otherwise use the full result
            responseText);
imo this is the only benefit of .load
 
gotcha. now, if I know I can append data on my request, but what is the best way of getting a specific variable back from say, a php file
 
.ajax
!!afk gym
 
guys, is it common in JS community to refer to an undefined as a variable not a primitive value (when speaking from the standard point of view)?
 
@zerkms no
 
11:07 PM
I'm currently having a weird dialogue with high rep users that insist it's a variable
0
A: difference between "defined" and defined in javascript

trex005"undefined" is a string, and undefined is a variable containing the primitive value undefined (Thank you elclanrs). if(typeof x === undefined) should only ever be able to return true if undefined is reassigned to a string matching the type of x.

 
@zerkms undefined is a variable, yes, but it stores the value undefined
void 0 is not a variable, but it also represents undefined
 
Hostage taker in the Netherlands seems fairly normal to me
 
@KendallFrey as per standard it's not required to be a variable
 
undefined is a primitive value, and a property of the global object, it's not a variable, but it can be the value of a variable
 
it may be in a particular implementation
 
11:09 PM
Some kid with too much tendency for drama?
 
@zerkms Indeed, I think it's more common in older browsers
I can't assign it in mine
 
@KendallFrey it's a property of a global object indeed
 
It is a variable in the sense that it's defined as window.undefined (in browsers)
 
it's required to be a property of the global object, but not writable
 
well, if you write undefined - engine is not ought to use a global property
since it's a primitive value already
 
11:12 PM
the engine is free to optimize as it sees fit
 
sure
but a standard does not state so
so presence in a global object changes nothing
 
when you write undefined in your code, it doesn't refer to the value, but the property
 
Well
You cannot know
it might refer to the global object attribute
but interpreter is not required to do so
 
with (undefined){
 
it may resolve the token directly into a value as per standard
 
11:14 PM
@zerkms I think it is required to not short-circuit to the value though
I figured out how to overwrite it
 
Uhm, I cannot agree
 
!!> var foo = function(undefined){return undefined;}; foo("bar")
 
you define a variable
 
@KendallFrey "bar"
 
When there is a variable in the context - a token is resolved as an identifier
 
11:15 PM
yes
 
when there is no - interpreter is free to resolve it into the value
(since it's not required by the standard to do something in particular)
 
undefined in JS is an identifier always
 
uhm, why so?
 
but I guess all keywords are
afk food time
 
is it a keyword?
it's not
 
11:16 PM
@SterlingArcher you listen to black veil brides right?
 
i know
 
what I cant figure out is how such a small man has such a big kickass voice
 
is it possible to use ajax on a php file that's writing html back, but also retrieve a variable?
 
@KevinMurphy ajax is a normal http request (it's not technically different from any other request sent by your browser)
now rethink your question using this new knowledge
 
well i can easily do what i want if the php file was only echoing back json data, etc.
but i want the php file to be echoing back html, but be able to get perhaps an error message that isn't part of the html to use in a callback or something
 
11:28 PM
html is a string. Cannot you return it as a part of your json-encoded response?
{"error_msg": "foo bar", "html": "..."}
?
 
oh, true. okay, that makes sense
thanks!
 
is there a less than attribute selector in CSS?
 
select what less than what?
 
<div data-hp="48" /> div[data-hp<=50]
 
Nope
 

« first day (1566 days earlier)      last day (3396 days later) »