« first day (1283 days earlier)      last day (3659 days later) » 

12:16 AM
!!hello
:(
Is caprica dead?
 
!!wakeup
!!COME ON, CAPRICA
:(
 
Apparently caprica's not even in the room
 
hello
 
hi
 
how are you? :)
 
12:22 AM
fine
 
Just reviewed 80 close votes.
 
@bjb568: 80?
 
12:38 AM
UTC resets at 5 o-cluck.
 
Oh, so you had 40 the previous utc day and another 40
 
Yup.
 
12:55 AM
anyone good at js?
10
 
no, here in the js room we shoot people good at js on sight
 
0
Q: Uncaught ReferenceError: Promise is not defined

FabisA Chrome app I've made works perfectly fine for me, but another user gets an error "Uncaught ReferenceError: Promise is not defined" when starting it up. For some reason it doesn't understand what a Promise is? The code works perfectly fine on my end and I've never gotten that error before, but ...

 
items = form.querySelectorAll("input[name]")
how could I change this to select every textarea as well?
tried it like: items = form.querySelectorAll("input[name] textarea[name]")
but cant make it work :(
 
needs a comma
 
items = form.querySelectorAll("input[name], textarea[name]") tried this too
 
1:05 AM
well, actually
what's input[name]
 
value of the name of each input inside a form
yeahh finally it works
items = form.querySelectorAll("input[name], textarea")
this one was the solution
interesting
 
yeah, I was about to say that you must have the selectors wrong :P
 
thanks for your help anyway :)
I'm new at JS but I'm keep on trying and wont give it up
 
@KissKoppány do you understand why it didn't work though
 
@AbhishekHingnikar Although true, I'm not sure if the average person is aware of how horrible 6-9 were. Myspace isn't really known by anyone for anything other than failing.
 
1:13 AM
not really, I cant understand why was that a problem I used "name" because in the DOM it has a name
like this <textarea name="test">
 
if that was true it would have worked with textarea[name]
perhaps you are calling the function before the textareas you are trying to select are rendered
 
@KissKoppány That will affect all textareas, just fyi
 
1:35 AM
what you mean?
 
@KissKoppány the selector textarea selects all text areas in the form
while textarea[name] selects only those with a name attribute
 
hm
I have only one textarea and it has a name
and somewhy the seletor doesnt work on it with name but witout it
h
 
recreate it in jsfiddle.net
 
jsfiddle.net/mg3Yb somewhy it doesnt call the function, i dont know this site xD
 
2:08 AM
@KissKoppány jsfiddle.net/mg3Yb/1
jsfiddle option wrap in <head>
 
thanks
hey @Connor :D
had a little problem with textarea
 
@KissKoppány When there's a problem, check the console.
 
I'll from now :)
 
@KissKoppány you see it does select the textarea with textarea[name]
 
yeah, really...
somewhy it dowsnt work for me in other environment
tried to represent it but maybe I missed something
hmm, it works now perfectly
I'm a little bit confused, since I didnt change anything lol
 
2:33 AM
Public wifi ftw!
And just when I thought there was nothing to like about this city.
 
which city? :D
 
Adelaide, South Australia
Home of the... nothing.
 
I have a question, do you think every verification based on JS is reliable? because just like Chrome, using F12 we can edit JS, I think it is not security...
 
HTML validation is more for convenience and user interface than security
you should always have server validation
 
I have both
client side in order to not send ajax request if validation fails
and server side to make sure you wont be hacked xD
 
2:42 AM
several days ago, I went into a web-site to calculate my salary, but the function is invalid, I edited the JS, and I got the correct result, so the idea came into my mind
 
Never rely on just client-side validation
 
yeah, but some web-site put them basic function on JS, once hacker edit them they can break into the system
 
@jesse Not if they have a server-side validation check. All the hacker will accomplish is sending bad data, which gets rejected by the server.
 
yeah, I know, I don't think the debug function of browser is good, at least if the web-site do not open debug model, the client can not edit even see the JS code. that is my own opinion。
 
What?
Did you just say that you think browsers shouldn't allow debugging?
 
2:50 AM
server verification + JS verification is security, but it bases on programmer, if some guys foget that, bug may be happen
@monners I think there should be a on-off on server, if it close, client can not see the JS code
 
Are you trolling?
I think you're trolling.
 
@monners just a idea:/
 
@jesse What you said about programming errors is absolutely true, which is why you should always hire competent developers. Enabling/disabling debug, however, is a horrible idea, more so because it would remove the user's ability to check whether a website they're visiting is up to no good as opposed to attempted hacking (which, as I've already said, is the responsibility of the developer to protect against on the server)
 
2
Q: Margin-top seems to be going haywire

AnimusI have a div, which contains an image and description. When I change margin-top of .describing, the container div moves: HTML: <div class="project"> <a href="img/projects/a/a6.png" data-lightbox="a" data-title="A* algorithm realization"> <img class="projim" src="img/projects/a...

 
@bjb568 .project { overflow: hidden; }
Oh yeah, vertical-align: top
that works too.
 
3:05 AM
I insist on my idea.
@rlemon is there any idea of you?
 
@jesse how old are you?
 
@rlemon ^^
 
@Loktar 25
 
Ah I assumed younger.
Not allowing a user to see the code on the web imo would break it.
hiding things in a black box allows bad programmers to be even worse :P
 
That
@Loktar that's what I said (in so many words)
 
3:08 AM
you could send machine code rather than JS
like EXE or DLL
 
You can minify your code with google closure compiler, this will accomplish the goal, unfortunately
 
with an option to run shady code if you really want to :P
but yeah, kinda violates some core principles of the web
 
the web would become a very dark place controlled by corporations
 
Minification just obfulscates code, it doesn't protect it.
 
things like jQuery may have never taken off
 
3:10 AM
yea, not in a security sense, but effectively it becomes very tough to read
 
@Jehan meh, you can beautify it
 
@Jehan Not really. Chrome Dev tools will beautify it for you in a second.
 
^
 
still tough to read though
 
then you've got to reverse engineer it
 
3:11 AM
jQuery do not have any business function code.
 
more of a discouragement than a defense :P
 
also, if you use a tool designed for obfuscation, it can become a large undertaken to get any meaning from the code
 
The girl sat across the park from me right now is eating an entire cucumber in a somewhat seductive manner.
 
@jesse if the web was not open like it is, I believe the environment we have today where front end code is widely shared would not exist
 
backend code is widely shared
 
3:12 AM
because people would be more concerned with protecting their code and profits.
 
For a good programmer, minification and even variable obfuscation isn't a barrier. People stealing code often isn't so good to deobfuscate.
 
@monners ask her if she wants another one
or maybe say "I see you like cucumbers"
 
@Jehan Sure, just ask Google. I'm sure they'd be happy to share their search algorithms with you.
 
what do you have to lose :D
 
opera dragonfly also beautifies code for the researcher's sake
 
3:13 AM
@Jehan it is for sure, but front end even more so.. because in reality you don't have much of a choice, so open source is more freely available
 
@Mosho My dignity
and virginity
 
heh imagine how wealthy John Resig would be if jQuery was closed source, and front end technologies were treated like back end
 
@Loktar We'd all be rich! Rich as Nazis!
 
lol
 
@Loktar there is a lot of less good (imho), but still very good open source libraries.
 
3:15 AM
that's chrome-beautified gmail frontend code
i await the gmail competitors
 
honestly I was kinda shocked to see how open-sourced the web is
in a world where an errant fart might produce a lawsuit
 
This entire discussion is silly.
 
you're right :(
 
33 mins ago, by jesse
yeah, but some web-site put them basic function on JS, once hacker edit them they can break into the system
 
Time for me to relocate. BBL
 
3:18 AM
^ happens with closed code all the time btw :P
time to go play a random game before bed
 
@Loktar I'm sure I'll see how you did on Twitter :P
 
lol
you see my new room setup?
the tv is massive, I feel bad every minute I'm not using it lol
 
No, one sec
 
I am a programmer for a bank, we can not share code.
 
@Loktar propietary software uses client-side validation more often
 
3:19 AM
^ @monners
 
Yeah, just found your tweet
 
all my old consoles are to the left of it and connected in :)
 
That's nutz
Is that a 4K tv?
 
hah noway
1080 only
 
D'awwww
 
3:20 AM
it was $350 I got a decent deal, 46"
 
Nice
 
I got it for retro game systems pretty much so didn't need anything too fancy
 
lol, Frogger on a 4K...
2
 
haha
 
The crispest pixels you ever saw :P
 
3:21 AM
I was telling my wife how awesome the Atari will look on that one
she rolled her eyes
I was like the pixels will be the size of my fist!
 
Women. They just don't understand sometimes.
 
haha
 
Ok, gotta run. A group of hooded youths just set up shop behind me. I fear for my life.
 
3:42 AM
Back
 
 
1 hour later…
5:04 AM
This message was posted 1 hour later. :P
 
5:41 AM
 
6:10 AM
There should be a "ban all approvers" button…
 
@AbhishekHingnikar Whoever wrote that hasn't a clue about WW2, however is on the right track when it comes to obama
 
6:34 AM
Super old, but useful: valet.webthing.com
 
 
1 hour later…
8:04 AM
1 hour later…
;)
 
@Connor I find your comment harsh and offensive. OP is here to learn basic things
 
@dystroy It's called tough love, there's nothing offensive about it
 
Yes, he ignores a very basic thing, but what he's trying to do is basic too
Why is this downvoted ? It could be better written but I see no big problem. — dystroy 44 secs ago
 
8:48 AM
@Connor lol
World War 2 was chaos at it best.
until america jumped in :-(
 
WW2 was planned in 1800
I'll find it for you
there was like a plaque in the british museum stating the 3 world wars and why
 
Plot Twist : Somebody from future played a real life prank on us coming back and placing it ?
@Connor The best part of WW2 atleast for me Mahatma Gandhi Wrote Hilter letters supporting Non Violence.
Probably Hilters response on the letter ^
wiki answers :[ your tagged image search sucks
Don't put HITLER background on Gandhi questions :(
 
It's trying to spread a message...
 
@AbhishekHingnikar here is a letter that was written in 1877
> The First World War must be brought about in order to permit the Illuminati to overthrow the power of the Czars in Russia and of making that country a fortress of atheistic Communism. The divergences caused by the “agentur” (agents) of the Illuminati between the British and Germanic Empires will be used to foment this war. At the end of the war, Communism will be built and used in order to destroy the other governments and in order to weaken the religions.

The Second World War must be fomented by taking advantage of the differences between the Fascists and the political Zionists. This wa
The most important thing is, it was written in 1877 and the first two wars have happened and for those exact reasons
This letter was displayed in the british museum until 1970's
then it was removed, strangely
 
9:14 AM
I am scared about the third one.
 
@AbhishekHingnikar 'What does Mahatma Gandhi'?
 
9:57 AM
@Lugia101101
 
Indeed @Lugia101101
 
hi friends how i write return function in post
 
Return function?
 
return some value from on success
 
Ah async.. Screw async.
 
10:03 AM
in backbone i want to use globule variable in my view where i can declare this variable . so i can use any calculation inside my view.
use of this var
 
I uh.. totally don't know JS.... ask @AbhishekHingnikar or someone...
 
@AbhishekHingnikar
 
I hope you do realize you are still using javascript.
 
yes
 
you can declare a global variable -_- almost anywhere and can refer it via window.x
 
10:05 AM
thanks @Lugia101101
 
but following an MVC you should NEVER do it
 
@AbhishekHingnikar hi
 
Why are global variables frowned upon?
 
@AbhishekHingnikar can u give a example in in backbone , mvc pattern
where i can use global
variable
 
@Janak hi
 
10:09 AM
you should never need it -_-
@Lugia101101 cause they cause confusions
and make things to break
for example.
 
@Schoening hi
u know how i write return function ajax success
?
 
var x = "Omg am so cool";
function (){
    /* use variable x asynchronous but not define it callbacks*/
    /* There won't be any error, but things will break */
}
further reading
 
Is usage of it via window. and only synchronously okay or still frowned upon
 
Its almost garunteed that you will find a better solution :P
and then hate yourself. for the bug you caused
its very rare a global variable is nice. :-)
 
I have yet to run into a bug and my predefinitions are pretty expansive.
window.ga = l('gamearea');
window.difficulty = null;
window.bandname = null;
window.inprog = false;
window.cards = [];
window.previous = [];
window.selection = [];
window.class = ['Warrior', 'Rogue', 'Mage', 'Cleric'];
window.classW = ['Mages', 'Warriors', 'Rogues', 'nothing'];
window.classS = ['Rogues', 'Mages', 'Warriors', 'nothing'];
window.race = ['Hero', 'Human', 'Elf', 'Dwarf', 'Goblin', 'Halfling', 'Orc', 'Skeleton', 'Half-troll', 'Celestial'];
window.raceD = ['Heroic', 'Human', 'Elven', 'Dwarven', 'Goblin', 'Hafling', 'Orcish', 'Skeletal', 'Half-troll', 'Celestial'];
 
10:16 AM
@AbhishekHingnikar
 
0
Q: Angular JS: Promise returns resource

user3555998REPOSITORY METHOD public int CalculateSoundVolume(string roomName, int currentUser) { { //Business Logic return finalApplauseVolume; //**say returning 75** } catch (Exception ex) { _logger.LogException(ex); thro...

 
I have strange issue in jvascript please help
 
And that is?
 
@Lugia101101 window.ga is the global google uses for google analytics
 
var MyConroller = {
url: "myurl",
init: function(){
this.url = ///cant access
}
};
 
10:21 AM
// there is a good reason not to use ga lol
@Sarah can't access what ?
 
Oh, then I may wish to change that.
 
Why I can't access this.url within the init function?
i am getting null
 
@Sarah what library you are using ?
var MyController = {
   url: "http://google.com",
   init: function(){  console.log(this.url); }
};
works for me :-/ if try pure js
thats why am wondering which library you are using
 
Same, works fine here.
 
@Sarah wait i got it.
are you calling the init as a callback of some network call ?
or in some timeout ?
like
setTimeout(MyController.init, 5000); ?
if so the init function will lose its context and will be called upon window object
to bind it to its parent
setTimeout(MyController.init.bind(MyController), 5000);
the bind will return a special function whose this will always be MyController
 
10:24 AM
Oh, thats what bind does!
 
ll
simple eh ?
 
Heh, I never knew what it did.
Thanks. :D
 
@RUJordan hi
@MehLON hi
 
user3071008
Hi
 
can u help me?
 
10:33 AM
hi how to implememt faebook news feed link text to page review
 
user3071008
I can try
 
how i write return function i ajax post
via ajax post
 
user3071008
what do you mean by 'return function'?
 
can u help me how can i change url link to url page view like facebook news feed
 
ye
yes
@AbhishekHingnikar how i write return function via ajax post
 
10:42 AM
by learning javascript
k thx bye
 
Wow.
 
you also need to learn one more langauge -_-
 
user3071008
10/10
 
@kathir can you communicate in any other language ?
How i write return function via ajax post, makes no sense to me
 
Like a calback?
 
10:44 AM
idk if htats what he need
further more how is he doing ajax and why is he doing X
 
Quote: return some value from on success
 
well since promises, and http filters
this could mean many things
if he is using angular he might want to write a filter which returns some value at the end of every web-request
 
yes @Lugia101101 thanks
 
such as checking some token or etc
or promises will make it like this
 
Do you mean return a value collected from the AJAX request or call a function onsuccess?
 
10:46 AM
$.get("http://google.com/?q=jQueriez").then(function(){
         return {'tehe': 'Fake Object'};
}).then(console.log.bind(console));
 
hi @AbhishekHingnikar get function working fine for me but post not return anything
 
are you sure your server returns something ?
try inspecting in chrome-dev-tools
 
ya server return user id
this is my code
$.ajax({
type: "POST",
async: false,
url: "",
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
success: function (data) {
// alert(data.user.uid);
return data.user.uid;

}
});
 
user3071008
why are you using POST; you don't seem to be posting anything
 
post some data and get file id and user id
 
user3071008
10:52 AM
ah
 
@AbhishekHingnikar It's async, it wont return
 
i am not using timer
 
11:10 AM
hi @MehLON its working now
 
So how to prevent some JS code from running on mobile devices? What's the best approach?
 
hi
 
(I have a auxiliary, resouce-heavy <iframe> widget that I'd rather not load on mobile devices)
 
hi @Lugia101101 now its working fine thanks
 
Oh, great, no worries.
 
11:20 AM
Looks like document.documentElement.clientWidth > … is the way to go.
 
11:38 AM
-1
Q: How to read Inbox mails from Gmail account using javascript Api

King ArthurI'm trying to authorize chrome extension to gmail message and read particulate email and convert in to pdf

@BenjaminGruenbaum Do your thing with being nice and polite and shit.
Or just shoot it down.
 
@Zirak I have a thing being polite o_0?
ok, sure
 
Sometimes you post a "welcome to stackoverflow! Your question sucks ass, please see this and that article or get the fuck off". Only nice and polite and shit.
 
Fine, nice enough?
That's awesome! Good luck, sounds like an interesting project. People are going to tell you to give up, don't! Always believe in yourself. Keep your head high and remember, the sky is the limit! — Benjamin Gruenbaum 7 secs ago
1 message moved to Trash
1 message moved to Trash
14 messages moved to Trash
Don't spam, don't ping people with your question. Instead, read the tutorial.
 
Benjamin, was that whole comment bullshit?
 
Also, what you're trying to do is horrible on several levels. Not just because Backbone is idiotic and EJS is horrid. It's because using IDs like that indicates you lack the fundamental understanding required to write good UI code and that you don't understand how Backbone works, even as it is the most basic framework. I strongly suggest you read something about how UI structuring works.
@Lugia101101 you're a non believer.
 
11:44 AM
Indeed I am.
 
can anyone tell me how to convert jquery project into an single .exe application file?
 
Whut? .-.
 
@BenjaminGruenbaum Good enough
@Illaya wat
 
@Zirak don't feed the troll.
 
I just...
wat
Is this the twilight zone?
Am I dying?
 
11:45 AM
Yes.
Yep.
 
!!are you here?
 
Mom? Why are you spanking Mussolini with an eggplant?
2
 
@Zirak can you get the bot up?
@rlemon ?
 
@Zirak I want to convert a html project into exe application file
 
That's the lemon's job
 
11:46 AM
lemon is in jail for pooping on one slide too many, then probably rehab.
 
Justice at last.
 
@Illaya I have a solution!
 
@Lugia101101 pls tell me
 
You don't.
 
tell me
 
11:48 AM
Anyone here got good experience with Doctrine2? Before I start using it I'd like to know of any bad experiences you have had with it and does it have any limitations that require messy hacks to solve?
 
Hacks can always be made to look elegant.
 
@David you agreed to 'messy hacks to solve' the minute you started coding in PHP.
 
@Illaya You are my love my angel. Please don't treat me like potato.
4
 
Potato much?
 
@Zirak can't do it?
 
11:49 AM
@BenjaminGruenbaum Well I suppose but I don't want any really messy hacks to accomplish a common enough task.
@BenjaminGruenbaum Have you used it?
 
@David no, I have self respect
 
Hmmm so I take that as it sucks and could cause me future headaches if I use it?
 
Think of the migrane you get when run over by a 5 ton truck.
 
@David no, using an ORM can be useful, but the language is what's causing you headaches.
 
@BenjaminGruenbaum But overall would you say doctrine is an ok solution to mapping data from a relational database to domain objects?
 
11:57 AM
@David No, nothing is with PHP because of the broken object system :D
 
Benjamin has strong opinions.
 
@BenjaminGruenbaum Ok but I have to get the data from the database to domain objects, and I'm using PHP, what do you recommend if I don't use doctrine?
 
@David I recommend you don't use PHP :D
Seriously, you could be using Python for this, it's an easier language that's a lot saner :P
 
@jesse Please learn how the web works, for your sake and your clients' sake. javascript can act as a middle-man between the client and the server. However, what if you don't use a browser to send data? You can just arbitrarily send http requests, you know.
 
@BenjaminGruenbaum Do you just not use PHP for anything?
 

« first day (1283 days earlier)      last day (3659 days later) »