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

8:02 AM
@KarelG i was going to suggest splice
 
yaeh, got in mind
after nipping from a cup of coffee
 
@RohitBatham 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.
 
HAMMAHTIME!
 
hello every one i am new to programming i am giving you a link there is a pdf in it i want sliding effect as written in it...
medicalresources.in/pdf/Layout.pdf hop you can help thank in advance
 
8:12 AM
Damn, why do I need to explain why this.id is better than $(this).attr('id') to a high rep veteran user ???
 
it's also faster ...
 
0
Q: Is it possible to identify multiple links using <a> tag in jquery

TechyI have 2 links inside a class link_div like this. <div class="link_div"> <a id="upload_link" href='' >Upload File</a> <a id="search_link" href='' >Search File </a> </div> My requirement is on clicking each link a div will be displayed.The displayed div contents will be almost same except sma...

Please don't upvote my answer, it's already awkward the way I gain my rep this morning...
 
can anyone help??
 
that's unexpected
the .attr() function is longer then what i expected :|
 
@user3346501 what is it you are after?
@KarelG indeed, and im wondering why one would use "removeAttr" function after looking at that src
 
8:25 AM
@DrogoNevets only the sliding effect when hover on thumbneil the should be rest in half part of website and and when click on it the image should be in full part and i also providedd a link of pdf where you can better understand
 
@user3346501 that sentence makes no sense
 
@dystroy lol @$(this).attr("id")
 
@user3346501 are you looking at the last page of that PDF?
 
this is the user arguing...
 
@DrogoNevets yes sir 3,4 and 5 page sir....
 
8:30 AM
Totally unexpected : a user comes to miaou and say
> i want donate money for this cool stack
...
 
@dystroy :D
@dystroy awesome :D
 
-1 for $(this).attr("id") which is an anti pattern. Let your APIs work for you not vice versa. — Benjamin Gruenbaum 3 secs ago
 
@BenjaminGruenbaum parser question for you: stackoverflow.com/questions/23649382/…
 
> im like it .. you spend much your time in build this gratis and you need gift ;-)
 
8:35 AM
that regex question, i should do that in 2 steps. Remove the {...} to empty and then find the values in the result of it
but i'm not an expert
 
@user3346501 ooo im a sir
@user3346501 there are plenty of jQuery plugins that will offer that kind of functionality, i dont know of one off the top of my head but a quick google should turn something up
 
@DrogoNevets sir i stuck in this from last 15 days.....if you can give me a link for this i will be very thankful to you.....
 
0
A: Javascript regex find variables in a math equation

Benjamin GruenbaumMatching {}s, especially nested ones is hard (read impossible) for a standard regular expression, since it requires counting the number of {s you encountered so you know which } terminated it. Instead, a simple string manipulation method could work: var input = "abc def+(1.1+{ghi})"; // I assum...

done
 
can anyone tell me why this doesn't set the height?
 
@BenjaminGruenbaum upvoted
I like your answers :)
 
8:44 AM
Any idea why someone downvoted it?
 
+1 better approach
 
@BenjaminGruenbaum imo to counter the upvote, the other answer had one upvote
 
probably because the question is to use regex. Maybe you can add clarification why you has used a different approach
 
@FlorianMargaine so strategic?
wow, -2
 
@BenjaminGruenbaum think so. I might be wrong though
 
8:46 AM
it works though, I tested
 
judging from your code, i would use it.
 
Meh, I don't like the fact people are downvoting my stuff although it's the only correct answer :/
 
just ppl-knows-everything with not enough or wrong knowledge ;)
 
oh god
I've never downvoted so much on a question
 
@FlorianMargaine which one ?
 
8:54 AM
@dystroy all the answers there: stackoverflow.com/questions/23649382/…
(except Benji's)
 
Sometimes it depresses me to answer stuff... all the other answers are just so... wrong
ITT people who know the difference between a regular and a context free language and people who don't :( — Benjamin Gruenbaum 4 secs ago
:P
 
The problem is that the question isn't precise enough. If there's no deep {} nesting then it's trivial and doesn't require parsing.
 
Hi is there tool or demo for event handling testing, the android, iPad, MS products all handle this differently. How to detect the events and types ?
 
@jurka I use browserstack.com
lol, here come random downvotes on question stackoverflow.com/q/13233137/1348195
And on stackoverflow.com/q/11264734/1348195 from 2 years ago :/
 
@BenjaminGruenbaum, its great for testing. In chrome you have built in monitorEvents tools which lets you debug all the click related events, but I need something similar to touch events
 
9:01 AM
I updated the question to make it clear: no nesting, only one level of { } — fluminis 3 mins ago
now it's trivial
 
Yeah, now it's a completely different question :/
 
people, please don't upvote benj's downvoted posts. It can be cleared if it's voted down due of grudge
 
no one is upvoting them, I was just complaining about it. Also, it won't get cleared and I don't care about the rep as it's tiny, I just hate the fact people are revenge downvoting me
 
you're not the first
 
it's not the first time either :D
 
9:07 AM
:p
 
its only rep who cares
 
Can anyone update this to angular 1.2.x
0
A: ng-repeat defined number of times instead of repeating over array?

Ashok Kumar SahooThe accepted answer does not work with angularjs 1.2.x

 
@AshokKumarSahoo I'll have a gander
 
@AshokKumarSahoo the correct solution is to only have a defined number of items in your view model on your scope.
 
Please remove your answer now : answers are for answers
 
9:12 AM
Also ^
 
0
Q: Produce a promise which depends on recursive promises

Askar IbragimovI have an array of integer ids, such as var a=[1,2,3,4,5] and I have a need to perform asynchronous remote calls for each of these ids. Each call is a WebAPI request performed using $resource and presented as promise. I need to create a function that takes array of these IDs, then initialize...

 
lol, now this got downvoted -_-
-1
A: ParseApp Saving data from httpRequest

Benjamin GruenbaumYou need to aggregate all the promises you used via an aggregation function, in the case of parse promises, it's .when : Parse.Cloud.httpRequest({ url: 'http://api.rottentomatoes.com/api/public/v1.0/lists/movies/upcoming.json?apikey=apikey', success: function(httpResponse) { var ...

 
Might i ask an opinion ? I have a prototype which returns a created object. But in the 10 times that i'm using that function, i only store the result two times. So the other 8 times, i don't store it in a variable. Is that a good practice or can be improved ?
Foo.proto.sumething = function( p ) {
    // tasks
    return bar;
};

// 8 times
foo.sumething(toodeloo);

// two times
var f = foo.sumething(toodeloo);
f.otherPrototype(...);
^-- example
 
Parse.Butt.httpRequest({
teehee
 
@KarelG Hard to tell without the semantics but there's no visible problem
 
9:18 AM
@KarelG I'd probably do this
Foo.proto.sumething = function( p ) {
    // tasks
};

Foo.proto.getF = function( p ) {
    this.sumething(p);
    return bar;
};

// 8 times
foo.sumething(toodeloo);

// 2 times
var f = foo.getF(toodeloo);
f.otherPrototype(...);
 
@AshokKumarSahoo added a new answer
 
@KarelG each function does only one thing, this way
 
@BenjaminGruenbaum bluebird.each is sequential?
 
9:21 AM
@FlorianMargaine Yes
It's in v2
 
how do you do concurrent promises then? .map?
 
.map , which has no order guarantee
 
you can also do .map(...,{concurrency:3}) or something similar
 
@FlorianMargaine this appears as a better and pretty explainable approach for the client.
but ... Foo is diff to Bar
 
9:22 AM
@dystroy "iterators"
 
@BenjaminGruenbaum what ?
 
@dystroy that's the branch name
 
oh, ok thanks
 
Still, do you see anything wrong with stackoverflow.com/a/23649366/1348195 ?
 
9:31 AM
@JohanBorssen 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.
 
0
Q: Accéder à une base de données SQL Server depuis Xcode

user3635899Avant tout je suis débutant concernant le développement iphone. Dans le cadre de mon projet de fin d'étude il m'est demander de développer une application iphone qui essentiellement lit des données depuis une base de données sur sql-server 2008. Mon problème c'est que je n'ai pas de mac pour déve...

 
mon français n'est pas parfait pour comprendre cette question. :|
 
@FlorianMargaine @dystroy
 
Is it possible to translate your question in english ? Then you've more chance to have an answer
 
9:49 AM
not mine question .. i post for you are french people
 
heh, we aren't french
 
this for @FlorianMargaine @dystroy ;-)
them is french i am meaning
 
ok nvm
 
im know stackoverflow is multi language :-)
 
@BenjaminGruenbaum : got two uneccesary downvotes today. Maybe i kicked some1's leg
 
9:54 AM
A wonderful chrome plugin found on reddit : chrome.google.com/webstore/detail/octotree/…
6
 
@Chetan 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.
 
Thanks for the rules
I would like to follow it , right now I dont have any questions
 
some1 complained that i'm using a fallthrough in my switch statement at my review last week.
 
:)
 
welcome to this chat @Chetan :)
 
9:59 AM
@Kare
@KarelG : Thanks
No one cracks a joke here
:(
@CapricaSix
 
CapricaSix is a bot btw
you can interact with it, but it doesn't have a human mind
 
Ohhh
 
fe
!! work or party
 
@KarelG work
 
@KarelG :/
 
10:08 AM
@Connor, sorry man. my internet got disconnected, can't access the fiddle you created anymore. I'm out of luck. D:
 
@Niks 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.
 
Lazy survey : do you guys have an opinion on react.js ?
 
Can somebody please review my code? codereview.stackexchange.com/questions/49623/…
Its a Movie Ticketing System.
 
@dystroy this is awesome
 
10:23 AM
this also remembers reminds everybody how bad it is now to browse github repos
they've put too much effort in pretty colors and not enough in ergonomy. Search is awkwardly bad too.
 
well it's never been good tbh :/
 
yes, I never said it was
 
Eew "This edit was already approved - please visit the post and correct the edit." stackoverflow.com/review/suggested-edits/4808838
 
@dystroy it's interesting and has an interesting coding style, not too bad.
 
the github search is not only too robust but the priority is at the codes instead of fe readme
 
10:27 AM
My main concern with react is working in a team.
 
@Qantas94Heavy A moderator should be summoned, I think
But I understand why reviewers accepted that : if you're not cautious you may think ok, ok, right, ok,... I guess it's just obvious fix until the end, let's accept
 
... kinda too, it's like "the first bit is alright, ok accept it, it should be fine"
 
btw @Qantas94Heavy did you flag that for a moderator ?
 
@dystroy flagged
 
good
just found some vandalism too :
(oh snap, was a test :\ )
 
10:41 AM
:p
 
> dystroy has approved 780 edit suggestions and rejected 489 edit suggestions
I hadn't noticed it was so bad...
 
That's nothing.
 
more than one third rejected is nothing ? How is it for you ?
 
> Qantas 94 Heavy has approved 915 edit suggestions and rejected 2229 edit suggestions
 
^-- lol
 
10:44 AM
impressive...
 
hello need help in json key parsing.....can anyone help????
 
maybe is it because I didn't review a lot in the last 12 months
 
!!welcome shishir123
 
@shishir123 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.
 
10:46 AM
!!stats jAndy
 
@jAndy You (http://stackoverflow.com/users/1386886/jandy) have 87032 reputation, earned 40 rep today, asked 53 questions, gave 1904 answers, for a q:a ratio of 53:1904.
avg. rep/post: 44.47. Badges: 13g 138s 202b
 
@jAndy youve asked 53 questions today?!
 
@DrogoNevets Click instead of asking that kind of question... stackoverflow.com/users/1386886/jandy
 
@dystroy it was a joke! i chose to ignore the comma
 
!!urban joke
 
10:49 AM
@jAndy [Joke](http://joke.urbanup.com/1454690) Q: What does a Big Fat White women and a Brick have in common?

A: Sooner or later, they will both be laid by a Mexican.
 
lol
 
i have json string array like [
{
"Market": "KOREA",
"Status": "none",}{
"Market": "GERMANY",
"Status": "Within",}] i want to keep the value of Market into an array and value of Status into separate array how can i do so? can anyone help?
 
json[0].Market
 
by the i get the json array from webservice
can you elaborate little bit because i am new in javascript/json !! @DrogoNevets
 
ehhrmm
are we no longer able to strikethrough text in answers ?
<strike> doesn't seem to work anymore
 
10:58 AM
blah?
 
I know we can do it in chat
 
Works for me
In the preview, at least
 
Hi to everyone!
 
@SomeGuy using --- or <strike> ?
 
<strike>
 
11:02 AM
hmm
 
Again, in the preview
 
<strike>???</strike> or not
 
Chat uses ---
 
Ah, you're talking about answers
Yeah, <strike> it is
 
@shishir123 the JSON string array is not valid. But your best chance is by using a utility library like Lo-Dash or Underscore.js which usually have a map() function to map your array. For example: jsfiddle.net/Xck5c
 
11:03 AM
ahh I got my mistake, I put </strike> at the end of a code-formatted block
must be in a non-formatted block to be recognized
 
@Shash 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.
 
!!s/Script|Please//g
 
@jAndy @Shash Welcome to the Java chat! review the room pseudo-rules. 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. (source)
 
@CapricaSix Huh, Java chat, am I missing something?
2
 
Hello can any one help me . I want to know how to center the google map in my mobile device
1
Q: How to give logitude and latitude value to google map script from a php variable

Vikram Anand BhushanI have a google map script like this which is the standard google map script provided in JQuery forum some where <script type="text/javascript"> /* * Google Maps documentation: http://code.google.com/apis/maps/documentation/javascript/basics.html * Geolocation documentation: http://...

here is the code which I am using
 
11:12 AM
@DimitriM some1 has edited the bot ...
 
Can any one help me please
 
@VikramAnandBhushan are you sure that the php variable is correct ?
 
hi all
 
@KarelG forgot to tell you it was just syntax error in the code because of that the map was not showing . Now the map is showing but its not centered
That's what my problem is :(
 
best to update the question
 
11:21 AM
Yes I will do that now but can you please look into the code and let me know in the JS what I should add or remove to make it centered
 
Hey, does anyone know of a good way to do the sliding effect that jquery can do but without the whole jquery library?
 
@David : slideToggle / slideDown / slideUp
@VikramAnandBhushan : still a little error; <?php ; echo $coordenadas[0];?>. Please remove the first ';'
 
@KarelG done!
 
@KarelG But without having to include the whole jQuery library? My situation is my application has a fixed bar at the top which accepts notifications and messages in real time using web sockets. That all works but then it's the part of making the drop downs slide down when showing them without using jQuery. I have always used jQuery for this effect but I don't want to include the whole library just for doing a sliding down and up effect
 
i am getting this error . when i want to post in facebook wall
{"message":"An active access token must be used to query information about the current user.","type":"OAuthException","code":2500}
function facebookWallPost() {
    alert("came");




    var body = 'Reading JS SDK documentation';
    FB.api('/me/feed', 'post', { message: body }, function(response) {
           if (!response || response.error) {
           alert('Error occured');
           console.log(response.error);
           console
           } else {
           alert('Post ID: ' + response.id);
           }
           });
}
 
11:29 AM
@David well, you can look for non jQuery sliders. like this one
 
function login() {
    FB.login(
             function(response) {
             if (response.session) {

             alert('logged in');
//             FB.api('/me', function(response) {
//                    console.log('Good to see you, ' + response.name + '.');
//                    });
             FB.api('/me', user_info_callback);
             } else {
             alert('not logged in');
             }
             },
             { scope: "email" }
             );
} this is my login
 
@KarelG Ok thanks. Do you have any angular experience?
 
no. sorry
 
@Sven 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.
 
Interesting :
1
Q: HTML5 Video not showing up in Chrome before scroll

Mich AelI have a problem with HTML5 Video and Google Chrome. When I load my page. I can't see the video. No poster image, no video frame. The video element does exist. Now if I scroll a little bit the video is showing up and plays. Its like "Please Scroll to Render and Play the Video".. This is my cod...

 
11:39 AM
I have to wait that time regardless of the scroll
 
@KrelG I have updated my answer
 
@PrinceVegeta 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.
 
@SomeGuy on Chrome too ?
 
Yep
Scrolling doesn't trigger it
It seemed that way the first time
(Testing incognito, before someone brings up caching)
 
For me it does. It can be very long if I don't scroll, when not cached
but not easy to reproduce... it... depends :\ (shitty markdown parser here...)
 
11:51 AM
first view it failed. every view since then (with and without cache clear) works 10/10
 
I've a simple question??
 
works fine in FF
 
Harish you can ask your question as long as you promise not to hit on anyone
 
newbie alert!
$(".fancybox")
.attr('rel', 'gallery')
.fancybox({
    padding : 0
});
in that above code, what does the 'rel' do?
 
oh boy I hope Aria won't kick my ass if I'm getting there in July
I changed my iTunes account to US store and since you need a valid address in the states, I entered the address data from Aria Resort / Las Vegas :-P
 
12:00 PM
'rel' is an attribute
 
they get my bills
 
!!google rel attribute
 
@redshift it is just adding the 'gallery' rel attribute to the tag
 
@rlemon thats what i thought but i don't see that 'rel' attribute in the HTML for this example: jsfiddle.net/Py2RA
 
12:01 PM
how are you viewing the source?
 
I'm just looking at the HTML as printed in that example
 
it adds it when the code is run
 
how'd u view that
i went to VIEW SOURCE on that result window
 
that doesn't show you what you want
javascript adds stuff to the DOM after the page is loaded
when you view-source that code isn't run and the changes are not reflected.
what browser do you use?
 
chrome
 
12:04 PM
hit f12
select the "elements" tab
 
cool thanks!
 
or right click on the element you want to inspect (on the page) and select 'inspect element'
 
@rlemon thanks!
 
it will open this 'elements' view and focus on the element you selected
 
does anyone here have experience working with the html5 video element and the 'autoplay' attribute?
 
12:07 PM
yes, no, and possibly so
 
my videos are not autplaying despite having the 'autoplay' attribute in the html5 video tag. Iend up having to click the play icon after the popup...wonder why it doesn't autoplay. My live sample: ogmda.com/3dms-public/gallery.php
 
!!s/so/so and by the way, don't ask to ask :p/
 
@jAndy yes, no, and possibly so and by the way, don't ask to ask :p (source)
 
here is my stackoverflow quesiton with a hint, but don't quite understand how to implement: stackoverflow.com/questions/23644813/…
 
Hey SO: I was wondering if any of you could enlighten me on why this equals to -81 and not -1;

(-9 - Math.sqrt(81))/2*9;

In my calculator (-9-9)/18 equals -1
 
12:19 PM
!!> (-9 - Math.sqrt(81))/(2*9);
...
 
@dystroy -1
 
Oh
That was really bad of me.. thanks a lot!
 
Yeah I know, I deleted it :P
I am really bad at waiting... especially when it is a problem i have no idea why is... but I forgot the basic math rule that division is before times... and that is really bad.
 
vs7
Hi ,

I have this imgur.com/ZUg6kKT checklist and have outer div id , I want to send a flag = 1 if all are unselected ...

check individual takes lots of time

I know a jquery method
flag=1;
$("$myid input[type=checkbox]").each(function(){
    if($(this):checked){
          flag=0 ;
    }
});
but i need it in pure JS
 
12:23 PM
!!/tell vs7 format
 
@vs7 Format your code - hit Ctrl+K before sending and see the faq
 
[].forEach.call( document.querySelectorAll( 'input:checked' ), function( input ) {

});
 
vs7
I have used this one document.querySelector('#myid input[type=checkbox]') and dont know how i can check value
 
nn to check for "checked state" when we originally only query for checked elements right
if you really want to do it within the loop.. just query for #myid input and then use if( input.checked ) {}
 
12:32 PM
@rlemon remember that I asked you a couple of questions about using a canvas to draw into another canvas yesterday? Does it matter how many things are drawn onto the canvas when doing this?
 
probably not
 
vs7
is that right ?>
 
@rlemon Cool thx. How come it does not matter that the screen sizes are different ? jsfiddle.net/Schoening/XxzS7/2
 
now I must answer more questions in go to get to 200...
 
12:38 PM
@vs7 no
 
vs7
@jAndy cool thanks
 
@Schoening setting height / width in css zooms the canvas
you need to set those with the attributes
<canvas height="" width=""></canvas>
or with the properties.
canvas.height = 100;
canvas.width = 200;
@dystroy :( I almost have the JS silver badge
 
I actually want my second canvas to get everything from my first canvas and scale it up to its own size. Does not specifying give some problems? @rlemon
 
no because you scaled down your first canvas
don't ever set canvas dimensions in css until you understand how it works :P
 
@rlemon now go answer a few questions. A paradox might be that we have to answer questions we would have closed otherwise just to be able to close more questions later :\
 
12:45 PM
D:
 
I've never used three.js so i'm not sure about how to set stuff there
 
"Resizes the output canvas to (width, height), and also sets the viewport to fit that size, starting in (0, 0)."
 
^ what I changed: I removed the css dimensions, added them to the HTML source. I then set the size on the drawed images
context.drawImage(img,0,0,width,height);
 
Its all blurry D:
new THREE.WebGLRenderer( { canvas: testCanvas } ); this line just means it uses the specified canvas size btw. So 50px in this case
I think I get what you mean.. Look I scaled the 50px canvas with css:
http://jsfiddle.net/Schoening/XxzS7/4/
@rlemon by the looks of it. I can use this to my advantage. Lower Performance = reduce canvas size and css scale it up
At least I would think so..
 
yea some people do use it to their advantage
 
12:54 PM
i have built a 3D tetris once with three.js. But didn't really loved it
 
afk ten minutes let me write a demo
 
Looks like I am not getting any real performance inprovements scaling. I guess the Three.js stuff is what hogs all the resources in my test
@KarelG got a link? :p
 
it was for a webscripting course 3 years ago
 
Ah Okay ^^
I wish I could do this differently xD ... WebGL 60fps drawImage = 35. Whatevs..
 
it could be that three.js got evolved now
 

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