http://stackoverflow.com/a/27527834
type: Answer
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/27527797
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27527797
has body: That's because you're using string concatenation (string + object). Change: console.log("Data: " + rows); To: console.log("Data:", rows); -- Demo var obj = { foo: 'bar' }; console.log("Data: " + obj); console.log("Data:", obj);

http://stackoverflow.com/comment/43495803
has text: You mean items may have say 10 objects and you just want to display only 3(or X) of them?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27533682

http://stackoverflow.com/q/27531209
favorite count: 0
tagged with: angularjs
linked to: http://stackoverflow.com/q/19867554
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
score: 2
downvote count: 0
has body: I'm trying to dynamically generate an ng-model directive using a filter. The main idea is that there is some text in a database. This text has gaps defined by numbers between square brackets ([1], [2], etc.). The purpose is to parse those gaps and turn them into inputs. These inputs should be then binded to a variable using the ng-model directive but I can't get it to work. Here is my controller: app.controller('exerciseTemplateCtrl', ['$http', '$scope', '$sce', '$filter', '$compile', function($http, $scope, $sce, $filter, $compile){ // used to test the binding through ng-model $scope.answers = []; $http.get('encode_exercises.json') .then(function(response){ $scope.firstExercise = response.data; }); $scope.parseHtml = function(input){ input = $filter('gapToInput')(input); return $sce.trustAsHtml(input); }; }]); Here my filter 'gapToInput' app.filter('gapToInput', function(){ return function(input){ return input.replace(/\[[0-9]\]/g, ' '); }; }); As you can see I am binding the model using the "answers" variable. Here is my directive: app.directive('exerciseTemplate', function(){ return{ restrict: 'E', templateUrl: 'exercise-template.html' }; }); The index.html contains the previous directive: And here my template for the previous directive (simplified) Check question.d.q contains the text from the database with the gaps ([1], [2], etc.) and it's applying the filter successfully (apologies, I don't have enough reputation to post images): https://i.sstatic.net/W0NoI.png The problem is that, even if the replacement works, the ng-model directive is not binding each input with the "answers" variable. For what I've been reading, this is because I have to recompile again the template so that Angular parses all of the ng-directives again. Tried doing the following without any luck: var scope = $scope; $scope.parseHtml = function(input){ input = $filter('gapToInput')(input); input = $compile(input)(scope); return $sce.trustAsHtml(input); }; I've also followed this thread and…
possible better answer: http://stackoverflow.com/a/27531555
type: Question
tagged with: javascript
upvote count: 2
answer count: 2
has title: Dynamically generate ng-model in AngularJS
has answer: http://stackoverflow.com/a/27531555
has answer: http://stackoverflow.com/a/27550653
accepted answer: http://stackoverflow.com/a/27550653

javascript
tags question: http://stackoverflow.com/q/27582986
tags question: http://stackoverflow.com/q/27590666
tags question: http://stackoverflow.com/q/27520282
tags question: http://stackoverflow.com/q/27566314
tags question: http://stackoverflow.com/q/27529886
tags question: http://stackoverflow.com/q/27553594
tags question: http://stackoverflow.com/q/27631619
tags question: http://stackoverflow.com/q/27597828
tags question: http://stackoverflow.com/q/27609234
tags question: http://stackoverflow.com/q/27474911
tags question: http://stackoverflow.com/q/27574705
tags question: http://stackoverflow.com/q/27585547
tags question: http://stackoverflow.com/q/27542928
tags question: http://stackoverflow.com/q/27523296
tags question: http://stackoverflow.com/q/27534518
tags question: http://stackoverflow.com/q/27615710
tags question: http://stackoverflow.com/q/27582679
tags question: http://stackoverflow.com/q/27530428
tags question: http://stackoverflow.com/q/27491439
tags question: http://stackoverflow.com/q/27476654
tags question: http://stackoverflow.com/q/27509325
tags question: http://stackoverflow.com/q/27580298
tags question: http://stackoverflow.com/q/27478541
tags question: http://stackoverflow.com/q/27533592
tags question: http://stackoverflow.com/q/27536353
tags question: http://stackoverflow.com/q/27552661
tags question: http://stackoverflow.com/q/27602932
tags question: http://stackoverflow.com/q/27572696
tags question: http://stackoverflow.com/q/27556530
tags question: http://stackoverflow.com/q/27639751
tags question: http://stackoverflow.com/q/27581193
tags question: http://stackoverflow.com/q/27554059
tags question: http://stackoverflow.com/q/27562231
tags question: http://stackoverflow.com/q/27545511
tags question: http://stackoverflow.com/q/27619051
tags question: http://stackoverflow.com/q/27606331
tags question: http://stackoverflow.com/q/27568402
tags question: http://stackoverflow.com/q/27628264
tags question: http://stackoverflow.com/q/27631326
tags question: http://stackoverflow.com/q/27558959
tags question: http://stackoverflow.com/q/27607729
tags question: http://stackoverflow.com/q/27552737
tags question: http://stackoverflow.com/q/27481198
tags question: http://stackoverflow.com/q/27482676
tags question: http://stackoverflow.com/q/27486982
tags question: http://stackoverflow.com/q/27520418
tags question: http://stackoverflow.com/q/27638828
tags question: http://stackoverflow.com/q/27502792
tags question: http://stackoverflow.com/q/27639984
tags question: http://stackoverflow.com/q/27588775
tags question: http://stackoverflow.com/q/27607041
tags question: http://stackoverflow.com/q/27579819
tags question: http://stackoverflow.com/q/27638541
tags question: http://stackoverflow.com/q/27566590
tags question: http://stackoverflow.com/q/27594391
tags question: http://stackoverflow.com/q/27553353
tags question: http://stackoverflow.com/q/27597889
tags question: http://stackoverflow.com/q/27639323
tags question: http://stackoverflow.com/q/27546984
tags question: http://stackoverflow.com/q/27538494
tags question: http://stackoverflow.com/q/27580933
tags question: http://stackoverflow.com/q/27527797
tags question: http://stackoverflow.com/q/27570877
tags question: http://stackoverflow.com/q/27585096
tags question: http://stackoverflow.com/q/27622032
tags question: http://stackoverflow.com/q/27591401
tags question: http://stackoverflow.com/q/27489015
tags question: http://stackoverflow.com/q/27510009
tags question: http://stackoverflow.com/q/27552132
tags question: http://stackoverflow.com/q/27538458
tags question: http://stackoverflow.com/q/27588551
tags question: http://stackoverflow.com/q/27485804
tags question: http://stackoverflow.com/q/27637597
tags question: http://stackoverflow.com/q/27573020
tags question: http://stackoverflow.com/q/27486819
tags question: http://stackoverflow.com/q/27500654
tags question: http://stackoverflow.com/q/27558398
tags question: http://stackoverflow.com/q/27637956
tags question: http://stackoverflow.com/q/27538770
tags question: http://stackoverflow.com/q/27509500

jquery
tags question: http://stackoverflow.com/q/27486864
tags question: http://stackoverflow.com/q/27578664
tags question: http://stackoverflow.com/q/27635784
tags question: http://stackoverflow.com/q/27490155
tags question: http://stackoverflow.com/q/27505126
tags question: http://stackoverflow.com/q/27634486
tags question: http://stackoverflow.com/q/27492332
tags question: http://stackoverflow.com/q/27606994
tags question: http://stackoverflow.com/q/27524567
tags question: http://stackoverflow.com/q/27621334
tags question: http://stackoverflow.com/q/27489467
tags question: http://stackoverflow.com/q/27545322
tags question: http://stackoverflow.com/q/27497411
tags question: http://stackoverflow.com/q/27486369
tags question: http://stackoverflow.com/q/27638909
tags question: http://stackoverflow.com/q/27552806
tags question: http://stackoverflow.com/q/27621505
tags question: http://stackoverflow.com/q/27589270
tags question: http://stackoverflow.com/q/27524804
tags question: http://stackoverflow.com/q/27486733
tags question: http://stackoverflow.com/q/27503565
tags question: http://stackoverflow.com/q/27614800
tags question: http://stackoverflow.com/q/27558614
tags question: http://stackoverflow.com/q/27570005
tags question: http://stackoverflow.com/q/27586392
tags question: http://stackoverflow.com/q/27587065
tags question: http://stackoverflow.com/q/27490151
tags question: http://stackoverflow.com/q/27603112
tags question: http://stackoverflow.com/q/27493732
tags question: http://stackoverflow.com/q/27542951
tags question: http://stackoverflow.com/q/27578889
tags question: http://stackoverflow.com/q/27533696
tags question: http://stackoverflow.com/q/27538144
tags question: http://stackoverflow.com/q/27572916
tags question: http://stackoverflow.com/q/27511060
tags question: http://stackoverflow.com/q/27636094
tags question: http://stackoverflow.com/q/27557675
tags question: http://stackoverflow.com/q/27597726
tags question: http://stackoverflow.com/q/27606356
tags question: http://stackoverflow.com/q/27609755
tags question: http://stackoverflow.com/q/27493070
tags question: http://stackoverflow.com/q/27616873
tags question: http://stackoverflow.com/q/27529932
tags question: http://stackoverflow.com/q/27557075
tags question: http://stackoverflow.com/q/27557098
tags question: http://stackoverflow.com/q/27527559
tags question: http://stackoverflow.com/q/27581969
tags question: http://stackoverflow.com/q/27567913
tags question: http://stackoverflow.com/q/27517406
tags question: http://stackoverflow.com/q/27636762
tags question: http://stackoverflow.com/q/27576143
tags question: http://stackoverflow.com/q/27566389
tags question: http://stackoverflow.com/q/27530597
tags question: http://stackoverflow.com/q/27501638
tags question: http://stackoverflow.com/q/27538435
tags question: http://stackoverflow.com/q/27476061
tags question: http://stackoverflow.com/q/27524084
tags question: http://stackoverflow.com/q/27639683
tags question: http://stackoverflow.com/q/27529322
tags question: http://stackoverflow.com/q/27569431
tags question: http://stackoverflow.com/q/27607293
tags question: http://stackoverflow.com/q/27572425
tags question: http://stackoverflow.com/q/27495052
tags question: http://stackoverflow.com/q/27578223
tags question: http://stackoverflow.com/q/27574778
tags question: http://stackoverflow.com/q/27509968
tags question: http://stackoverflow.com/q/27597361
tags question: http://stackoverflow.com/q/27564757
tags question: http://stackoverflow.com/q/27497446
tags question: http://stackoverflow.com/q/27494570
tags question: http://stackoverflow.com/q/27600113
tags question: http://stackoverflow.com/q/27620022
tags question: http://stackoverflow.com/q/27548275
tags question: http://stackoverflow.com/q/27569354
tags question: http://stackoverflow.com/q/27532886
tags question: http://stackoverflow.com/q/27484513
tags question: http://stackoverflow.com/q/27562733
tags question: http://stackoverflow.com/q/27592606
tags question: http://stackoverflow.com/q/27567927
tags question: http://stackoverflow.com/q/27574394

http://stackoverflow.com/q/27599352
has answer: http://stackoverflow.com/a/27599445
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/27599393
tagged with: http://stackoverflow.com/tag/html
has title: Animating using onmousedown when clicking on background
score: 0
tagged with: background-image
answer count: 3
has body: I have a small image in my HTML page. I need that to be animated when I click the BackGround of the page? I know that I have to achieve this by the onmousefunction but when I add that function to the body tag it does not work.
upvote count: 1
has answer: http://stackoverflow.com/a/27599432
downvote count: 1
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/q/27525376
possible better answer: http://stackoverflow.com/a/27532686
has answer: http://stackoverflow.com/a/27532686
accepted answer: http://stackoverflow.com/a/27527942
downvote count: 1
type: Question
answer count: 2
has body: var server = net.createServer(function(c) { //... c.on('data', function(data) { //The data is all data, but what if I need only first N and do not need other data, yet. c.write(data); }); //... }; Is there a way to read only defined portion of data? For example: c.on('data', N, function(data) { //Read first N bytes }); Where N is number of bytes I expect. So the callback gets only N out of M bytes. The solution is (thanks to mscdex): c.on('readable', function() { var chunk, N = 4; while (null !== (chunk = c.read(N))) { console.log('got %d bytes of data', chunk.length); } });
upvote count: 12
tagged with: javascript
has answer: http://stackoverflow.com/a/27527942
favorite count: 0
tagged with: buffer
has comment: http://stackoverflow.com/comment/44247345
tagged with: sockets
score: 11
has title: Read only first N bytes from socket in node.js
tagged with: node.js
type: AnsweredQuestion

http://stackoverflow.com/comment/43561952
score: 0
has text: if you want the behavior bound to checkbox, why are you applying click handler to row instead of to the checkboxes?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27568146

http://stackoverflow.com/q/27598260
tagged with: angularjs
answer count: 4
has answer: http://stackoverflow.com/a/27598349
has answer: http://stackoverflow.com/a/27598444
upvote count: 1
has answer: http://stackoverflow.com/a/27598339
type: Question
type: AnsweredQuestion
has title: Working difference between javascript [],[[]] and [{}] when used with ng-repeat in angularJS
score: 1
possible better answer: http://stackoverflow.com/a/27598345
has body: I have created a form to add multiple users information dynamically. It working fine. But there is a question in my mind about working ofarrayandarray of objectinsideng-repeat.If I use$scope.users = []; and $scope.users=[{}], ng-repeat works differently. With $scope.users = [], view appears blank,and$scope.users = [{}], view appears correctly. I have created fiddle link for both. Can anyone explain me what exactly happening here. Link with $scope.users = [ ], is: http://jsfiddle.net/9Ymvt/2799/ Link with $cope.users = [{ }], is :http://jsfiddle.net/9Ymvt/2800/ Update: If I use $scope.users = [[]], It works fine, but the data is not binding first time, as it is binding in $scope.users = [{}]. Data only binds when I click ob addMore users button Here is the Fiddle link: http://jsfiddle.net/9Ymvt/2801/ What I am thinking , If the data is binding with [{}], why not with [[]];
has answer: http://stackoverflow.com/a/27598345
downvote count: 0
accepted answer: http://stackoverflow.com/a/27598339
tagged with: javascript
favorite count: 0

http://stackoverflow.com/a/27563358
type: Answer
has comment: http://stackoverflow.com/comment/43599679
has comment: http://stackoverflow.com/comment/43658185
has comment: http://stackoverflow.com/comment/43575509
has comment: http://stackoverflow.com/comment/43561731
has comment: http://stackoverflow.com/comment/43595911
has body: Update The last answer was wrong, this works but I still think I can do better: // call fn at most count times per delay. const debounce = function (fn, delay, count) { let working = 0, queue = []; function work() { if ((queue.length === 0) || (working === count)) return; working++; Promise.delay(delay).tap(() =&gt; working--).then(work); let {context, args, resolve} = queue.shift(); resolve(fn.apply(context, args)); } return function debounced() { return new Promise(resolve =&gt; { queue.push({context: this, args: arguments, resolve}); if (working &lt; count) work(); }); }; }; function mockRequest() { console.log("making request"); return Promise.delay(Math.random() * 100); } var bounced = debounce(mockRequest, 800, 5); for (var i = 0; i &lt; 5; i++) bounced(); setTimeout(function(){ for (var i = 0; i &lt; 20; i++) bounced(); },2000); So you need to make the requests throttle function-wide - that's fine. Promises have queueing pretty much built in. var p = Promise.resolve(); // our queue function makeRequest(){ p = p.then(function(){ // queue the promise, wait for the queue return request("http://www.google.com"); }); var p2 = p; // get a local reference to the promise // add 1000 ms delay to queue so the next caller has to wait p = p.delay(1000); return p2; }; Now makeRequest calls will be at least 1000ms apart. jfriend has pointed out that you need two requests per second and not a single one - this is just as easily solvable with a second queue: var p = Promise.resolve(1); // our first queue var p2 = Promise.resolve(2); // our second queue function makeRequest(){ var turn = Promise.any([p, p2]).then(function(val){ // add 1000 ms delay to queue so the next caller has to wait // here we wait for the request too although that's not really needed, // check both options out and decide which works better in your case if(val === 1){ p = p.return(turn).delay(1, 1000); } else { p2 = p2.return(turn).delay(1, 1000); } return request("http://www.google.com"); }); return tur…
has comment: http://stackoverflow.com/comment/43578048
has comment: http://stackoverflow.com/comment/43552531
has comment: http://stackoverflow.com/comment/43578067
has comment: http://stackoverflow.com/comment/45245718
upvote count: 5
has comment: http://stackoverflow.com/comment/43656911
has comment: http://stackoverflow.com/comment/43552542
has comment: http://stackoverflow.com/comment/43562202
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43552276
has comment: http://stackoverflow.com/comment/43572964
accepted answer of: http://stackoverflow.com/q/27561158
has comment: http://stackoverflow.com/comment/43582178
has comment: http://stackoverflow.com/comment/43570650
has comment: http://stackoverflow.com/comment/43597317
answers question: http://stackoverflow.com/q/27561158
has comment: http://stackoverflow.com/comment/43656992
score: 5
has comment: http://stackoverflow.com/comment/45244403

ajax
tags question: http://stackoverflow.com/q/27600506
tags question: http://stackoverflow.com/q/27625455
tags question: http://stackoverflow.com/q/27497527
tags question: http://stackoverflow.com/q/27521713
tags question: http://stackoverflow.com/q/27574579
tags question: http://stackoverflow.com/q/27530621
tags question: http://stackoverflow.com/q/27535491
tags question: http://stackoverflow.com/q/27636099
tags question: http://stackoverflow.com/q/27518580
tags question: http://stackoverflow.com/q/27497100
tags question: http://stackoverflow.com/q/27630672
tags question: http://stackoverflow.com/q/27608614
tags question: http://stackoverflow.com/q/27571221
tags question: http://stackoverflow.com/q/27508619
tags question: http://stackoverflow.com/q/27621181
tags question: http://stackoverflow.com/q/27532017
tags question: http://stackoverflow.com/q/27525771
tags question: http://stackoverflow.com/q/27622270
tags question: http://stackoverflow.com/q/27596848
tags question: http://stackoverflow.com/q/27590625
tags question: http://stackoverflow.com/q/27610080
tags question: http://stackoverflow.com/q/27488832
tags question: http://stackoverflow.com/q/27504668
tags question: http://stackoverflow.com/q/27550416
tags question: http://stackoverflow.com/q/27519616
tags question: http://stackoverflow.com/q/27597710
tags question: http://stackoverflow.com/q/27570005
tags question: http://stackoverflow.com/q/27606014
tags question: http://stackoverflow.com/q/27520053
tags question: http://stackoverflow.com/q/27609755
tags question: http://stackoverflow.com/q/27522911
tags question: http://stackoverflow.com/q/27635738
tags question: http://stackoverflow.com/q/27488275
tags question: http://stackoverflow.com/q/27561282
tags question: http://stackoverflow.com/q/27584758
tags question: http://stackoverflow.com/q/27556850
tags question: http://stackoverflow.com/q/27531623
tags question: http://stackoverflow.com/q/27519190
tags question: http://stackoverflow.com/q/27548709
tags question: http://stackoverflow.com/q/27569532
tags question: http://stackoverflow.com/q/27548505
tags question: http://stackoverflow.com/q/27630341
tags question: http://stackoverflow.com/q/27489436
tags question: http://stackoverflow.com/q/27588990
tags question: http://stackoverflow.com/q/27605721
tags question: http://stackoverflow.com/q/27605732
tags question: http://stackoverflow.com/q/27497581
tags question: http://stackoverflow.com/q/27574242
tags question: http://stackoverflow.com/q/27619106
tags question: http://stackoverflow.com/q/27491729
tags question: http://stackoverflow.com/q/27550775
tags question: http://stackoverflow.com/q/27610184
type: Tag
tags question: http://stackoverflow.com/q/27567127
tags question: http://stackoverflow.com/q/27627806
tags question: http://stackoverflow.com/q/27602797
tags question: http://stackoverflow.com/q/27482980
tags question: http://stackoverflow.com/q/27564832
tags question: http://stackoverflow.com/q/27577313
tags question: http://stackoverflow.com/q/27529172
tags question: http://stackoverflow.com/q/27489343
tags question: http://stackoverflow.com/q/27511088
tags question: http://stackoverflow.com/q/27525544
tags question: http://stackoverflow.com/q/27559549
tags question: http://stackoverflow.com/q/27607145
tags question: http://stackoverflow.com/q/27478808
tags question: http://stackoverflow.com/q/27491380
tags question: http://stackoverflow.com/q/27513632
tags question: http://stackoverflow.com/q/27486177
tags question: http://stackoverflow.com/q/27591160
tags question: http://stackoverflow.com/q/27542167
tags question: http://stackoverflow.com/q/27534221
tags question: http://stackoverflow.com/q/27489866
tags question: http://stackoverflow.com/q/27604518
tags question: http://stackoverflow.com/q/27506373
tags question: http://stackoverflow.com/q/27506310
tags question: http://stackoverflow.com/q/27639485
tags question: http://stackoverflow.com/q/27611131
tags question: http://stackoverflow.com/q/27520460
tags question: http://stackoverflow.com/q/27593634

http://stackoverflow.com/comment/43548108
has text: @Vohuman I didn't think you voted. I just wanted to comment on the downvote in case that person gets a notification. Thanks for your suggestion, though! I think I'd mark it as the answer (if you'd provide it as the answer), because gruntjs looks really promising.
score: 0
comment on: http://stackoverflow.com/q/27560886
type: Comment
type: QuestionComment

jhipster
tag name: jhipster
tags question: http://stackoverflow.com/q/27591118
type: Tag

http://stackoverflow.com/comment/43414268
has text: I think, issue in your `.filter('date',`
comment on: http://stackoverflow.com/a/27491021
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27601509
downvote count: 0
has body: you need to use event delegation here: $("body").on('click','.a_shops',function(){ $('.i_find div:eq(0)').replaceWith(' Goods '); $('.i_find div:eq(1)').replaceWith(' Shops '); }); $("body").on('click','.a_goods',function(){ $('.i_find div:eq(0)').replaceWith(' Goods '); $('.i_find div:eq(1)').replaceWith(' Shops '); }); Working Demo
type: Answer
answers question: http://stackoverflow.com/q/27601452
score: 1
upvote count: 1

http://stackoverflow.com/q/27624825
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43670278
has answer: http://stackoverflow.com/a/27624946
answer count: 3
has body: I am loading a page mypage.php and in div1 I include example.php from the same server. The script is : &lt;script&gt; $(document).ready(function(){ $("#div1").load("example.php"); }); &lt;/script&gt; How can I add a loading.gif in while example.php is loading the content? I want to show the loading.gif only until the content loads.
favorite count: 0
type: UnansweredQuestion
score: 6
tagged with: php
has title: Display a loading gif in a div until div loads content from other page
has answer: http://stackoverflow.com/a/27625006
type: Question
has answer: http://stackoverflow.com/a/31632365
upvote count: 6
downvote count: 0

http://stackoverflow.com/a/27536595
accepted answer of: http://stackoverflow.com/q/27536536
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/27536536
has body: In your current regex, you're not looking for any of those things - you're looking for all three in a row. Also, \D doesn't mean "non-hyphen", it means "not a digit". You want to search for anything that doesn't match your whitelist: (/[^\w\s\-]/).test('hello!') // true (/[^\w\s\-]/).test('hello') // false (/[^\w\s\-]/).test('hello-there') // also false
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/27554725
has body: You have a simple logic error - you should not include this.model.get(name) === '' in your check. In fact, the preceding if means that you cannot set the Model's name attribute to an empty String. Therefore, unless you could set it to an empty String elsewhere in your application, the else if condition can never be met. This should work as you expect: if (value !== '') { this.model.set(name, value); } else if ( this.model.has(name)) { this.model.unset(name); }
score: 1
answers question: http://stackoverflow.com/q/27554501
has comment: http://stackoverflow.com/comment/43535883
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43535804
type: Answer
accepted answer of: http://stackoverflow.com/q/27554501
downvote count: 0

http://stackoverflow.com/comment/43616228
type: QuestionComment
comment on: http://stackoverflow.com/q/27595711
has text: Making a fiddle now.
score: 0
type: Comment

http://stackoverflow.com/comment/43577371
comment on: http://stackoverflow.com/q/27537374
score: 0
has text: @torazaburo thanks for your help - Now, (I don't know why) but I'm getting a different error: In my folder, I open the HTML document in my browser (Chrome), and try to run. I open the console via F12, and get this line in the console: "XMLHttpRequest cannot load file://api.soundcloud.com/tracks?genres=soundtrack&client_id=6e6078f1408f62443f757b4c34d55e12&format=json&_status_code_map[302]=200. Cross origin requests are only supported for protocol schemes: http, data, chrome-extension, https, chrome-extension-resource.sdk.js:1 window.SC.SC.Helper.merge._xhrRequest"
type: QuestionComment
type: Comment

http://stackoverflow.com/q/27633121
has answer: http://stackoverflow.com/a/27633417
tagged with: css
has title: Load webfont only if font not available locally
upvote count: 2
tagged with: fonts
accepted answer: http://stackoverflow.com/a/27633417
type: Question
type: AnsweredQuestion
has body: I saw Remy Sharp's solution on how to detect whether a font exists, but it's a really old implementation. https://remysharp.com/2008/07/08/how-to-detect-if-a-font-is-installed-only-using-javascript Is there a better way to do this now?
tagged with: javascript
score: 2
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0

http://stackoverflow.com/a/27622651
type: Answer
upvote count: 6
accepted answer of: http://stackoverflow.com/q/27622621
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27622621
score: 6
has body: You're (re)registering the .click handler every time the .mouseup handler is invoked. Just do it once, outside of the handler. Aldo, don't write $() around the call to selHTML() - it's invoking jQuery but will have no effect has you're discarding the result.

http://stackoverflow.com/comment/43573816
type: QuestionComment
comment on: http://stackoverflow.com/q/27574145
type: Comment
has text: Create a directive with 2 way binding, So you could bind with any model as you need and the template becomes as reusable as a component.
score: 0

http://stackoverflow.com/q/27635870
answer count: 1
linked to: http://stackoverflow.com/q/26973751
favorite count: 0
has answer: http://stackoverflow.com/a/27636883
accepted answer: http://stackoverflow.com/a/27636883
has title: xml processing in worklight adapter
tagged with: ibm-mobilefirst
type: AnsweredQuestion
has body: When we process XML in client side, we can use jQuery like: var kids = jQuery(" ABC BCD ").find("kid"); , now in adapter implementation script (i.e. MyAdapter-impl.js), can we have a similar solution to iterate over XML text or extract/update DOM nodes simply? , currently I use Java function to do it, I'm looking for JavaScript solution.
downvote count: 0
score: 1
linked to: http://stackoverflow.com/q/15350362
type: Question
tagged with: javascript
tagged with: serverside-javascript
upvote count: 1

http://stackoverflow.com/comment/43562697
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27568669
type: QuestionComment
has text: Do one thing post your code on Plunker as you given above link.

http://stackoverflow.com/comment/43478475
score: 0
type: AnswerComment
has text: Getting this Error: Error: cannot call methods on dialog prior to initialization; attempted to call method 'open'
type: Comment
comment on: http://stackoverflow.com/a/27524105

http://stackoverflow.com/a/27530181
has body: It is not clear what your problem is. I use remote combo follows: Ext.define('ComboRemote', { extend: 'Ext.form.ComboBox', xtype: 'ComboRemote', emptyText: 'empty', width: 75, displayField: 'name', valueField: 'id', store: { model: 'ComboModel', proxy: { type: 'rest', url: '/serv/Res', extraParams: { query: '' }, reader: { root: "result", type: 'json' } }, autoLoad: true, }, queryMode: 'remote', pageSize: false, lastQuery: '', minChars: 0}); Ext.define('ComboModel', { extend: 'Ext.data.Model', fields: [ 'id', 'name' ]}); I hope to help
upvote count: 1
answers question: http://stackoverflow.com/q/27525829
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/a/27522993
has comment: http://stackoverflow.com/comment/43475339
answers question: http://stackoverflow.com/q/27522902
score: 1
type: Answer
upvote count: 1
has body: Why not use cookies with PHP? $popup = " This popup is awesome "; if($_COOKIE["PopupShown"] != true){ echo $popup; } setcookie("PopupShown", true); For example.. More info here: http://php.net/manual/en/function.setcookie.php
downvote count: 0

http://stackoverflow.com/a/27486292
has comment: http://stackoverflow.com/comment/43406147
accepted answer of: http://stackoverflow.com/q/27485654
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27485654
has comment: http://stackoverflow.com/comment/43406076
has comment: http://stackoverflow.com/comment/43409069
has comment: http://stackoverflow.com/comment/43407615
type: Answer
has comment: http://stackoverflow.com/comment/43405650
has body: Since you only use basic rotations, you have the straightforward formulas for each rotation : The rotation you want to operate is the multiplication of these matrices. The order is important, but because you get your angles from a gyroscopic device, I will assume a conventional order of : roll (around x axis, a or gamma in this post's notations), pitch (around y axis, b or beta), and finally yaw (around z-axis, c or alpha). Here is the general explicit (and pretty ugly) matrix formulation for you, showing in which order the three rotations have to be performed (from http://planning.cs.uiuc.edu/node102.html). You then multiply your vectors by this matrix R (with your vector as a column vector on the right-hand side), and you're done. So you javascript code for the matrix is : var ca = Math.cos(a), sa = Math.sin(a); var cb = Math.cos(b), sb = Math.sin(b); var cc = Math.cos(c), sc = Math.sin(c); var mat = [[cc*cb, cc*sb*sa-sc*ca, cc*sb*ca+sc*sa], [sc*cb, sc*sb*sa+cc*ca, sc*sb*ca-cc*sa], [-sb, cb*sa, cb*ca]]; // x is any vector you want to rotate var x = [/* value on x axis */, /* value on y axis */, /* value on z axis */]; // this is the value of x once it is rotated var rot_x = [mat[0][0]*x[0]+mat[0][1]*x[1]+mat[0][2]*x[2], mat[1][0]*x[0]+mat[1][1]*x[1]+mat[1][2]*x[2], mat[2][0]*x[0]+mat[2][1]*x[1]+mat[2][2]*x[2]]; You can see from the general formula that if you rotate the vectors of the standard basis, you get the first column of the matrix for [1,0,0], the second column for [0,1,0] and the third column for [0,0,1], which is simpler. However the above formula is general and always works.
has comment: http://stackoverflow.com/comment/43407403
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/43405068
has comment: http://stackoverflow.com/comment/43406754
upvote count: 2

http://stackoverflow.com/comment/43495662
score: 0
has text: I think the problem here was your `og:url` tag on the individual `/share.php?file=xxxx` URLs was pointing to `http://www.jajo.net/odditree/` - this redirects Facebook's crawler to that URL to get the metadata - you should see this in the debug tool output showing which URLs it traversed to get the metadata for the input URL
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27513600

http://stackoverflow.com/q/27582275
linked to: http://stackoverflow.com/q/16056591
has comment: http://stackoverflow.com/comment/43588975
tagged with: fonts
has comment: http://stackoverflow.com/comment/43588963
type: Question
has comment: http://stackoverflow.com/comment/43589033
has comment: http://stackoverflow.com/comment/43590360
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27582499
tagged with: responsive-design
tagged with: javascript
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/43588922
accepted answer: http://stackoverflow.com/a/27582499
has comment: http://stackoverflow.com/comment/43589081
tagged with: css
has body: I'm looking for a way to set different width and height separately based on viewport width and height. Is it possible in css or js?
has comment: http://stackoverflow.com/comment/43589014
has title: Set different width and height to font in css/js

http://stackoverflow.com/comment/43488566
type: Comment
type: QuestionComment
score: 1
has text: How about split your message into strings, which have max 512 characters, and print them all in separate notices? `parts = str.match(/.{1,512}/g)`
comment on: http://stackoverflow.com/q/27523844

http://stackoverflow.com/q/27501530
accepted answer: http://stackoverflow.com/a/27501949
has comment: http://stackoverflow.com/comment/43433903
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/43433556
answer count: 1
has comment: http://stackoverflow.com/comment/43433857
has comment: http://stackoverflow.com/comment/43433816
tagged with: jquery
favorite count: 0
has body: I got this 'ReferenceError: display is not defined' where my script link are as below. I replace them with latest version 1.11.1 and tried with But still there is Reference Error. What should i change my display function(Script): function display(view) { if (view == 'list') { $('.product-grid').attr('class', 'product-list'); $('.product-list > div').each(function(index, element) { html = ' '; var image = $(element).find('.image').html(); if (image != null) { html += ' ' + image + ' '; } html += ' '; html += ' ' + $(element).find('.wishlist').html() + ' '; html += ' ' + $(element).find('.compare').html() + ' '; html += ' '; html += ' ' + $(element).find('.name').html() + ' '; html += ' ' + $(element).find('.description').html() + ' '; var rating = $(element).find('.rating').html(); if (rating != null) { html += ' ' + rating + ' '; } var price = $(element).find('.price').html(); if (price != null) { html += ' ' + price + ' '; } html += ' ' + $(element).find('.cart').html() + ' '; html += ' ' + $(element).find('.cart-phone').html() + ' '; html += ' '; $(element).html(html); }); $('.display').html(' <a id="grid_a" title="<?php echo $text_grid; ?>" onclick="display(\'grid\');">'); $.totalStorage('display', 'list'); } else { $('.product-list').attr('class', 'product-grid'); $('.product-grid > div').each(function(index, element) { html = ''; var image = $(element).find('.image').html(); if (image != null) { html += ' ' + image + ' '; } html += ' '; html += ' ' + $(element).find('.wishlist').html() + ' '; html += ' ' + $(element).find('.compare').html() + ' '; html += ' '; html += ' ' + $(element).find('.name').html() + ' '; html += ' ' + $(element).find('.description').html() + ' '; var rating = $(element).find('.rating').html(); if (rating != null) { html += ' ' + rating + ' '; } var price = $(element).find('.price').html(); if (price != null) { html += ' ' + price + ' '; } html += ' ' + $(element).find('.cart').html() + ' '; html += ' ' + $(element).find('.cart-phone').h…
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/7065120
has title: ReferenceError: display is not defined
has answer: http://stackoverflow.com/a/27501949
has comment: http://stackoverflow.com/comment/43434176
upvote count: 1
has comment: http://stackoverflow.com/comment/43433936
downvote count: 1
has comment: http://stackoverflow.com/comment/43433928
type: Question

http://stackoverflow.com/comment/43513408
score: 1
comment on: http://stackoverflow.com/q/27543119
type: Comment
type: QuestionComment
has text: Why you use `{0,4}`?

http://stackoverflow.com/comment/43395528
type: AnswerComment
type: Comment
score: 1
has text: Thanks for this, but before I try this I want to try another way: my idea is to create the module in the parent - parent.angular.module(...), so the dependency should work. Now I have the Problem, that I need to "execute" angular in the HTML-File, which is loaded in the iframe, but when I load angular again the connection gets lost (of course...), maybe I could send the angular instance from the parent down to the child or something, so that the directives gets solved ...
comment on: http://stackoverflow.com/a/27480589

http://stackoverflow.com/a/27570625
answers question: http://stackoverflow.com/q/27570555
downvote count: 0
has body: "south": [ 1, 0, 1 -1, 1, 1], ^ You missed a comma here, so there's only 5 elements in this array. That's why you get undefined when trying to read the 6th element.
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/q/27523298
type: UnansweredQuestion
score: -3
tagged with: php
has comment: http://stackoverflow.com/comment/43475652
upvote count: 0
has comment: http://stackoverflow.com/comment/43475566
has answer: http://stackoverflow.com/a/27523605
has comment: http://stackoverflow.com/comment/43475488
type: Question
has title: Ajax response array
answer count: 2
has comment: http://stackoverflow.com/comment/43587309
has body: I want to insert ajax response array into form select input. for the purpose i want to look into array. here is my function; function _get_student_failed_classes() { $failed_classes=$this-&gt;db-&gt;select('class_student.class_id,course.course_code,course.course_name,course.course_credit') -&gt;join('class','class.class_id=class_student.class_id','LEFT') -&gt;join('course','course.course_id=class.class_course','LEFT') -&gt;where('class.class_status',$active) -&gt;where('class_student.class_marks &lt;=',50) -&gt;where('class_student.student_id',$std_code) -&gt;order_by('class.class_id') -&gt;get('class_student')-&gt;result(); echo $failed_classes; } and here is my ajax call in form $.ajax({ url: '&lt;?php echo base_url()."index.php/student/get_student_failed_classes/s-14-1"; ?&gt;', type: 'POST', data: std_code, success: function(response) { alert(response); }, error: function() { alert(error); } I get the response is [] the actual array looks like this Array ( [0] =&gt; stdClass Object ( [class_id] =&gt; 3 [course_code] =&gt; cs3 [course_name] =&gt; cs3 [course_credit] =&gt; 3 ) [1] =&gt; stdClass Object ( [class_id] =&gt; 4 [course_code] =&gt; cs4 [course_name] =&gt; cs4 [course_credit] =&gt; 4 ) [2] =&gt; stdClass Object ( [class_id] =&gt; 5 [course_code] =&gt; cs5 [course_name] =&gt; cs5 [course_credit] =&gt; 3 ) ) can some one help me out on this
tagged with: arrays
tagged with: javascript
tagged with: jquery
tagged with: ajax
downvote count: 3
has comment: http://stackoverflow.com/comment/43508643
has comment: http://stackoverflow.com/comment/43477249
favorite count: 0
has comment: http://stackoverflow.com/comment/43475904
has answer: http://stackoverflow.com/a/27523383

http://stackoverflow.com/comment/43632554
type: AnswerComment
comment on: http://stackoverflow.com/a/27604327
type: Comment
has text: @user2330270: The CSS and JS responses don't need to be explicitly loaded. If the HTML document being loaded into the `iframe` has a `link` element and a `script` element which reference the CSS and JS "actions" respectively, the browser will request those resources when the HTML loads in the frame.
score: 0

http://stackoverflow.com/q/27516467
upvote count: 1
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/43470558
type: Question
has body: I have an array of JSON objects that is being filtered by a search. In the search, I have the ng-model on the search set to search.$, but it only searches through the top part of each of the objects, but I need to to search all the objects nested inside of the objects. Is there an easy way to do that in Angular?
accepted answer: http://stackoverflow.com/a/27520676
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has title: Angular - Filter on nested objects
tagged with: angular-filters
tagged with: angularjs
has answer: http://stackoverflow.com/a/27520676

http://stackoverflow.com/a/27524325
type: Answer
upvote count: 2
score: 2
answers question: http://stackoverflow.com/q/27524232
has comment: http://stackoverflow.com/comment/43478441
downvote count: 0
has body: In javascript, objects are basically hash-maps, meaning that looking up a certain value given a key is a constant O(1) cost operation. That makes objects ideal for lookup-based functionality, so you probably want to go with objects, so there will be no need for sorting (of course, objects by definition are an unsorted collection of their key-value pairs), and the lookup will be fast regardless. Do note though that in JS arrays are also objects, with the same lookup properties, the only difference is that they follow the convention of using subsequent integers for keys. If your IDs are integers, you can also create a sort of sparse array by using the IDs as indexes, but that's basically the same as creating an object with the IDs as keys.

http://stackoverflow.com/q/27504588
tagged with: firefox-addon-sdk
answer count: 0
type: UnansweredQuestion
upvote count: 1
score: 1
tagged with: eclipse
type: Question
downvote count: 0
has body: Is there a way to configure Eclipse to be aware of the firefox addon-sdk libraries .. in such a way that if errors exist on api methods they are underlined like normal javascript errors? Simple test using self api from addon-sdk .. var data = require("sdk/self").data; exports.get = function(content) { return data.url(content); } If I remove content from data.url() there is no error or warning in my IDE, instead I only see the error at runtime, which seems pretty late .. var data = require("sdk/self").data; exports.get = function(content) { return data.url(); }
tagged with: javascript
favorite count: 0
has title: Setup eclipse to validate firefox addon-sdk libraries

http://stackoverflow.com/comment/43650163
type: AnswerComment
has text: An explanation of what you are doing and comparing it to Mritunjay's answer would certainly be good.
type: Comment
score: 3
comment on: http://stackoverflow.com/a/27613995

http://stackoverflow.com/a/27636116
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/43692133
has body: The reason this is not possible is that this is not something you'll usually want to do in Angular - you're most likely still "thinking like you're using jQuery". Please elaborate on why you want to manipulate the DOM yourself in the first place. Most likely it's a different problem that you can solve with e.g. a directive. (This may sound like a lame answer, but "don't do this" very likely is the only correct way to handle this situation.)
has comment: http://stackoverflow.com/comment/43746949
answers question: http://stackoverflow.com/q/27600010
downvote count: 0
type: Answer

http://stackoverflow.com/a/27536301
upvote count: 5
has comment: http://stackoverflow.com/comment/43501160
has comment: http://stackoverflow.com/comment/43501315
has comment: http://stackoverflow.com/comment/43501431
has comment: http://stackoverflow.com/comment/43501295
score: 5
has body: Change the access of terms.currentTerm.length to be terms[currentTerm].length. That should fix your error. Explanation In the first iteration of the first for loop, for example, terms.currentTerm does not access terms.day. It instead accesses the property named currentTerm on your terms object. This property does not exist—terms has no property named currentTerm—and trying to access length on an object that does not exist produces an error. If you want to access a property on terms with the same name as the value of your currentTerm variable, use bracket notation so the value of currentTerm gets used instead: terms[currentTerm]. The interpreter "reads" this as terms['day'], which is what you really want.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43501479
has comment: http://stackoverflow.com/comment/43501360
has comment: http://stackoverflow.com/comment/43501377
type: Answer
answers question: http://stackoverflow.com/q/27536190
accepted answer of: http://stackoverflow.com/q/27536190

http://stackoverflow.com/a/27629508
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27475232
score: 1
answers question: http://stackoverflow.com/q/27475232
has comment: http://stackoverflow.com/comment/43779792
type: AcceptedAnswer
downvote count: 0
has body: Not sure why you want this approach, perhaps it can be refactored? Probably better to have some sort of PersonMediator "class" in my opinion. But, if you want to have the prototype include an active array that has conditions, then attach some way to manage those conditions to the Person object. var Person = function( age, name ){ this.age = age; this.namge = name; //checks for activation flag this.ready(); }; Person.prototype.active = []; Person.activate = function(){ Person.prototype.activate = true; }; Person.deactivate = function(){ Person.prototype.activate = false; }; Person.prototype.activate = false; Person.prototype.ready = function(){ //depending on activate flag, appends to active array if( this.activate ) this.append(); }; Person.prototype.append = function(){ //array append this.active.push(this); }; var Jim = new Person(10,'Jim');//not added, default flag false //activate flag for appending Person.activate(); var Tim = new Person(20,'Tim');//now added to the active array console.log(Jim.active);//shows only Tim console.log(Tim.active);//shows only Tim That said, this is how I would manage this. var Person = function( age, name ){ this.age = age; this.namge = name; }; var PersonMediator = function(){ this.alive = []; this.removed = []; }; PersonMediator.prototype.create = function(age, name){ var person = new Person(age,name); this.alive.push(person); return person; }; PersonMediator.prototype.remove = function(person){ for(var i = 0; i &lt; this.alive.length; i++){ if( this.alive[i] === person ){ this.alive.splice(i,1); } } this.removed.push(person); }; var pm = new PersonMediator(); var Jim = pm.create(10,'Jim'); var Tim = pm.create(20,'Tim'); console.log(pm.alive);

http://stackoverflow.com/q/27499146
answer count: 2
has answer: http://stackoverflow.com/a/27500192
tagged with: javascript
tagged with: resize
has comment: http://stackoverflow.com/comment/43430528
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/27502362
has title: HTML CSS using fixed elements and resize
type: AnsweredQuestion
has body: I am a html/css/javascript beginner. I am working on the project. Using nodeJS + websockets. I am haveing a problem with the styling. I have Three fixed elements. I need them to resize properly on resize in browser window. I am working on the styling in scratchpad.io. This is the code I have only included the styling part. HIIIIIIIII Enter Your Message Below Users __________________ Abc Keshav Rachna Messages Abc Hi Keshav Holla Rachna Hello
has comment: http://stackoverflow.com/comment/43577458
accepted answer: http://stackoverflow.com/a/27502362
type: Question
possible better answer: http://stackoverflow.com/a/27500192

http://stackoverflow.com/q/27545881
has title: Is it possible to combine Dojo with other JS frameworks?
answer count: 2
upvote count: 12
tagged with: javascript
has answer: http://stackoverflow.com/a/27561989
tagged with: web-frameworks
favorite count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/26386669
has body: We are using Dojo (1.9.3) as a JS framework for building a single page application. We are however spending too much time on the quirks of Dojo, so even simple tasks take a long time to implement. And since there is lack of proper documentation, we often have to resort to reading the source code and then implementing a workaround. I feel that we would speed up development, and make it easier to maintain the code if we moved to some other framework. Our codebase is rather large, since it is a complex application, so we do not have time to re-write the whole thing at once. I was therefore hoping that it might be possible to combine Dojo with some other framework, so that we can move away from Dojo incrementally. I have only dabbled with these other framework in my spare time, and only wrote some small example apps, so I do not feel that I can really say whether or not they would play well with another framework, so I'm hoping that some of you out there can. The frameworks I've been looking into - in the order of what I'd prefer based on my short investigation, but feel free to convince me otherwise. Ember React Polymer Angular (last due to me being scared of the major 2.0 overhaul) While the main question is whether or not it is possible, please also advice on if you think it is a bad idea to do so.
has answer: http://stackoverflow.com/a/27558419
score: 11
downvote count: 1
tagged with: dojo
tagged with: web-frontend
type: Question

http://stackoverflow.com/q/27575761
score: 4
tagged with: leaflet
answer count: 0
has title: How do I get the correct bounding box from GDAL corner coordinates?
type: Question
tagged with: c#
tagged with: javascript
upvote count: 4
tagged with: gdal
has body: I have a program that is grabbing the corner coordinates from a TIFF image and using those coordinates to get the lower left and upper right lat/lon values in decimal format. Gdal outputs values in degrees, minutes, and seconds, so in my program, I am converting the lower left and upper right coordinates to lat/lon decimal values. The problem is that when I overlay the tiff on a map, the dimensions of the overlay are incorrect, which leads me to believe that I am calculating the bounding box incorrectly. Here is the gdal output: Upper Left ( 681480.000, 1913050.000) ( 87d39'59.59"W, 41d55' 1.56"N) Lower Left ( 681480.000, 1882578.800) ( 87d40' 2.72"W, 41d50' 0.54"N) Upper Right ( 704407.200, 1913050.000) ( 87d34'56.36"W, 41d54'59.69"N) Lower Right ( 704407.200, 1882578.800) ( 87d34'59.88"W, 41d49'58.67"N) Center ( 692943.600, 1897814.400) ( 87d37'29.64"W, 41d52'30.14"N) And here are my bounding box coordinates: (southwest lat,lon) (northeast lat,lon) 41.000,-87.001,41.017,-87.016 How do I correctly calculate the bounding box values? I am using leaflet to overlay the image, and it expects a southwest point and a northeast point.
downvote count: 0
tagged with: asp.net
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/27599184
upvote count: 4
answer count: 1
downvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/12197880
favorite count: 0
tagged with: controller
tagged with: angularjs
has answer: http://stackoverflow.com/a/27726904
has title: how to include controller.js into ng-include html page?
type: UnansweredQuestion
type: Question
has body: this is home.html SPM and head.html is details...... use angularjs version 1.3.7 problem is 'can't find headController' in my code what shoud i do ? can i change my angular version? 1.2.X version can allow function headController($scope){ .....}; but 1.3.7 not work what can i do ?
has comment: http://stackoverflow.com/comment/43715177
score: 4

http://stackoverflow.com/a/27573453
answers question: http://stackoverflow.com/q/27572886
score: 3
downvote count: 1
has comment: http://stackoverflow.com/comment/104410405
has body: Inheritance and Composition are similar in what they can achieve, and you hint at that when you say that composition sounds a lot like multiple inheritance The fundamental difference can be illustrated in this code example: Inheritance class Fruit { ... } class Apple extends Fruit { ... } Composition class Fruit { ... } class Apple { this.fruit = new Fruit(); } The implications of the design choice should be obvious here: Inheritance gives you the added benefit of making functionality that is shared by your subclasses really easy to update, and helps establish a logical hierarchical structure to your classes. However, superclasses are often considered volatile, in that a change to a superclass can have very far-reaching side-affects that you will need to be conscious of almost constantly. Composition, on the other hand, adds a level of access between subclasses and their parents. The benefit here being that changes to the "parent" class are far less likely to have far-reaching side-effects to be concerned with. The trade-off here being that it increases complexity to a degree. A good rule of thumb is to think about the semantics of your classes. Think of the relationship between the two classes. If you could say that child is a parent, then use inheritance; otherwise use composition. In the example above, we can say that an Apple is a Fruit, so inheritance probably makes sense here. Again, this is a suggestion, not a rule! Check out this article for a much deeper explanation.
type: Answer
upvote count: 4

http://stackoverflow.com/comment/43566281
comment on: http://stackoverflow.com/a/27570283
score: 0
type: AnswerComment
type: Comment
has text: Happy to help. Have fun with your project!

http://stackoverflow.com/comment/43687179
has text: oh absolutely. To be honest digging into the source was helpful. Good thinking
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27633624

http://stackoverflow.com/comment/43520320
has text: This is interesting idea too. However I find it pretty confusing, since it's not obvious why it works (for beginner, who is not familiar with digest loop). At the same time proper promise usage makes it clear and will also work in non-Angular world, because it's just promise pattern. But nice idea!
comment on: http://stackoverflow.com/a/27546995
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27620266
has comment: http://stackoverflow.com/comment/43661232
has title: div className="filter-bubbles five-sixths column"
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27620375
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43661273
type: Question
tagged with: javascript
has body: Hi I see a javascript file where a return statement is written like: &lt;div className={'filter-popup align-left- popover '+filterClass}&gt; &lt;div className="tree tree-bb-piano_content_provider"&gt;&lt;div className="tree-search popover-header shaded-"&gt; &lt;div className="tree-search-container"&gt; what can I understand from this?
upvote count: 1
has comment: http://stackoverflow.com/comment/43661427
answer count: 1
favorite count: 0

http://stackoverflow.com/comment/43478066
type: Comment
comment on: http://stackoverflow.com/a/27520233
score: 1
type: AnswerComment
has text: Its working very fine.great job Mr.salman.Thank you so much for good responses.

http://stackoverflow.com/q/27577273
has answer: http://stackoverflow.com/a/27592320
accepted answer: http://stackoverflow.com/a/27592320
has comment: http://stackoverflow.com/comment/43589669
type: AnsweredQuestion
tagged with: leaflet
has title: Leaflet map from REST service adding custom markers
has body: I am successfully pulling in a SharePoint 2013 list using the following: function LeafletDemoList(){ $.ajax({ url: "SITEURL/_api/Web/Lists/GetByTitle('Leaflet%20Demo%20List')/items", type: "GET", headers: {"accept": "application/json;odata=verbose"}, success: function(data){ $.each(data.d.results, function(index, item){ var mapMarker = "{icon:" + item.Marker_x0020_Type.replace(/ /g,'') + "}"; var latlng = item.Latitude_x002c_Longitude.split(","); L.marker([latlng[0],latlng[1]],mapMarker).addTo(map).bindPopup(item.Title); }); }, error: function(error){ alert(JSON.stringify(error)); } }); } The custom map markers are not showing up. I can see that the field is being pulled in correctly... (ie Forest shows when alert(mapMarker) test is done). The leaflet blue markers show just fine, the individual custom markers show fine: L.marker([latlng[0],latlng[1]],{icon:Forest}).addTo(map).bindPopup(item.Title); var Forest = L.icon({ iconUrl: 'SITEURL/SiteAssets/map-assets/images/forest.png', iconSize: [21, 23], popupAnchor: [0, -8] }); but when I try and pull them from my list using my variable only the blue markers show: L.marker([latlng[0],latlng[1]],MapMarker).addTo(map).bindPopup(item.Title); I have attempted to write it a few different ways: L.marker([latlng[0],latlng[1]],{icon:item.Marker_x0020_Type.replace(/ /g,'')}).addTo(map).bindPopup(item.Title); L.marker([latlng[0],latlng[1]],"{icon:"+item.Marker_x0020_Type.replace(/ /g,'')+"}").addTo(map).bindPopup(item.Title); What am I doing wrong here? EDIT: I get a Uncaught TypeError: undefined is not a function. item.Marker_x0020_Type is equal to a stripped text only string containing only one of the following: forest or region or other I am using the .replace(/ /g,'') to be certain there are no extra spaces.
has comment: http://stackoverflow.com/comment/43582604
type: Question
tagged with: javascript
score: 0
answer count: 1

http://stackoverflow.com/a/27634810
score: 3
downvote count: 0
answers question: http://stackoverflow.com/q/27634786
accepted answer of: http://stackoverflow.com/q/27634786
has body: You need to use :lt selector. Select all elements at an index less than index within the matched set. $("#parent .child:lt(2)").clone(); or $("#parent&gt;div:lt(2)").clone(); Working Demo
has comment: http://stackoverflow.com/comment/43689585
upvote count: 3
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43689707
type: Answer
has comment: http://stackoverflow.com/comment/43689691

http://stackoverflow.com/a/27577061
downvote count: 0
has body: That would be (excluding some headers): curl -XPOST 'http://www.roblox.com/messages/send' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -d 'subject=UMAD!&amp;body=UMAD!&amp;recipientid=2342342'
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27577035
has comment: http://stackoverflow.com/comment/43579291
has comment: http://stackoverflow.com/comment/43579323

http://stackoverflow.com/q/27488551
has body: I'm new in javascript. I would like to ask if its possible to retrieve values from html input to javascript? i have this email form here where the user inputs its information and etc. I wonder how would this work? NOTE: I know how to do it on php. but I'm not planning doing it on php. the email form that im currently working on is a widget. I don't like user will be directed to another page and etc. Here's my email form [HTML] Quick Email Send
upvote count: 1
has comment: http://stackoverflow.com/comment/43408763
type: Question
has answer: http://stackoverflow.com/a/27488618
has title: sending email [html] via javascript
has answer: http://stackoverflow.com/a/27488770
downvote count: 4
answer count: 2
tagged with: email
tagged with: javascript
favorite count: 0
type: UnansweredQuestion
score: -3
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43408726

http://stackoverflow.com/a/27540963
has body: You need to modify the click handler to add/remove class on click of divs: $('body').on('click','.somedivs',function(){ $(".add_color").not($(this)).removeClass("add_color"); $(this).addClass('add_color'); });
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27540689
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/43509711
has comment: http://stackoverflow.com/comment/43510016
score: 2
answers question: http://stackoverflow.com/q/27540689

http://stackoverflow.com/a/27613830
downvote count: 0
has comment: http://stackoverflow.com/comment/46248825
type: Answer
has body: Okay, wow, silly of me. I've found this solution to a problem previously. Here is my answer just a fortnight ago. Facepalm. Here's what the chart looks like now, with the desired effect -
answers question: http://stackoverflow.com/q/27613143
accepted answer of: http://stackoverflow.com/q/27613143
score: 4
upvote count: 4
type: AcceptedAnswer

http://stackoverflow.com/a/27589983
answers question: http://stackoverflow.com/q/27589972
score: 0
type: Answer
has body: You should put your script tag somewhere after your div#demo. because you need it in your script. best place is to put it before &lt;/body&gt;

http://stackoverflow.com/comment/43423343
type: AnswerComment
has text: http://jsfiddle.net/1ghybf8c/4/ the external css sheets arent necessary so dont worry about them. All the scripts are linked properly.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27495545

http://stackoverflow.com/q/27573118
tagged with: parameters
has comment: http://stackoverflow.com/comment/43572592
score: 0
type: Question
has comment: http://stackoverflow.com/comment/43571811
tagged with: splice
tagged with: arrays
tagged with: javascript
answer count: 1
has answer: http://stackoverflow.com/a/27573179
has title: remove parameter of an array in javascript
type: UnansweredQuestion
has body: I ran into a little trouble within my javascript. Basically I am trying to remove a parameter in an array after the startEventDate has passed the endEventDate. The issue is I am only splicing from the index of the array. How can I remove specific parameters of the array? Here is my code. &lt;div style="position:absolute; top:145px; left:0px; z-index:9999; width:350px; background-image:url(); height:125px; width:396px; padding:5px; font-size:12px;"&gt; &lt;p id="af1" style="display:none;"&gt;&lt;strong style="color:#003399"&gt;Holiday Schedule&lt;/strong&gt;&lt;br&gt; December 24 &amp;#8211; 5:00 a.m. &amp;#8211; 3:00 pm &amp;#8211; December 25 &lt;span style="color:#F00"&gt;CLOSED&lt;/span&gt;; &lt;BR&gt; December 31 &amp;#8211; 5:00 a.m. &amp;#8211; 3:00 pm &amp;#8211; January 1, 2015 8:00 a.m. &amp;#8211; 10 p.m.&lt;/p&gt;&lt;!----&gt; &lt;p id="af2" style="display:none;"&gt;&lt;strong style="color:#003399"&gt; Pool Holiday Schedule&lt;/strong&gt;&lt;br /&gt; Lap pool will close Monday, December 29 at 730 a.m., and will be closed through Tuesday, December 30, due to pool maintenance. The pool will reopen for Holiday hours beginning Wednesday, December 31 at 5:00 a.m.. Regular hours will resume Friday, January2 at 5:00 a.m.&lt;/p&gt; &lt;/div&gt; &lt;script type="text/javascript"&gt; var af = new Crossfader( new Array('af1','af2'), 500, 5000 ); //Crossfader references an earlier Javascript written to rotate between an element with the id listed as it’s parameter. var today = new Date(); //The javascript below is written in order to display the id’s ‘af1’ and ‘af2’ as block between the current date and end event date. After the end date the display is set back to none. var startEventDate = new Date(); // time is optional var endEventDate = new Date ("January 1, 2015 12:00:00"); if ((today &gt;= startEventDate) &amp;&amp; (today &lt;=endEventDate)) { document.getElementById("af1").style.display = "block" } else{ Crossfader.splice(index, af1); //This splices the index…

http://stackoverflow.com/comment/43389662
score: 0
type: Comment
type: QuestionComment
has text: metaDataContent is a string with a json format?
comment on: http://stackoverflow.com/q/27477934

http://stackoverflow.com/comment/43902186
type: QuestionComment
comment on: http://stackoverflow.com/q/27624046
type: Comment
has text: my question is that i am trying to understand how to get the dataTable works inside ym asp.net mvc web application. and to be able to do so i need to find relative documentations and not just tutorials and examples which do not provide any explanation,,,
score: 0

http://stackoverflow.com/a/27582313
has body: just put this code in your dropdown. Products DROP DOWN MENU and your problem will be resolved when page load drop div will be hidden that u can use toggle or show command in jquery function. Regards Imran Qasim
downvote count: 0
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27582284

http://stackoverflow.com/comment/43394459
score: 0
type: Comment
type: QuestionComment
has text: So you're creating pink noise and playing it back through your loudspeakers and getting your microphone to pick it up. I created a JSFiddle based on your code. http://jsfiddle.net/notthetup/gfbou158/2/.
comment on: http://stackoverflow.com/q/27476236

http://stackoverflow.com/comment/43567649
comment on: http://stackoverflow.com/q/27570951
has text: I wasn't being that serious Zack. =)
type: Comment
score: 1
type: QuestionComment

http://stackoverflow.com/comment/43437850
score: 0
has text: Thank you so much! I even that the data wasn't sorted.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27500786

http://stackoverflow.com/q/27509377
has answer: http://stackoverflow.com/a/28118304
has body: I created a modal by the documentation of the Angular Strap. But it is interesting for me that the Modal does not convert the HTML elements. I have tried with and without the built-in $sce.trustAsHtml() method, but the modal still renders out the html elements too as string. I use the modal only as an object. This is in my Angular controller: var message = "A szelvény sikeresen elmentve!" + " URL: " + url + "" $scope.modal = { "title": "Mentési eredmény", "content": $sce.trustAsHtml(message) }; And here the button which activates the modal: Mentés Any body has an idea, how I should use the modal's content to convert the HTML elements and not render out as a string? Because the following example will not create the link html element, because it is shown as a string...
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28118304
score: 1
has title: Angular Strap - Modal Html converting does not work
upvote count: 1
type: Question
tagged with: angular-strap
tagged with: javascript
tagged with: modal-dialog
answer count: 1
downvote count: 0
favorite count: 0
tagged with: angularjs

internet-explorer-9
tag name: internet-explorer-9
tags question: http://stackoverflow.com/q/27509128
tags question: http://stackoverflow.com/q/27516043
type: Tag

http://stackoverflow.com/q/27559950
upvote count: 2
has title: how to pass array Data one-Page to other page
accepted answer: http://stackoverflow.com/a/27560418
has comment: http://stackoverflow.com/comment/43546160
type: AnsweredQuestion
type: Question
has body: I Get data form like this $('input:checked').each(function () { $this = $(this); var itemName= $(this).closest('tr').children('td:eq(2)').text(); var itemCost=$(this).closest('tr').children('td:eq(3)').text(); // admin var itemQty= $(this).closest('tr').find('td:eq(4) input').val(); }); I have 4 textFields like this When I Click on Check-box.We Need to Pass Data(name,cost,Qty) to Next-Page.if We Click 4 check-box .We need 4 name and 4 cost and 4 qty value pass to next-Page. Please any one guide.Please tell me Total Data will pass to other page.We redirect page like this window.location = '../html/NextPage.html';
has answer: http://stackoverflow.com/a/27561204
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27560418
has comment: http://stackoverflow.com/comment/43546439
possible better answer: http://stackoverflow.com/a/27561204
answer count: 2
score: 2
has comment: http://stackoverflow.com/comment/43546464
downvote count: 0
favorite count: 0
tagged with: cordova
tagged with: multidimensional-array

http://stackoverflow.com/a/27494812
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27487828
upvote count: 3
answers question: http://stackoverflow.com/q/27487828
type: AcceptedAnswer
has body: Probably best to just let the user know that an update is available, and not worry about the platform. Also it's not clear how cross-browser this script is. You may have to resort to browser sniffing (not usually recommended) to be absolutely sure. You can use the scriptHandler property of the GM_info object, if you are only concerned about Chrome and/or Firefox: // ==UserScript== // @name _Rough script handler detector // @include http://YOUR_SERVER.COM/YOUR_PATH/* // ==/UserScript== var scriptEngine; if (typeof GM_info === "undefined") { scriptEngine = "plain Chrome (Or Opera, or scriptish, or Safari, or rarer)"; // See https://stackoverflow.com/a/2401861/331508 for optional browser sniffing code. } else { scriptEngine = GM_info.scriptHandler || "Greasemonkey"; } console.log ('This userscript is running on ' + scriptEngine + '.'); Which yields: Tampermonkey: This userscript is running on Tampermonkey. Greasemonkey (Strictly Firefox): This userscript is running on Greasemonkey. Chrome from the web store, or other: This userscript is running on plain Chrome (Or Opera, or scriptish, or Safari, or rarer). Because only the big engines (Greasemonkey and Tampermonkey) currently support GM_info, if your userscript is especially cross-browser, you will need to do browser sniffing to differentiate in rarer cases. See this answer for browser-sniffing code that doesn't require jQuery. Note: A @grant directive is not needed to use GM_info.
type: Answer
score: 3

http://stackoverflow.com/comment/43714115
type: Comment
score: 0
comment on: http://stackoverflow.com/a/27552496
type: AnswerComment
has text: I am having some issues with the code: THe page refreshes and than nothing happens, i do not have enough room inside the comment to show you, i will answer my question for more typing space...

http://stackoverflow.com/comment/58943090
type: Comment
has text: hey there. how am I be able to show this once every 30 days?
comment on: http://stackoverflow.com/a/27580251
type: AnswerComment
score: 0

http://stackoverflow.com/a/27532094
upvote count: 3
type: AcceptedAnswer
has body: You can do it like below: Write the following code into your view: $this-&gt;registerJs('$("#btnadd").on("click",function(){' . '$("#dynamicInput").append(\'' . Html::tag("div", Html::textInput("name","",['placeholder'=&gt;"name"])) . Html::tag("div", Html::textInput("email","",['placeholder'=&gt;"email"])) . '\');' . '})'); Please note that you need to have: use yii\helpers\Html; at top of your page. Otherwise, you should write yii\helpers\Html:: instead of Html::
has comment: http://stackoverflow.com/comment/43492910
accepted answer of: http://stackoverflow.com/q/27531993
has comment: http://stackoverflow.com/comment/44853513
answers question: http://stackoverflow.com/q/27531993
type: Answer
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/46247577

http://stackoverflow.com/a/27601323
has comment: http://stackoverflow.com/comment/43847403
upvote count: 4
downvote count: 0
answers question: http://stackoverflow.com/q/27601282
score: 4
type: Answer
has body: You could Array.reduce on request.split("|") and return key value based object. var obj = request.split("|").reduce(function(o, c){ var arr = c.split(":"); return o[arr[0].trim()] = arr[1].trim(), o; // comma operator },{}); When you log it by console.log(obj), you get { Country: "India", Location: "Mumbai", Attachment: "Photo.png" }

http://stackoverflow.com/q/27610322
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27610424
has body: How can I change my logic to retry if the err.retryable = true in the following code: async.each(queues, function (queue, callback) { sqs.getQueueUrl({'QueueName': queue.queue}, function (err, qurl) { if (err) { if (err.retryable) { // How to retry sqs.getQueueUrl({'QueueName': queue.queue}...? } else { console.error(err, err.stack); callback(err); } }else{ //Do lots of things here } }) }, function (err) { //... })
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: callback
favorite count: 0
score: 3
has answer: http://stackoverflow.com/a/27610424
tagged with: asynchronous
tagged with: node.js
possible better answer: http://stackoverflow.com/a/27610500
upvote count: 3
has answer: http://stackoverflow.com/a/27610500
has title: Retry an async function if the error is retryable

http://stackoverflow.com/comment/43647870
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27612653
type: AnswerComment
has text: on a Template.myTemplate.rendered = function(){}

http://stackoverflow.com/q/27497154
tagged with: tabs
type: UnansweredQuestion
upvote count: 1
has body: I'm using wordpress, and I want to open multiple tabs in the same browser window after user click image. I don't know how to achieve it using wordpress so I'm using javascript/jquery tutorial from stackoverflow, I want the script work on all browser like chrome, firefox, ie etc. I write this code at html wordpress -- user click small image to download bigger image file: &lt;a href="http://www.example.com/cutecat1500x1250.png"&gt;&lt;img src="http://example.com/wp-content/uploads/2014/12/cutecat125x125.png" border=0&gt;&lt;/a&gt; At the same time after user click small image and download process begin, browser will open multiple url in new tabs: example : http ://www.example.com/cute-dog-collection and http ://www.example.com/cute-owl-collection From this source : Open a URL in a new tab (and not a new window) using JavaScript open multiple tabs on a single window by a single click using JavaScript This is what I do: 1. make folder js, create new file : newtab.js and then add this code -- I want the script only run on certain page and post, not all pages and posts. Also not blocked: var win = window.open('url-link', '_blank'); if(win){ win.focus(); }else{ alert('Please allow popups for this site'); } // hijack first anchor that has target=_blank, change href, next document click triggers it var a = $('a[target="_blank"]')[0]; a.setAttribute('href', 'url-link'); $(document).click(function(){ $('a[target="_blank"]')[0].click(); }); // create an anchor, add to body, next document click triggers it var a = document.createElement('a'); a.setAttribute('href', 'url-link'); a.setAttribute('target', '_blank'); document.body.appendChild(a); $(document).click(function(){ a.click(); }); var linkArray = []; // your links for (var i = 0; i &lt; linkArray.length; i++) { // will open each link in the current window chrome.tabs.create({ url: linkArray[i] }); } then I add this code at function.php: function new_tab_script() { wp_enqueue_script('my-newtab-script', get_template_director…
has title: Open multiple tabs in the same browser window after clicking image
score: 1
tagged with: wordpress
linked to: http://stackoverflow.com/q/7564392
has answer: http://stackoverflow.com/a/27497370
type: Question
tagged with: function
tagged with: javascript
linked to: http://stackoverflow.com/q/4907843
tagged with: jquery
answer count: 1
downvote count: 0
favorite count: 0

http://stackoverflow.com/comment/43590611
type: QuestionComment
comment on: http://stackoverflow.com/q/27582936
has text: Notice that you should not overwrite the `Game` constructor with your instance. Use `var game = new Game(…)`
score: 0
type: Comment

http://stackoverflow.com/q/27640268
accepted answer: http://stackoverflow.com/a/27640408
type: Question
score: 3
has answer: http://stackoverflow.com/a/27640353
tagged with: canvas
tagged with: html5-canvas
downvote count: 0
possible better answer: http://stackoverflow.com/a/27640500
tagged with: javascript
favorite count: 0
answer count: 3
has title: Scale HTML5 Canvas to div width and height
has body: In my application i have div that styled with twitter bootstrap like this : &lt;div class="col-md-12"&gt; &lt;canvas id="canvas"&gt;&lt;/canvas&gt; &lt;/div&gt; the canvas is placeholder of some large images.i need a way to scale image to width and height of this div or if not exactly scale to width and height of div , scale must create a very small scroll bar for div. the div has overflow:scroll style.
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27640500
type: AnsweredQuestion
upvote count: 3
has answer: http://stackoverflow.com/a/27640408

http://stackoverflow.com/q/27620165
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27620243
tagged with: javascript
has answer: http://stackoverflow.com/a/27620322
has title: change background image in no time
answer count: 3
has body: I am changing background image of a div on event basis, There are two image Image1 and Image2 I have to use these two images on condition basis, it is working fine, but at first time when i change image, it takes time to load, how to load it instantly div has image1 as default background image, and I am changing it with below code $("div").addClass('loadalternateImage'); alternate image is class with background-image with image2 but it take time to load Image2. Please advise how to load it instantly Thanks
downvote count: 0
tagged with: jquery
has answer: http://stackoverflow.com/a/27620217
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43661190
score: 1

http://stackoverflow.com/comment/43446071
comment on: http://stackoverflow.com/a/27507915
type: AnswerComment
score: 0
type: Comment
has text: Algorithms that are not guaranteed to exit (like this one) make me sad. A better solution would be to remove the last color and then readd it after the next color is selected. That way you never get caught that while loop.

http://stackoverflow.com/comment/43450750
type: Comment
comment on: http://stackoverflow.com/q/27510029
score: 0
type: QuestionComment
has text: Why on earth would you have a KEY with the same name of a VALUE? you're apparently looping into a dimentional array (like a matrix), maybe you want to just loop into the array and check for duplicates? animals[i] is the KEY, while animals[j] is the current value.

http://stackoverflow.com/comment/44083391
type: Comment
has text: @WilliamLepinski: Well it's funny that you mention Angular. I'm actually using this in my Angular project because I define all my controllers/services etc using constructors and their prototype functions. In order for those prototype functions to also use constructor injected arguments I call `adoptArguments` hence making them accessible on `this` within any function defined on the prototype. And in Angular I want **all** of the arguments not just some, so I'm not doing any argument filtering. I just add them all (nested under `injections`).
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27838697

http://stackoverflow.com/a/27559891
accepted answer of: http://stackoverflow.com/q/27559819
score: 0
answers question: http://stackoverflow.com/q/27559819
type: AcceptedAnswer
has body: $('.text').each(function(){ if($(this).text() == "Text 2"){ $(this).attr('id','CustomID'); } }); Fiddle :: http://jsfiddle.net/hoja/9spwrxd9/
type: Answer

memory-management
tags question: http://stackoverflow.com/q/27614200
type: Tag
tags question: http://stackoverflow.com/q/27511015
tags question: http://stackoverflow.com/q/27604469
tag name: memory-management

http://stackoverflow.com/comment/43667479
comment on: http://stackoverflow.com/a/27623451
type: AnswerComment
has text: I would suggest adding a transparent border (1px top and bottom) to the li element to prevent the visual issue Jonathan was wanting to avoid.
type: Comment
score: 1

node.js
tags question: http://stackoverflow.com/q/27480141
tags question: http://stackoverflow.com/q/27621959
tags question: http://stackoverflow.com/q/27505268
tags question: http://stackoverflow.com/q/27579393
tags question: http://stackoverflow.com/q/27611278
tags question: http://stackoverflow.com/q/27481684
tags question: http://stackoverflow.com/q/27585779
tags question: http://stackoverflow.com/q/27512244
tags question: http://stackoverflow.com/q/27636682
tags question: http://stackoverflow.com/q/27605209
tags question: http://stackoverflow.com/q/27613205
tags question: http://stackoverflow.com/q/27624009
tags question: http://stackoverflow.com/q/27502248
tags question: http://stackoverflow.com/q/27599537
tags question: http://stackoverflow.com/q/27551089
tags question: http://stackoverflow.com/q/27534518
tags question: http://stackoverflow.com/q/27615710
tags question: http://stackoverflow.com/q/27527565
tags question: http://stackoverflow.com/q/27640106
tags question: http://stackoverflow.com/q/27593938
tags question: http://stackoverflow.com/q/27527797
tags question: http://stackoverflow.com/q/27484911
tags question: http://stackoverflow.com/q/27598906
tags question: http://stackoverflow.com/q/27491572
tags question: http://stackoverflow.com/q/27589127
tags question: http://stackoverflow.com/q/27529235
tags question: http://stackoverflow.com/q/27477854
tags question: http://stackoverflow.com/q/27510379
tags question: http://stackoverflow.com/q/27609718
tags question: http://stackoverflow.com/q/27600159
tags question: http://stackoverflow.com/q/27591956
tags question: http://stackoverflow.com/q/27560968
tags question: http://stackoverflow.com/q/27615087
tags question: http://stackoverflow.com/q/27498121
tags question: http://stackoverflow.com/q/27533148
tags question: http://stackoverflow.com/q/27474839
tags question: http://stackoverflow.com/q/27570886
tags question: http://stackoverflow.com/q/27628503
tags question: http://stackoverflow.com/q/27550144
tags question: http://stackoverflow.com/q/27595817
tags question: http://stackoverflow.com/q/27566527
tags question: http://stackoverflow.com/q/27575521
tags question: http://stackoverflow.com/q/27560753
tags question: http://stackoverflow.com/q/27581680
tags question: http://stackoverflow.com/q/27517264
tags question: http://stackoverflow.com/q/27571319
tags question: http://stackoverflow.com/q/27635665
tags question: http://stackoverflow.com/q/27555777
tags question: http://stackoverflow.com/q/27584422
tags question: http://stackoverflow.com/q/27604384
tags question: http://stackoverflow.com/q/27610361
tags question: http://stackoverflow.com/q/27511563
tags question: http://stackoverflow.com/q/27609207
tags question: http://stackoverflow.com/q/27596196
tags question: http://stackoverflow.com/q/27610322
tags question: http://stackoverflow.com/q/27559652
tags question: http://stackoverflow.com/q/27521594
tags question: http://stackoverflow.com/q/27543929
tags question: http://stackoverflow.com/q/27552609
tags question: http://stackoverflow.com/q/27537588
tags question: http://stackoverflow.com/q/27613940
tags question: http://stackoverflow.com/q/27509711
tags question: http://stackoverflow.com/q/27561273
tags question: http://stackoverflow.com/q/27629698
tags question: http://stackoverflow.com/q/27568390
tags question: http://stackoverflow.com/q/27578484
tags question: http://stackoverflow.com/q/27588262
tags question: http://stackoverflow.com/q/27535027
tags question: http://stackoverflow.com/q/27485750
tags question: http://stackoverflow.com/q/27529812
tags question: http://stackoverflow.com/q/27547083
tags question: http://stackoverflow.com/q/27622845
tags question: http://stackoverflow.com/q/27614882
tags question: http://stackoverflow.com/q/27583681
tags question: http://stackoverflow.com/q/27562061
tags question: http://stackoverflow.com/q/27508684
tags question: http://stackoverflow.com/q/27608304
tags question: http://stackoverflow.com/q/27585856
tags question: http://stackoverflow.com/q/27585558
tags question: http://stackoverflow.com/q/27590382

http://stackoverflow.com/q/27560731
has answer: http://stackoverflow.com/a/27561186
has comment: http://stackoverflow.com/comment/43548789
tagged with: jquery-svg
has title: how to add content to div in d3 js d3.select('body').append('div') after this steps
has answer: http://stackoverflow.com/a/27561296
type: Question
has comment: http://stackoverflow.com/comment/43547637
has body: adding content to div in d3 js gv_html=' ' i want to add this content to d3.select('body').append('div').add above content in that div is this possible,help me
answer count: 2
linked to: http://stackoverflow.com/q/5677799
linked to: http://stackoverflow.com/q/17595813
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
type: UnansweredQuestion

http://stackoverflow.com/q/27506373
downvote count: 0
has comment: http://stackoverflow.com/comment/43442887
tagged with: jquery
has answer: http://stackoverflow.com/a/27506445
has answer: http://stackoverflow.com/a/27506443
accepted answer: http://stackoverflow.com/a/27506620
favorite count: 0
tagged with: ajax
type: Question
score: 3
tagged with: php
upvote count: 3
has answer: http://stackoverflow.com/a/27506499
tagged with: mysql
has answer: http://stackoverflow.com/a/27506501
has answer: http://stackoverflow.com/a/27506620
has title: AJAX doesn't get data from PHP file with Jquery
answer count: 5
tagged with: javascript
has body: I'm trying post data to PHP file but i can't receive any data from PHP file. Let me add codes. This is my jQuery function: $(document).ready(function () { $(function () { $('a[class="some-class"]').click(function(){ var somedata = $(this).attr("id"); $.ajax({ url: "foo.php", type: "POST", data: "id=" + somedata, success: function(){ $("#someid").html(); }, error:function(){ alert("AJAX request was a failure"); } }); }); }); }); This is my PHP file: <?php $data = $_POST['id']; $con = mysqli_connect('localhost','root','','somedatabase'); if (!$con) { die('Could not connect: ' . mysqli_error($con)); } mysqli_select_db($con,"database"); $sql="SELECT * FROM sometable WHERE id = '".$data."'"; $result = mysqli_query($con,$sql); while($row = mysqli_fetch_array($result)) { echo $row['info']; } mysqli_close($con); ?> This what i have in HTML file: Data1 Data2 Note: This website is horizontal scrolling and shouldn't be refreshed. When i'm clicking links (like Data1) it's going to another page without getting data from PHP file
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43442881
has comment: http://stackoverflow.com/comment/43444943
possible better answer: http://stackoverflow.com/a/27506443

http://stackoverflow.com/q/27566369
has answer: http://stackoverflow.com/a/27569137
has body: I have a force directed graph where I can show and hide nodes. I wish to do this for the edges based on if the edge source and target are shown or hidden. Here I am choosing the edge, looping through all the selected nodes to see if any of them match the edges source, if they do, loop through them again to see if they match the edges' target too and then I want to set that edges class to "visible" if it doesn't show both source and target then set class to "hidden". var selectedNodes = d3.selectAll(".selectedNode"); var linksVisible = d3.selectAll(".link.visible"); var countOfVisibleLinks = []; linksVisible.each(function(o) { selectedNodes.each(function(i) { if(o.source.index === i.index) { //clog("yes1"); selectedNodes.each(function(j) { if(o.target.index === j.index) { countOfVisibleLinks++; //visibleLinks.push(o); var myLink = d3.selectAll(".link.visible") .classed("hidden", function(d) { return d === o ? false : true; }); //.filter(function(d) { return d === o; }) //.attr('class', 'hidden'); } }) } }) }); The 'countOfVisibleLinks' works, as it correctly counts the visible edges, but the function after this doesn't set the chosen ones to 'visible' and the un-chosen ones to 'hidden' Any ideas ?
tagged with: javascript
has title: How do I give certain edges a class?
accepted answer: http://stackoverflow.com/a/27569137
type: AnsweredQuestion
tagged with: css
type: Question
tagged with: d3.js
answer count: 1
score: 0

http://stackoverflow.com/a/27632314
type: Answer
has body: I think you may be looking for something like this: Figure has a Layer instance and a Layer instance has multiple figures. Layer may have a factory that will create Figures having the current Layer instance: Layer = function Layer(){ this.figures = []; }; Layer.prototype.addFigure = function addFigure(arg){ arg = arg || {}; arg.layer = this; this.figures.push(new Figure(arg)); return this;//now you can stack functions } Figure = function Figure(arg){ arg = arg || {}; //layer is not optional this.layer = arg.layer || (function(){ throw new Error('Cannot create figure without layer'); }()); this.shape = arg.shape || 'square'; } var l = new Layer(); l.addFigure({shape:'round'})//stacking next addFigure on next line .addFigure();//defaults to square console.log(l.figures); More info on constructor functions and prototype here: https://stackoverflow.com/a/16063711/1641941
score: 0
answers question: http://stackoverflow.com/q/27631978

http://stackoverflow.com/a/27603011
has comment: http://stackoverflow.com/comment/43628354
type: Answer
has body: Why would you need to run an AJAX hook to populate a dropdown? Why not just call the function and loop through the results: &lt;select&gt; &lt;?php $cities = function_that_returns_cities(); foreach ($cities as $city) { ?&gt; &lt;option&gt;&lt;?php echo $cities['name']; ?&gt;&lt;/option&gt; &lt;?php } ?&gt; &lt;/select&gt; Something like this for example.
score: 0
answers question: http://stackoverflow.com/q/27602890

http://stackoverflow.com/a/27504276
has comment: http://stackoverflow.com/comment/43438802
has comment: http://stackoverflow.com/comment/43438993
answers question: http://stackoverflow.com/q/27503827
has comment: http://stackoverflow.com/comment/43438732
has body: try like this: <?php $new ="i am here"; ?> <a href="#popup-1" data-input="<?php echo $new ?>"> Click Me I'm the pop up
has comment: http://stackoverflow.com/comment/43439010
has comment: http://stackoverflow.com/comment/43439390
score: 0
has comment: http://stackoverflow.com/comment/43439261
has comment: http://stackoverflow.com/comment/43438893
type: Answer

http://stackoverflow.com/q/27488614
has title: How to convert arrays from PHP/MySQL to Javascript
answer count: 1
downvote count: 0
score: 1
favorite count: 0
upvote count: 1
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27488698
has comment: http://stackoverflow.com/comment/43408930
has body: I am having difficulty with getting the JavaScript portion of this code to work the way I would like. I have managed to pull the array from a MySQL table and convert it using JSON. However, when I try to get the data into a HTML table, I get individual characters in each cell. For example, my database has a table with a keyword labels. Inside this are 4 colors Blue, Green, Brown, Hazel exactly as I have entered it here. When I output via JavaScript, I get one character in each cell instead of 4 cells. I am "almost" there on my own: &lt;?php include 'conn.php'; $sql = "SELECT * FROM variables WHERE id= '1' "; $result = $conn-&gt;query($sql); if ($result-&gt;num_rows &gt; 0) { while($row = $result-&gt;fetch_assoc()) { $labels = $row["labels"]; } foreach (explode(',', $labels) as $newLabel) { echo "{$newLabel} "; } } ?&gt; &lt;script&gt; &lt;?php $newLabel = $labels ?&gt; var n = &lt;?php print (json_encode($newLabel)); ?&gt;; var index; var myTable= "&lt;table class='hover'&gt;"; myTable+= "&lt;tr&gt;&lt;td class='smalltd'style='width: 20px; font-weight:bold;'&gt;&lt;/td&gt;"; for (index = 0; index &lt; newLabel.length; index++) { myTable+= "&lt;td class='no' style='width: 100px; font-weight:bold;'&gt;" + newLabel[index] + "&lt;/td&gt;"; } myTable+="&lt;/table&gt;"; document.write(myTable); &lt;/script&gt; I suspect the culprit lies in the newLabel.length but I am not certain
type: Question
accepted answer: http://stackoverflow.com/a/27488698
tagged with: arrays
has comment: http://stackoverflow.com/comment/43408869
tagged with: javascript
has comment: http://stackoverflow.com/comment/43408893

http://stackoverflow.com/q/27533593
tagged with: xmlhttprequest
has answer: http://stackoverflow.com/a/27585439
upvote count: 0
type: UnansweredQuestion
type: Question
has body: I have seen a couple of other threads relatively similar but I still find my problem unique so I hope you guys give me a chance. What I want to do: use proxy to bypass same origin policy and to save these values (that changes and need to be checked by timer) into variables that can be modified. A server contains data.asp which looks something like this and updates from time to time (although with a bit more data): { "Title":"Tile of song" ,"Artist":"The artist" ,"Album":"The album" ,"CDCover":"/covers/randomcover.jpg" } The method I have tried is like the one on http://qnimate.com/same-origin-policy-in-nutshell/#Same_Origin_Policy_for_AJAX. In case you guys don't want to follow the link I've posted the data here as well. Request data And the proxy file: <?php echo file_get_contents('http://www.qscutter.com/ajaxdata.txt'); ?> So what I want to do is store the data into variables that I can alter, not show it inside a div using innerHTML. Preferably check this ever so often for changes as well. Suggestions? I can add that I have the permission from the server owner to retrieve the information and to use it but no possibility to add script to their server, hence the proxy bypass attempt.
tagged with: javascript
score: -1
has title: Save variable from remote server using XMLHttpRequest
tagged with: http-proxy
answer count: 1
downvote count: 1
favorite count: 0
tagged with: ajax

http://stackoverflow.com/comment/43479091
type: Comment
type: QuestionComment
has text: OK. Though that might be more fitting on a different SE site.
score: 0
comment on: http://stackoverflow.com/q/27524232

http://stackoverflow.com/a/27565453
answers question: http://stackoverflow.com/q/27565141
score: 0
type: Answer
has body: I tried using input type date: http://jsfiddle.net/washington_guedes/dafbz0qo/ $(document).ready(function(){ $("#fromDate").on("blur", function(){ var year = parseInt( $(this).val().substring(0,4) ); var month = parseInt( $(this).val().substring(5,7) ); var day = parseInt( $(this).val().substring(9,11) ); month += 6; if( month &gt; 12){ month %= 12; year++; } $("#toDate").val(year + "-" + ((month&lt;10)?"0":"") + month + "-" + ((day&lt;10)?"0":"") + day); }); });

http://stackoverflow.com/q/27604694
tagged with: sheetrock
has title: Table won't show using jquery sheetrock
has comment: http://stackoverflow.com/comment/45337870
has body: Hi I'm trying to show the table from Google Spreadsheet using the jquery plugin Sheetrock. It shows fine when I did it in jsfiddle, but it doesn't show when load on an html. Here's the code: !DOCTYPE html table
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/69591935
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: plugins
has answer: http://stackoverflow.com/a/41195057
score: 2
upvote count: 2
type: UnansweredQuestion
type: Question

http://stackoverflow.com/a/27481294
answers question: http://stackoverflow.com/q/27480399
score: 3
upvote count: 3
downvote count: 0
has body: I would recommend you avoid generating all these inline scripts and instead add the values as data attributes of the row @foreach (var row in ViewBag.Retailers.Rows) //Retailers is a datatable { @row["RegionName"].ToString() } then have a single script to build your array var markersArray = []; $('#retailers tr').each(function() { markersArray.push({ lat: $(this).data('latitude'), lon: $(this).data('longitude') }); });
type: Answer

http://stackoverflow.com/q/27634552
has comment: http://stackoverflow.com/comment/43793416
score: 1
has comment: http://stackoverflow.com/comment/43688662
tagged with: angularjs
has body: I am new to angular and trying to implement add to list functionality. I have a few questions why does console.log of $scope.newChat return undefined Is newChat available to sendChat() call due to variable hoisting. Template {{chat.name}} {{chat.lastText}} Delete Send controller .controller('ChatsCtrl', function($scope, Chats) { $scope.chats = Chats.all(); $scope.remove = function(chat) { Chats.remove(chat); } $scope.sendChat = function(newchat){ Chats.set(newchat); console.log($scope.newchat); //this line in question 1 newchat.lastText = ""; } })
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43688568
has answer: http://stackoverflow.com/a/27690106
has title: Add to list functionality in angular
upvote count: 1
tagged with: ionic-framework
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/43788403
favorite count: 0
has answer: http://stackoverflow.com/a/27635047

http://stackoverflow.com/comment/43566366
comment on: http://stackoverflow.com/q/27567816
type: Comment
type: QuestionComment
has text: So the plugin is only sending the HTML back to the textarea on `blur` (I'm assuming that's what `'tbwblur'` means)... is your console spitting out `working`? If not, the issue is not in `$_POST` but in the plugin. I'm wondering if hitting `ENTER` is not firing the `blur` and that's the reason. In any event, do you have a live example so we can see what it's doing instead of just guessing?
score: 0

http://stackoverflow.com/q/27537448
upvote count: 1
has comment: http://stackoverflow.com/comment/43503207
downvote count: 1
has comment: http://stackoverflow.com/comment/43503211
has comment: http://stackoverflow.com/comment/43505626
answer count: 4
type: AnsweredQuestion
tagged with: arrays
has answer: http://stackoverflow.com/a/27537480
tagged with: javascript
has answer: http://stackoverflow.com/a/27537618
favorite count: 0
has title: Sum arrays in javascript
has answer: http://stackoverflow.com/a/27537663
type: Question
has comment: http://stackoverflow.com/comment/43503324
possible better answer: http://stackoverflow.com/a/27537618
has body: I have these arrays: // I want to calculate these arrays each other. var a = [1,2,3] var b = [1,2,3] var c = [3,4,5] // -&gt; var result = [5, 8, 11] I can calculate two array with below method but how can I sum n arrays? Array.prototype.Sum = function (arr) { var s = []; if (arr != null &amp;&amp; this.length == arr.length) { for (var i = 0; i &lt; arr.length; i++) { var c = this[i] + arr[i] s.push(c); } } return s; }
accepted answer: http://stackoverflow.com/a/27537480
score: 0
has answer: http://stackoverflow.com/a/27537472

http://stackoverflow.com/comment/44018637
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27622639
has text: I had spotted the invert_lightness vs inverse_lightness but then saw that changing that param name only resulted in different output because the value was being completely missed (i.e. PPPinvert_lightness gives same result as invert_lightness). Many thanks. I'm unable to comment on the above link so will include a separate answer here (based on above) with a modification to do the correct conversion.

http://stackoverflow.com/q/27602045
has answer: http://stackoverflow.com/a/27602274
type: Question
tagged with: c#
answer count: 2
has body: I am looking for a solution to install Silver light application in to user system, if he click on (install button ) in web browser. I know how to do Out of browser but here requirement is not right click and install , it needs to install from HTML5 web page button click event. I know can achieve from Silver light button click but I want to achieve this from HTML5 button Click event private void Button_Click(object sender, RoutedEventArgs e) { if (Application.Current.HasElevatedPermissions &amp;&amp; System.Windows.Interop.ComAutomationFactory.IsAvailable) { string run = "\"%ProgramFiles%\\Microsoft Silverlight\\sllauncher.exe\" /emulate:Silverface.xap /origin:\"http://www.silverlight.net/content/samples/apps/facebookclient/ClientBin/Silverface.xap\" /overwrite"; dynamic cmd = ComAutomationFactory.CreateObject("WScript.Shell"); cmd.Run(run, 1, true); } } Thanks, ineffablep
tagged with: javascript
tagged with: jquery
has title: Install silverlight application on button click
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: silverlight
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27603876

http://stackoverflow.com/comment/43606676
score: 0
comment on: http://stackoverflow.com/q/27591001
type: Comment
type: QuestionComment
has text: Show your HTML code and the specific styling for the relevant element.

http://stackoverflow.com/q/27526650
tagged with: javascript
has answer: http://stackoverflow.com/a/27526711
accepted answer: http://stackoverflow.com/a/27526711
downvote count: 0
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/43481825
type: AnsweredQuestion
has title: What does [ ] mean in javascript and how to return it from C#
score: 1
has body: I returned class from C# to javascript in this format Format needed in javascript: { key: 1, label: 'Food'} This part works and the class I used to return from C# looks like this: public static FoodClass get_AllFood() { FoodClass FoodClass = new FoodClass { label = "Food", key = "1", }; return FoodClass; } public class FoodClass { public FoodClass() { } public FoodClass(string data1, string data2) { label = data1; key = data2; } public string label { get; set; } public string key { get; set; } public Boolean open { get; set; } public int ID { get; set; } } Now when I have to add a child element to my format, It has the [ ] bracket which I dont know how to get from C# Format needed in javascript: { key: 1, label: 'Food', open: false, children: [{ key: 211, label: 'Burger' }]}
has comment: http://stackoverflow.com/comment/43481824
upvote count: 1
type: Question
tagged with: c#
has comment: http://stackoverflow.com/comment/43481849

http://stackoverflow.com/comment/43514552
score: 0
comment on: http://stackoverflow.com/a/27536472
type: AnswerComment
has text: You might want to try `data = encodeURI(data)` in your JS function. That should solve those special characters. In case they are than double encoded in PHP, use the `$data = urldecode($data)` to decode it again.
type: Comment

http://stackoverflow.com/comment/43444792
comment on: http://stackoverflow.com/q/27506969
type: Comment
type: QuestionComment
has text: So denormalising the data. Each document will still have the three fields in the new collection. How can each field be target to update instead of updating of using $set which overwrites everything?
score: 0

http://stackoverflow.com/q/27541467
tagged with: google-chrome-app
tagged with: google-chrome-extension
type: AnsweredQuestion
has title: Restrict addeventlistener of chrome webrequest to the current tab or the main window of the extension
possible better answer: http://stackoverflow.com/a/27542461
tagged with: google-chrome
type: Question
has answer: http://stackoverflow.com/a/27642470
accepted answer: http://stackoverflow.com/a/27642470
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/27542461
tagged with: javascript
has body: I am trying to fix some issues in an existing extension of Chrome. The extension is supposed to change the user agent of the sub frame which is a part of it. Now the problem is that when the event happens and I change the user agent of the header it is reflecting on all the tabs in browser and forcing the rest of the secured logins in those tabs to log off. I want to change the user agent of only that particular tab of the extension. Here is the code I am using in background.js var requestFilter = { urls: [ "&lt;all_urls&gt;" ], types: ["main_frame", "sub_frame"] }; chrome.tabs.query({ 'active': true, 'windowId': chrome.windows.WINDOW_ID_CURRENT }, function(tabs) { chrome.webRequest.onBeforeSendHeaders.addListener(function(details) { var headers = []; headers = details.requestHeaders; if (!localStorage['user-agent']) { return; } for (var i = 0; i &lt; headers.length; i++) { if (headers[i].name != 'User-Agent') { headers[i].name = 'User-Agent'; headers[i].value = localStorage['user-agent']; } } return { requestHeaders: headers }; }, requestFilter, ['requestHeaders', 'blocking']); }); function focusOrCreateTab(url) { chrome.windows.getAll({ "populate": false }, function(windows) { var existing_tab = null; for (var i in windows) { var tabs = windows[i].tabs; for (var j in tabs) { var tab = tabs[j]; if (tab.url == url) { existing_tab = tab; break; } } } if (existing_tab) { chrome.tabs.update(existing_tab.id, { "selected": true }); } else { chrome.tabs.create({ "url": url, "selected": true }); } }); } chrome.browserAction.onClicked.addListener(function(tab) { var manager_url = chrome.extension.getURL("youTube_tool.html"); focusOrCreateTab(manager_url); }); Kindly help me with this. I have been stuck for two weeks :-(

http://stackoverflow.com/comment/43595603
type: AnswerComment
comment on: http://stackoverflow.com/a/27585389
score: 0
has text: @I-LinKuo Yes, it's privileged. It can access private data declared inside the self executing function.
type: Comment

http://stackoverflow.com/q/27613933
has comment: http://stackoverflow.com/comment/43649901
upvote count: 1
has comment: http://stackoverflow.com/comment/43650078
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43649945
has comment: http://stackoverflow.com/comment/43649931
score: 1
has comment: http://stackoverflow.com/comment/43650077
type: Question
has comment: http://stackoverflow.com/comment/43649982
downvote count: 0
has title: Eloquent JS: Chessboard – why is first row misaligned?
tagged with: javascript
has answer: http://stackoverflow.com/a/27614098
favorite count: 0
has comment: http://stackoverflow.com/comment/43649961
accepted answer: http://stackoverflow.com/a/27614098
answer count: 1
has body: function chessBoard (size) { result = ""; for (var s = 1; s &lt;= size; s++ ){ for (var c = 1; c &lt;= size; c++){ if ((s + c) % 2 == 0) { result = result + " "; } else { result = result + "#"; } } result = result + "\n"; } console.log(result); } chessBoard(8); Result: # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Why is the first line of the "chessboard" result misaligned in this code? Help me understand what needs to be changed. It should look like: # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
has comment: http://stackoverflow.com/comment/43650048

http://stackoverflow.com/q/27546206
tagged with: yui
tagged with: yahoo-api
tagged with: javascript
has body: I am using YUI datatable 2.8.2. I need to click the delete button and an ajax request goes, after success response, the clicked delete button should be replaced into "Deleted" text.But when I sort any column the "Deleted" text disappears, as the old data gets sorted. By default all the button text should be "Delete?". Any help?? Ref : // Create a new YUI instance and populate it with the required modules. YUI().use('node', function (Y) { Y.one('body').addClass('yui-skin-sam'); }); http://jsfiddle.net/ejx3zex3/1/
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/27547703
has title: YUI 2.8.2 datatable sorts old value after a client side button click action is done
tagged with: yahoo
accepted answer: http://stackoverflow.com/a/27547703
type: AnsweredQuestion
tagged with: yui-datatable
type: Question

http://stackoverflow.com/comment/43497174
has text: @mk117: As I already explained in the answer: requesting byte ranges is not meant for direct end users' usage. To test if viewer as well as web servers work accordingly, just use a linearized PDF with more than only a few pages, and/or a slow (or artificially limited) connection bandwidth. The request `http://server/file.pdf#page=104`. Observe if page 104 displays *before* the download progress bar is finished. If it does, byte range serving works. If not, it doesn't. (AFAIK, `pdf.js` doesn't support it [yet].)
type: Comment
score: 2
comment on: http://stackoverflow.com/a/27533031
type: AnswerComment

http://stackoverflow.com/comment/43629966
type: Comment
type: QuestionComment
has text: Problem occurs in mozilla and works fine in chrome ..
comment on: http://stackoverflow.com/q/27603724
score: 0

xmlhttprequest
tags question: http://stackoverflow.com/q/27576221
tags question: http://stackoverflow.com/q/27526680
tags question: http://stackoverflow.com/q/27620609
tags question: http://stackoverflow.com/q/27531089
tags question: http://stackoverflow.com/q/27588823
tags question: http://stackoverflow.com/q/27637140
tags question: http://stackoverflow.com/q/27596805
tags question: http://stackoverflow.com/q/27605732
tags question: http://stackoverflow.com/q/27622644
tag name: xmlhttprequest
tags question: http://stackoverflow.com/q/27617427
tags question: http://stackoverflow.com/q/27519546
tags question: http://stackoverflow.com/q/27622366
tags question: http://stackoverflow.com/q/27534641
tags question: http://stackoverflow.com/q/27514404
tags question: http://stackoverflow.com/q/27635738
type: Tag
tags question: http://stackoverflow.com/q/27506789
tags question: http://stackoverflow.com/q/27533593
tags question: http://stackoverflow.com/q/27637240

http://stackoverflow.com/q/27492954
score: 1
has comment: http://stackoverflow.com/comment/43417594
favorite count: 0
has answer: http://stackoverflow.com/a/29919780
has answer: http://stackoverflow.com/a/37162100
answer count: 4
tagged with: youtube-javascript-api
has body: I search music with youtube data api. I use javascript and jquery and i have a problem. Here is my code <script src="<?php echo SITE_PUBLIC; ?>/bootstrap-3.2.0/dist/js/bootstrap.js"> This code not working. Chrome console say "Uncaught TypeError: Cannot read property 'setApiKey' of undefined". But this code is working: keyWordsearch() to $(document).click(function(){ keyWordsearch() }) I do not understand this issue. Thanks in advance EDIT My code run on jsFiddle.But not run my html file. My html file is here: Search Search Results
has title: Youtube Data Api - Uncaught TypeError: Cannot read property 'setApiKey' of undefined
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/37303942
upvote count: 1
tagged with: youtube-api
type: Question
downvote count: 0
has answer: http://stackoverflow.com/a/27494408
tagged with: javascript

http://stackoverflow.com/a/27556039
has comment: http://stackoverflow.com/comment/43538330
has comment: http://stackoverflow.com/comment/43538347
upvote count: 5
has comment: http://stackoverflow.com/comment/43538337
score: 4
has comment: http://stackoverflow.com/comment/43538466
has comment: http://stackoverflow.com/comment/43538253
has comment: http://stackoverflow.com/comment/43538292
type: Answer
answers question: http://stackoverflow.com/q/27555979
has comment: http://stackoverflow.com/comment/43538355
has body: You want to use == and not = in your if statement if (pass == "hack")
downvote count: 1

http://stackoverflow.com/comment/43686871
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27633569
has text: I will try that - is a template a solution to both questions?

http://stackoverflow.com/comment/43502114
has text: Do you want to run the batch file from the client or from the (web)server?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27536819

http://stackoverflow.com/q/27504176
has answer: http://stackoverflow.com/a/27504306
tagged with: jquery-ui
has comment: http://stackoverflow.com/comment/43438416
has comment: http://stackoverflow.com/comment/43438620
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43438511
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/43438343
has body: Why this shows different date 05/05/1972 instead of 29/05/1970? $(document).ready(function(){ alert($.datepicker.formatDate('dd/mm/yy', new Date("29/05/1970"))); }); JSFIDDLE
has comment: http://stackoverflow.com/comment/43438670
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27504298
has answer: http://stackoverflow.com/a/27504249
type: Question
has title: jQuery Date format invalid

http://stackoverflow.com/a/27581540
answers question: http://stackoverflow.com/q/27581502
type: AcceptedAnswer
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/27581502
has body: This is because SNOW refers to the object constructor, not the instance which is referenced by this. Create a variable referencing this i.e that = this. Now you can apply stuff to the instance in the method. var SNOW = function () { this.top = 0; this.left = 0; this.snowflake = document.getElementById('snowDiv'); this.snowflake.style.margin = this.top+'px 0px 0px '+this.left+'px'; this.snowflake.style.positon = 'absolute'; this.snowflake.style.zIndex = '1'; this.snowflake.style.position = 'absolute'; this.snowflake.style.height = '5px'; this.snowflake.style.width = '5px'; var that = this; this.moveSnow = function () { that.top += 2; that.left += 5; that.snowflake.style.margin = that.top+'px 0px 0px '+that.left+'px'; window.requestAnimationFrame(that.moveSnow); }; }; var snowing = new SNOW(); snowing.moveSnow(); &lt;div id="snowDiv"&gt;*&lt;/div&gt;

http://stackoverflow.com/comment/43691578
type: AnswerComment
type: Comment
score: 0
has text: First of all for IE support you have to use the prefix -ms- . IE is not a webkit browser. Safari is a webkit browser? Is this working normally on Chrome?
comment on: http://stackoverflow.com/a/27634795

http://stackoverflow.com/comment/43591201
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27583367
has text: I have an other `console.log` inside the same script tag, and that one is just printing to the console

http://stackoverflow.com/comment/43692286
type: AnswerComment
has text: The way you construct your menu can differ. You can create a recursive function that iterates your json and create chunks of HTML for your menu
comment on: http://stackoverflow.com/a/27635465
type: Comment
score: 0

http://stackoverflow.com/comment/43443864
comment on: http://stackoverflow.com/a/27506000
type: AnswerComment
has text: As my requirement is i need to show hide not redrawing the canvas
type: Comment
score: 0

http://stackoverflow.com/comment/43694343
has text: please check this i am triying this way
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27636099

http://stackoverflow.com/comment/43674834
type: Comment
comment on: http://stackoverflow.com/a/27627025
has text: That is because OPs issue could be an X/Y problem.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43593474
comment on: http://stackoverflow.com/q/27584358
has text: It sounds like the problem is not with your regex. The newline at the end is there from the start. When you double escape it, you're just double escaping a newline that already exists. Use `String.trim()` remove trailing whitespace at the beginning and end of the string (including newlines).
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/comment/43504729
score: 0
comment on: http://stackoverflow.com/a/27537856
type: AnswerComment
type: Comment
has text: Do you have an idea about how to use the json data to rebuild the tree though ?

http://stackoverflow.com/comment/43499349
comment on: http://stackoverflow.com/q/27533608
score: 0
has text: Can you please [edit] to show us how you extended the method?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/57857050
type: Comment
score: 2
has text: If some objects have no manager property they won't appear even if the filter is empty. Do you know a way to include them ?
comment on: http://stackoverflow.com/a/32994920
type: AnswerComment

http://stackoverflow.com/q/27573293
upvote count: 3
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/43572188
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43572112
tagged with: node.js
has comment: http://stackoverflow.com/comment/43831437
has comment: http://stackoverflow.com/comment/43572241
score: 3
answer count: 0
tagged with: geolocation
type: Question
has comment: http://stackoverflow.com/comment/43573837
has body: I am using npm package geolocation but I have also used logic such as if (navigator.geolocation) and I keep getting ReferenceError: navigator is not defined As such? var geo = function(){ //using Mr. Concolato's example function geolocation(){ if(geo.geolocation()){//blah navigator.geolocation.getCurrentPosition(coords) console.log(coords); } } }
has title: What causes node to return 'navigator is not defined'
tagged with: javascript

http://stackoverflow.com/q/27486755
possible better answer: http://stackoverflow.com/a/27486853
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27488372
has body: I'm trying to make a php variable with some js inside for inserting this with an echo $imagerollover = ' onmouseover="document.getElementsByClassName(".'.trim($item-&gt;classe).' a img").src=\'' . JURI::base(true) . '/' . $menu_image_hover . '\'" and then echo '&lt;li '.$imagerollover.'....... I have a annoying issue : the double-quote make some bad output in my html because js stop on double-quote... I have try many conbinaison but I don't find Thanks for your help on this
has answer: http://stackoverflow.com/a/27486844
type: Question
tagged with: javascript
score: 0
answer count: 3
has title: getElementsByClassName and quote issue
accepted answer: http://stackoverflow.com/a/27486844
has answer: http://stackoverflow.com/a/27486853

http://stackoverflow.com/a/27507720
has comment: http://stackoverflow.com/comment/43471350
score: 0
has body: The way the commandButton is set up will make it use the last submitted values to call the javascript function. Before addressing this issue, we may want to understand the relationship between EL, JSF, and Javascript. JSF takes the facelet code and turns it into HTML. Any EL statements are resolved on the server side at that time. So, when it's all said and done, we have an HTML page that we can inspect in our favorite browser. Now comes Javascript, which has no awareness of JSF, so it works solely on the rendered HTML page. With that in mind, we can see why the code above wouldn't work. The EL statements used as argument to the getShift Javascript function will only be resolved when that part of the page is rerendered by the server. It look like the objective here is to call a non-JSF servlet asynchronously when the button is clicked. I would go about this a little differently. Have the commandButton call a JSF method asynchronously, and the method can reach out to the custom servlet. &lt;div id="time_scheduler" style="display: none;" title="Change Event Time" class="dialog"&gt; &lt;div class="block"&gt; &lt;h:form&gt; &lt;span&gt;Select Shift&lt;/span&gt; &lt;p&gt;&lt;/p&gt; &lt;h:selectOneMenu value="#{fieldController.shift}"&gt; &lt;f:selectItems itemLabel=" #{s.shiftName} &amp;nbsp; &amp;nbsp; &amp;nbsp; #{s.startTime} to #{s.endTime}" var="s" value="#{fieldController.allShiftUnfiltered}" /&gt; &lt;f:converter converterId="shconvert" /&gt; &lt;/h:selectOneMenu&gt; &lt;p&gt;&lt;/p&gt; &lt;h:commandButton styleClass="btn btn-small" value="change"&gt; &lt;f:ajax execute="@form" listener="#{someBean.callServlet()} /&gt; &lt;/h:commandButton&gt; &lt;/h:form&gt; &lt;/div&gt; Then, create a backing bean with a method to call the servlet @Named public class SomeBean { @Inject FieldController fieldController; public String callServlet() { Object startTime = fieldController.shift.startTime; Object endTime = fieldController.shift.endTime; //Call the servlet here return nu…
answers question: http://stackoverflow.com/q/27506505
type: Answer
has comment: http://stackoverflow.com/comment/43489459

http://stackoverflow.com/comment/43466754
score: 2
type: Comment
comment on: http://stackoverflow.com/q/27518167
type: QuestionComment
has text: My crystal ball tells me that you have `localWord = JSON.parse(localStorage.getItem("localWord"))` somewhere in your code and that is why `localWord` is null. Please show us all of the relevant code when you post a question.

http://stackoverflow.com/q/27524220
type: AnsweredQuestion
type: Question
downvote count: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/27524291
tagged with: javascript
tagged with: asp.net
favorite count: 0
score: 1
tagged with: panel
has body: Using JS Can get the height of an asp.net panel var test1 = $$('ViewFeatureProperties')[0].offsetHeight; if (test1&lt;500) { //change height of panel to 275 $$('ViewFeatureProperties')[0].offsetHeight = 275px; } could get the value in test1, but wouldnt update to 275 if test1&lt;500, any advice? ta
has title: Change height of panel form javascript
upvote count: 1
has answer: http://stackoverflow.com/a/27524291

http://stackoverflow.com/a/27637427
answers question: http://stackoverflow.com/q/27637408
has body: Module dependencies should go into one array: angular.module('IssueArchiver', ['multi-select', 'DWand.nw-fileDialog', 'ngRoute'])
score: 0
type: Answer

http://stackoverflow.com/a/27516116
downvote count: 0
has comment: http://stackoverflow.com/comment/43462542
has comment: http://stackoverflow.com/comment/43462716
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/43462570
has body: Since oneObject refers to an object, changing it will also change other references to that object. You can solve this with a closure. (function(obj) { globalFunction(obj,id,newval); }(oneObject)) This way, each time you call globalFunction it will receive a unique copy of oneObject. You need to create a closure for the entire reference to oneObject: (function(obj) { obj.watch(property,function(id, oldval, newval){ globalFunction(obj,id,newval); return newval; }); }(oneObject)); (I'm curious what that return is expected to do in a callback, but that's a separate issue.)
answers question: http://stackoverflow.com/q/27516038
accepted answer of: http://stackoverflow.com/q/27516038
has comment: http://stackoverflow.com/comment/43462698
type: AcceptedAnswer

http://stackoverflow.com/a/27547918
answers question: http://stackoverflow.com/q/27537383
has body: I found out that I put ng-controller="" in the HTML element that calls the logIn() function. In fact, I called it twice and causes the view update to fail.
score: 0
type: Answer

http://stackoverflow.com/comment/43623329
type: Comment
score: 0
type: AnswerComment
has text: What is `selectRoles()`? Is it something exactly like `selectEntities()` function?
comment on: http://stackoverflow.com/a/27596998

http://stackoverflow.com/comment/44894366
comment on: http://stackoverflow.com/a/27605346
type: AnswerComment
type: Comment
has text: could you link to the api docs? I can't find the functions that you mention here...
score: 1

http://stackoverflow.com/q/27553888
answer count: 1
downvote count: 0
favorite count: 0
has body: I'm working on my first Chrome extension. Very much a beginner with javascript so bear with me... Basically, I've written a Chrome extension that adds a new context menu item when you right click on a hyperlink. I want to make it so when you click that context menu item, it copies the href value of the hyperlink you're clicking on (essentially, this will duplicate the 'Copy Link Address' menu item, but later I will use substrings to copy only a certain part of the URL). What can I do to set the sUrl variable to the href of the current hyperlink? And then what is the proper way to pass this variable to the clipboard using execCommand('copy')? My manifest.json is below: { "name": "Copy SKU", "description": "Add a context menu item to copy SKU from webpages", "version": "1.0", "permissions": ["contextMenus", "clipboardWrite"], "background": { "persistent": false, "scripts": ["background.js"] }, "manifest_version": 2 } My current background.js is below: // Set up context menu at install time. chrome.runtime.onInstalled.addListener(function() { var context = "link"; var title = "Copy SKU"; var id = chrome.contextMenus.create({"title": title, "contexts":[context], "id": "context" + context}); }); // add click event chrome.contextMenus.onClicked.addListener(onClickHandler); // The onClicked callback function. function onClickHandler(info, tab) { var sUrl = HYPERLINK HREF document.execCommand('copy', false, null); };
tagged with: google-chrome-extension
has title: Copy Link Href within Chrome Extension
tagged with: contextmenu
type: UnansweredQuestion
score: 1
upvote count: 1
tagged with: google-chrome
has answer: http://stackoverflow.com/a/27556930
tagged with: javascript
type: Question
tagged with: execcommand

http://stackoverflow.com/comment/43616941
has text: Why not add a class?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27596558

http://stackoverflow.com/comment/43439035
has text: So you want the data bound to the selection? `.data()`
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27503972
score: 1

http://stackoverflow.com/a/27486730
accepted answer of: http://stackoverflow.com/q/27479475
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: If you use Sencha Cmd to create the project in the beginning you'll be setup with the folder structure you need. In the Terminal: sencha -sdk /path/to/touch-x.x.x generate app MyApp /path/to/www/myapp You will be setup with a directory structure like this... MyApp/ |_ app/ | |_ controller/ | |_ model/ | |_ store/ | |_ view/ |_ build/ |_ packages/ ... |_ resources/ ... |_ touch/ ... &lt;-- this folder is also generated for you. |_ app.js |_ app.json |_ bootstrap.js |_ bootstrap.json |_ build.xml |_ index.html |_ packager.json I'm not sure about keeping the templates in one file but I've seen someone say they could keep their templates in the index.html file in script tags and reference it somehow. Not sure about how that works.
upvote count: 3
answers question: http://stackoverflow.com/q/27479475
score: 3

http://stackoverflow.com/comment/43401444
has text: Yeah, split(",") is a good idea. But how can I get the value inside of {}? It is always a number from 0 too XXXX. split("{") and then split("}")?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27484643

http://stackoverflow.com/comment/43391833
type: QuestionComment
comment on: http://stackoverflow.com/q/27478953
score: 0
type: Comment
has text: Working perfectly after adding that additional plugin. Thankyou all.

http://stackoverflow.com/a/27615529
has comment: http://stackoverflow.com/comment/43681804
score: 0
has body: You can also try innerWidth() / outerWidth() methods to obtain exact widths.. Just write : $('div').outerWidth(): A more detailed explanation can be found in this answer
has comment: http://stackoverflow.com/comment/43654166
type: Answer
has comment: http://stackoverflow.com/comment/43653485
answers question: http://stackoverflow.com/q/27615396

http://stackoverflow.com/a/27538247
score: 2
answers question: http://stackoverflow.com/q/27537959
downvote count: 0
has comment: http://stackoverflow.com/comment/43520587
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43588911
has body: In this case, the component probably doesn't need state. If you manage the http requests in angular, then the react component is simpler and easier to reuse. var containerTarget = document.querySelector('.order-wrapper'); // idempotent update function function update(props){ React.render(React.createElement(OrdersTable, props), containerTarget); } var fetchDataAndUpdate = function(){ var search = $location.search(); var page = search.hasOwnProperty('page') ? search.page : 0; var sort = search.hasOwnProperty('sort') ? search.sort : 'number,desc'; OrderService.ordersSummary({ page: page, sort: sort }).then(function(results){ update({data: results, page: page, sort: sort}); }); }; fetchDataAndUpdate(); $scope.$on('$routeUpdate', fetchDataAndUpdate); // optionally do an initial render before you have data update({}); You can also pass it callbacks for when a column header, or pagination button is clicked, and react accordingly in angular.
type: Answer
accepted answer of: http://stackoverflow.com/q/27537959

http://stackoverflow.com/a/27637189
downvote count: 0
answers question: http://stackoverflow.com/q/27630314
type: Answer
has body: Try changing your events option to this: events: { url: '/pushCombos/calendarioAction!getEventosMes.action', type: 'GET', data: { mes: 1 }, cache: false, error: function (jqXHR, textStatus, errorThrow) { //whatever you want } }
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27630314
has comment: http://stackoverflow.com/comment/43809580
type: AcceptedAnswer

http://stackoverflow.com/a/27498162
type: Answer
upvote count: 3
answers question: http://stackoverflow.com/q/27497581
has comment: http://stackoverflow.com/comment/43427675
score: 3
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27497581
has body: Try this code: $(function() { var button; $('.ladda-button').click(function(e){ button = this; }) $("input,textarea").jqBootstrapValidation({ preventSubmit: true, submitError: function($form, event, errors) { // additional error messages or events }, submitSuccess: function($form, event) { event.preventDefault(); // prevent default submit behaviour var l = Ladda.create(button); l.start(); // Starts the spinner // get values from FORM var name = $("input#name").val(); var email = $("input#email").val(); var phone = $("input#phone").val(); var message = $("textarea#message").val(); var firstName = name; // For Success/Failure Message // Check for white space in name for Success/Fail message if (firstName.indexOf(' ') &gt;= 0) { firstName = name.split(' ').slice(0, -1).join(' '); } $.ajax({ url: "././mail/contact_me.php", type: "POST", data: { name: name, phone: phone, email: email, message: message }, cache: false, success: function() { // Success message $('#success').html("&lt;div class='alert alert-success'&gt;"); $('#success &gt; .alert-success').html("&lt;button type='button' class='close' data-dismiss='alert' aria-hidden='true'&gt;&amp;times;") .append("&lt;/button&gt;"); $('#success &gt; .alert-success') .append("&lt;strong&gt;Your message has been sent. &lt;/strong&gt;"); $('#success &gt; .alert-success') .append('&lt;/div&gt;'); l.stop(); // Stops the spinner //clear all fields $('#contactForm').trigger("reset"); $('#contactForm').click() }, error: function() { // Fail message $('#success').html("&lt;div class='alert alert-danger'&gt;"); $('#success &gt; .alert-danger').html("&lt;button type='button' class='close' data-dismiss='alert' aria-hidden='true'&gt;&amp;times;") .append("&lt;/button&gt;"); $('#success &gt; .alert-danger').append("&lt;strong&gt;Sorry " + firstName + ", it seems that my mail server is not responding. Please try again later!"); $('#success &gt; .alert-danger').append('&lt;/div&gt;'); l.stop(); // Stops the spinner //clear all fields $('#…

http://stackoverflow.com/q/27608176
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I am struggling to produce an infowindow in google maps that displays a list of nearby locations from a mySQL db and their distance and time from a placemark the user can drag around. The best I can do is to display the locations but not the info for the time and distance - i can access it and display in an alert, but not on the infowindow. I think my problem is that i am trying to perform 2 actions (mySQL query to get list and google distance matrix api to get time/distnace) that each require callbacks but don't understand how i can combine all the output together to display the infowindow without the undefined values problem. function get_nearby_plants(location){ var searchUrl = 'phpsqlsearch_genxml.php?lat=' + location.lat() + '&lng=' + location.lng(); downloadUrl(searchUrl, function(data) { var xml = parseXml(data); var markerNodes = xml.documentElement.getElementsByTagName("marker"); for (var i = 0; i < markerNodes.length; i++) { // replace 1 with markerNodes.length buyername[i] = markerNodes[i].getAttribute("BuyerName"); // more populating arrays calculateDistances(pass_start, pass_dest) // this function is to get drive distances and times and display them but i dont // know how to include them with the data in the array } // end for i= loop var c=0; var output = ' Potential Suppliers Address Distance '; //to populate an html table to go in the infowindow for (c = 0; c < resultcount; c++){ output = output + ' ' + buyerid[c] + ' ' + buyername[c] + ' ' + buyerparent[c]+ ' ' + buyeraddress[c] + ' ' + kms[c] + 'km ' + myStart[c] + ' ' + myDest[c] + ' '; } var contentstring=' test'+ display_string +' '; var infowindow = new google.maps.InfoWindow({ content: output }); infowindow.open(map,marker); }); } // end function get_nearby_plants() function calculateDistances(myStart, myDest) { var service = new google.maps.DistanceMatrixService(); service.getDistanceMatrix( { origins: [myStart], destinations: [myDest], travelMode: google.maps.TravelMode.DRIVING, unitSystem: …
has title: Multiple Callbacks to get google maps distance and duration
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/43639138
score: 0
has answer: http://stackoverflow.com/a/27619017
tagged with: google-maps

http://stackoverflow.com/q/27542928
type: Question
answer count: 2
tagged with: highcharts
accepted answer: http://stackoverflow.com/a/27591082
tagged with: javascript
upvote count: 11
favorite count: 0
has answer: http://stackoverflow.com/a/36270224
tagged with: http://stackoverflow.com/tag/svg
has title: Extend highcharts renderer symbols to have plus sign
has comment: http://stackoverflow.com/comment/43605699
has answer: http://stackoverflow.com/a/27591082
downvote count: 1
possible better answer: http://stackoverflow.com/a/36270224
has body: How can I extend highcharts renderer symbols library to include a "Plus" sign.
type: AnsweredQuestion
score: 10
has comment: http://stackoverflow.com/comment/43605623

http://stackoverflow.com/q/27516037
tagged with: javascript
has answer: http://stackoverflow.com/a/27516114
has body: Is their a way- client side, to add text to a file named text.txt in javascript? In python: f = open("text.txt","w") f.write("Hello World") f.close() would write "Hello World" into the text file. I want to do something similar with javascript. Note: I am running these files locally.
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/16055391
tagged with: file
has comment: http://stackoverflow.com/comment/43462447
has title: Add content to .txt file from javascript
type: Question
score: 0
answer count: 1

http://stackoverflow.com/a/46062057
upvote count: 1
score: 1
downvote count: 0
type: Answer
has body: In general mixing Symfony and Angular is not the best approach. Your app will be more maintainable if you separate completely your view and backend. But still if you want to do that you can use some existing plugins to handle Symfony Routing in JavaSripts. The most easy way to make Symfony and Angular work smoothly together is to envelop your Angular html in components (to avoid conflict with Twig). Than you can pass your baseUrl to those components like this : &lt;componentName baseurl="{{ app.request.scheme ~ '://' ~ app.request.httpHost ~ app.request.basePath }}"&gt;&lt;/componentName &gt; and then use it in your templateUrl function templateUrl: function($attrs) { return $attrs.baseurl + 'templates/componentName.template.html'; } Voila, not beautiful but working solution.
answers question: http://stackoverflow.com/q/27636258

http://stackoverflow.com/comment/43473051
type: QuestionComment
score: 0
has text: is there somebody with same problem or can solve the problem?, please help me. just one more step to complete my plugin.
comment on: http://stackoverflow.com/q/27517288
type: Comment

http://stackoverflow.com/q/27506310
has comment: http://stackoverflow.com/comment/43445518
has body: I've a problem on a clean json string on a textarea. I've a form with a textarea. A validation, it sends an email by taking the forms of information. But I get an error when I pass a line in my textarea. Ma fonction JS : function submit() { var path = $(location).attr('href'); try { var parameters = '{ "url" : "' + escape(path) + '", "prénom" : "' + cleanJSONString($("#inputFirstname").val()) + '", "nom" : "' + cleanJSONString($("#inputLastname").val()) + '", "email" : "' + cleanJSONString($("#inputEmail").val()) + '", "message" : "' + cleanJSONString($("#inputMessage").val()) + '", "captchachallenge" : "' + capchallenge + '", "captcharesponse" : "' + capresponse + '" }'; contentSubmit = $("#submitArea").html(); $("#submitArea").empty().html(' '); jQuery.ajax({ type: "POST", url: '_vti_bin/json/service.svc/submit', contentType: "application/json; charset=utf-8", dataType: 'json', data: parameters, success: function (msg) { submitSucceeded(msg); $("#submitArea").empty().html(contentSubmit); resetRealPersonCaptcha(); }, error: submitFailed }); } catch (e) { alert('Error invoking service' + e); clearUploadPart(); } //Recaptcha.reload(); } The function who clean values in json properties so as to send a valid json request : function cleanJSONString(str) { if (typeof str == 'undefined' || str == null) return ""; //clean values in json properties so as to send a valid json request return str.replace(/[/\\""]/g, "") .replace(/\\n/g, "") .replace(/\\&/g, "\\&") .replace(/\\r/g, "\\r") .replace(/\\t/g, "\\t") .replace(/\\b/g, "\\b") .replace(/\\f/g, "\\f"); } And my ASP form : Submit ** Add your message here ** SEND FORM I don't understand why i've an error when I pass a line in my textarea. Do you have any idea ? Is this an error in json properties so as to send a valid json request ?
tagged with: asp.net
has comment: http://stackoverflow.com/comment/43444371
answer count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/json
type: Question
has comment: http://stackoverflow.com/comment/43442938
has title: How to perform a clean json for a carriage return?
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43443111
tagged with: ajax
score: 0

http://stackoverflow.com/comment/43509292
has text: I am not familiar with ajax. Can you please have a look at http://pulukool.in.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27540478
type: Comment

http://stackoverflow.com/q/27615020
upvote count: 5
tagged with: javascript
answer count: 3
has answer: http://stackoverflow.com/a/27615757
downvote count: 0
has answer: http://stackoverflow.com/a/28881689
tagged with: gulp
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27615049
type: Question
score: 5
has body: My build.js is using ngHtml2js to convert partials in directives into js files. gulp.task('partials', function () { return gulp.src('src/{components,app}/**/*.html') .pipe($.ngHtml2js({ moduleName: 'testApp' })) .pipe(gulp.dest('.tmp')) .pipe($.size()); }); Where, my directives are situated in components folder in components->directives. The issue is that when I try to deploy the dist folder, the static partial calls from the routes JS files gets fired, and I get a 404. angular.module(ModuleName) .directive('collapseWindow', ['$parse', function (parse) { return { templateUrl:'/components/directives/collapse.html', transclude:true, restrict: 'A' In my understanding, the ngHtml2js converts the partials into module.run blocks as module.run(['$templateCache', function($templateCache) { $templateCache.put('components/directives/collapse.html', '&lt;div class="collapsible"&gt;\n' ... But then, why am I getting a 404 error such as GET http://localhost:3000/components/directives/collapse.html 404 (Not Found)
has title: Gulp Angular build templateCache issue

http://stackoverflow.com/comment/43594833
type: QuestionComment
comment on: http://stackoverflow.com/q/27585117
has text: ` ` - in case you missed the ` ` tag. Plus, the "?" was outside your quotes. Code worked fine for me.
score: 0
type: Comment

http://stackoverflow.com/q/27580943
has answer: http://stackoverflow.com/a/27581156
has body: I have to generate a string in Jquery by looping the List as follows events: [ { title: 'All Day Event', start: '2014-11-01' }, { title: 'Long Event', start: '2014-11-07', end: '2014-11-10' }, { id: 999, title: 'Repeating Event', start: '2014-11-09T16:00:00' }, { id: 999, title: 'Repeating Event', start: '2014-11-16T16:00:00' }, { title: 'Conference', start: '2014-11-11', end: '2014-11-13' }, { title: 'Meeting', start: '2014-11-12T10:30:00', end: '2014-11-12T12:30:00' }, { title: 'Lunch', start: '2014-11-12T12:00:00' }, { title: 'Meeting', start: '2014-11-12T14:30:00' }, { title: 'Happy Hour', start: '2014-11-12T17:30:00' } ] The list contain these elements but I'm unable to generate this kind of string .I've tried in two ways for(var i=0; i&lt;customers.length; i++) { "{" "title:" +customers[i].Column1+"," "start:"+customers[i].Column3 "}" if(i!=customers.length-1) { "," } } and $.each(eventList, function (index, employee) { { title:employee.name, start:employee.date } , }); but I'm unable to get proper result please give me solution for this .To get list I'm using the following coe $(document).ready(function () { $.ajax({ type: 'POST', dataType: 'json', contentType: 'application/json', url: 'ProjectedYieldCalender.aspx/GetData', data: '{}', success: function (data) { var eventList = data.d eventList=demo(eventList); initCalendar(eventList); } }); }); function initCalendar(eventList) { $('#calendar').fullCalendar({ header: { left: 'prev,next today', center: 'title', right: 'month,basicWeek,basicDay' }, //defaultDate: '2014-08-12', editable: true, eventLimit: true, // allow "more" link when too many events events: [ eventList ] }); } Thank you
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43586381
has title: How to generate string using for loop in JQuery in ASP.net?
has comment: http://stackoverflow.com/comment/43586293
tagged with: javascript
type: Question
score: 0
answer count: 1
tagged with: jquery
tagged with: asp.net

http://stackoverflow.com/comment/43654007
has text: It's better to use `hasOwnProperty` when you move into the JSON. Just to be failsafe.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27616284

http://stackoverflow.com/a/27622983
has comment: http://stackoverflow.com/comment/43668974
has comment: http://stackoverflow.com/comment/43668908
score: 0
has body: You could return a promise and resolve if later (see: https://docs.angularjs.org/api/ng/service/$q). function getComplexObject () { var deferred = $q.defer(); var complexObject = { 'A': null, 'B': null } $http.get('someURI').then(function(data) { complexObject.A = data; //Do some processing and set B deferred.resolve(complexObject); }); return deferred.promise; };
has comment: http://stackoverflow.com/comment/43666749
answers question: http://stackoverflow.com/q/27622837
type: Answer
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/43666441

http://stackoverflow.com/q/27499151
has comment: http://stackoverflow.com/comment/43429681
linked to: http://stackoverflow.com/q/16791295
type: Question
has answer: http://stackoverflow.com/a/27535514
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43429312
has body: I have a PhoneGap application in which I need to download certain images for offline usage and show those inside an iframe. Is this possible and do I need something like CorHTTPD (https://github.com/floatinghotpot/cordova-httpd) to serve the assets locally? I have been trying to store the files on file system but when I try to show those (even without being inside iframe), those doesn't show. They seem to be loaded (can be seen in network console in remote debugging), though, but (of course) without any headers.
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27535514
score: 0
has title: PhoneGap show downloaded image in iframe
tagged with: cordova

http://stackoverflow.com/comment/61891875
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27511897
has text: @Bergi was `.toMethod` deprecated? I can't seem to find it implemented in any browser.
score: 0

http://stackoverflow.com/q/27604916
tagged with: gsap
has title: MouseOver CSS3D effect with javascript
tagged with: css
accepted answer: http://stackoverflow.com/a/27644265
favorite count: 0
has comment: http://stackoverflow.com/comment/43756353
possible better answer: http://stackoverflow.com/a/30307641
has comment: http://stackoverflow.com/comment/43638843
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/30307641
score: 10
upvote count: 10
type: Question
has comment: http://stackoverflow.com/comment/43773489
has answer: http://stackoverflow.com/a/27644265
answer count: 2
has comment: http://stackoverflow.com/comment/43699800
downvote count: 0
tagged with: javascript
has body: I am trying to achieve mouseOver effect like this. I am able to generate css3d matrix required for each and every tile according to their position. I have achieved this effect with slow mouse movement, but if I am moving fast from one tile to another tile its notupdating properly. its showing gap in between tiles. What is the best way to update all the tile/tile co-ordinates on mouseover so that i get consistent effect? here is my js code: $('.box').each(function() { $(this).css('height', '284px'); $(this).css('width', '284px'); }); generateGrid = function(w, h) { var t = this; this.p = []; var d = 30; var c = Math.floor($('.w').outerWidth() / 284 + 1); var r = Math.ceil($('.w').outerHeight() / 284) + 1; var vc = c * r; for (i = 0; i < vc; i++) { var l = { x: Math.floor(i % c) * 284, y: Math.floor(i / c) * 284 }; this.p.push(l); } var m = m || {}; m.Grid = function() { this.elms = []; this.init(); }, m.Grid.prototype = { init: function() { this.createTiles(); }, animateTile: function() { var e = this; for (i = 0; i < e.elms.length; i++) { console.log(i); e.elms[i].update(); } requestAnimationFrame($.proxy(this.animateTile, this)); }, createTiles: function() { var c = this; for (i = 0; i < $('.box').length; i++) { c.elms.push(new m.tile($('.box:eq(' + i + ')'), i)); } c.animateTile(); } }, m.tile = function(e, i, pt) { this.el = e; this.i = i; var p = t.p; this.elX = Math.floor(i % 4) * 284, this.elY = Math.floor(i / 4) * 284, this.p1 = p[i + Math.floor(i / 4)], this.p2 = p[i + Math.floor(i / 4) + 1], this.p3 = p[i + Math.floor(i / 4) + 6] this.p4 = p[i + Math.floor(i / 4) + 5]; this.init(); }, m.tile.prototype = { init: function() { this.initEvents(); }, initEvents: function() { var e = this; var pts = t.p; var p1 = pts[e.i + Math.floor(i / 4)], p2 = pts[e.i + Math.floor(i / 4) + 1], p3 = pts[e.i + Math.floor(i / 4) + 6], p4 = pts[e.i + Math.floor(i / 4) + 5]; $(e.el).hover(function() { TweenMax.killTweensOf(p1), TweenMax.killTweensOf(p2), TweenMax.killTweensOf(p3),…
tagged with: jquery

http://stackoverflow.com/comment/43867988
has text: Thanks! I like to "override" as it forces me to know how things work that I use, that way I can customize any 3rd party component to my needs, write my own tests to guarantee it works, and I don't depend on how active is the project. I might even override Angular, if they upset me too much :)
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27701537

http://stackoverflow.com/a/27652966
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/27583853
has body: I ended up using oozcitak/xmlbuilder-js (actually a Meteor derivative) for server side xml generation. Works great!
answers question: http://stackoverflow.com/q/27583853
score: 0

http://stackoverflow.com/comment/43472112
type: QuestionComment
comment on: http://stackoverflow.com/q/27520898
score: 0
type: Comment
has text: try to print your query and see what is generated, then try to launch that query on your db from php my admin and see what it tells you

http://stackoverflow.com/comment/43671957
has text: I want to render it inside of the canvas
score: 0
comment on: http://stackoverflow.com/q/27625760
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27604469
accepted answer: http://stackoverflow.com/a/27612306
answer count: 2
has answer: http://stackoverflow.com/a/27606856
upvote count: 1
has comment: http://stackoverflow.com/comment/44668448
favorite count: 0
has answer: http://stackoverflow.com/a/27612306
tagged with: backbone.js
has comment: http://stackoverflow.com/comment/43680999
tagged with: memory-leaks
tagged with: marionette
has title: Backbone + Marionette - Memory managment best practices for Models/Collections?
type: AnsweredQuestion
tagged with: memory-management
downvote count: 0
score: 1
possible better answer: http://stackoverflow.com/a/27606856
has body: What are the best practices when destroying models/collections using Backbone and Marionette? I know that views are automagically memory managed by Marionette (if used correctly) but how about models/collections? When do you destroy them? Is it when your view gets destroyed like for instance the code (it is TypeScript instead of JavaScript) below or? class SomeItemView extends Marionette.ItemView&lt;Backbone.Model&gt; { destroy() { super.destroy(); delete this.model; // is this the best way to destroy a model/collection? } }
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/44684844

http://stackoverflow.com/comment/43514997
has text: This isn't a UX question because you've already decided what the User Experience answer is: you want to provide auto suggest. What you're asking here is *how* to implement that UX solution, so you've moved on from the scope of this site at that point. We can help with *what* to implement, but *how* you implement it is out of scope here.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27544121

http://stackoverflow.com/q/27627728
answer count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/43716244
has body: I have a file that has content that looks like this: object node { name swing120; from 679-1025; to spt128-1043; configuration lineover-1bc2-ac; } object switch { name spectializer120; phases BN; from spt128-1043; to 678-1022; status OPEN; } How to convert it into a JSON file so I can convert the JSON file into a graphic using d3.js visualization (by importing the JSON file). I tried some online to-JSON converters but did not do the job quite right. I thought of writing a python script to convert it into a .csv file and import that .csv file into D3 but by reading D3 documentation, converting it into JSON and importing it into D3 makes more sense.
type: Question
has title: convert a file into JSON to use in D3 for visualization
tagged with: javascript
has comment: http://stackoverflow.com/comment/43700036
score: 0
has comment: http://stackoverflow.com/comment/43676617
has comment: http://stackoverflow.com/comment/43679343
has comment: http://stackoverflow.com/comment/43676370
has comment: http://stackoverflow.com/comment/43678237
has comment: http://stackoverflow.com/comment/43680208
has comment: http://stackoverflow.com/comment/43677212
has comment: http://stackoverflow.com/comment/43736847
tagged with: d3.js

http://stackoverflow.com/comment/43690417
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27635618
has text: btw, why do you want to add a extra div? it seems you are adding it to clear the float.. is it so?

http://stackoverflow.com/comment/43655739
type: QuestionComment
comment on: http://stackoverflow.com/q/27616087
has text: I am searching on internet regrading these topic but still can't found something related to this topic have any link for reference?
score: 0
type: Comment

http://stackoverflow.com/comment/43622556
has text: whne you reach the frame you want use getImageData from the whole canvas, edit the values and draw the new imagedate to the canvas http://www.w3schools.com/tags/canvas_getimagedata.asp
type: Comment
comment on: http://stackoverflow.com/q/27597366
score: 0
type: QuestionComment

http://stackoverflow.com/q/27588533
tagged with: javascript
tagged with: jquery
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/27589246
has comment: http://stackoverflow.com/comment/43602514
favorite count: 0
tagged with: angularjs
upvote count: 2
accepted answer: http://stackoverflow.com/a/27589246
score: 2
type: AnsweredQuestion
type: Question
has body: I use a jQuery slider and need to detect on slideBl element when it gets a cycle-slide-active class, which is moving from slide to slide continuously. here is my Jade(html): #slideshow2(slideshow, data-cycle-speed="500", data-cycle-prev="#prev", data-cycle-next="#next") div.slideBl(ng-repeat="image in images" ng-init="rating = image.rate" class="slide{{image.id}}") span(star-rating, rating-value="rating" max="5" on-rating-selected="rateFunction(rating)") img.slide.img-responsive(ng-src="{{image.url}}") div() {{image.count}} I have read about Angular's $observe and $watch, and thanks to Ben Nadel's tutorial, I end up with next directive: .directive('slideBl', function ($compile) { return { restrict: "C", link: // I bind the UI events to the local scope. function ( $scope, element, attrs ) { setTimeout(function () { // Register an $observe callback. attrs.$observe( "slideBl", function innerObserveFunction() { console.log( "Inner $observe() fired." ); } ); // Register a $watch callback. $scope.$watch( function innerWatchFunction() { console.log( "Inner $watch() fired." ); }); }, 250); } }; }); With this code I can detect all slideBl elements after page loads, but how do I keep on tracking for cycle-slide-active class changes, so I could count how many times slide was shown?
has title: Angular action on a class change

http://stackoverflow.com/comment/43683285
comment on: http://stackoverflow.com/q/27631436
has text: did you try to google `jquery css`? Would likely have found this http://api.jquery.com/css/
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27505517
tagged with: image
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/27506846
tagged with: http://stackoverflow.com/tag/svg
has body: I am new to svg. I have an image that I want to rotate. I have rotated the image using rotation transform and giving it an angle and coordinates of the point around which I want to rotate the image. My requirement is when I drag the Image after rotation, I want to check that top-left corner is within bounding area. This works before rotate. But after rotation, it seems that after applying this transform to the Image, my coordinate system is also rotated in the same angle. This is causing some problem for me. Is there any way to rotate the image without rotating the original coordinate system? Also x and y attribute of image is not getting updated if I rotate image .
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27506846
type: Question
tagged with: transform
tagged with: rotation
has title: Transform image in svg without transforming coordinate system
tagged with: javascript

http://stackoverflow.com/q/27511060
tagged with: loops
has body: I have a javascript object that represents a processing video. As the video is processing, I send a request to the server every 5000 milliseconds, and once it is processed, it should unbind itself, and complete. The trouble is that every time it checks the server to see if it's complete, it re-renders an instance of itself, and binds an additional 5000 millisecond timeout. Consequentially an exponential loop occurs, and will eventually crash the browser. I have a loop error occurring because of this event handler : initialize: function() { this.on('all', this.reset_auto_refresh, this); this.auto_refresh(); }, Once this initialize() method is cast, it binds reset_auto_refresh and runs auto_refresh . auto_refresh: function(timeout) { if(this.is_processing()) { if(!timeout) timeout = 5000; var callback = _.bind(function() { this._timer = null; this.fetch({error: _.bind(function() { this.reset_auto_refresh(15000); }, this)}); this.auto_refresh(); }, this); this._timer = setTimeout(callback, timeout); } }, reset_auto_refresh: function(timeout) { if(this._timer) clearTimeout(this._timer); this.auto_refresh(timeout); } Because every time it instantiates, it's technically a different object, I havn't figured out a way for any instance to share a single ._timer, and therefore, they keep adding on new setTimeout's even though one already exists and is running. Would anyone know a best practice, or a way to prevent multiple instances setting a setTimeout here?
answer count: 0
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
score: 1
favorite count: 0
type: Question
upvote count: 1
tagged with: settimeout
has title: How can I prevent multiple setTimeout 's from being set?
tagged with: timeout

http://stackoverflow.com/comment/43572188
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27573293
has text: Anything I can use to get geolocation then?

http://stackoverflow.com/q/27626798
tagged with: laravel-routing
has body: i have the following code eo.changeState = function(clicked_button) { // get the selected app path var app_path = getAppPath(clicked_button); // get the selected app status $.ajax({ type: 'POST', url: '/get_app_status/' + encodeURIComponent(app_path), context: clicked_button }) }; and am using the route Route::post('get_app_status/{app_path}', [ 'as' =&gt; 'get_app_status', 'uses' =&gt; 'LocalDataController@getAppStatus' ]); the problem is when i click the button, i get the following error POST http://localhost:8000/get_app_status/%2Fmedia%2FData%2FCode%2Fproject%2Fdone%2FServiceManager 404 (Not Found) i think its because the %, but i don't know a javascript way to fix this problem, except using a replace method, by just replace all the '/'s on javascript, then get them back with str_replace in php. is there a valid fix on javascript ?
tagged with: php
has title: how to send a link as a parameter in php laravel
has answer: http://stackoverflow.com/a/27626916
accepted answer: http://stackoverflow.com/a/27626908
possible better answer: http://stackoverflow.com/a/27626916
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/43674204
type: AnsweredQuestion
tagged with: javascript
answer count: 2
has answer: http://stackoverflow.com/a/27626908
tagged with: laravel-4
downvote count: 0
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/43674180

http://stackoverflow.com/q/27508833
type: Question
tagged with: ecmascript-6
has title: Shim vs. Sham: What is the difference?
has body: What is the difference between a shim an a sham? Is it enough to include es5-shim.min.js and es6-shim.min.js or should I also include es5-sham.min.js and es6-sham.min.js?
tagged with: ecmascript-5
tagged with: javascript
tagged with: polyfills
has comment: http://stackoverflow.com/comment/43448308
has comment: http://stackoverflow.com/comment/43447919
has answer: http://stackoverflow.com/a/27508921
answer count: 1
favorite count: 0
upvote count: 56
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27508921
score: 55
downvote count: 1

http://stackoverflow.com/q/27597990
answer count: 2
tagged with: angularjs
has answer: http://stackoverflow.com/a/27598071
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27598310
type: Question
has answer: http://stackoverflow.com/a/27598310
accepted answer: http://stackoverflow.com/a/27598071
tagged with: javascript
score: 0
has title: Injecting service to controller fails in angularJS
has body: My code is like this Controller.js var errorMessage = { MessageHeader: "Error", Message: "Something went wrong. Please try again later." }; angular.module('RateRequestApp.controllers', []).controller('ReadOnlyController', [ '$scope', 'updateTruckNoService', 'messageModalService', '$modal', function ($scope, updateTruckNoService, messageModalService, $modal) { messageModalService.showMessageModal(errorMessage); } ]); Services.js angular.module('RateRequestApp.services').factory('messageModalService', [ '$modal', messageModalService]); function messageModalService($modal) { function showMessageModal(response) { var modalInstance = $modal.open({ templateUrl: 'MessageModal.html', controller: 'ModalInstanceCtrl', resolve: { items: function () { return response; } } }); }; } App.JS angular.module('RateRequestApp', [ 'RateRequestApp.services', 'RateRequestApp.controllers', 'ui.bootstrap', 'angular-loading-bar' ]); Everything looks okay to me, But this throws an error TypeError: Cannot read property 'showMessageModal' of undefined at line messageModalService.showMessageModal(errorMessage);

http://stackoverflow.com/q/27631284
has answer: http://stackoverflow.com/a/27631428
has title: What is different between inside table and outside table html tag when using javascript to calculate some value?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43682981
type: Question
has body: How to access Class in table element to calculate its value NOTES: If I don't put input element into table->tbody->tr->td It will work with javascript below And If I put input element into table it will work for me (if I don't used table). So What is wrong when I put input element into tbody inside of table tag? Here is HML tag <?php echo form_open(base_url('invoice/add'));?> No DESCRIPTION Type QUANTITY UNIT PRICE AMOUNT (USD) 1 <?php echo form_textarea('descr',set_value('descr',''),'class="descriptoin my-form-control"')?> <?php echo form_dropdown('type',$type,'',' class="type form-control" placeholder="type"')?> <?php echo form_input('quant',set_value('quant',' '),'class="qty"')?> <?php echo form_input('unit_p',set_value('unit_p',' '),'class="unit"')?> <?php echo form_input('amount',set_value('amount',' '),'class="amount" readonly')?>$ <?php echo form_textarea('descr',set_value('descr1',''),'class="descriptoin my-form-control"')?> <?php echo form_input('vat',set_value('',''), 'class="qty"')?> <?php echo form_input('vat',set_value('',''), 'class="unit"')?> <?php echo form_input('vat',set_value('',''), 'class="amount" readonly')?>$ <?php echo form_textarea('descr',set_value('descr2',''),'class="descriptoin my-form-control"')?> <?php echo form_input('vat',set_value('',''), 'class="qty"')?> <?php echo form_input('vat',set_value('',''), 'class="unit"')?> <?php echo form_input('vat',set_value('',''), 'class="amount" readonly')?>$ <?php echo form_textarea('descr',set_value('descr3',''),'class="descriptoin my-form-control"')?> <?php echo form_input('vat',set_value('',''), 'class="qty"')?> <?php echo form_input('vat',set_value('',''), 'class="unit"')?> <?php echo form_input('vat',set_value('',''), 'class="amount" readonly')?>$ <?php echo form_textarea('descr',set_value('descr4',''),'class="descriptoin my-form-control"')?> <?php echo form_input('vat',set_value('',''), 'class="qty"')?> <?php echo form_input('vat',set_value('',''), 'class="unit"')?> <?php echo form_input('vat…
has comment: http://stackoverflow.com/comment/43682955
has comment: http://stackoverflow.com/comment/43682992
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: codeigniter-2
has comment: http://stackoverflow.com/comment/43683011
has comment: http://stackoverflow.com/comment/43682960
score: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/43689855
comment on: http://stackoverflow.com/a/27635287
type: AnswerComment
score: 0
type: Comment
has text: let me edit, yes this will . can you eloborate your question of comment

http://stackoverflow.com/comment/43459854
has text: try icons[y].setAttribute('src', yourURL);
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27514683
type: QuestionComment

famo.us
tags question: http://stackoverflow.com/q/27520921
tag name: famo.us
tags question: http://stackoverflow.com/q/27559914
tags question: http://stackoverflow.com/q/27634985
tags question: http://stackoverflow.com/q/27543409
tags question: http://stackoverflow.com/q/27638663
type: Tag

http://stackoverflow.com/comment/43653045
comment on: http://stackoverflow.com/q/27597366
score: 0
type: QuestionComment
type: Comment
has text: try and replacing var im1 = 'images/img1.png'; with var im1 = new Image(); im1.src = "images/img1.png";

velocity
tags question: http://stackoverflow.com/q/27619106
type: Tag
tag name: velocity

http://stackoverflow.com/comment/54125444
type: Comment
has text: I was also getting an error for copyElement.remove() in safari so wrapped it with $. You might need some other solution for that if you don't want jQuery for dependency.
comment on: http://stackoverflow.com/a/32467898
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43522890
type: Comment
type: QuestionComment
has text: `$.isEmptyObject(image)` checks a string and returns false even though the string is empty. You should compare it e.g. with `image.length`
comment on: http://stackoverflow.com/q/27548314
score: 0

http://stackoverflow.com/a/27529885
answers question: http://stackoverflow.com/q/27517307
type: Answer
score: 0
has body: For PHP there is SublimeText Xdebug, which integrates with Xdebug to allow you to set breakpoints at which it will show you the current value of all variables.

http://stackoverflow.com/comment/43659029
score: 0
type: Comment
type: QuestionComment
has text: can you post your code
comment on: http://stackoverflow.com/q/27619034

http://stackoverflow.com/comment/43673511
comment on: http://stackoverflow.com/q/27626424
score: 0
type: QuestionComment
type: Comment
has text: Yeah, that's what I was thinking too. People can change ID's, classes, whatever basically. I just wanted to make it as hard as possible so that the average user (who may pick up on the idea of removing classes using any element inspector since it's super simple) would find it difficult to alter these things.

http://stackoverflow.com/a/27480651
upvote count: 9
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/43394305
accepted answer of: http://stackoverflow.com/q/27480625
has body: Note that - should either be at the beginning or at the end of character class or has to be escaped by a backslash \, since it indicates range as in a-z /[()a-zA-Z0-9 ?,/.-]/ Also, if dynamic regex is required, just use the regex literal as in above, if not you'd have to remove the delimiters / / and use the actual regex [()a-zA-Z0-9 ?,/.-] as a String which can be used in RegExp constructor.
score: 9
answers question: http://stackoverflow.com/q/27480625
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43394296

http://stackoverflow.com/comment/43420100
type: AnswerComment
comment on: http://stackoverflow.com/a/27494120
type: Comment
has text: I correct it to this and it still only outputs "loop through paragraph elements" as if there are no paragraph elements. Thank you though.
score: 0

http://stackoverflow.com/comment/43666926
score: 1
has text: The `this` inside your `getHours` function is not the same `this` outside of it.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27623201

http://stackoverflow.com/comment/101228436
type: Comment
score: 0
has text: @spencer.sm what if I only want modules to be resolved from the current project? I have a few projects that import from each other. If projectA imports fileA from projectB, and fileA imports `lodash`, I want `lodash` to be resolved ONLY from `projectA/node_modules`. This is what `resolve.modules: [path.resolve(__dirname, 'node_modules')]` is useful for. However I'm running into problems with sub-dependencies like you said. Is there a way to tell webpack to also find sub-dependencies in addition to restricting node_modules resolution to `projectA/node_modules`?
type: AnswerComment
comment on: http://stackoverflow.com/a/33817499

http://stackoverflow.com/comment/43583353
has text: this wil throw error because u are not appending properly on 49
type: Comment
comment on: http://stackoverflow.com/a/27578837
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43510794
type: Comment
comment on: http://stackoverflow.com/a/27532873
has text: Thank you for your feedback. I was more thinking of a [minimal example](http://stackoverflow.com/help/mcve) than an complete environment. Did you try to use native functions like [`classList`](https://developer.mozilla.org/en-US/docs/Web/API/Element.classList) instead of the jQuery function?
score: 0
type: AnswerComment

http://stackoverflow.com/a/29548796
score: 0
answers question: http://stackoverflow.com/q/27541974
type: Answer
has body: It's hard to say exactly what you should change based on the information you have provided, but I'll try to give a general solution. Based on the information you provided it sounds like you might be trying to read in an insanely amount of json at one time. If you changed to the source of the json to allow you to read a hundred records at a time, then update the page, and then ask for more records and do it again. You may solve your problem. Also be sure to set objects to null and get rid of the information you are storing on the heap in-between loading sets of records. See this url for pagination of rest api's it gives a good idea for a possible implementation. https://developer.atlassian.com/confdev/confluence-rest-api/pagination-in-the-rest-api

css
tags question: http://stackoverflow.com/q/27522914
tags question: http://stackoverflow.com/q/27501642
tags question: http://stackoverflow.com/q/27593645
tags question: http://stackoverflow.com/q/27512590
tags question: http://stackoverflow.com/q/27515144
tags question: http://stackoverflow.com/q/27634642
tags question: http://stackoverflow.com/q/27606816
tags question: http://stackoverflow.com/q/27482472
tags question: http://stackoverflow.com/q/27596825
tags question: http://stackoverflow.com/q/27564013
tags question: http://stackoverflow.com/q/27543473
tags question: http://stackoverflow.com/q/27495894
tags question: http://stackoverflow.com/q/27561402
tags question: http://stackoverflow.com/q/27555515
tags question: http://stackoverflow.com/q/27531497
tags question: http://stackoverflow.com/q/27639000
tags question: http://stackoverflow.com/q/27523222
tags question: http://stackoverflow.com/q/27592104
tags question: http://stackoverflow.com/q/27569553
tags question: http://stackoverflow.com/q/27607677
tags question: http://stackoverflow.com/q/27544765
tags question: http://stackoverflow.com/q/27551401
tags question: http://stackoverflow.com/q/27623305
tags question: http://stackoverflow.com/q/27479650
tags question: http://stackoverflow.com/q/27606586
tags question: http://stackoverflow.com/q/27627121
tags question: http://stackoverflow.com/q/27618045
tags question: http://stackoverflow.com/q/27498976
tags question: http://stackoverflow.com/q/27504205
tags question: http://stackoverflow.com/q/27636527
tags question: http://stackoverflow.com/q/27532565
tags question: http://stackoverflow.com/q/27612968
tags question: http://stackoverflow.com/q/27581731
tags question: http://stackoverflow.com/q/27599709
tags question: http://stackoverflow.com/q/27484468
tags question: http://stackoverflow.com/q/27524938
tags question: http://stackoverflow.com/q/27584934
tags question: http://stackoverflow.com/q/27580389
tags question: http://stackoverflow.com/q/27563193
tags question: http://stackoverflow.com/q/27554586
tags question: http://stackoverflow.com/q/27636959
tags question: http://stackoverflow.com/q/27549427
tags question: http://stackoverflow.com/q/27617426
tags question: http://stackoverflow.com/q/27541649
tags question: http://stackoverflow.com/q/27582275
tags question: http://stackoverflow.com/q/27613815
tags question: http://stackoverflow.com/q/27634488
tags question: http://stackoverflow.com/q/27585987
tags question: http://stackoverflow.com/q/27629630
tags question: http://stackoverflow.com/q/27578307
tags question: http://stackoverflow.com/q/27639769
tags question: http://stackoverflow.com/q/27630584
tags question: http://stackoverflow.com/q/27489145
tags question: http://stackoverflow.com/q/27597168
tags question: http://stackoverflow.com/q/27514761
tags question: http://stackoverflow.com/q/27494513
tags question: http://stackoverflow.com/q/27542143
tags question: http://stackoverflow.com/q/27541124
tags question: http://stackoverflow.com/q/27482740
tags question: http://stackoverflow.com/q/27555232
tags question: http://stackoverflow.com/q/27505245
tags question: http://stackoverflow.com/q/27498558
tags question: http://stackoverflow.com/q/27547247
tags question: http://stackoverflow.com/q/27594691
tags question: http://stackoverflow.com/q/27490993
tags question: http://stackoverflow.com/q/27522798
tags question: http://stackoverflow.com/q/27552427
tags question: http://stackoverflow.com/q/27560880
tags question: http://stackoverflow.com/q/27578732
tags question: http://stackoverflow.com/q/27570088
tags question: http://stackoverflow.com/q/27559914
tags question: http://stackoverflow.com/q/27608932
tags question: http://stackoverflow.com/q/27567035
tags question: http://stackoverflow.com/q/27474930
tags question: http://stackoverflow.com/q/27530853
tags question: http://stackoverflow.com/q/27562043
tags question: http://stackoverflow.com/q/27546645
tags question: http://stackoverflow.com/q/27592397
tags question: http://stackoverflow.com/q/27575836
tags question: http://stackoverflow.com/q/27604290

http://stackoverflow.com/comment/43441854
comment on: http://stackoverflow.com/a/27505087
score: 0
type: Comment
has text: can I declare a function to select the canvas and manipulate it once the modal is open in the modalCtrl controller?
type: AnswerComment

http://stackoverflow.com/comment/43691707
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27636298
has text: How much you achieved?
score: 0

http://stackoverflow.com/comment/45415937
type: Comment
type: QuestionComment
has text: Given that you are not _really_ creating a custom protocol, but rather just opening the page within a browser in `myawesomeapp`, I would suggest not using the `myawesomeapp://` scheme at all. In your Android and iOS apps, register url handlers for `http` and `https` filtered on on `myawesomeapp.com`.
score: 1
comment on: http://stackoverflow.com/q/27632064

http://stackoverflow.com/comment/73560676
comment on: http://stackoverflow.com/a/27574013
type: AnswerComment
score: 0
type: Comment
has text: @andy-mccullough . have you found a solutuion ? I am stuck with same issue, I have http everywhere.

http://stackoverflow.com/q/27565909
favorite count: 0
type: UnansweredQuestion
tagged with: tampermonkey
has title: Having userscript permanently change Javascript on page
tagged with: google-chrome
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/34694912
has comment: http://stackoverflow.com/comment/43650519
score: -1
has comment: http://stackoverflow.com/comment/43723745
has body: I have been trying this for the past 3 days using Tampermonkey and I haven't gotten anywhere (I am an extreme newbie). So far I have just tried saving these files locally and seeing if Node.js could save the changes I made but no luck. I need to change &lt;a href="javascript:notFinished()" onmouseover="if(module_next.src == 'images/navbar/next.gif'){changeImages('module_next', 'images/navbar/next_o.gif'); tag('Go to next page'); return true;}" onmouseout="if(module_next.src == 'images/navbar/next.gif'){changeImages('module_next', 'images/navbar/next.gif'); return true;}" name="module_next_href" id="module_next_href"&gt; into &lt;a href="javascript:changePage(1)" onmouseover="if(module_next.src == 'images/navbar/next.gif'){changeImages('module_next', 'images/navbar/next_o.gif'); tag('Go to next page'); return true;}" onmouseout="if(module_next.src == 'images/navbar/next.gif'){changeImages('module_next', 'images/navbar/next.gif'); return true;}" name="module_next_href" id="module_next_href"&gt; It needs to permanently stay like this, to apply this I just replace it manually but figured a script would be best.
has comment: http://stackoverflow.com/comment/43885607
upvote count: 0
tagged with: greasemonkey
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/43763747

http://stackoverflow.com/comment/43462513
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27516077
has text: I'm sorry i dont even know how to find or provide that information
type: Comment

excel
tags question: http://stackoverflow.com/q/27550669
tag name: excel
tags question: http://stackoverflow.com/q/27576777
tags question: http://stackoverflow.com/q/27511629
tags question: http://stackoverflow.com/q/27535356
tags question: http://stackoverflow.com/q/27567437
type: Tag
tags question: http://stackoverflow.com/q/27523406
tags question: http://stackoverflow.com/q/27548378
tags question: http://stackoverflow.com/q/27537354
tags question: http://stackoverflow.com/q/27572607

typescript
tags question: http://stackoverflow.com/q/27509973
tags question: http://stackoverflow.com/q/27612298
tags question: http://stackoverflow.com/q/27522973
tags question: http://stackoverflow.com/q/27533030
tags question: http://stackoverflow.com/q/27572943
tags question: http://stackoverflow.com/q/27614200
tags question: http://stackoverflow.com/q/27631435
tags question: http://stackoverflow.com/q/27578380
tag name: typescript
tags question: http://stackoverflow.com/q/27528164
tags question: http://stackoverflow.com/q/27591627
tags question: http://stackoverflow.com/q/27490707
tags question: http://stackoverflow.com/q/27573365
tags question: http://stackoverflow.com/q/27520188
tags question: http://stackoverflow.com/q/27623744
tags question: http://stackoverflow.com/q/27591227
type: Tag
tags question: http://stackoverflow.com/q/27492384

recursion
type: Tag
tags question: http://stackoverflow.com/q/27496534
tag name: recursion
tags question: http://stackoverflow.com/q/27495686
tags question: http://stackoverflow.com/q/27595015
tags question: http://stackoverflow.com/q/27637648
tags question: http://stackoverflow.com/q/27485691
tags question: http://stackoverflow.com/q/27499833
tags question: http://stackoverflow.com/q/27608644
tags question: http://stackoverflow.com/q/27557422
tags question: http://stackoverflow.com/q/27631576

http://stackoverflow.com/comment/43582178
type: Comment
comment on: http://stackoverflow.com/a/27563358
has text: There is revision history in every question in SO. You should probably use he newer one which is more correct. You can use it in production it works - just make sure you understand it first - also I think it can be prettier
score: 0
type: AnswerComment

angularjs-scope
tags question: http://stackoverflow.com/q/27511269
tags question: http://stackoverflow.com/q/27566237
tags question: http://stackoverflow.com/q/27627306
tags question: http://stackoverflow.com/q/27493164
tags question: http://stackoverflow.com/q/27619308
tags question: http://stackoverflow.com/q/27527869
tags question: http://stackoverflow.com/q/27626822
tags question: http://stackoverflow.com/q/27581519
tags question: http://stackoverflow.com/q/27521271
tags question: http://stackoverflow.com/q/27577794
tags question: http://stackoverflow.com/q/27492287
tags question: http://stackoverflow.com/q/27511164
tags question: http://stackoverflow.com/q/27481781
tags question: http://stackoverflow.com/q/27559421
tags question: http://stackoverflow.com/q/27504850
tags question: http://stackoverflow.com/q/27558560
tags question: http://stackoverflow.com/q/27503417
tags question: http://stackoverflow.com/q/27500941
tags question: http://stackoverflow.com/q/27493054
tags question: http://stackoverflow.com/q/27480677
tags question: http://stackoverflow.com/q/27638534
tags question: http://stackoverflow.com/q/27537383
tags question: http://stackoverflow.com/q/27485848
tag name: angularjs-scope
tags question: http://stackoverflow.com/q/27496122
tags question: http://stackoverflow.com/q/27507651
tags question: http://stackoverflow.com/q/27487179
tags question: http://stackoverflow.com/q/27561150
tags question: http://stackoverflow.com/q/27639049
tags question: http://stackoverflow.com/q/27567214
tags question: http://stackoverflow.com/q/27477457
tags question: http://stackoverflow.com/q/27610956
tags question: http://stackoverflow.com/q/27591181
tags question: http://stackoverflow.com/q/27474858
type: Tag

http://stackoverflow.com/q/27549744
has answer: http://stackoverflow.com/a/70542487
type: Question
has comment: http://stackoverflow.com/comment/43526034
score: 3
has answer: http://stackoverflow.com/a/27549906
upvote count: 3
has body: Maybe there is already a solution, but I can't find it. I try to access different slots in a multi dimensional array dynamical but with the challenge of different depths. Basically, it looks like this: var source = []; source['lvl1'] = []; source['lvl1']['lvl2a'] = []; source['lvl1']['lvl2a']['lvl3'] = "ping"; source['lvl1']['lvl2b'] = "pong"; If the depth is fix, I could write code like this: var path1 = ["lvl1","lvl2a","lvl3"]; var path2 = ["lvl1","lvl2b"]; console.log(source[path1[0]][path1[1]][path[2]]); // =&gt; ping console.log(source[path2[0]][path2[1]]); // =&gt; pong My problem is to write a code that works for both variants. This would work: switch(path.length) { case 1: console.log(source[path[0]]); break; case 2: console.log(source[path[0]][path[1]]); break; case 3: console.log(source[path[0]][path[1]][path[2]]); break; } But this is neither efficient nor elegant. Has somebody another solution that works for example with some kind of loop?!? Thanks Thomas
has comment: http://stackoverflow.com/comment/43525850
has title: dynamic access to an array in Javascript
has comment: http://stackoverflow.com/comment/43593277
type: UnansweredQuestion
answer count: 4
has answer: http://stackoverflow.com/a/27550375
tagged with: arrays
downvote count: 0
has answer: http://stackoverflow.com/a/27549797
tagged with: javascript
favorite count: 0

http://stackoverflow.com/q/27568071
has title: How to check if browser supports svg with javascript?
answer count: 2
has body: I'm using svg animations on my website, but it also have to run in older browsers, which do not support svg. I could solve this with a redirect to a static page. But is it even possible to detect if the Browser supports svg's with the help of javascript? Any help would be appreciated.
tagged with: javascript
has answer: http://stackoverflow.com/a/27568167
downvote count: 1
linked to: http://stackoverflow.com/q/9689310
linked to: http://stackoverflow.com/q/654112
tagged with: cross-browser
favorite count: 0
possible better answer: http://stackoverflow.com/a/27568129
tagged with: http://stackoverflow.com/tag/svg
duplicate of: http://stackoverflow.com/q/9689310
has answer: http://stackoverflow.com/a/27568129
has comment: http://stackoverflow.com/comment/43561357
has comment: http://stackoverflow.com/comment/43561331
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43561956
has comment: http://stackoverflow.com/comment/43561320
score: 1
type: Question
upvote count: 2
tagged with: browser
accepted answer: http://stackoverflow.com/a/27568167

http://stackoverflow.com/q/27518891
tagged with: http://stackoverflow.com/tag/html
has title: I want to hide Fields if its value is empty and image src also in HTML using Javascript
has answer: http://stackoverflow.com/a/27518915
possible better answer: http://stackoverflow.com/a/27518948
upvote count: 2
has body: how to hide fields in html if fields are empty and the image src also. using java script. please suggest <form:label path="file4Desc" type="text" value="" maxlength="50"> </form:label> <form:input path="file4Desc" value="${agreement.file4Desc}" style="width:300px"/> <form:errors path="file4Desc" /> <form:label path="filename3" type="text" value="" maxlength="50"> </form:label>
score: 0
answer count: 2
downvote count: 2
linked to: http://stackoverflow.com/q/4244565
has comment: http://stackoverflow.com/comment/43467568
accepted answer: http://stackoverflow.com/a/27518915
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27518948
type: Question

http://stackoverflow.com/comment/45472517
comment on: http://stackoverflow.com/a/28461881
has text: This will refresh the page. they do something like `window.history.go(-N)` but it never gets refreshed. that is the mystery .
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/27628496
has comment: http://stackoverflow.com/comment/43678291
has title: Is there any way of stripping all javascript from a string in PHP?
has answer: http://stackoverflow.com/a/27628576
answer count: 3
has comment: http://stackoverflow.com/comment/43681741
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27628590
favorite count: 0
has body: I have the following php code: $mystr = " "; $mystr .= " </div"; What i want is to strip all kind of javascript from $mystr. I am trying the following code but it keeps the onmouseover event. $mystr = strip_tags($mystr,' '); I want to remove the onmouseover or any othe inline javascript code too. I am actually trying to achieve the above in wordpress. so as far as i know there is no HTML Purifier in wordpress.
possible better answer: http://stackoverflow.com/a/27628545
has answer: http://stackoverflow.com/a/27628545
type: AnsweredQuestion
upvote count: 2
has comment: http://stackoverflow.com/comment/43677780
has comment: http://stackoverflow.com/comment/43677802
tagged with: php
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27628590
tagged with: strip
has comment: http://stackoverflow.com/comment/43677758
score: 1

http://stackoverflow.com/comment/43614217
type: Comment
type: QuestionComment
has text: you are correct @DanielA.White . Amadan suggested that in comment so I fixed that error.
comment on: http://stackoverflow.com/q/27595258
score: 0

http://stackoverflow.com/comment/43545754
has text: Wow that's lightning fast response. Thank you so much. Arun your explanation is spot on thank you for explaining it too me. Also I was wondering how to use the .each() with conditions. Its more efficient and will use that in future. One question to add. I am used to VB where errors are told during the compiling. For this case I had no errors. How do I catch them? Is there specific debug/editor you are using which you can recommend? Thanks in advance.
comment on: http://stackoverflow.com/q/27559425
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43687361
score: 0
type: AnswerComment
has text: It was clear from a single line. I think, the code snippet is ok but will look much pretty if you hide the code snippet.
comment on: http://stackoverflow.com/a/27633823
type: Comment

http://stackoverflow.com/comment/43522814
type: AnswerComment
comment on: http://stackoverflow.com/a/27548292
score: 0
type: Comment
has text: I didn't know about that :/

http://stackoverflow.com/q/27548128
type: AnsweredQuestion
has body: Is there any simple way to capture an event when an element disabled property (or other css properties) is changed? I know there is MutationObservers, but it seems is not supported by IE8-IE9. I need to use a plugin? Actual MutationObservers compatibility: Chrome: 18-16 Firefox: 14 IE: 11 Opera: 15 Fafari 6
type: Question
has answer: http://stackoverflow.com/a/27549228
tagged with: internet-explorer
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27549228
has title: Capture when disabled property is changed (IE8 compatible)
tagged with: css

http://stackoverflow.com/comment/43451398
type: QuestionComment
comment on: http://stackoverflow.com/q/27510608
score: 0
has text: You can find the solution here : http://stackoverflow.com/questions/831030/how-to-get-get-request-parameters-in-javascript
type: Comment

http://stackoverflow.com/comment/43556633
type: Comment
comment on: http://stackoverflow.com/a/27565640
has text: but it doesnt show my current location, it show other markers but i cant see my location
type: AnswerComment
score: 0

http://stackoverflow.com/comment/43469070
comment on: http://stackoverflow.com/q/27516458
score: 0
has text: @Namekal Sorry. No spoonfeed-helping out here...Not meant of offend you, but we urge that you try implement Bradley's solution by your self? Find your answer. Use Google. And even after that, if you are genuinely stuck with an issue we can help provided you have posted your implementation...
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43546763
has text: @ReynierPM it won't work that way as the control ID you're using is not the actual id of your checkbox. it's the Div id not the checkbox id.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27560199
score: 0

http://stackoverflow.com/comment/43633280
type: AnswerComment
has text: beefy is ok for development, but when you deploy you will need to browserify your source code, here gauge-main.js
comment on: http://stackoverflow.com/a/27605338
score: 0
type: Comment

http://stackoverflow.com/comment/43400058
comment on: http://stackoverflow.com/q/27483014
score: 0
has text: can you update a plunker for this? This should work
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27500684
has answer: http://stackoverflow.com/a/27501194
has comment: http://stackoverflow.com/comment/43431955
score: 1
tagged with: reload
type: Question
tagged with: browser
answer count: 2
has title: Force refresh/reload when user navigates Back and forward again
tagged with: javascript
upvote count: 1
has body: I want to know how i can ensure page reload/refresh when user presses the back button and then presses forward again.? Please help!
favorite count: 0
downvote count: 0
linked to: http://stackoverflow.com/q/9071838
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27501013

http://stackoverflow.com/comment/43505880
type: Comment
has text: That's exactly right. See [these docs](https://developer.mozilla.org/en-US/Add-ons/SDK/Guides/Module_structure_of_the_SDK) for a full explanation.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27536780

odata
tag name: odata
type: Tag
tags question: http://stackoverflow.com/q/27488522

http://stackoverflow.com/comment/43557862
comment on: http://stackoverflow.com/a/27555825
type: Comment
score: 0
has text: I've been messinig around with the JS code, and I seem to have identified the source of the problem. It seems that when AtribMorada, which is a function to post data from localStorage, loads on pageload, the clock doesn't show up. But when I created a button to run AtribMorada, there was no problem with the clock. I leave it like this, but the goal is for the site to be as automated as it can... I'll make a small version of the site, with one or 2 pages + the index, and see if you guys can get it to work. BTW, keep the JS to the basics, if you can. I don't know jQuery or any of that...
type: AnswerComment

http://stackoverflow.com/q/27553985
has answer: http://stackoverflow.com/a/27554138
answer count: 2
tagged with: jquery
has comment: http://stackoverflow.com/comment/43538003
favorite count: 0
has body: how can i make a button with the id #createEditListCloseBtn get disabled if a dialog box with the id #acronyms is empty? I've tried the following: if($("#acronyms").children("option:selected").length &lt; 1) { $("#createEditListSaveBtn").addClass("state-btn-disabled") .attr("disabled", "disabled"); }
type: UnansweredQuestion
tagged with: handlebars.js
has title: how to disable a button if dialog box is empty
has answer: http://stackoverflow.com/a/27556444
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/43536395
tagged with: javascript
has comment: http://stackoverflow.com/comment/43534646
score: 0

http://stackoverflow.com/comment/43650565
type: Comment
has text: if it is incorrect how it plays in other browsers ?
comment on: http://stackoverflow.com/a/27614311
type: AnswerComment
score: 0

http://stackoverflow.com/comment/43450891
comment on: http://stackoverflow.com/q/27509022
score: 0
type: Comment
type: QuestionComment
has text: Did you check the correct `name="..."` for each `input` in your form with the expected name in Google Forms?

http://stackoverflow.com/comment/43831307
comment on: http://stackoverflow.com/a/27709267
score: 1
has text: It should be noted that a clever user can just override `window.bota` in this manner as well, taking the obfuscation out of the question. This shouldn't be relied upon for any kind of actual security - it just makes it a pain in the ass for would-be meddlers.
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27558045
has body: To unblock you right now, you could do &lt;div id="element1" ng-click="ctrl.animateStuff($event)"&gt;&lt;/div&gt; that would pass the event to your function and you could extract the DOM element from it. I'm not familiar with GSAP, but you should be able to hook it into ngAnimate-way of doing things. And, I would repeat myself - DON'T access or make any assumption about the DOM in your controller - you are breaking Angular's best practices and will often find yourself with problems and headaches.
score: 0
has comment: http://stackoverflow.com/comment/43542361
has comment: http://stackoverflow.com/comment/43542532
type: Answer
answers question: http://stackoverflow.com/q/27557622

http://stackoverflow.com/q/27475146
upvote count: 1
answer count: 1
tagged with: jquery
favorite count: 0
has title: catch not being triggered even though there is error in try
type: AnsweredQuestion
downvote count: 0
score: 1
has body: I have a $.getJSON() call in my try that is throwing an error, but the catch is not being triggered. Nothing is happening. Just the error in the console. Why is this? What I'm trying to do is do something if the JSON is loaded and do something else if there is a failure or error in the request. Here is my code: try{ $.getJSON('https://www.googleapis.com/freebase/v1/search?query=&amp;filter=(all+type%3A%22nominated%20works+exhibited_at%3A%222012%20grammy%27s%22)&amp;indent=true', function(searchJSON){ alert('sucesss!'); }); } catch(e){ alert('failure: '+e); } Here is a link to a jsfiddle: http://jsfiddle.net/sgeg56c3/
tagged with: http://stackoverflow.com/tag/json
type: Question
tagged with: try-catch
tagged with: javascript
has answer: http://stackoverflow.com/a/27475172
accepted answer: http://stackoverflow.com/a/27475172

http://stackoverflow.com/q/27560709
type: Question
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/27560741
possible better answer: http://stackoverflow.com/a/27560784
has title: Check that at least one of two input fields has data
has answer: http://stackoverflow.com/a/27560784
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27560741
has body: I have two input fields and I want to make sure that at least one of them is filled when a button is clicked. First name: &lt;input type="text" name="FirstName" id="first"&gt;&lt;br&gt; Last name: &lt;input type="text" name="LastName" id="second"&gt;&lt;br&gt; &lt;button type="submit" value="Submit"&gt;submit&lt;/button How can this be done through jQuery? There is no form tag in the html code. http://jsfiddle.net/zs7mau12/

http://stackoverflow.com/comment/43425041
type: AnswerComment
score: 0
has text: It does not call my function.
type: Comment
comment on: http://stackoverflow.com/a/27496772

http://stackoverflow.com/q/27505878
score: 2
downvote count: 0
tagged with: node.js
tagged with: object
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27506885
has comment: http://stackoverflow.com/comment/43442092
has comment: http://stackoverflow.com/comment/43443333
type: Question
upvote count: 2
has title: Making an array of object which have an asynchronous constructor
answer count: 2
tagged with: javascript
tagged with: callback
has comment: http://stackoverflow.com/comment/43442631
has answer: http://stackoverflow.com/a/27507695
accepted answer: http://stackoverflow.com/a/27507695
possible better answer: http://stackoverflow.com/a/27506885
tagged with: asynchronous
favorite count: 0
has body: I want to do the following with NodeJS. Make an object array of the following, where each object has different local variables where they want to get when they initialize. obj.js var Obj = function (_id) { this.id = _id; var that=this; db.getData(_id,function(collection){ //this method is asynchronous collection.toArray(function(err, items) { that.data=items; }); }); } Obj.prototype.data = []; module.exports = Obj; app.js var arr=[]; arr.push(new obj(24)); arr.push(new obj(41)); arr.push(new obj(24)); arr.push(new obj(42)); //then do tasks with the arr But since the arr constructor is synchronous they may not have get all the data when I do calculations with the arr. So how to handle this scenario ? I want to make sure that all the objects are successfully created before doing any work with them. Thanks in advance.

http://stackoverflow.com/q/27580933
favorite count: 0
type: UnansweredQuestion
has title: getElementById innerHTML not work for me?
downvote count: 0
score: 1
duplicate of: http://stackoverflow.com/q/20604299
has body: getElementById innerHTML not work for me ? When user fill data in input tag, it's will be change data to Hello! http://jsfiddle.net/59DFY/21/ &lt;input type="text" id="hola" onchange="changeMe()"&gt; &lt;script&gt; function changeMe() { document.getElementById("hola").innerHTML="Hello!"; } &lt;/script&gt;
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27580950
has comment: http://stackoverflow.com/comment/43586267
linked to: http://stackoverflow.com/q/20604299
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/27580963

http://stackoverflow.com/comment/43422472
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27495325
has text: What? My app is scoped and clearly asks for their email and name when they sign in with google. It is for a commercial product and my users are happy to share the information... Of course I don't want their google password, I don't want any information that they don't agree to give me! But if a customer wants to pay to use my service then I need their name and they want to give it to me, I want that to be easy for them!
score: 0

http://stackoverflow.com/a/27593484
score: 0
type: Answer
has body: if you allow yourself to make these very safe assumptions: all unit designators are made up of non-numbers (cm, px, pt, %) all values are made up of numbers (10, 12, 14, 16) this regex will get your values: string.match(/(\d+)/g); and this will get your unit: string.match(/\D+$/); and you can combined them: string.match(/(\d+)|\D+$/g);
answers question: http://stackoverflow.com/q/27593185

http://stackoverflow.com/a/27602961
score: 0
answers question: http://stackoverflow.com/q/27602519
has body: I would consider using the &lt;noscript&gt; tag, like so: $(window).load(function() { $("#startImage img").css("opacity", "1"); }); #startImage img { -webkit-transition:all 0.5s ease-in-out; -moz-transition:all 0.5s ease-in-out; -ms-transition:all 0.5s ease-in-out; -o-transition:all 0.5s ease-in-out; transition:all 0.5s ease-in-out; } &lt;noscript&gt; &lt;style type="text/css"&gt; #startImage img { opacity: 1; } &lt;/style&gt; &lt;/noscript&gt; &lt;style type="text/css"&gt; #startImage img { opacity: 0; } &lt;/style&gt; &lt;div id="startImage"&gt; &lt;img src="http://www.gettyimages.co.uk/CMS/StaticContent/1391099215267_hero2.jpg" alt="Hero2" /&gt; &lt;/div&gt; Even though it doesn't seem to work when you run the code snippet, the following demo should work in the 5 major browsers.
type: Answer

http://stackoverflow.com/comment/43467607
comment on: http://stackoverflow.com/q/27518708
has text: Ok I took you idea and just pass the UNIX_TIMESTAMP of my date time value and the chart is now seen. The challenge how to show the x-axis with the correct data and time value?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43464065
type: QuestionComment
comment on: http://stackoverflow.com/q/27516990
has text: @SenorAmor Lol. okay. I forgot. Thanks
score: 0
type: Comment

jspdf
tags question: http://stackoverflow.com/q/27540502
type: Tag
tag name: jspdf
tags question: http://stackoverflow.com/q/27573784

http://stackoverflow.com/q/27580753
downvote count: 1
tagged with: javascript
has title: Create object and add to array of pointers - always replaces existing array
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27582231
upvote count: 0
favorite count: 0
tagged with: parse-platform
type: Question
has body: I have probably misunderstood the documentation somehow but cannot figure this out. What I want to do, is to be able to create a new ClientContact and save it to an array of pointers called contacts in Clients table. This is the relevant code: var Client = Parse.Object.extend("Client"); var selectedClient = new Client(); // sets the objectId based on URL params selectedClient.id = $routeSegment.$routeParams.id; var ClientContact = Parse.Object.extend("ClientContact"); var contact = new ClientContact(); contact.set('name', 'test'); contact.set('desc', 'some description'); contact.set('phoneNumber', '123'); selectedClient.add('contacts', contact); selectedClient.save().then(function() { console.log('saved'); }, function(error) { console.error(error); }); As expected, the contact is automatically saved and added to contacts when the selectedClient is saved. But if I run the same code again (in the testing this means refreshing the page), a new ClientContact is saved but it replaces the contacts array entirely. That is, only the most recent ClientContact is associated to the Client, any new additions replaces the array, leaving only one pointer. I hope there is an obvious an easy fix that I have simply failed to spot.
score: -1
accepted answer: http://stackoverflow.com/a/27582231
answer count: 1

http://stackoverflow.com/q/27603308
has body: I have a floating horizontal navbar positioned using jQuery. It's perfect when the page is static, but as soon as I start scrolling, the navbar's height increases and I am unsure why. I've a JSFiddle here to show the unwanted effect Here's the html Week1 Week2 Week3 Week4 Week5 Week6 Here's the css #stickyribbon { width:800px; background: orange; border-radius: 5px; } #stickyribbon ul { display:table; width:100%; list-style-type: none; } #stickyribbon li { display:table-cell; font-size: 16px; font-weight: bold; vertical-align:middle; } #stickyribbon li a { display:block; color: #fff; text-decoration: none; } #stickyribbon li a:hover { color: yellow; } And lastly the JavaScript $(function () { var stickyRibbonTop = $('#stickyribbon').offset().top; $(window).scroll(function () { if ($(window).scrollTop() > stickyRibbonTop) { $('#stickyribbon').css({ position: 'fixed', top: '0px' }); } else { $('#stickyribbon').css({ position: 'static', top: '0px' }); } }); }); I'd be grateful for any guidance, as I'm completely stumped. TIA
tagged with: http://stackoverflow.com/tag/html
tagged with: css
downvote count: 2
upvote count: 1
tagged with: navbar
possible better answer: http://stackoverflow.com/a/27603986
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27603986
has answer: http://stackoverflow.com/a/27603395
score: -1
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: How can I prevent the height of this navbar increasing when I scroll?
accepted answer: http://stackoverflow.com/a/27603395

http://stackoverflow.com/comment/43480423
type: AnswerComment
type: Comment
has text: Hi Brian, Really struggling with this. I can't seem to find the hidden fields in the code behind. I've tried to recursivly get all the controls on the form but none contain the id of the hidden field I'm after. If possible could you direct me to an example? I've tried searching but must be using the wrong terminology or can't see the wood for the trees!
comment on: http://stackoverflow.com/a/27510064
score: 0

http://stackoverflow.com/q/27532401
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/27532884
type: Question
tagged with: jqgrid
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
has title: jqGrid wrong data format?
type: UnansweredQuestion
has body: Im trying to put some data into jqGrid and force it to be displayed in a treeview. My problem is, the 6th item (cid=6) is not showing in the grid. The 4th item looks like it has some subitems, but expanding this branch shows nothing. The 6th item is nowhere to find in the tree (I suppose, I've defined it as subitem of cid4). Here is a working example of this code http://jsfiddle.net/498jhxcg/ (my production code uses POST/AJAX/JSON, the example is changed to localdata. Grid is displayed in the same wrong way in both cases.) Is the data in wrong format, or the jqgrid is wrong defined? (btw. changing parent_id to parentid did not helped.) var myjsondata = '{"rows":[ {"cid":"1","name":"cat1","lvl":"0","parent_id":"null","isleaf":true,"expanded":false,"loaded":true}, {"cid":"2","name":"cat2","lvl":"0","parent_id":"null","isleaf":false,"expanded":false,"loaded":true}, {"cid":"3","name":"cat3","lvl":"1","parent_id":"2","isleaf":true,"expanded":false,"loaded":true}, {"cid":"7","name":"cat7","lvl":"1","parent_id":"2","isleaf":true,"expanded":false,"loaded":true}, {"cid":"4","name":"cat4","lvl":"0","parent_id":"null","isleaf":false,"expanded":false,"loaded":true}, {"cid":"6","name":"cat6","lvl":"1","parent_id":"4","isleaf":true,"expanded":false,"loaded":true}, {"cid":"5","name":"cat5","lvl":"0","parent_id":"null","isleaf":true,"expanded":false,"loaded":true} ],"records":7,"total":1}'; $('#jgtable').jqGrid({ ExpandColumn:'id', datastr: myjsondata, datatype: 'jsonstring', colNames: [ 'Id', 'Name', 'Parent id', 'isLeaf?', ], colModel: [ { index: 'cid', name: 'cid', width:"75px"}, { index: 'name', name: 'name', width:"75px"}, { index: 'parent_id', name: 'parent_id',width:"75px"}, { index: 'isleaf', name: 'isleaf', width:"75px"}, ], pager: '#pager', rowNum: 10, rowList:[2, 10, 25, 50, ], height: 'auto', minHeight: '250px', recordpos: 'right', viewrecords: true, gridview: false, treeGrid: true, treeGridModel : 'adjacency', treedatatype: "local", treeReader : { level_field: "lvl", …

http://stackoverflow.com/comment/43410866
has text: If you want to store this on a file, it should at least be either an `xml` or a `json`. Try `JSON` better since it works wonders with `AJAX`, but not a `.txt`
score: 0
comment on: http://stackoverflow.com/q/27489425
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27492446
tagged with: javascript
has answer: http://stackoverflow.com/a/27492642
has answer: http://stackoverflow.com/a/27493231
linked to: http://stackoverflow.com/q/18013109
upvote count: 1
linked to: http://stackoverflow.com/q/24906120
tagged with: text-extraction
favorite count: 0
tagged with: ace-editor
type: AnsweredQuestion
downvote count: 0
score: 1
accepted answer: http://stackoverflow.com/a/27493231
possible better answer: http://stackoverflow.com/a/27492642
type: Question
has body: I integrated ACE editor in my site. I want to retrieve the text in a certain line. I've searched and found This and This. But unfortunately, I can't understand those, as I'm a newbie to the subject. Can anyone give an example for it ? I got the lines to an array using the following code. var line = document.getElementsByClassName("ace_line"); Are there any methods like line[count].getValue Which can return the string of the text in that line ?
answer count: 2
has title: how to retrieve a line of text from ACE editor?

http://stackoverflow.com/q/27559351
answer count: 1
downvote count: 1
favorite count: 0
has title: how to display data points from a csv file to a google map uning d3
tagged with: d3.js
has body: I am trying to display some data points in a csv file on a Google Map using d3 in my responsive website. The google map is displayed as expected and works fine however the data points are not being displayed can anyone help? :( &lt;script type="text/javascript"&gt; // Create the Google Map… var map = new google.maps.Map(d3.select("#map").node(), { zoom: 7, center: new google.maps.LatLng(51.5000, 0.1167), mapTypeId: google.maps.MapTypeId.TERRAIN }); // Load the station data. When the data comes back, create an overlay. d3.json("stations.json", function(data) { var overlay = new google.maps.OverlayView(); // Add the container when the overlay is added to the map. overlay.onAdd = function() { var layer = d3.select(this.getPanes().overlayLayer).append("div") .attr("class", "stations"); // Draw each marker as a separate SVG element. // We could use a single SVG, but what size would it have? overlay.draw = function() { var projection = this.getProjection(), padding = 10; var marker = layer.selectAll("svg") .data(d3.entries(data)) .each(transform) // update existing markers .enter().append("svg:svg") .each(transform) .attr("class", "marker"); // Add a circle. marker.append("svg:circle") .attr("r", 4.5) .attr("cx", padding) .attr("cy", padding); // Add a label. marker.append("svg:text") .attr("x", padding + 7) .attr("y", padding) .attr("dy", ".31em") .text(function(d) { return d.key; }); function transform(d) { d = new google.maps.LatLng(d.value[1], d.value[0]); d = projection.fromLatLngToDivPixel(d); return d3.select(this) .style("left", (d.x - padding) + "px") .style("top", (d.y - padding) + "px"); } }; }; // Bind our overlay to the map… overlay.setMap(map); // Plot data points from .csv file d3.csv("data/data.csv", function(csv) { d3.selectAll("circle") .data(csv) .enter() .append("circle") .attr("cx", function(d) { return projection([d.lat, d.lon])[0]; }) .attr("cy", function(d) { return projection([d.lat, d.lon])[1]; }) .attr("r", 5) .style("fill", "red") .style("opaci…
type: UnansweredQuestion
upvote count: 0
has answer: http://stackoverflow.com/a/27559924
type: Question
tagged with: google-maps
tagged with: javascript
score: -1
tagged with: http://stackoverflow.com/tag/csv

http://stackoverflow.com/q/27499530
has comment: http://stackoverflow.com/comment/43429846
upvote count: 3
has title: how can i set starting position of a tabs in swipe Tabs for removing there scroll?
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27500074
score: 3
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/43430466
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I make a phonegap app for using swipe tabs i have four tabs and every tab have a specific div getting dynamic data using Ajax. the tabs simply work fine. but there have a problem in scroll bar. suppose i have in First tab page then Ajax call and get data from URL. suppose he get 100 data from the URL now for seeing the last data i use scroll the page. The problem is here now at this time i swipe First Tab to Second Tab then Second Tab use the scroll of first Tab page and that are also show in last of the page. I don't know i can explain this so i add some snapshot of this problem. Any one please help me. Thanks. I have no reputation for post the images so i add my code for swipe. My index.html Orders Quotes Closing Encompass i use the reference of swipe tabs this link Tabs with feedback demo here is my swipe css .swiper-container { margin:0 auto; position:relative; overflow:hidden; -webkit-backface-visibility:hidden; -moz-backface-visibility:hidden; -ms-backface-visibility:hidden; -o-backface-visibility:hidden; backface-visibility:hidden; /* Fix of Webkit flickering */ z-index:1; } .swiper-wrapper { position:relative; width:100%; -webkit-transition-property:-webkit-transform, left, top; -webkit-transition-duration:0s; -webkit-transform:translate3d(0px,0,0); -webkit-transition-timing-function:ease; -moz-transition-property:-moz-transform, left, top; -moz-transition-duration:0s; -moz-transform:translate3d(0px,0,0); -moz-transition-timing-function:ease; -o-transition-property:-o-transform, left, top; -o-transition-duration:0s; -o-transform:translate3d(0px,0,0); -o-transition-timing-function:ease; -o-transform:translate(0px,0px); -ms-transition-property:-ms-transform, left, top; -ms-transition-duration:0s; -ms-transform:translate3d(0px,0,0); -ms-transition-timing-function:ease; transition-property:transform, left, top; transition-duration:0s; transform:translate3d(0px,0,0); transition-timing-function:ease; -webkit-box-sizing: content-box; -moz-box-sizing: content-box; b…
tagged with: css

http://stackoverflow.com/a/27639684
answers question: http://stackoverflow.com/q/27637765
has body: You need to edit your .htaccess file RewriteEngine on # Don't rewrite files or directories RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] # Rewrite everything else to index.html to allow html5 state links RewriteRule ^ index.php [L] RewriteRule: index.php or index.html
type: Answer
score: 0

http://stackoverflow.com/a/27511962
has comment: http://stackoverflow.com/comment/43457708
has comment: http://stackoverflow.com/comment/43454481
accepted answer of: http://stackoverflow.com/q/27511630
answers question: http://stackoverflow.com/q/27511630
has comment: http://stackoverflow.com/comment/43458226
type: AcceptedAnswer
downvote count: 0
has body: Your Haskell implementation is simply wrong: it never completes because: fib n = (fib n - 1) + (fib n - 2) is the same as: fib n = (fib n) - 1 + ((fib n) - 2) which diverges. The correct implementation: fib 0 = 1 fib 1 = 1 fib n = fib (n-1) + fib (n-2) genFibs n maxVal | fib n &lt; maxVal = fib n : genFibs (n+1) maxVal | otherwise = [] totalSum = sum $ filter even $ genFibs 1 4000000 main = print totalSum Runs in about 1 second on my machine: $time ./fibo 4613732 real 0m1.334s user 0m1.324s sys 0m0.009s The problem with the python solution is that the interpreter isn't introducing any kind of optimization or memoization for the double recursive call. This means that the algorithm takes exponential time to compute the answer. It's pretty easy to come up with a polynomial time algorithm: def fibo(n): prev, cur = 0, 1 for i in range(n): prev, cur = cur, prev + cur return cur Which results in: In [8]: %%timeit ...: tot = 0 ...: n = 0 ...: while True: ...: num = fibo(n) ...: if num &gt; 4000000: ...: break ...: elif num % 2 == 0: ...: tot += num ...: n += 1 ...: 10000 loops, best of 3: 54.8 µs per loop My guess for the speed of F# and C# is that the compiler is introducing some form of memoization to avoid exponential growth. Although the problem may still be too small to notice the exponential growth in function calls. If you try to increase the 4000000 to 400 hundred millions or more, you can definitely check if this is true.
type: Answer
has comment: http://stackoverflow.com/comment/43454630
has comment: http://stackoverflow.com/comment/43454899
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/43454992

http://stackoverflow.com/q/27481273
has comment: http://stackoverflow.com/comment/43395402
type: AnsweredQuestion
has body: Please check below image. When I will click on the hide images all the images show replaced with a static image and later when I will uncheck it it must show the original images now. &lt;div id="log_contents"&gt; &lt;span style="color:blue;"&gt;&lt;b&gt;Public chat&lt;/b&gt; with &lt;b&gt;dragos123&lt;/b&gt;&lt;/span&gt; &lt;br&gt;&lt;br&gt; &lt;div class="chat-line"&gt; &lt;span class="dialogue_time"&gt; 11:00:39 AM &amp;nbsp;&lt;/span&gt; &lt;span style="background-color:FFF;"&gt;debasish:&lt;/span&gt; &lt;span style="background-color:FFF;"&gt;&lt;img style="cursor:pointer; max-height:80px;" src="http://localhost/myshowcam/files/stickers/msc-1427684408.gif" title=":party1"&gt;&lt;/span&gt; &lt;/div&gt; &lt;div class="chat-line"&gt; &lt;span class="dialogue_time"&gt; 11:01:43 AM &amp;nbsp;&lt;/span&gt; &lt;span style="background-color:ffff88;"&gt;pkk:&lt;/span&gt; &lt;span style="background-color:ffff88;"&gt;hiiiiiiiiiiiiii&lt;/span&gt; &lt;/div&gt; &lt;div class="chat-line"&gt; &lt;span class="dialogue_time"&gt; 11:02:03 AM &amp;nbsp;&lt;/span&gt; &lt;span style="background-color:ffff88;"&gt;pkk:&lt;/span&gt; &lt;span style="background-color:ffff88;"&gt;&lt;img style="cursor:pointer; max-height:80px;" src="http://localhost/myshowcam/files/stickers/msc-1427684892.gif" title=":1min"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class="pagination" style=""&gt;&lt;/div&gt; &lt;/div&gt; Please give your valuable feedback. Thank you.
has comment: http://stackoverflow.com/comment/43395306
favorite count: 0
accepted answer: http://stackoverflow.com/a/27481456
type: Question
answer count: 2
score: -2
tagged with: local-storage
has comment: http://stackoverflow.com/comment/43395392
upvote count: 3
has comment: http://stackoverflow.com/comment/43395336
has comment: http://stackoverflow.com/comment/43395359
has comment: http://stackoverflow.com/comment/43395285
possible better answer: http://stackoverflow.com/a/27481471
has answer: http://stackoverflow.com/a/27481471
has answer: http://stackoverflow.com/a/27481456
downvote count: 5
tagged with: javascript
tagged with: jquery
has title: jQuery how to store images source into a temporary memory and retrieve it later

http://stackoverflow.com/q/27494515
tagged with: asp.net
favorite count: 0
type: Question
has title: Text attribute of an asp label using JavaScript is not staying changed
tagged with: vb.net
has answer: http://stackoverflow.com/a/27494731
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/43421098
has comment: http://stackoverflow.com/comment/43421170
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27494731
type: AnsweredQuestion
downvote count: 0
score: 1
has body: I have a button: &lt;asp:Button Text="Reset" runat="server" ID="ResetButton" OnClientClick="ResetClick()"/&gt; that runs the following JavaScript function when it gets clicked: function ResetClick() { document.getElementById("&lt;%=lblError.ClientId%&gt;").innerHTML = ""; } That changes the text on this label: &lt;asp:Label ID="lblError" runat="server" Style="color: Red;" Text=""&gt;&lt;/asp:Label&gt; Unfortunately, my code behind also changes the label text to an error message using the following code: lblError.Text = "No data is available" When I click the reset button, the text is momentarily cleared and then it fills again with the error message. Is there any way to have the code behind set a message in the label and let the JavaScript clear the message?
has comment: http://stackoverflow.com/comment/43420940

http://stackoverflow.com/q/27529472
tagged with: jquery
favorite count: 0
tagged with: symfony
answer count: 1
tagged with: symfony-forms
has title: Symfony2 collection field for simple list of emails to be sent
accepted answer: http://stackoverflow.com/a/27531315
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/27531315
tagged with: forms
has body: I'm trying to accomplish a very basic task: I'd like to have a form with one field (an email address), and an "add" button so that you can add other email addresses. I'll later send emails to each of the addresses passed. I came across this, which in theory is exactly what I need. I'm fine creating the form inside the controller directly, as I'll use it only here. Here is the function inside the controller: public function createHRAction(Request $request) { $data = array(); $form = $this->createFormBuilder($data) ->add('emails', 'collection', array( // each item in the array will be an "email" field 'type' => 'email', // these options are passed to each "email" type 'options' => array( 'required' => false, 'attr' => array('class' => 'email-box'), 'prototype' => true, 'allow_add' => true, ), ))->getForm(); $form->handleRequest($request); if ($form->isValid()) { //$form->bind($request); // $data is a simply array with your form fields $data = $form->getData(); return $this->render('HR/invitationSent.html.twig', array('data' => $data,)); } return $this->render('HR/createForm.html.twig', array('form' => $form->createView(),)); } And here is the twig: {% extends "internal.html.twig" %} {% block content %} {{ form_start(form) }} {# {# store the prototype on the data-prototype attribute #} {% for emailField in form.emails %} {{ form_errors(emailField) }} {{ form_widget(emailField) }} {% endfor %} Add another email #} {{ form_end(form) }} {% endblock content %} {% block javascripts %} {% endblock %} I get the following error: Key "prototype" for array with keys "value, attr, form, id, name, full_name, disabled, label, label_format, multipart, block_prefixes, unique_block_prefix, translation_domain, cache_key, read_only, errors, valid, data, required, max_length, pattern, size, label_attr, compound, method, action, submitted, allow_add, allow_delete" does not exist in HR/createForm.html.twig at line 8 I thought I solved it by adding the lines: 'prototype' => true, 'allow_add…
type: Question
upvote count: 1
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/43566219
score: 3
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27570438
has text: Two divs with the same id may have a lot to do with it

http://stackoverflow.com/q/27571246
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43567857
has title: centering a div within a div
has answer: http://stackoverflow.com/a/27571300
type: Question
possible better answer: http://stackoverflow.com/a/27571501
has comment: http://stackoverflow.com/comment/43567942
answer count: 2
has answer: http://stackoverflow.com/a/27571501
tagged with: javascript
tagged with: jquery
has body: I realize this has been asked a lot on SO, but after trying solutions from a bunch of different entries, I just can't seem to get it to work on mine. The answer is probably something easy i'm overlooking. Im just trying to get these 3 cells to be centered in the fixed container width of 1024px. Please help o' stackoverlords! http://jsfiddle.net/uvb1u8y1/15/ #container { width:1024px; position:absolute; background-color: #7f82a3; } #topgrid { margin: 0 auto; } .toptile { position:relative; display: block; float:left; margin-left:10px; margin-top:10px; } .topslider { margin: 0px auto; } .contenthover { padding: 15px 20px 0px 20px; } .contenthover { font-family: Arial, Helvetica, sans-serif; color: #fff; font-size:12px; } .contenthover h4 { font-size:20px; font-weight:normal; } .contenthover h4, .contenthover p { margin: 0 0 10px 0; line-height: 1.4em; padding: 0; } .contenthover a { font-family:'Droid Sans', sans-serif; font-weight:700; } .contenthover a.mybutton { margin: 20px 0 0 40px; font-size:21px; padding: 10px 15px; color: #fff; background: -webkit-linear-gradient(#5bc5de, #0b75b9); background: -o-linear-gradient(#5bc5de, #0b75b9); background: -moz-linear-gradient(#5bc5de, #0b75b9); background: linear-gradient(#5bc5de, #0b75b9); -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px; border-style: solid; border-color: #007ac9; } .contenthover a.mybutton:hover { background: #005588; } lorem Ipsum Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum pulvinar ante quis augue lobortis volutpat. Click to Install lorem Ipsum Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum pulvinar ante quis augue lobortis volutpat. Click to Install lorem Ipsum Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum pulvinar ante quis augue lobortis volutpat. Click to Install $('.topslidercell').contenthover({…
score: 0
linked to: http://stackoverflow.com/q/114543
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/27571300
tagged with: css

http://stackoverflow.com/a/27546182
type: Answer
answers question: http://stackoverflow.com/q/27545895
has body: After taking @sudip-pal's advise you'll have to loop through the data yourself. jQuery pales in comparison to other tools sadly. There are several options, ES5 (The modern browser) has built-in methods for managing loops, For older browsers Underscore or Lo-Dash do wonders for these kinds of operations. Since this question was JS / jQuery only I'll show two methods (ES5 and jQuery only): ECMAScript 5 function filterByPriceRange(objects, min, max) { return objects.reduce(function(memo, object) { if (min &lt;= object.price &lt; max) { memo.push(object); } return memo; }, []); } jQuery (old browsers) function filterByPriceRange(objects, min, max) { var result = []; $.each(objects, function(index, object) { if (min &lt;= object.price &lt; max) { result.push(object); } }); return result; } Underscore / Lo-Dash By comparison here is the same with a utility library: function filterByPriceRange(objects, min, max) { return _.filter(objects, function(object) { return (min &lt;= object.price &lt; max); }); }
score: 0

http://stackoverflow.com/comment/43680993
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27630118
has text: hey awesome! thanks for the info, have some internet points.
score: 0

http://stackoverflow.com/q/27478414
has comment: http://stackoverflow.com/comment/43391329
tagged with: jquery
has title: ZeroClipboard js is not worlink with Input[type="text"]
type: UnansweredQuestion
answer count: 0
type: Question
has body: I am facing a problem with ZeroClipoard js. I want to copy text which an user put on a input form field when he click on a button. I am not good in js. So can anyone plz help me? Thanks in advance. Below is my code. HTML markup: Sales Page Link / URL main.js code: //set path ZeroClipboard.setMoviePath("ZeroClipboard.swf"); //create client var clip = new ZeroClipboard.Client(); //event clip.setHandCursor( true ); clip.addEventListener("mousedown", function () { clip.setText(document.getElementById("salesinput2").value); }); clip.addEventListener("complete", function (client, text) { alert("copied: " + text); }); //glue it to the button clip.glue("copy-button");
tagged with: javascript
has comment: http://stackoverflow.com/comment/43391162
score: 0
tagged with: zeroclipboard

http://stackoverflow.com/comment/47451099
comment on: http://stackoverflow.com/a/29655692
score: 0
type: AnswerComment
has text: Sorry your index.html file should have within a script tag ' data-main="bootstrap" src="path-to-require.js" '
type: Comment

http://stackoverflow.com/q/27619015
upvote count: 1
tagged with: php
has body: i am trying to make scroll follow with ScrollToFixed.js This is my view: Summary 1 There are three floating summaries on the right of this page. They are anchored to their respective sections. Once a summary reaches the bottom of the header above, it will stop there until the next section summary arrives. Then, it will continue up the page. The last summary will get pushed up the page by the footer once it undocks to reveal the content below it. Summary 3 There are three floating summaries on the right of this page. They are anchored to their respective sections. Once a summary reaches the bottom of the header above, it will stop there until the next section summary arrives. Then, it will continue up the page. The last summary will get pushed up the page by the footer once it undocks to reveal the content below it. This is the javascript: var summaries = $('.summary'); summaries.each(function(i) { var summary = $(summaries[i]); var next = summaries[i + 1]; summary.scrollToFixed({ marginTop: $('.header').outerHeight(true) + 10, limit: function() { var limit = 0; if (next) { limit = $(next).offset().top - $(this).outerHeight(true) - 10; } else { limit = $('.footer').offset().top - $(this).outerHeight(true) - 10; } return limit; }, zIndex: 999 }); }); If the number is sequential, it will run successfully. But if not, it didn't work at all. I know the wrong is in var next = summaries[i + 1]; and then i replace it with var next = summaries<?php echo $data['id_post']?>; but it still not working. The number 1 and 3 in summary id is my id_post. Does anyone know how to change var next with id_post? Many thanks for the answer...
has title: Javascript - ScrollToFixed in dynamically div id
score: 1
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27619202
has comment: http://stackoverflow.com/comment/43659163
downvote count: 0
has answer: http://stackoverflow.com/a/27619290
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/27524713
answers question: http://stackoverflow.com/q/27524561
has body: Every web console run every JavaScript code. You want your script run when page is loaded. This event occurs when the page just finished to load. When you go to Web console, the page is already loaded. If you tell your page to run a function when the page is loaded, but your page is already loaded, the function will never be called. Insert your script in your page, or place the script-link, before end of &lt;/html&gt;. Then in your script, call your function ( example fn ) : window.addEventListener &amp;&amp; window.addEventListener( "load", fn ) || window.attachEvent &amp;&amp; window.attachEvent( "load", fn );
score: 1
accepted answer of: http://stackoverflow.com/q/27524561
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1

http://stackoverflow.com/comment/43564176
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27568336
type: Comment
has text: Following is a [Fiddle](http://jsfiddle.net/RajeshDixit/7k6rtLbn/) that you can use if you may require in future.

http://stackoverflow.com/q/27479640
favorite count: 0
has comment: http://stackoverflow.com/comment/43392510
has comment: http://stackoverflow.com/comment/43392554
has body: I want to add 1 to the value "$arate_num" and update the database with new $arate_num called "num3". But it is not working properly. Here is my PHP code. $jsqla = mysql_query("select * from products where id='$product_id'") or die(mysql_error()); $jfeta = mysql_fetch_assoc($jsqla); $arate_num = $jfeta['rate_number']; Here is my javaScript code. var phpvalue = "&lt;?php echo $arate_num; ?&gt;"; var num = parseInt(phpvalue, 10); var num3 = parseInt(phpvalue+1, 10); alert(num3);
tagged with: php
has title: How to add 1 to a javaScript variable?
type: AnsweredQuestion
upvote count: 3
has comment: http://stackoverflow.com/comment/43392519
type: Question
score: 3
tagged with: javascript
has comment: http://stackoverflow.com/comment/43392539
has answer: http://stackoverflow.com/a/27479679
accepted answer: http://stackoverflow.com/a/27479679
answer count: 1
downvote count: 0

http://stackoverflow.com/q/27576695
type: Question
has comment: http://stackoverflow.com/comment/43578716
answer count: 2
downvote count: 4
tagged with: javascript
has answer: http://stackoverflow.com/a/27576925
has comment: http://stackoverflow.com/comment/43578742
has comment: http://stackoverflow.com/comment/43578749
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has comment: http://stackoverflow.com/comment/43578739
has comment: http://stackoverflow.com/comment/43578733
has body: How does one get the .tagName of a value passed in an HTML form input? This is to check whether the value that has been passed is an 'iFrame'. The input is to only accept iframes For example: //HTML Push //JavaScript document.getElementById("butt").onclick = function(){ var iframe = document.getElementById("iFrame").value; console.log(iframe.tagName); }
has comment: http://stackoverflow.com/comment/43578808
type: UnansweredQuestion
score: -3
upvote count: 1
has answer: http://stackoverflow.com/a/27576727
has title: Get the tag name of a form input value
has comment: http://stackoverflow.com/comment/43578726

http://stackoverflow.com/comment/43408063
comment on: http://stackoverflow.com/q/27488197
type: QuestionComment
has text: @Blunderfest What do you mean about "don't mix types" ?
score: 0
type: Comment

http://stackoverflow.com/comment/43545495
type: QuestionComment
has text: yes,whenever we save img in browser by 'save as' it now naming file as aaa.jpg,i want to rename randomly everytime user save img
score: 1
comment on: http://stackoverflow.com/q/27559354
type: Comment

http://stackoverflow.com/a/27570693
score: 2
has body: Your .dropdown is nested inside a .dropdown-btn causing any further clicks to trigger the parent event. By separating the trigger and the dropdown you can stop them triggering upwards. See this updated fiddle: http://jsfiddle.net/3rm3ny1j/2/
downvote count: 0
answers question: http://stackoverflow.com/q/27570603
upvote count: 2
type: Answer

http://stackoverflow.com/a/27537772
type: Answer
has body: getElementsByClassName() generates a node list, so even if your list contained only one item, you would still need to access it like so: var play = document.getElementsByClassName('lay')[0];
answers question: http://stackoverflow.com/q/27537736
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/43503844
has comment: http://stackoverflow.com/comment/43503875
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27537736

parse-platform
tags question: http://stackoverflow.com/q/27633360
type: Tag
tags question: http://stackoverflow.com/q/27580753
tags question: http://stackoverflow.com/q/27552456
tags question: http://stackoverflow.com/q/27614260
tags question: http://stackoverflow.com/q/27521233
tags question: http://stackoverflow.com/q/27521473
tags question: http://stackoverflow.com/q/27522956
tags question: http://stackoverflow.com/q/27516635
tags question: http://stackoverflow.com/q/27549612
tags question: http://stackoverflow.com/q/27505256
tags question: http://stackoverflow.com/q/27476359
tags question: http://stackoverflow.com/q/27613500
tags question: http://stackoverflow.com/q/27608459
tags question: http://stackoverflow.com/q/27587814
tag name: parse-platform

http://stackoverflow.com/comment/43573786
type: QuestionComment
has text: @PSL could you elaborate on what you mean by that?
score: 0
comment on: http://stackoverflow.com/q/27574145
type: Comment

http://stackoverflow.com/comment/43498090
comment on: http://stackoverflow.com/q/27529598
score: 0
type: Comment
type: QuestionComment
has text: I mean a link to your player embed to where it isn't working so I can inspect it.

http://stackoverflow.com/comment/43425521
type: Comment
type: QuestionComment
score: 0
has text: @SableFoste Cookies hold little nits of data and they are transferred to the server on every request. That is bad if you do not need that info on the server. Local Storage is a better place to store info that is needed just on the client.
comment on: http://stackoverflow.com/q/27496927

graphics
tag name: graphics
tags question: http://stackoverflow.com/q/27542452
type: Tag
tags question: http://stackoverflow.com/q/27624895

http://stackoverflow.com/q/27477883
upvote count: 0
tagged with: actionscript-3
has body: I am following exactly this tutorial on Youtube : https://www.youtube.com/watch?v=ohlrknEwobs&list=PLE10sFVGtI1ejzPFmX5CebHrTMhaCx2oI&index=31 The concept is to make an avoid-er game in which 3 objects fall vertically, one of which will increase point score, and the other two which will end the game. I have created 4 objects within an array which are as follows: var:objects Array = [new BlueBird(),new RedBird(),new Goomba(),new Ham()] // objects[0] = Is a Blue Bird which jumps to scene 3 ("Death Scene") // objects[1] = Is a Red Bird which jumps to scene 3 ("Death Scene") // objects[2] = Is a Goomba which jumps to scene 3 ("Death Scene") // objects[3] = Is an piece of Ham which adds Points Here is the statement that I am having trouble with. I can't get the object[3], the piece of Ham, to test for else if statement. I coded in && objectsIndex == 3, but it did not work: if((Pig.hit).hitTestObject(objects[objectsIndex])) { // Reset objects to y positions objects[objectsIndex].x = randomRange(0,3) * 50 objects[objectsIndex].y = -50; stage.removeEventListener(KeyboardEvent.KEY_DOWN,pressedButton); stage.removeEventListener(Event.ENTER_FRAME,CollisionSensor); stage.frameRate = 24; gotoAndStop(1,"GG WP"); //trace ("you died!"); } else if((Pig.hit).hitTestObject(objects[objectsIndex]) && objectsIndex == 3) { score = score + 1; //increase score by 1 point text1.text = String(score); // Score is now a string value // Since text1 is a text box, it must be denotated as a string // Reset the objects to y positions objects[objectsIndex].x = randomRange(0,3) * 50; objects[objectsIndex].y = -50 } Here is the entire Projects Code for Reference: stop(); import flash.events.Event; stage.focus = this; stage.addEventListener(KeyboardEvent.KEY_DOWN, pressedButton); stage.addEventListener(Event.ENTER_FRAME, CollisionSensor); var score:Number = 0; //Player Score var enemy_velocity:Number = 5; var objects:Array = [new RedBird(),new Goomba,new BlueBird(),new Ham()]; // objects[0] is a RedBir…
has comment: http://stackoverflow.com/comment/43393242
type: UnansweredQuestion
score: -1
has title: ActionScript 3 If/ Else If Statement
type: Question
tagged with: flash
answer count: 1
tagged with: arrays
tagged with: javascript
downvote count: 1
has answer: http://stackoverflow.com/a/27482764
favorite count: 0

http://stackoverflow.com/a/27507033
answers question: http://stackoverflow.com/q/27506815
has comment: http://stackoverflow.com/comment/43449240
score: 0
has body: Try adding this to the on.cick function row.on("click", function() { $('INPUT', this).each(function(i){ rowData['value' + (i+1)] = this.value; }); fillForm(rowData); });
type: Answer

http://stackoverflow.com/comment/43581760
type: AnswerComment
comment on: http://stackoverflow.com/a/27549041
type: Comment
has text: @Melkor For less events this will work, but what you will do if you have 20 or 30 event handlers you wanna bind, you will create a custom directive for each of them?
score: 0

http://stackoverflow.com/q/27574596
has comment: http://stackoverflow.com/comment/43607031
has answer: http://stackoverflow.com/a/27575439
upvote count: 1
has comment: http://stackoverflow.com/comment/43575794
type: Question
has comment: http://stackoverflow.com/comment/43702872
possible better answer: http://stackoverflow.com/a/40380575
tagged with: javascript
has title: Prevent DIV from scrolling on DOM content change
has answer: http://stackoverflow.com/a/40380575
has comment: http://stackoverflow.com/comment/43575116
has body: I am writing a document reading application using Node-Webkit. A document can be hundreds of pages long and the interface allows opening the document to a specific chapter. Once the initial chapter is displayed, I want to load the rest of the book asynchronously. Since I don't know what direction the reader will scroll, my strategy is to alternately load chapters before and then after the initial chapter: load chapter x -> load chapter x-1 -> load chapter x+1 -> load x-2 -> load x+2 ... I am displaying the book in a containing div element with each chapter being a div within the container. I'm using jquery .before() and .after() to insert each chapter as it is fetched. My problem is that the browser automatically scrolls up when I add chapters earlier in the book. So if I start with chapter 10, the browser scrolls up when I add chapter 9 and again with chapter 8 and so forth. One (unsatisfactory) solution to the problem is to make an anchor tag for each chapter and store the id of the first chapter loaded. Then after each chapter is fetched, runing the code: window.location.href = #originalChapter keeps the initial chapter in the browser viewport. Of course the problem with that is that the reader cannot scroll while the rest of the book is being loaded. Ideally, I would like to disable scrolling, load a chapter and then re-enable until the next chapter is fetched. I'm so far unable to figure out how to do that.
answer count: 2
accepted answer: http://stackoverflow.com/a/27575439
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/43575522
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: node-webkit
linked to: http://stackoverflow.com/q/4770025
type: AnsweredQuestion
score: 1

http://stackoverflow.com/comment/43406325
type: Comment
score: 1
type: AnswerComment
has text: I did it. But it's currently with the other solution which i prefer since it would put markers when the user select the option.
comment on: http://stackoverflow.com/a/27475242

http://stackoverflow.com/comment/43693027
score: 2
comment on: http://stackoverflow.com/q/27637008
has text: `obj[findex][sindex][tindex] = myvalue`
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27508086
score: 1
upvote count: 1
has body: I try to find all images in a web page, add them in an array, check their dimensions and sort the array accordingly. var images = document.getElementsByTagName("img"); var image_dimensions=[]; for(var i=0;i&lt;images.length;i++){ image_dimensions.push(images[i].width+"x"+images[i].height); } //var image_dimensions = ["45x67", "68x45", "12x23", "124x90"]; I want to sort the images according to their dimensions and update the images array. I tried to push dimensions into image_dimensions and sort it but later I could not figure out how can I relate the dimensions to the actual img nodes. How can I sort the images in a web page by dimension?
type: Question
linked to: http://stackoverflow.com/q/623172
possible better answer: http://stackoverflow.com/a/27510901
has answer: http://stackoverflow.com/a/27508164
has answer: http://stackoverflow.com/a/27508846
tagged with: arrays
linked to: http://stackoverflow.com/q/12161056
tagged with: javascript
has answer: http://stackoverflow.com/a/27510901
tagged with: sorting
has title: How to Sort Images by Dimension
tagged with: image
answer count: 3
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/27508846
has comment: http://stackoverflow.com/comment/43446685
type: AnsweredQuestion

http://stackoverflow.com/q/27511246
has title: some questions about the different ways to determine the highest value stored in an array (plus an output message issue)
tagged with: javascript
has answer: http://stackoverflow.com/a/27511333
type: AnsweredQuestion
tagged with: arrays
favorite count: 0
type: Question
accepted answer: http://stackoverflow.com/a/27511333
has comment: http://stackoverflow.com/comment/43452735
has comment: http://stackoverflow.com/comment/43452711
has body: I have this HTML/Javascript document which lets the user insert a number into a text field and after clicking a button, the number is stored in an array and the text field is cleared so more numbers (as many as the user wants) can be stored in the array. The user is also given the option to determine the highest number stored in the array by clicking another button, which should print a message saying "The highest number in the array is number". Now, I have found 3 possible options to determine the highest number out of those stored in the array but I can only get 2 of those options to work so far because the other option returns a NaN. My preferred option out of the 3 is the one that returns a NaN because to me it seems less complex than the other 2. I have commented out each of the 3 options, in case people want to test them. I have also commented out the output message (which is not printing what I wanted it to). So my questions are: Why is option1 returning a NaN, if I have previously used a parseInt everytime a number is stored in the array? What do the 'Math' and 'null' inside the parenthesis represent or do in option2 and option3 respectively? Why is the actual number missing in the output message? (sorry for this one being off-topic) Here's the code (which I only test with Internet Explorer):
score: 0
upvote count: 1
answer count: 1
downvote count: 1
linked to: http://stackoverflow.com/q/1669190

http://stackoverflow.com/q/27503717
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/1187518
type: Question
has title: Handling elements in arrays differing in their length considering indices of elements
has comment: http://stackoverflow.com/comment/43438330
tagged with: arrays
has comment: http://stackoverflow.com/comment/43437692
tagged with: javascript
tagged with: comparison
has answer: http://stackoverflow.com/a/27508626
score: 0
has body: I have 2 arrays to compare, these arrays are recreated frequently. Very often the arrays will have different length, as in example below: a = [1,2,3,4,5] b = [2,4,6] The following needs to be done with the arrays: a) compare value in a origin array with the value in the source array (taking into account position through index) and push it to a specially designated array depending on the outcome. in my example i do comparison between 2?1, 4?2 and 3?6 and act accordingly. This is not a problem, I am mostly clarifying this as this operation will be in the further code example. b) push whatever remains (unaccounted values) to a specially designated array. In the example above the numbers 4 and 5 in array a would be the "unaccounted ones" and need to be pushed further. And here I have a problem, as I need to find a way to do so. I have a suspicion that I could figure out which array of the two is larger and then loop through it and compare values at the same time performing a test to see if a target array value is "undefined". If it is, then push the source array value to a specially designated array. I have not tried it yet but aiming to, meanwhile, may be there is some advice on best practices on how to achieve this? What I have so far is as follows: var playerRollsLegal = []; var enemyRollsLegal = []; var hitsToPlayer = []; var hitsToEnemy = []; if (playerRollsLegal.length === enemyRollsLegal.length) { for (var m = 0; m &lt; playerRollsLegal.length; m++){ if (playerRollsLegal[m] === enemyRollsLegal[m]) { hitsToPlayer.push(enemyRollsLegal[m]); hitsToEnemy.push(playerRollsLegal[m]); } else if (playerRollsLegal[m] &gt; enemyRollsLegal[m]) { hitsToEnemy.push(playerRollsLegal[m]); } else if (playerRollsLegal[m] &lt; enemyRollsLegal[m]) { hitsToPlayer.push(enemyRollsLegal[m]); } } } else if (playerRollsLegal.length &gt; enemyRollsLegal.length){ alert("Player has more legal rolls than enemy"); } else if (playerRollsLegal.length &lt; enemyRollsLegal.length) { alert("Player ha…
answer count: 1

http://stackoverflow.com/a/27508012
type: Answer
accepted answer of: http://stackoverflow.com/q/27507843
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27507843
score: 0
has body: var lastValue; $('#qty').live('change', function () { if ((this.value) == 10) { $(this).replaceWith($('&lt;input/&gt;', { 'type': 'text', 'value': +(this.value) })); } else{ lastValue = this.value; } }); And then use lastValue to reset the value of the selectbox when you have to show it. EDIT : modified the jsfiddle, you jsut need to create the list again http://jsfiddle.net/qje6uywg/5/

http://stackoverflow.com/comment/43682488
type: Comment
has text: document.getElementById('newimg'); will not return anything in the second page as your newimg is in the first page
score: 0
comment on: http://stackoverflow.com/q/27631015
type: QuestionComment

http://stackoverflow.com/a/27481131
has comment: http://stackoverflow.com/comment/43395357
score: 0
answers question: http://stackoverflow.com/q/27480627
has comment: http://stackoverflow.com/comment/43395496
has comment: http://stackoverflow.com/comment/43395997
type: Answer
has body: give your checkbox the same class no need to change classes for each input this function in jquery to check your checkbox with value you want function checkValue(Num){ $('.checkIT').each(function(){ if($(this).val() == Num){ $(this).prop('checked',true); } }); } you can call function with checkValue('80%'); // change number as you want see DEMO replace your code with this <?php if(!empty($wpjobus_resume_skills)) { for ($i = 0; $i < (count($wpjobus_resume_skills)); $i++) { ?> <div id="lang<?php echo $i; ?>"> 20% <input style="width:50%; float: none" type='checkbox' class='wpjobus_resume_skills' name='wpjobus_resume_skills[<?php echo $i; ?>][1]' value='20%'> 40% <input style="width:50%; float: none" type='checkbox' class='wpjobus_resume_skills' name='wpjobus_resume_skills[<?php echo $i; ?>][1]' value='40%'> 60% <input style="width:50%; float: none" type='checkbox' class='wpjobus_resume_skills' name='wpjobus_resume_skills[<?php echo $i; ?>][1]' value='60%'> 80% <input style="width:50%; float: none" type='checkbox' class='wpjobus_resume_skills' name='wpjobus_resume_skills[<?php echo $i; ?>][1]' value='80%' /> 100% <input style="width:50%; float: none" type='checkbox' class='wpjobus_resume_skills' name='wpjobus_resume_skills[<?php echo $i; ?>][1]' value='100%' > in js $(document).ready(function(){ checkValue('lang1','20%'); checkValue('lang2','80%'); checkValue('lang3','100%'); }); function checkValue(IDname,Num){ $('#'+IDname +' .wpjobus_resume_skills').each(function(){ if($(this).val() == Num){ $(this).prop('checked',true); } }); }

http://stackoverflow.com/a/27566127
has comment: http://stackoverflow.com/comment/43558898
has comment: http://stackoverflow.com/comment/43557770
has comment: http://stackoverflow.com/comment/43557712
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27566009
has body: Try this: function show (text){ var userInput = document.getElementById('textbox').value; userInput = userInput.match(/[a-z]+/gi).join(", ").toLowerCase(); document.getElementById('text').innerHTML = userInput; }

http://stackoverflow.com/q/27630584
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/27630648
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27630648
has comment: http://stackoverflow.com/comment/43681821
type: Question
has comment: http://stackoverflow.com/comment/43681745
has body: I'm having trouble figuring out what is causing my issue. If you go to my site and click the flowers box first, the 3 div images are all over the place. If you hit the back button and then go into vegetables or herbs and then the back button again and then click Flowers again, The divs are organized correctly. What is causing the divs to get shifted all over the place if you click the flowers image first? Here's the site: http://andrewhnovak.com/Botany/index.html#
has title: Divs all over the place when certain button is clicked first
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/43409486
comment on: http://stackoverflow.com/a/27488698
type: AnswerComment
has text: @IndraKumarS You are right. I've just try to find the errors in his code. Who knows, maybe he has some reason for it.
score: 0
type: Comment

http://stackoverflow.com/comment/43574556
type: Comment
score: 2
has text: In this case the keys can be passed in as an array `Swap(joe, bob, ['iq', 'favoriteColor'])`. This makes the function much more flexible and useful.
comment on: http://stackoverflow.com/a/27574516
type: AnswerComment

http://stackoverflow.com/comment/43494398
score: 0
type: QuestionComment
has text: Good point. Since I have no way of knowing how the decryption is handled, I did not bother trying to decrypt both strings with the same method.
type: Comment
comment on: http://stackoverflow.com/q/27529782

http://stackoverflow.com/comment/43486680
has text: Nice. You know where to find me if you're ever looking for a good dev job on a Knockout-based SPA. I can't hire you, but I can put in a good word.
comment on: http://stackoverflow.com/a/27528858
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27475172
accepted answer of: http://stackoverflow.com/q/27475146
upvote count: 2
has body: Your callback function is asynchronous, while your try / catch block is synchronous. By the time your async callback has finished, the try / catch block may have already finished. Since exceptions are handled synchronously, you'll need to use a different method for error handling. I recommend reading Asynchronous Error Handling in Javascript
type: AcceptedAnswer
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/27475146

http://stackoverflow.com/comment/43472953
score: 0
comment on: http://stackoverflow.com/a/27521643
type: AnswerComment
type: Comment
has text: I made an edit, if he will accept, you can see a function which will make a join and skip empty entries.

http://stackoverflow.com/comment/43535809
type: Comment
comment on: http://stackoverflow.com/a/27535443
type: AnswerComment
has text: I am adding an edit that will explain what I think is the best solution for this.
score: 0

http://stackoverflow.com/a/27479096
answers question: http://stackoverflow.com/q/27478562
type: Answer
has comment: http://stackoverflow.com/comment/43418634
has comment: http://stackoverflow.com/comment/43428996
downvote count: 0
has comment: http://stackoverflow.com/comment/43392100
score: 1
has comment: http://stackoverflow.com/comment/43392170
has comment: http://stackoverflow.com/comment/43392135
upvote count: 1
has comment: http://stackoverflow.com/comment/43392245
has body: It's not very clear what kind of help you are asking for i.e. help with fixing a bug in your code or ideas for a possible algorithm....? Directives are not meant to manipulate your model/scope, they are used to manipulate the DOM, so what you want to do is build out your feature in your controller and then create a directive that is capable of recursively traversing the model and rendering it to the DOM. See this fiddle to get you started http://jsfiddle.net/ObiOne86/e478n2pc/4/ UPDATE I think what you want to achieve might be achievable with a simple template rather than having to worry about the nuances of a using directives. Please see this new Fiddle for a working example that meets your objectives var app = angular.module('TempExplorer', []); app.controller("TempExplorerCtrl", ["$scope", function ($scope) { $scope.Directory = [new Directory('My Documents')]; $scope.CurrentPath = {}; $scope.selectPath = function (path) { $scope.CurrentPath = path; } }]); function Directory(name) { var self = this; self.Name = name; self.CreatedOn = new Date(); self.Directories = []; self.AddChild = function (childName) { self.Directories.push(new Directory(childName)); } } HTML Rename: Some CSS sugar .subdir { margin-left : 30px; }

http://stackoverflow.com/comment/43579480
has text: Sounds like you are trying to trigger a click on the anchor tag in the iframe. To do that, you will need to have the trigger code in the iframe document and add a listener for messages from the parent document.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27577133
type: QuestionComment

http://stackoverflow.com/comment/43520749
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27547036
has text: Thanks! Looks like it was needing filter instead of find. Thanks a lot for the help!

http://stackoverflow.com/q/27523147
answer count: 2
has comment: http://stackoverflow.com/comment/43475211
has title: passing php value as parameter
tagged with: jquery
tagged with: php
type: AnsweredQuestion
has body: I want to pass php variable as parameter in onblur event.2nd parameter is not passed to the function. Here I attached my code. echo " Email "; script
has answer: http://stackoverflow.com/a/27523181
type: Question
has comment: http://stackoverflow.com/comment/43475433
accepted answer: http://stackoverflow.com/a/27523513
possible better answer: http://stackoverflow.com/a/27523181
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27523513

http://stackoverflow.com/comment/43392076
has text: http://stackoverflow.com/questions/2407284/how-to-get-multiple-selected-values-of-select-box-in-php link for more reference
type: AnswerComment
comment on: http://stackoverflow.com/a/27479321
score: 0
type: Comment

http://stackoverflow.com/q/27483681
answer count: 2
upvote count: 1
favorite count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/9051955
downvote count: 0
score: 1
tagged with: java
has answer: http://stackoverflow.com/a/27484905
has title: GWT - Inject external JavaScript file into GWT application without ScriptInjector
type: Question
tagged with: gwt
has body: I'm working on maintenance project which was developed with GWT version 1.x. Now I have to add some extra features in the same project and for that I have to inject external JavaScript file into GWT application. So I have done a bit of research to achieve the same and I can understand that I can inject the external JavaScript with the help of ScriptInjector class [Source]. but this class is available in GWT version GWT 2.7.0 and I'm using the older version of GWT. So I would like to know that Can I inject the external JavaScript file without ScriptInjectorclass?
tagged with: javascript
has answer: http://stackoverflow.com/a/27484808
tagged with: javascript-injection

http://stackoverflow.com/q/27544118
tagged with: javascript
tagged with: jquery
score: 0
tagged with: angularjs-filter
has title: How to use Angularjs filter to filter an array which has a binding to two select boxes
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27545776
has answer: http://stackoverflow.com/a/27545426
has body: I have two select boxes (box 1 and box2) which are bound to a model array. When an option is selected in box 1, the item should not be displayed in box2 and vice versa. How can I do this in Angularjs. Below is my HTML Choose 1 Choose 2 array1.boxvalue = {['id':1,'text':'test1'],['id':2,'text':'test2'],['id':3,'text':'test3']} How can I achieve the following: When selected test1 in box1, box2 drop down should not display test1 and vice versa. Thanks
type: Question
answer count: 2

http://stackoverflow.com/q/27639211
tagged with: javascript
tagged with: pouchdb
score: 0
has answer: http://stackoverflow.com/a/27643600
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/27643600
tagged with: scripting
has body: We are looking into using a CouchDB and PouchDB stack and we would like to stress test CouchDB as one of our use case can have as many as 70-80 users replicating at the same time. We managed to stress test CouchDB and are satisfied with the result, but we would like to do some end-to-end stress test from PouchDB. I have tried a few things: 1) Using a PhantomJS script that launches many pages in a for loop 2) Using a PhantomJS script with some kind of parallel function found on Github 3) Using a bash script and the &amp; to launch multiple phantomJS 4) Using a bash script and GNU Parallel to launch multiple instances of PhantomJS * all tests above are using a waitFor function to only finish when a global variable has been set to true (the only way I can think of that will wait for all the JS in the page to be executed) While one phantomJS execution takes about 200-300ms, when running multiple, they seem be be queued somehow and we are getting numbers from 200ms to 30,000ms for the last of ~30 executions. Looks like PhantomJS is queueing itself somehow. As I can see a steady progression of n*200ms for each subsequent requests. I could probably build a demo app on 2-3 devices and loop PUT and Replicate, but I wanted to try to script this in a similar way that Siege can stress test a page with multiple assets. Only, I want it to "wait" until the page is really done and all the JS has finished running. Any idea on how I could do this?
type: AnsweredQuestion
tagged with: stress-testing
upvote count: 1
downvote count: 1
type: Question
has title: How to stress test PouchDB

http://stackoverflow.com/comment/43592735
has text: i did that but I not sure how to stop the annual payments from adding into the from time until retirement. if that made any senses
score: 0
comment on: http://stackoverflow.com/q/27584033
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43535114
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27554348
has text: @MelanciaUK You use a CSS media query to hide the background images completely.
type: Comment

http://stackoverflow.com/a/27623146
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/27570708
downvote count: 0
has body: you need the user "markModified" http://mongoosejs.com/docs/api.html#document_Document-markModified var updated = _.merge(store, req.body); updated.markModified('foo_name'); updated.save(function (err) { if (err) { return handleError(res, err); } return res.json(200, store); });
has comment: http://stackoverflow.com/comment/43771178

http://stackoverflow.com/comment/43665216
has text: Yes, Underscore has changed its template function from a direct call to a function: http://underscorejs.org/#changelog. Sadly, most Backbone tutorials havent updated to this new behaviour
comment on: http://stackoverflow.com/a/27622160
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/43656849
type: Comment
score: 0
has text: my jsp part is working fine, because in my html, i embedded jsp to it, it works fine SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); <%=formatter.format(new java.util.Date())%> Not sure why when do this var d = new Date("<%=formatter.format(new java.util.Date())%>"); will give me NaN
type: AnswerComment
comment on: http://stackoverflow.com/a/27617458

http://stackoverflow.com/comment/43687321
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27633858
has text: ` ` how does that come out in the HTML sent to the clinet ?
score: 0

http://stackoverflow.com/comment/43683223
type: QuestionComment
comment on: http://stackoverflow.com/q/27631383
has text: you got that code internet and dont know what that code does ? than you should rather read javascript and php first
score: 1
type: Comment

http://stackoverflow.com/a/27554138
answers question: http://stackoverflow.com/q/27553985
has comment: http://stackoverflow.com/comment/43538374
has body: You can use this: $("#submit").prop("disabled", true); setInterval(function () { if ($("#username").val().length &gt;= 1 &amp;&amp; $("#password").val().length &gt;= 1) { $("#submit").prop("disabled", false); } else { $("#submit").prop("disabled", true); } }, 100); It checks the values of two fields if they are equal or more than "1" and if so, it enables the submit button. FIDDLE HERE: http://jsfiddle.net/nn8s2e8h/
has comment: http://stackoverflow.com/comment/43538118
upvote count: 3
type: Answer
has comment: http://stackoverflow.com/comment/43534691
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/43538040

http://stackoverflow.com/comment/43684277
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27632031
type: AnswerComment
has text: How can I use splice()? Can you please explain briefly? It would be helpful

http://stackoverflow.com/comment/43405284
comment on: http://stackoverflow.com/a/27486630
score: 0
type: Comment
has text: Yes... Uncaught TypeError: object is not a function
type: AnswerComment

http://stackoverflow.com/a/27524926
downvote count: 0
answers question: http://stackoverflow.com/q/27524833
accepted answer of: http://stackoverflow.com/q/27524833
score: 5
type: AcceptedAnswer
upvote count: 5
type: Answer
has body: You can set the hours, minutes, seconds, and milliseconds to 0 before doing the comparison in order to ignore the time of day, e.g.: var startdate = "2014-12-17"; var enddate = "2014-12-19"; var start = new Date(startdate); start.setHours(0, 0, 0, 0); // Sets hours, minutes, seconds, and milliseconds var end = new Date(enddate); end.setHours(0, 0, 0, 0); var diff = Math.round((end - start) / 86400000) + 1; // See note below re `+ 1` snippet.log("diff = " + diff); // 3 &lt;!-- Script provides the `snippet` object, see http://meta.stackexchange.com/a/242144/134069 --&gt; &lt;script src="http://tjcrowder.github.io/simple-snippets-console/snippet.js"&gt;&lt;/script&gt; Two notes on that: Math.round: This is here because if the timespan crosses a Daylight Savings Time boundary, the number will be off by a small fraction, but within the realm where rounding corrects it. Note that you must round, not truncate, floor, ceiling. + 1: The + 1 at the end of the diff = line is because your "difference" is unusual, because you're counting the start and end days inclusive. That's very odd, it would say that the difference in days from one Monday to the next was eight, not seven, because it would count the Monday on either end. But you said: For example if i give input start date as 17-dec-2014 and 19-dec-2014 its displaying two days, but i need to calculate number of days 17,18 and 19. ...so you need the + 1. A normal difference between two dates wouldn't have it. Example across DST boundaries (in many timezones): var start, end, diff; start = new Date(2014, 2, 1); // March 1st 2014 end = new Date(2014, 5, 1); // May 1st 2014 diff = ((end - start) / (1000 * 3600 * 24)) + 1; // diff won't *quite* be 93, because of the change to DST // (assuming a timezone where DST changes sometime in // March, as in most parts of the U.S., UK, and Canada snippet.log("diff = " + diff + " instead of 93"); snippet.log("rounded = " + Math.round(diff)); // Similarly, at the other end: start = new Date(…

http://stackoverflow.com/comment/52494483
has text: If I understand correctly, ISO periods can't be compared without a specific points in time (ISO date), because the duration of a period depends on that date. P1M is 86400 seconds shorter starting at February 1st in 2015 than in 2016, because 2016 is a leap year and there is thus an additional day. It may also need to take DST, holes in calendar systems and leap seconds into account.
type: AnswerComment
comment on: http://stackoverflow.com/a/27580361
score: 0
type: Comment

http://stackoverflow.com/q/27488484
type: Question
score: -2
tagged with: javascript
has title: jQuery conflict on my website
answer count: 2
upvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27488548
has comment: http://stackoverflow.com/comment/43412555
type: UnansweredQuestion
has body: I believe my website is having a jquery conflict problem. I'm running the Camera (jQuery slider) which uses jQuery v1.7.1, and the Simple Instagram Fancybox which uses jQuery 1.11.0. I'm loading the Instagram script in a php include file that will load if coded into the page but it will cause my slider to not load. (Camara Slider Javascripts) (Instagram/Fancybox Javascripts) If you wouldn't mind please write the code in full with all tags and let me know where exactly to put each script, I would appreciate it. My website is http://www.deatherageproductions.com, please feel free to view the source and http://www.deatherageproductions.com/instagram.html is my instagram script that I'm trying to run as an include file on my main page with the slider.
tagged with: conflict
has comment: http://stackoverflow.com/comment/43411863
downvote count: 2
has answer: http://stackoverflow.com/a/27488590
has comment: http://stackoverflow.com/comment/43415589
has comment: http://stackoverflow.com/comment/43408816

http://stackoverflow.com/a/62030361
score: 0
type: Answer
has body: I think it’s not worth doing difficult: gulp.watch('./frontend/js/', ['browserify']);
answers question: http://stackoverflow.com/q/27526891

http://stackoverflow.com/comment/43630083
comment on: http://stackoverflow.com/a/27601617
type: AnswerComment
score: 1
has text: Is telling me "null object or undefined".
type: Comment

http://stackoverflow.com/q/27565269
downvote count: 1
tagged with: dos
tagged with: java
has title: how to run selenium html suite parallely on same pc in 3 different browsers?
type: Question
score: 5
tagged with: firefox
has body: I am running CHROME, FF, IE parallely by changing port number the command is: java -jar D:\selenium\selenium-server-standalone-2.40.0.jar -htmlSuite "*googlechrome C:\chrome.exe" http://localhost/test/ D:\selenium\TS6.html C:\RES\Result_TS6.html -port 4448 and -port 4452 for FF and -port 4456 for IE CHROME runs perfectly fine and close after completion BUT when FF completes its automation it is closing IE rather than FF and FF remains running forever.... Can anybody suggest why this is happening?
answer count: 1
tagged with: javascript
favorite count: 0
upvote count: 6
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27642870
tagged with: selenium

http://stackoverflow.com/comment/43588043
type: Comment
comment on: http://stackoverflow.com/a/27581367
has text: He's not **passing** 2 arguments, he's **accepting** 2 arguments from his callers.
score: 0
type: AnswerComment

http://stackoverflow.com/q/27561158
has comment: http://stackoverflow.com/comment/43548512
has title: Timed promise queue / throttle
linked to: http://stackoverflow.com/q/28459812
has comment: http://stackoverflow.com/comment/43549972
has answer: http://stackoverflow.com/a/27563358
favorite count: 0
has comment: http://stackoverflow.com/comment/53697190
tagged with: promise
has body: I have a request-promise function that makes a request to an API. I'm rate-limited by this API and I keep getting the error message: Exceeded 2 calls per second for api client. Reduce request rates to resume uninterrupted service. I'm running a couple of Promise.each loops in parallel which is causing the issue, if I run just one instance of Promise.each everything runs fine. Within these Promise.each calls they lead to the same function a with a request-promise call. I want to wrap this function with another queue function and set the interval to 500 milliseconds so that a request isn't made after one another, or parallel, but set to that time, on queue. The thing is I still need these promises to get their contents even if it takes a rather long time to get a response. Is there anything that will do this for me? Something I can wrap a function in and it will respond at a set interval and not in parallel or fire functions one after another? Update: Perhaps it does need to be promise specific, I tried to use underscore's throttle function var debug = require("debug")("throttle") var _ = require("underscore") var request = require("request-promise") function requestSite(){ debug("request started") function throttleRequest(){ return request({ "url": "https://www.google.com" }).then(function(response){ debug("request finished") }) } return _.throttle(throttleRequest, 100) } requestSite() requestSite() requestSite() And all I got back was this: $ DEBUG=* node throttle.js throttle request started +0ms throttle request started +2ms throttle request started +0ms
type: AnsweredQuestion
tagged with: bluebird
upvote count: 5
accepted answer: http://stackoverflow.com/a/27563358
tagged with: queue
type: Question
tagged with: rate-limiting
score: 5
answer count: 1
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/43424404
comment on: http://stackoverflow.com/q/27496303
score: 0
type: Comment
has text: I have a vanilla solution but it involves recursion. What happens if `files` property object has objects inside, should they be also copied with their properties as being null? So if you imagine the whole thing as a tree, only the leaves are nulls?
type: QuestionComment

http://stackoverflow.com/comment/43640788
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27604431
has text: @Shawn When my timer starts, I want to send a CHANGE_PATTERN event though, so could I just handle start and stop in my timer component (as well as move timeLeft there from the store) and then do AppStore.changePattern() whenever my timer starts? Or does that go against the whole uni-directional flow of Flux? A tad confused on how to properly solve this. Thanks!
score: 0

http://stackoverflow.com/comment/43954286
has text: Sounds like an excellent idea and useful even when just using promises without Rx.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27708609

http://stackoverflow.com/q/27534467
has comment: http://stackoverflow.com/comment/43497740
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27534646
accepted answer: http://stackoverflow.com/a/27534571
downvote count: 3
type: Question
tagged with: javascript
answer count: 2
upvote count: 0
has answer: http://stackoverflow.com/a/27534571
has body: I'm trying to use the existing href value as my target in manipulating the css. Unfortunately, I can't seem to make it work. I need a little assistance where did I go wrong. $(function(){ $('.tab-items a').each(function(){ var target_ids = $(this).attr('href').toLowerCase();; var target_image =$(target_ids).find('a:first img').attr('src'); $(this).css('background' 'url("'+ target_image +'")'); }) }) .tab-items a { width: 100px; height: 100px; line-height: 100px; text-align: center; margin: 5px; display: block; } Nature People Animals
tagged with: jquery
favorite count: 0
has title: How to get the href value and use it as the id of a target
score: -3
has comment: http://stackoverflow.com/comment/43497555
possible better answer: http://stackoverflow.com/a/27534646
has comment: http://stackoverflow.com/comment/43497344

http://stackoverflow.com/a/27516485
has comment: http://stackoverflow.com/comment/43533139
answers question: http://stackoverflow.com/q/27504243
score: 0
type: Answer
has body: If you are doing some kind of lazy loading, you could use Polymer.import // Signature: Polymer.import(urls, callback) Polymer.import( ['polymer-cat.html'], function() { // called when our import is fully loaded // including any assets like CSS. }); This loads import dynamically and asynchronously. The callback is called when the imports have loaded and any associated polymer-elements have upgraded.

http://stackoverflow.com/q/27486370
linked to: http://stackoverflow.com/q/4191386
favorite count: 0
possible better answer: http://stackoverflow.com/a/27486707
has answer: http://stackoverflow.com/a/27486707
type: AnsweredQuestion
downvote count: 0
has body: I have a div inside a div. This inner div has a data attribute. I tried to apply the answer from this question to find the inner div, but am having no luck. What am I doing wrong? var content = $('#mapElements').find('.mapMarker [data-depotid="b04b4184"]').data('depotguid'); $('#result').text(content); This is the text from mapMarker, and if the depotID appears below this text the code works!
has title: Why isn't this jQuery selector finding anything?
type: Question
score: 1
has answer: http://stackoverflow.com/a/27486380
accepted answer: http://stackoverflow.com/a/27486380
answer count: 2
upvote count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/89768184
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27499167
score: 0
has text: Duplicate of [How to format datetime for (x,y) pair data for Highcharts](https://stackoverflow.com/questions/25968970/how-to-format-datetime-for-x-y-pair-data-for-highcharts)

window.opener
tags question: http://stackoverflow.com/q/27545635
type: Tag
tag name: window.opener
tags question: http://stackoverflow.com/q/27506153

http://stackoverflow.com/a/27596987
score: 0
has comment: http://stackoverflow.com/comment/43634585
has body: You don't need to use JavaScript, so long as your SVG has a viewbox attribute, you can just use CSS. As you can see in the following example, there is a viewbox of 200 by 200, but it is filling a div that it 400px/400px. Example: .wrap { width: 400px; height: 400px; border: 2px solid grey; } .wrap svg { width: 100%; height: 100%; display: block; } &lt;div class="wrap"&gt; &lt;svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 200 200"&gt; &lt;rect x="0" y="0" width="150" height="150" rx="20" style="fill:#ff0000;" /&gt; &lt;rect x="50" y="50" width="150" height="150" rx="40" style="fill:#0000ff; fill-opacity:0.7;" /&gt; &lt;/svg&gt; &lt;/div&gt; If needed, you can set the viewbox in jQuery like this (obviousness substituting the dimensions as needed). $('svg')[0].setAttribute('viewBox', '0 0 200 200');
answers question: http://stackoverflow.com/q/27596877
type: Answer
has comment: http://stackoverflow.com/comment/43633848
has comment: http://stackoverflow.com/comment/43634767
has comment: http://stackoverflow.com/comment/43622616
has comment: http://stackoverflow.com/comment/43645146

http://stackoverflow.com/q/27519022
tagged with: jquery-validate
downvote count: 1
has comment: http://stackoverflow.com/comment/43468024
has body: J Query form validation disables whole JQuery Code.I made a simple validation form using J Query. It's not working. i have tried http://jsfiddle.net/4PuJL/165/ and working fine, but not working on my computer. This is a paragraph. Name: Password: Submit if i remove below part,then first alert starts working $("#personDetailForm").validate({ rules: { persname: { required: true, regex: /^[A-Za-z]+$/ } } submitHandler: function() { alert("alert"); } });
type: Question
has answer: http://stackoverflow.com/a/27519208
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27519202
score: 0
answer count: 3
has title: JQuery form validation disables whole JQuery Code
upvote count: 1
favorite count: 0
possible better answer: http://stackoverflow.com/a/27519208
has comment: http://stackoverflow.com/comment/43467875
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27519314
accepted answer: http://stackoverflow.com/a/27519314
linked to: http://stackoverflow.com/q/15678839

http://stackoverflow.com/q/27512689
tagged with: qtquick2
upvote count: 2
tagged with: canvas
has answer: http://stackoverflow.com/a/41634913
answer count: 1
has title: Qt QML Canvas requestPaint does not repaint immediately the scene
favorite count: 0
type: UnansweredQuestion
tagged with: qt
score: 2
downvote count: 0
type: Question
has body: I'm trying to adapt the Html JS library Char.js to QML QtQuick 2.4. The library have a function to animate the scene. Everything works great if I don't animate it (eg animate with only 1 step of animation). When the animation is used, the canvas freeze until the animation is finished, and then the scene is redraw. Here is the animationLoop function: animationLoop = helpers.animationLoop = function(callback,totalSteps,easingString,onProgress,onComplete,chartInstance){ var currentStep = 0, easingFunction = easingEffects[easingString] || easingEffects.linear; var animationFrame = function(){ currentStep++; var stepDecimal = currentStep/totalSteps; var easeDecimal = easingFunction(stepDecimal); callback.call(chartInstance,easeDecimal,stepDecimal, currentStep); onProgress.call(chartInstance,easeDecimal,stepDecimal); if (currentStep &lt; totalSteps){ chartInstance.animationFrame = chartInstance.chart.canvas.requestAnimationFrame(animationFrame); } else{ onComplete.apply(chartInstance); } }; chartInstance.chart.canvas.requestAnimationFrame(animationFrame); }, Each time the onAnimationProgress callback is called, I call the Canvas requestPaint function to redraw the scene. Unfortunately, the onPaint function will not be called until every step of the animation have finished. The Canvas object is accessible with : chartInstance.chart.canvas. I tried to call directely chartInstance.chart.canvas.requestPaint() at each iteration too, which do not work. I still have to wait until the animation finished to see the scene redraw correctly. onAnimationProgress: function(easeDecimal,stepDecimal) { skipNextChartUpdate = true; requestPaint(); } onPaint: { if (!chartInstance) { initializeChart() } else if(!skipNextChartUpdate) { chartInstance.scale.update({width:width,height:height}); chartInstance.resize(chartInstance.update); } else { skipNextChartUpdate = false; } }
tagged with: qml
tagged with: javascript

http://stackoverflow.com/comment/97870474
type: AnswerComment
score: 18
comment on: http://stackoverflow.com/a/27538363
has text: @Spen FYI, `Object.assign(...arrObj)` mutates the first element of the array. So, should be: `Object.assign({}, ...arrObj)`
type: Comment

http://stackoverflow.com/a/27611831
answers question: http://stackoverflow.com/q/27611610
score: 0
type: Answer
has body: You would want to use delegation for this. You could do something like this: $(document).on('input propertychange', '#textarea', function() { var text = $('#textarea').val(); if (text.length &gt; 255) { $('#textarea').val(text.substring(0,255)); } //Maybe some code to display a message to the user, or update a character count element or something? });
has comment: http://stackoverflow.com/comment/43647359

http://stackoverflow.com/a/29411474
score: 12
has body: At first, flow-files-submitted event is triggered when user pick a file (misleading name). So when you assign $flow.upload() to it, you make it uploading immediately after file selection. Second thing is to get $flow object in your controller. Two ways comes to my mind: A. As instruction say, you have to use flow-name attribute: Then you have reference to $flow in yours $scope.obj.flow property and you can use $scope.obj.flow.upload() method anywhere in your controller. B. Put your "Upload" button inside flow directive block (as a descendant of element with flow-init attribute) and use $flow property of directive scope as a parameter in ng-click, for example: Upload and inside myUploadMethod(param) just call param.upload().
answers question: http://stackoverflow.com/q/27559910
upvote count: 12
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/27559910

http://stackoverflow.com/a/27585878
downvote count: 0
has comment: http://stackoverflow.com/comment/43615323
type: Answer
has comment: http://stackoverflow.com/comment/43609801
has comment: http://stackoverflow.com/comment/43606317
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27582672
answers question: http://stackoverflow.com/q/27582672
type: AcceptedAnswer
has body: The problem is that $watch evaluates expressions that are defined on the scope. Your UserStatusService isn't, so it is returning undefined. You have two options. Option 1: Define a function the gets the state on the scope of NavigationController: $scope.getUserState = function () { return UserStatusService.state; }; You want to use a getter function here so it will always have the updated value. Then watch this expression: $scope.$watch("getUserState()", function (newValue, oldValue) { // Do stuff on change here }); This is a good option since you'll likely want this information available on the scope anyway so your UI can respond accordingly. Option 2: You can always just watch the result of a function: $scope.$watch(function () { return UserStatusService.state; }, function (newValue, oldValue) { // Do stuff on change here }); During each digest cycle, the first function will be evaluated and the result returned will be compared to the previous value. This is obviously simpler and avoids putting anything on the scope. Update with more explanation as requested You seem to be confused by normal JavaScript variable scope and what Angular calls the "scope". Angular uses the word "scope" to refer to a special object that is available to expressions in the view. When you write something like "{{foo}}" in your view, Angular will populate that with the value of the variable named foo that is attached to the scope object. Scope objects are created by a number of directives and will be nested in each other. This nesting behavior is analogous to variable scoping, which is where the name comes from. This page has more detail. A controller has access to a scope object via the $scope variable that is injected by Angular. Anything you attach to the $scope variable will be accessible to the view for that controller. If you don't explicitly attach something to the $scope object it will not be accessible. Now here's where the $watch function comes in. When you place an expression in…

http://stackoverflow.com/comment/43655947
has text: You're welcome, glad I could be of some help
type: Comment
comment on: http://stackoverflow.com/q/27617143
score: 0
type: QuestionComment

http://stackoverflow.com/comment/43502063
has text: You're welcome! Please, mark the question as Answered so that other people can find the answer more easily :)
comment on: http://stackoverflow.com/a/27530908
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/43599856
has text: please provide a fiddle
type: Comment
comment on: http://stackoverflow.com/q/27587844
score: 0
type: QuestionComment

http://stackoverflow.com/a/27510156
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/55109658
type: Answer
has body: When you define a variable in the classic JavaScript way : var someVar = 'someValue'; at the root of your .js file Meteor scopes it to the file using an IIFE. If you want to define a global variable, simply don't write the var, giving : someVar = 'someValue'; This will define a variable in all your application by default, although you may restrict it by writing that declaration in a specific recognized folder (client or server folder for example). However this variable won't be defined absolutely first. It will be defined when Meteor runs the actual code that defines it. Thus, it may not be the best practice because you're going to struggle with load order, and it will make your code dependent on how Meteor loads files: which folder you put the file in, the name of the file... Your code is prone to messy errors if you slightly touch your architecture. As I suggested in another closely related post you should go for a package directly!
answers question: http://stackoverflow.com/q/27509125
has comment: http://stackoverflow.com/comment/53032230
has comment: http://stackoverflow.com/comment/71113222
score: 62
upvote count: 66
downvote count: 4
accepted answer of: http://stackoverflow.com/q/27509125

http://stackoverflow.com/a/27486331
accepted answer of: http://stackoverflow.com/q/27486274
score: 6
type: Answer
upvote count: 6
has body: you have a speling error. you wrote succss, it should be success
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27486274
downvote count: 0

http://stackoverflow.com/q/27533826
has answer: http://stackoverflow.com/a/27534002
has title: jQuery chaining and cascading then's and when's
tagged with: javascript
answer count: 1
downvote count: 0
tagged with: jquery
tagged with: chaining
favorite count: 0
tagged with: promise
accepted answer: http://stackoverflow.com/a/27534002
has comment: http://stackoverflow.com/comment/43496194
has body: I currently have a humongous if-then-else loop in front of me which first gets multiple cantinas from a webservice. Then it gets all available meals (for each menu) and all available side dishes (for each menu). For each of the meals as well as the sides it then checks for all additives and aggregates them. In the end I have multiple menus with meals, side dishes and all their additives. The following flowchart shows the process: I want to beautify the code and want to make use of promises with jQuery - but I can't figure out how to do it as I have to stack a then after a when (at least I think, maybe I have to resolve?). The following is my best try: //this totally does not work at all, but you get the idea what I want to do Menus.getCantinas() .when(Menus.getMeals(cantinas), Menus.getSides(cantinas)) //when doesn't exist here, neither does cantinas .then(Menus.getAdditives(meals, sides) //also throws errors as meals and sides does not exist .done(function(cantinas, meals, sides, additives) { //more errors for the people Menus.cantinas = cantinas; Menus.meals = meals; Menus.sides = sides; Menus.additives = additives; //... some html stuff to build the menus }); Make sure to check out the following code snippet for more explanatory code. window.Menus = { cantinas = {}, meals = {}, sides = {}, additives = {}, callWebservice: function (listname, filter) { if (filter &amp;&amp; filter != '') data['$filter'] = filter; return jQuery.ajax({ url: '/_api/web/lists/getbytitle(\'' + listname + '\')/items', data: data, dataType: 'json' }); }, getCantinas: function() { return Menus.callWebservice("Cantinas", ""); }, getMeals: function(cantinas) { var filterString; for (var i = 0; i &lt; cantinas.length; i++) { if (i == 0) { filterstring = "ID eq " + cantinas[i]; } else { filterstring += " or ID eq " + cantinas[i] } } return Menus.callWebservice("Meals", filterString); }, getSides: function(cantinas) { //see above function for filterstuff return Menus.callWebservice("Sides", fil…
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43496302
score: 1
has comment: http://stackoverflow.com/comment/43496203
upvote count: 1
has comment: http://stackoverflow.com/comment/43496167
type: Question
linked to: http://stackoverflow.com/q/23744612
tagged with: jquery-deferred

http://stackoverflow.com/comment/43690177
type: Comment
score: 1
has text: (-1) No need for regex, you haven't enforced the start of the string, and no idea why you are only catering for the 4th digit to be variable.
comment on: http://stackoverflow.com/a/27635422
type: AnswerComment

http://stackoverflow.com/q/27636352
has title: Changing CSS with Javascript form validation
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/27637002
upvote count: 2
has answer: http://stackoverflow.com/a/27637521
type: UnansweredQuestion
has body: I have a site that is covered by a div. I want to make the div disappear when someone enters the correct password. I validate the form with Javascript and successfully change the CSS of that div from display:block to display:none, but immediately after the display property has been changed it changes back to default again. I want to have it so the display of #overlay is forever set to none if the password is correct. The form. &lt;form id="overlay-form" name="overlay-form" method="post" onsubmit="validateForm();"&gt; &lt;input id="overlay-password" name="overlay-password" type="password"&gt; &lt;input type="submit" id="overlay-submit" value="Submit"&gt; &lt;/form&gt; Javascript. &lt;script&gt; function validateForm() { var x = document.forms["overlay-form"]["overlay-password"].value; if (x == "password") { document.getElementById('overlay').style.display = "none"; } } &lt;/script&gt;
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/43691844
answer count: 2
tagged with: validation
tagged with: javascript
score: 1
favorite count: 0

http://stackoverflow.com/comment/43388010
comment on: http://stackoverflow.com/a/27476538
type: Comment
has text: That helped! It is now grabbing the JSON.
type: AnswerComment
score: 0

http://stackoverflow.com/a/27630960
has body: I don't think you have to use jQuery for "toggling" you can do that in more polymeric way: Toggle secret
answers question: http://stackoverflow.com/q/27628668
downvote count: 0
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/q/27489233
has title: Append users text input onto the end of a url
has comment: http://stackoverflow.com/comment/43410122
tagged with: javascript
score: -1
has body: I am trying to create a courier tracking section to a webpage and I want to be able to have a text box so the user can put their tracking number in and then it will add to the end of the URL and load it in a new tab: http://wwwapps.ups.com/WebTracking/track?track=yes&amp;trackNums=1Z Unfortunately I have no clue where to start so I can't show an example of what I've tried..
upvote count: 0
answer count: 1
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43433722
has answer: http://stackoverflow.com/a/27489342
accepted answer: http://stackoverflow.com/a/27489342
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43410142
has comment: http://stackoverflow.com/comment/43410039
has comment: http://stackoverflow.com/comment/43410088
downvote count: 1
type: Question

http://stackoverflow.com/q/27615388
tagged with: javascript
tagged with: jquery
tagged with: asp.net
score: 0
has comment: http://stackoverflow.com/comment/43652707
tagged with: http://stackoverflow.com/tag/html
answer count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/7709289
has comment: http://stackoverflow.com/comment/43652682
has comment: http://stackoverflow.com/comment/43656578
type: Question
has title: How can I pass time using jquery
has body: I have 2 pages. On page 1 i have two values, one is string and one is datetime. I want to pass that value to page 2 but i have problem, the string is passed but datetime is not passed. This is my code time = jQuery('#timepicker_7').val(); var url = "test.aspx?name=" + encodeURIComponent(lObjSeat[0].Name) + "&technology=" + encodeURIComponent(time); window.location.href = url; this is what's on page 2 var queryString = new Array(); $(function () { if (queryString.length == 0) { if (window.location.search.split('?').length > 1) { var params = window.location.search.split('?')[1].split('&'); for (var i = 0; i < params.length; i++) { var key = params[i].split('=')[0]; var value = decodeURIComponent(params[i].split('=')[1]); queryString[key] = value; } } } if (queryString["name"] != null) { var data = "Values from QueryString "; data += "Name: " + queryString["name"] + " Technology: " + queryString["technology"]; $("#lblData").html(data); } }); "name" is done. but "time" is not show. whats the problem ?
has comment: http://stackoverflow.com/comment/43652397
has comment: http://stackoverflow.com/comment/43652749
linked to: http://stackoverflow.com/q/87359
has comment: http://stackoverflow.com/comment/43652517

http://stackoverflow.com/q/27494711
has body: I'm trying to incorporate a stripe-angular module into my Ionic/AngularJS app. https://github.com/gtramontina/stripe-angular I installed the app using npm install stripe-angular. Here is where I inject the dependency into my app: var myApp = angular.module('myApp', ['ionic','ionic.utils','stripe','google.maps','myApp.controllers','myApp.services']) .config(function($stateProvider, $urlRouterProvider, stripeProvider) { stripeProvider.setPublishableKey('pk_test_APIKEY'); }); Without even injecting the dependency into any of my controllers or services, I am met with the following console error: Uncaught Error: [$injector:modulerr] Failed to instantiate module myApp due to: Error: [$injector:unpr] Unknown provider: stripeProvider http://errors.angularjs.org/1.2.25/$injector/unpr?p0=stripeProvider at http://localhost:8100/lib/ionic/js/ionic.bundle.js:7703:12 at http://localhost:8100/lib/ionic/js/ionic.bundle.js:11427:19 at getService (http://localhost:8100/lib/ionic/js/ionic.bundle.js:11555:39) at Object.invoke (http://localhost:8100/lib/ionic/js/ionic.bundle.js:11582:13) at http://localhost:8100/lib/ionic/js/ionic.bundle.js:11510:37 at forEach (http://localhost:8100/lib/ionic/js/ionic.bundle.js:7950:18) at loadModules (http://localhost:8100/lib/ionic/js/ionic.bundle.js:11497:5) at createInjector (http://localhost:8100/lib/ionic/js/ionic.bundle.js:11437:11) at doBootstrap (http://localhost:8100/lib/ionic/js/ionic.bundle.js:9069:20) at bootstrap (http://localhost:8100/lib/ionic/js/ionic.bundle.js:9084:12) http://errors.angularjs.org/1.2.25/$injector/modulerr?p0=myApp&amp;p1=Error%…%3A%2F%2Flocalhost%3A8100%2Flib%2Fionic%2Fjs%2Fionic.bundle.js%3A9084%3A12) This is the relevant portion of my index.html file: &lt;!-- your app's js --&gt; &lt;script src="js/app.js"&gt;&lt;/script&gt; &lt;script src="js/controllers.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="https://js.stripe.com/v2/"&gt;&lt;/script&gt; &lt;script src="js/services.js"&gt;&lt;/script&gt; Is th…
accepted answer: http://stackoverflow.com/a/27495454
score: 0
has title: Cannot resolve stripe-angular dependency injection
answer count: 1
has answer: http://stackoverflow.com/a/27495454
tagged with: stripe-payments
tagged with: angularjs
type: AnsweredQuestion
tagged with: ionic-framework
type: Question
tagged with: dependency-injection
tagged with: javascript

http://stackoverflow.com/comment/43394103
type: Comment
comment on: http://stackoverflow.com/q/27476236
type: QuestionComment
has text: The exact operation of the AnalyserNode is defined in the spec. There is some amount of smoothing that happens, but the spec doesn't imply adding any compression/expansion in the AnalyzerNode. See http://webaudio.github.io/web-audio-api/#fft-windowing-and-smoothing-over-time
score: 0

http://stackoverflow.com/q/27594153
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43612851
has comment: http://stackoverflow.com/comment/43616014
has body: I've been working with angular. I am using data from json and push it to array object and display in the options in select element. My concern is: After default option with selection and after that only options fron json data s is displayed. Finally, here's the snippet of HTML which gets generated: BrodieBuild12_10 Liberty ITyyy Jon Break - Group Jon Break Dash - Group Internet Team Tasks Jon Test Group 12-2 Select Workgroups What do I need to do to get rid of it? the below be in the first option and selected. When am running this would be the top of the option but it display in last option. Select Workgroups
type: Question
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27596161
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: Order the default option in select in the first by angularjs
tagged with: angularjs

http://stackoverflow.com/q/27564135
tagged with: placeholder
tagged with: javascript
score: -1
answer count: 3
has comment: http://stackoverflow.com/comment/43553665
has answer: http://stackoverflow.com/a/27564199
upvote count: 0
tagged with: jquery
has title: Remove text input value but not placeholder
favorite count: 0
has comment: http://stackoverflow.com/comment/43553662
has answer: http://stackoverflow.com/a/27564206
type: UnansweredQuestion
has body: Here's my code which is removing both value and placeholder. But I want to preserve the placeholder intact. &lt;input type="text" id="name" placeholder="Type something…"&gt; &lt;textarea id="desc" placeholder="Write description..."&gt;&lt;/textarea&gt; &lt;input type="button" value="Click" onClick="submit_info();"&gt; function submit_info(){ /* some functions to submit */ $("#name").val(" "); $("#desc").val(" "); } The text field and textarea field is becoming blank.. removing everything. I tried this as well which is removing nothing : $("#name").removeAttr("value"); $("#desc").removeAttr("value");
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27564193

http://stackoverflow.com/comment/61903229
comment on: http://stackoverflow.com/a/27511897
type: AnswerComment
score: 0
type: Comment
has text: @nils: Yes, it's been removed from ES6 and deferred to later revisions (if at all). It seems Chrome did implement it once.

http://stackoverflow.com/a/43652659
has body: I had to downgrade @types/core-js to 9.36 to get it to work with "target": "es5" set in my tsconfig. "@types/core-js": "0.9.36",
upvote count: 0
answers question: http://stackoverflow.com/q/27573365
score: -1
type: Answer
downvote count: 1

http://stackoverflow.com/q/27492603
tagged with: post-processing
has body: I'm trying to combine texture passes in someway that preserves the alpha channel. I've tried or assured that. Renderer has alpha set to true Renderer with many different setClearColor setting. The material on the full-screen quad used by the effect passes have transparency set to true The textures are in fact transparent The shaders I'm using for combining use the alpha channel The textures/pass all draw properly if you comment out the others, I just can't get PNG1.png to blend over gits.jpg. var width = window.innerWidth; var height = window.innerHeight; var updateFcts = []; var masterRenderer = new THREE.WebGLRenderer({ alpha: true, autoClear: false }); masterRenderer.setSize( window.innerWidth, window.innerHeight ); masterRenderer.setClearColor ( 0xFFFFFF, 1.0); document.body.insertBefore( masterRenderer.domElement, document.body.firstChild); var parameters = { minFilter: THREE.LinearFilter, magFilter: THREE.LinearFilter, format: THREE.RGBAFormat, stencilBuffer: false }; var renderTarget = new THREE.WebGLRenderTarget( width, height, parameters ); var masterComposer = new THREE.EffectComposer(masterRenderer, renderTarget); var gitsTexture = THREE.ImageUtils.loadTexture( "images/gits.jpg" ); var pngTexture = THREE.ImageUtils.loadTexture( "images/PNG1.png" ); // declare passes var passes = {}; passes.toScreen = new THREE.ShaderPass(THREE.CopyShader); passes.toScreen.renderToScreen = true; passes.gitsTexturePass = new THREE.TexturePass(gitsTexture); passes.gitsTexturePass.material.transparent = true; passes.pngTexturePass = new THREE.TexturePass(pngTexture); passes.pngTexturePass.material.transparent = true; //add passes masterComposer.addPass(passes.gitsTexturePass); masterComposer.addPass(passes.pngTexturePass); masterComposer.addPass(passes.toScreen); // render the webgl updateFcts.push(function(delta,now){ masterComposer.render(); }) ////////////////////////////////////////////////////////////////////////////////// // handle resize // ////////////////////////////…
tagged with: three.js
upvote count: 1
has comment: http://stackoverflow.com/comment/43457714
has answer: http://stackoverflow.com/a/27502251
score: 1
has comment: http://stackoverflow.com/comment/43421138
has comment: http://stackoverflow.com/comment/43442308
type: Question
has title: THREE.js transparency and EffectComposer
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/43434722
answer count: 1
has comment: http://stackoverflow.com/comment/43455097
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/27569284
score: 0
type: Answer
upvote count: 1
downvote count: 1
has body: I think you wanna do that: &lt;script type="text/javascript"&gt; var a1 = []; alert(a1.toSource()); // Inital array Value $(function() { $("#upload1").click(function(){ var video_object = { title1:"", desc:"", link1:"",url1:""}; video_object.title1 = $("#title1").val(); video_object.desc = $("#desc1").val(); video_object.link1 = $("#extra1").val(); video_object.url1 = $("#path1").val(); a1.push(video_object); alert(a1.toSource()); }); }); &lt;/script&gt;
answers question: http://stackoverflow.com/q/27568945

http://stackoverflow.com/comment/43573905
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27573793
has text: Here's what it looks like with it working now I can't give away much other code because the company I work for would be too happy about it, but to be put vaguely, I'm using Backbone.View.Extend which then has an event specified for when I click my "addBrowser" button I have up there. It then calls this function: add_browser: function(e) { var browserInput = $("#browserInput").val(); console.log(browserInput); $("#browserInput").toggle(300); }
score: 0

http://stackoverflow.com/q/27579586
has comment: http://stackoverflow.com/comment/43584798
linked to: http://stackoverflow.com/q/14896205
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43584429
duplicate of: http://stackoverflow.com/q/14896205
answer count: 0
tagged with: twitter-bootstrap
score: 1
upvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/43583830
has body: I am getting a Jquery Error $.validator.methods[method] is undefined, when click on submit button. Actually, I am validating a one field out of two fields. We are using following library files for validation: a) jquery.validate.1.9.0.js, b) jquery-validate.bootstrap-tooltip.js My HTML code: <input type="hidden" name="programType" id="programType" value="<?php echo $programDetail->program_type;?>" /> Add: <input type="radio" disabled="disabled" value="points" <?php if($programDetail->program_type=="pointtype"){echo "checked";}?> name="pType" > Points <input type="radio" disabled="disabled" <?php if($programDetail->program_type=="punchtype"){echo "checked";}?> value="punches" name="pType" > Punches Add Reward : Select Offer 20% discount on Sheets 30% discount on Pillows Validate code: $("#addRewards").validate({ rules: { addNumber : { number: true, require_from_group: [1, '.mygroup'] }, offers : { number: true, require_from_group: [1, '.mygroup'] } }, groups: { theGroup: 'addNumber offers' }, tooltip_options: { addNumber: {placement:'right',html:false}, offers: {placement:'right',html:false} }, highlight: function (element) { // hightlight error inputs }, success: function (label) { }, errorPlacement: function (error, element) { error.addClass('help-small no-left-padding').insertAfter(element.closest('.input-icon')); }, submitHandler: function (form) { addPointsPunches(); } }); Please suggest, so that we can resolve this issue.
tagged with: validation
downvote count: 0
has title: Jquery validate: Error $.validator.methods[method] is undefined
tagged with: jquery
has comment: http://stackoverflow.com/comment/43584314
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/27596098
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43616244
has comment: http://stackoverflow.com/comment/43616081
has comment: http://stackoverflow.com/comment/43616275
has comment: http://stackoverflow.com/comment/43616061
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27596344
has title: Complex situation that no asp.net developer encountered
has comment: http://stackoverflow.com/comment/43616328
upvote count: 1
downvote count: 1
accepted answer: http://stackoverflow.com/a/27596344
has comment: http://stackoverflow.com/comment/43616299
has comment: http://stackoverflow.com/comment/43616358
type: Question
tagged with: c#
has comment: http://stackoverflow.com/comment/43616109
has body: I have a div, and some buttons I add on runtime from the master page which is inside that div. All good. But I also need to add a label, dropdown list and a button on the fly because some page which use this master doesn't contain the buttons while some other has buttons. Now the problem is, if I set the width to a specific value, its accordingly adjusting for the page to align it to the predefined value. Otherwise it assigns to the right. The code is below. My limitation is, I shouldn't use another div as it adds another line in UI. How to achieve the fixed or variable alignment of these controls relative to the buttons that are visible in certain pages. Remember, all are in master page. This difficult situation I handled by using &amp;**nbsp however, during resizing it has problems. I also tried new string character overload. &lt;asp:Label ID="LiteralSpecial" runat="server" Text="Select page " width="1070px" style="text-align: right;" Visible="true" &gt;&lt;/asp:Label&gt; &lt;asp:DropDownList ID="ddlLinks" runat="server" /&gt; &lt;asp:Button ID="goButton" runat="server" Text="GO" OnClick="goButton_Click" /&gt; I am adding it on the fly spnContainer.Controls.Add(LiteralSpecial); spnContainer.Controls.Add(ddlLinks); spnContainer.Controls.Add(goButton);
has comment: http://stackoverflow.com/comment/43616035
tagged with: javascript
has comment: http://stackoverflow.com/comment/43616279
score: 0
has comment: http://stackoverflow.com/comment/43616219
answer count: 1
has comment: http://stackoverflow.com/comment/43616152
tagged with: asp.net
favorite count: 0
has comment: http://stackoverflow.com/comment/43616078
has comment: http://stackoverflow.com/comment/43616355

http://stackoverflow.com/comment/43667883
score: 0
type: Comment
has text: [`escape`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/escape) is deprecated and not unicode safe. It should not be used. `#` is SQL safe (at least in this context), `'` would be problematic, but needs solving in the PHP not the JS.
comment on: http://stackoverflow.com/a/27623667
type: AnswerComment

http://stackoverflow.com/q/27594496
tagged with: css
type: Question
type: AnsweredQuestion
tagged with: javascript
tagged with: image
has answer: http://stackoverflow.com/a/27594569
score: 0
has body: Based on the code below & using bootstrap, I have a grid layout with multiple .block components, each containing an image and a title. The images are larger than the column size so that they can resize to full width for responsive screen sizes (done with the CSS listed below). each image may be different heights & widths. This works just fine as long as you don't define the image height in the attributes. As soon as you add the height it distorts the image proportions. Now however, I need to set the image heights for some javascript so that it loads properly. Without setting the heights, the js is loading too quickly and the element heights are incorrect basically. Right now I'm getting around this by using a setTimeout() to delay the js script by 1.5 seconds. This obviously isn't ideal as for someone with a slow connection it won't be long enough. My Question: Is there a way to either (A) delay the js until all images have loaded on the page or (B) set the height for each image in a way that it will resize with the image width and keep my proportions correct for the image with css? HTML: Image Title Image Title Image Title Image Title Image Title Image Title Image Title Image Title Image Title Image Title CSS: .block img{ max-width: 100%; }
answer count: 1
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27594569
has title: Using image max-width and keeping height ratios for responsive
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/43087563
downvote count: 1
type: Answer
has body: To contradict the previous answer, as far as I understand, the crypto.createHmac method does all computation on the main thread in C++, but this is still the same thread as the event loop. Your snippet is not actually asynchronous and not actually non-blocking. The interface only looks asynchronous. It will still use up time on your event loop. For truly asynchronous crypto methods and better throughput, use crypto-async.
score: 0
upvote count: 1
answers question: http://stackoverflow.com/q/27583230

http://stackoverflow.com/q/27494606
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43421010
duplicate of: http://stackoverflow.com/q/14492830
downvote count: 1
type: Question
has body: I have ng-switch="field.type" for an element containing ng-switch-when but I'd like to have the switch on when it's more than just one field.type. I would assume something like ng-switch-when="type1 || type2" would work, but it doesn't. What's the correct way to do this?
tagged with: conditional-statements
tagged with: javascript
score: -1
has title: Angular ng-switch with conditions
has comment: http://stackoverflow.com/comment/43421315
tagged with: ng-switch
has comment: http://stackoverflow.com/comment/43421237
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/43421119
has answer: http://stackoverflow.com/a/27495123
favorite count: 0
linked to: http://stackoverflow.com/q/14492830

http://stackoverflow.com/comment/43539817
score: 0
type: QuestionComment
has text: why try to reinvent the wheel? What factors make you say you must do it this way?
type: Comment
comment on: http://stackoverflow.com/q/27556375

http://stackoverflow.com/q/27527559
has answer: http://stackoverflow.com/a/27527633
has body: I'm creating a timeline using timesheet.js. The data will be input via custom fields in Wordpress. I want to be able to output that php data into the jquery array. Is that possible? This is my php loop: &lt;?php if( have_rows('timeline') ): while ( have_rows('timeline') ) : the_row(); echo the_sub_field('start_date'); echo the_sub_field('end_date'); echo the_sub_field('description'); echo the_sub_field('name'); endwhile; endif; ?&gt; Here's the jquery, each time the php loops through I want it to output in the format: &lt;script type="text/javascript"&gt; jQuery(function($) { $(document).ready(function() { new Timesheet('timesheet', 2002, 2013, [ ['2002', '09/2002', 'A freaking awesome time', 'lorem'], ['06/2002', '09/2003', 'Some great memories', 'ipsum'], ['2003', 'Had very bad luck'], ['10/2003', '2006', 'At least had fun', 'dolor'], ['02/2005', '05/2006', 'Enjoyed those times as well', 'ipsum'], ['07/2005', '09/2005', 'Bad luck again', 'default'], ['10/2005', '2008', 'For a long time nothing happened', 'dolor'], ['01/2008', '05/2009', 'LOST Season #4', 'lorem'], ['01/2009', '05/2009', 'LOST Season #4', 'lorem'], ['02/2010', '05/2010', 'LOST Season #5', 'lorem'], ['09/2008', '06/2010', 'FRINGE #1 &amp; #2', 'ipsum'] ]); }); }); &lt;/script&gt;
tagged with: php
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/43483776
tagged with: wordpress
has title: Output php data into jquery array?
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/43483698
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27527702
accepted answer: http://stackoverflow.com/a/27527702
score: 0
possible better answer: http://stackoverflow.com/a/27527633

http://stackoverflow.com/a/27533629
answers question: http://stackoverflow.com/q/27518238
has body: I've circumvented the lousy browser support for the .json file type with the following code: #coffeescript: file_type = file.type if file_type is '' #then possibly a .json file (is =&gt; uses ===) [..., file_ext] = file.name.split '.' #If file.name is 'json', then file_ext will be 'json' as well. if file_ext is 'json' file_type = 'application/json' ...then I used file_type instead of file.type, e.g. headers: { 'Content-Type': file_type, ... },
type: Answer
upvote count: 2
score: 2
accepted answer of: http://stackoverflow.com/q/27518238
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/43574476
type: QuestionComment
type: Comment
has text: I'm using jQuery from the GoogleApi's library. See my edit above.
comment on: http://stackoverflow.com/q/27574377
score: 0

http://stackoverflow.com/a/34656510
upvote count: 13
type: Answer
has body: You can use something like this: window.Parsley.on('field:error', function() { // This global callback will be called for any field that fails validation. console.log('Validation failed for: ', this.$element); }); from http://parsleyjs.org/doc/index.html#events
answers question: http://stackoverflow.com/q/27511082
score: 13
downvote count: 0
has comment: http://stackoverflow.com/comment/103674788

http://stackoverflow.com/q/27567360
tagged with: javascript
has comment: http://stackoverflow.com/comment/43560190
has body: How to make pagination limit for example maximum pagination should be 5 even if the items more than that. var app = angular.module('App', []); app.controller('Controller', function($scope) { $scope.editmode = false; // limit page items $scope.currentpage = 0; $scope.pageSize = 5; $scope.pagelist = function(start, end) { var ret = []; start = $scope.totalpages(); if (!end) { end = start; start = 0; } for (var i = start; i &lt; end; i++) { ret.push(i); } return ret; }; $scope.prevlist = function() { if ($scope.currentpage &gt; 0) { $scope.currentpage--; } }; $scope.nextlist = function() { if ($scope.currentpage &lt;= ($scope.items.length / $scope.pageSize - 1)) { $scope.currentpage++; } }; $scope.showlist = function(argument) { $scope.currentpage = argument; }; $scope.totalpages = function(argument) { return Math.ceil($scope.items.length / $scope.pageSize); }; $scope.items = [{ product: '1 Lorem ipsum', date: '12-March-2013', rate: 12.35, member: 1, status: 'approved' }, { product: '2 dolor sit', date: '1-January-2011', rate: 60.54, member: 3, status: 'pending' }, { product: '3 consectetur', date: '12-December-2014', rate: 12.56, member: 1, status: 'pending' }, { product: '4 adipisicing', date: '14-November-2014', rate: 0.99, member: 1, status: 'pending' }, { product: '5 do eiusmod', date: '2-November-2014', rate: 4.00, member: 2, status: 'approved' }, { product: '6 magna aliqua', date: '16-February-2014', rate: 6.54, member: 2, status: 'approved' }, { product: '7 exercitation', date: '30-November-2014', rate: 60.32, member: 2, status: 'pending' }, { product: '8 consequat', date: '5-May-2014', rate: 5.12, member: 1, status: 'denied' }, { product: '9 reprehenderit', date: '12-April-2014', rate: 8.99, member: 5, status: 'approved' }, { product: '10 voluptate', date: '18-November-2014', rate: 34.54, member: 4, status: 'approved' }, { product: '10 ugiat nulla', date: '28-June-2014', rate: 55.12, member: 1, status: 'pending' }, { product: '11 occaecat cupidatat', date: '21…
downvote count: 0
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/43560348
type: UnansweredQuestion
tagged with: angularjs-ng-repeat
has comment: http://stackoverflow.com/comment/43560289
has comment: http://stackoverflow.com/comment/43560124
answer count: 0
upvote count: 3
has title: ngRepeat How to limit the maximum visible buttons in pagination
type: Question
score: 3
has comment: http://stackoverflow.com/comment/43559891
tagged with: pagination

http://stackoverflow.com/comment/43518389
type: QuestionComment
has text: try sending the button id with the post, ie __doPostBack(ButtonID, reqMesage)..
score: 0
comment on: http://stackoverflow.com/q/27545418
type: Comment

http://stackoverflow.com/comment/43458524
has text: Thanks a lot, this is a "strategic" approach so I cannot deny you an upvote! However, I prefer the solution to point to the object, it doesn't expect any HTML revision. Thanks a lot anyway :)
type: Comment
score: 0
comment on: http://stackoverflow.com/a/27513985
type: AnswerComment

http://stackoverflow.com/a/27612061
has body: As you said, it references the most local object, to do what you explained : ... fn.game=function(width,height,inSide,name){ var that = this;//expose this of fn.game to this scope ... this.add={ }; this.add.state=function(name){ that[name]=3;//access this of fn.game }; };
type: AcceptedAnswer
downvote count: 0
score: 5
type: Answer
accepted answer of: http://stackoverflow.com/q/27611975
answers question: http://stackoverflow.com/q/27611975
upvote count: 5

http://stackoverflow.com/comment/43624464
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27600551
has text: Ok, did that, I got this error in the console: "XMLHttpRequest cannot load https://docs.google.com/forms/d/1TEPXPqigGuN8sayYjz-sk6H-5wAbPaImsgadM2PBFAk/formResponse. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. index.html:93 Submission failed:"

http://stackoverflow.com/comment/43387159
score: 0
type: QuestionComment
type: Comment
has text: I suspected something is wrong with recursive regex, so I came up with this example: http://pastebin.com/RkGj3h4v
comment on: http://stackoverflow.com/q/27476388

http://stackoverflow.com/comment/43580930
score: 0
type: Comment
has text: where is this js file in the background file or the popup? and also you don't need to put `!= 01 because in javascript `1 == true` and `0 == false`
type: QuestionComment
comment on: http://stackoverflow.com/q/27577708

http://stackoverflow.com/comment/43663341
type: Comment
has text: No such luck I'm afraid. Still `✖ should bind to the load event of the image`. Not sure what you mean about testing jQuery noodles. All I'm trying to do is detect when an image has loaded so I can hook into that process. I have to resize columns after content is loaded. Suggestions welcome though.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27621307

http://stackoverflow.com/a/27488308
has body: I don't know why jQuery doesn't animate it to the right. But you can simulate the behavior by animating left by this amount: $('body').width() - $(this).width() - 8 The number 8 accounts for the 8px border. The reason the percentage reappears on mouse over is due to this code: $(this).on("mousemove", function () { ... $("#border_left_position_percentage").css({ ... "display": "block" }); Even though it's defined within the dragstart event, it gets attached to the element, so it's always triggered whenever the mouse moves over the element. In my code, I've moved the mousemove event outside of the dragstart event, and I don't change the display CSS: $('.right').on('mousemove', function() { var percentuale = parseInt((($(this).position().left / $(this).parent().width()) * 100), 10); $("#border_left_position_percentage").html(percentuale + "%"); }); I've also moved the logic/CSS of your mousemove event to the dragstop event. The dragstart event is now simply: $('#border_left_position_percentage').css('display','block'); $(this).stop(); This shows the element, which then gets updated while dragging due to the mousemove event. It also stops any animations in progress, so you can grab the box while it's moving. Fiddle
upvote count: 2
has comment: http://stackoverflow.com/comment/43412027
type: AcceptedAnswer
type: Answer
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27486733
answers question: http://stackoverflow.com/q/27486733
has comment: http://stackoverflow.com/comment/43410829
has comment: http://stackoverflow.com/comment/43409735

http://stackoverflow.com/q/27520961
downvote count: 0
favorite count: 0
tagged with: angularjs
tagged with: multi-select
score: 2
has answer: http://stackoverflow.com/a/27615578
has body: I am using angular-multi-select dropdown from https://github.com/isteven/angular-multi-select. Now i want to write test cases in protractor. I am unable to send data using model because here we don't mention ng-model. Could anyone help me out in writing test case for it?
upvote count: 2
possible better answer: http://stackoverflow.com/a/27529928
type: Question
has answer: http://stackoverflow.com/a/27529928
type: AnsweredQuestion
has title: How to test angular multi select dropdown using protractor?
tagged with: testing
tagged with: protractor
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27615578
answer count: 2

http://stackoverflow.com/comment/43846688
score: 0
type: Comment
type: QuestionComment
has text: Do you mind sharing the details of the actual version of your IE11 and Windows?
comment on: http://stackoverflow.com/q/27622366

http://stackoverflow.com/q/27535133
accepted answer: http://stackoverflow.com/a/27535237
has comment: http://stackoverflow.com/comment/43499138
has comment: http://stackoverflow.com/comment/43499072
has comment: http://stackoverflow.com/comment/43498771
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43498804
upvote count: 4
has comment: http://stackoverflow.com/comment/43498830
has title: AngularJS - fire ng-change on every drop down selection
has answer: http://stackoverflow.com/a/27535237
answer count: 1
downvote count: 0
tagged with: javascript
score: 4
has body: I have a drop down for selecting which report to generate, so when a user selects the report from the drop down it then generates it and downloads it for a mobile. Using ng-change it will only pick up when a user wants to generate different reports. I'd like it so they can select the same drop down item twice and have it download the report twice. I have code similar to this: Markup: &lt;div&gt; &lt;select ng-model="currentlySelected" ng-options="opt as opt.label for opt in options" ng-change="logResult()"&gt; &lt;/select&gt; The value selected is {{ currentlySelected.value }}. &lt;/div&gt; Javascript: angular.module('demoApp', []).controller('DemoController', function($scope) { $scope.options = [ { label: 'one', value: 1 }, { label: 'two', value: 2 } ]; $scope.currentlySelected = $scope.options[1]; $scope.logResult = function() { console.log($scope.currentlySelected); } }); Fiddle: http://jsfiddle.net/KyleMuir/cf59ypyw/ What I expect is to select "two" twice and have it log the result to the console twice. Is this doable or should I be using a different directive for this?
favorite count: 0
has comment: http://stackoverflow.com/comment/43498827
tagged with: angularjs
has comment: http://stackoverflow.com/comment/43499039
has comment: http://stackoverflow.com/comment/43498795
has comment: http://stackoverflow.com/comment/43498850
has comment: http://stackoverflow.com/comment/43498667
has comment: http://stackoverflow.com/comment/43498837

http://stackoverflow.com/q/27569055
tagged with: javascript
has answer: http://stackoverflow.com/a/27569599
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/27569439
has answer: http://stackoverflow.com/a/27569439
tagged with: asp.net
accepted answer: http://stackoverflow.com/a/27569599
has body: I know how to get the return confirm box to popup on the button click but in my case, I only want to get which button was clicked by the user ("yes" or "no). Once the client clicks on the AddToCartBtn I am redirecting them to another url. I want them to be redirected to the URL no matter what they click on but with the Return Confirm, it will cancel the redirect at the moment when the click no. Should I be using something other than "Confirm" in this case to receive the value that the user chose and continue to redirect them to a new page afterwards? The only code I have so far is only for the simple confirmation popup. <asp:ImageButton ID="AddToCartBtn" runat="server" RowIndex='<%# Container.DisplayIndex %>' ImageUrl="~/Pictures/ShoppingCart.png" OnClick="AddToCartBtn_Click" OnClientClick="return confirm('are you sure?')" /> I have been unable to find much else although I found a custom popup in javascript that includes a checkbox which the checkbox control could take place of the yes or no buttons just as long as I can get the value but I am not able to get this to work, I will include this code also just in case this is the direction I should be going in CLICK ME The registration you have entered is illegal for the uk roads. By clicking ok you are accepting full resposibility for this plate and agreeing to use it for offroad use only. Check here if you agree to the terms and conditions: I am not use to using javascript with asp.net so I am not exactly sure how I call this javascript in the onClick event for my button. The button and containers below the javascript code are test examples from a site but in my case I need the button to be my asp:ImageButton "AddToCartBtn" instead of the html button. So to recap, Is there a way to use the return confirm popup and get the value that the user clicked on, but still redirect them to the page if they click no? Or should I be going more towards the custom checkbox popup, and if so how can I get the example I listed for th…
type: AnsweredQuestion
has title: How to get the value of OnClientClick Return with yes or no buttons
type: Question

http://stackoverflow.com/comment/43491621
type: Comment
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/27521760
has text: It's still the same.My server.js works in locahost but not in azure.I don't think the problem is the server.js code.Issue seems to be the Web.config.

http://stackoverflow.com/comment/43582969
comment on: http://stackoverflow.com/q/27578900
type: QuestionComment
score: 0
has text: What do you mean by no data available? If i go into my local storage, i see a lot of prop1 ids saved there
type: Comment

http://stackoverflow.com/comment/43430840
has text: http://www.seabreezecomputers.com/tips/progress.htm is this what your looking for?
score: 2
comment on: http://stackoverflow.com/q/27500137
type: Comment
type: QuestionComment

flask
tags question: http://stackoverflow.com/q/27534116
tags question: http://stackoverflow.com/q/27626330
tags question: http://stackoverflow.com/q/27505704
type: Tag
tags question: http://stackoverflow.com/q/27538840
tags question: http://stackoverflow.com/q/27633858
tag name: flask
tags question: http://stackoverflow.com/q/27537377

http://stackoverflow.com/comment/114365740
comment on: http://stackoverflow.com/a/27639461
type: AnswerComment
score: 0
type: Comment
has text: The link is dead

http://stackoverflow.com/comment/73580208
type: AnswerComment
has text: It is possible to chain this with a loader someway? Let's say I want to copy a directory of svg images and I would want to optimize them when moving them with some kind of image loader?
type: Comment
comment on: http://stackoverflow.com/a/33374807
score: 1

http://stackoverflow.com/comment/43436977
has text: As using postman with an OPTION request works fine, i think it's not a server configuration problem !?
comment on: http://stackoverflow.com/q/27501045
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27516961
score: -2
has comment: http://stackoverflow.com/comment/43956315
has body: Did you test this without the top 200px padding on the body? Because that also counts when JS calculates offset-top. Or simply give it a higher offset-top.
answers question: http://stackoverflow.com/q/27516875
downvote count: 2
type: Answer
upvote count: 0

http://stackoverflow.com/a/27552232
answers question: http://stackoverflow.com/q/27552132
upvote count: 4
has comment: http://stackoverflow.com/comment/43530873
has comment: http://stackoverflow.com/comment/43531231
score: 4
downvote count: 0
has body: You could use .text() but if the span happens to have text in it then it will be wrong. So instead you could clone the button and then remove the span from it so you could use the .html() or the text() like var clonedButton = $('#myButton').clone(); $('span', clonedButton ).remove(); alert(clonedButton.html()); And here is a demo for you...
type: Answer

http://stackoverflow.com/comment/43419175
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27493672
has text: No the first. Try doing `document.body.appendChild(HTMLStringContainer)`. It should work.

http://stackoverflow.com/q/27637765
tagged with: javascript
has answer: http://stackoverflow.com/a/27637832
has answer: http://stackoverflow.com/a/27639684
answer count: 3
tagged with: single-page-application
downvote count: 0
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has body: I am trying to build an single page application with angular js. But i don't want # inside the url when the template is included. I have used the $locationProvider.html5Mode(true) app.config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) { $routeProvider. when('/dashboardnew', { templateUrl: './dashboard_tmp', controller: 'CategoryCtrl' }). otherwise({ redirectTo: '/dashboardnew' }); // use the HTML5 History API $locationProvider.html5Mode(true); }]); but this didn't work when the page is reloaded. How should I solve this problem? Thanks
has title: How to have single page application without # inside the URL using Angularjs?
tagged with: node.js
score: 3
upvote count: 3
has answer: http://stackoverflow.com/a/27638747
type: Question
has comment: http://stackoverflow.com/comment/43694358

http://stackoverflow.com/q/27527121
type: Question
accepted answer: http://stackoverflow.com/a/27527129
answer count: 1
has body: I need to refresh a div on 3 sec so I tried a setInterval method as follows using javaScript: Try it This is not working, But when I tried like thje following it works: function myFunction() { setInterval(function hello(){ alert("vannallo"); }, 3000); } I need to work setInterval continuosly on my first buttonclick , How can I acheive it? Please help guys!!
tagged with: javascript
has answer: http://stackoverflow.com/a/27527129
downvote count: 4
favorite count: 0
has comment: http://stackoverflow.com/comment/43482778
score: -3
duplicate of: http://stackoverflow.com/q/10182714
upvote count: 1
has title: Javascript setInterval() not working on function call
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/10182714

http://stackoverflow.com/comment/43511799
type: Comment
has text: I've just added 2 references for you to get started.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27539333

http://stackoverflow.com/comment/43798651
comment on: http://stackoverflow.com/a/27616508
type: AnswerComment
has text: Sorry but is there a way to make this support multiple sheets? For sheet1 with name XXX I have an array called dataA for it, for sheet2 with name YYY I have an array called dataB for it.
type: Comment
score: 0

http://stackoverflow.com/tag/html
tags question: http://stackoverflow.com/q/27560661
tags question: http://stackoverflow.com/q/27593937
tags question: http://stackoverflow.com/q/27622594
tags question: http://stackoverflow.com/q/27514761
tags question: http://stackoverflow.com/q/27624842
tags question: http://stackoverflow.com/q/27639480
tags question: http://stackoverflow.com/q/27601568
tags question: http://stackoverflow.com/q/27489143
tags question: http://stackoverflow.com/q/27639780
tags question: http://stackoverflow.com/q/27528091
tags question: http://stackoverflow.com/q/27534336
tags question: http://stackoverflow.com/q/27492271
tags question: http://stackoverflow.com/q/27528216
tags question: http://stackoverflow.com/q/27581007
tags question: http://stackoverflow.com/q/27568306
tags question: http://stackoverflow.com/q/27482740
tags question: http://stackoverflow.com/q/27503770
tags question: http://stackoverflow.com/q/27603081
tags question: http://stackoverflow.com/q/27493909
tags question: http://stackoverflow.com/q/27533532
tags question: http://stackoverflow.com/q/27489179
tags question: http://stackoverflow.com/q/27615885
tags question: http://stackoverflow.com/q/27632432
tags question: http://stackoverflow.com/q/27639455
tags question: http://stackoverflow.com/q/27552313
tags question: http://stackoverflow.com/q/27532604
tags question: http://stackoverflow.com/q/27512559
tags question: http://stackoverflow.com/q/27512256
tags question: http://stackoverflow.com/q/27553171
tags question: http://stackoverflow.com/q/27547247
tags question: http://stackoverflow.com/q/27594691
tags question: http://stackoverflow.com/q/27522798
tags question: http://stackoverflow.com/q/27496008
tags question: http://stackoverflow.com/q/27513893
tags question: http://stackoverflow.com/q/27565731
tags question: http://stackoverflow.com/q/27584750
tags question: http://stackoverflow.com/q/27565913
tags question: http://stackoverflow.com/q/27590956
tags question: http://stackoverflow.com/q/27594960
tags question: http://stackoverflow.com/q/27498406
tags question: http://stackoverflow.com/q/27538085
tags question: http://stackoverflow.com/q/27504207
tags question: http://stackoverflow.com/q/27505460
tags question: http://stackoverflow.com/q/27552427
tags question: http://stackoverflow.com/q/27566236
tags question: http://stackoverflow.com/q/27570088
tags question: http://stackoverflow.com/q/27555064
tags question: http://stackoverflow.com/q/27625086
tags question: http://stackoverflow.com/q/27517189
tags question: http://stackoverflow.com/q/27608932
tags question: http://stackoverflow.com/q/27632104
tags question: http://stackoverflow.com/q/27639712
tags question: http://stackoverflow.com/q/27591261
tags question: http://stackoverflow.com/q/27634996
tags question: http://stackoverflow.com/q/27509931
tags question: http://stackoverflow.com/q/27562043
tags question: http://stackoverflow.com/q/27560675
tags question: http://stackoverflow.com/q/27592397
tags question: http://stackoverflow.com/q/27510653
tags question: http://stackoverflow.com/q/27598820
tags question: http://stackoverflow.com/q/27604290
tags question: http://stackoverflow.com/q/27536819
tags question: http://stackoverflow.com/q/27618664
tags question: http://stackoverflow.com/q/27563947
tags question: http://stackoverflow.com/q/27524526
tags question: http://stackoverflow.com/q/27573537
tags question: http://stackoverflow.com/q/27638467
tags question: http://stackoverflow.com/q/27601773
tags question: http://stackoverflow.com/q/27619847
tags question: http://stackoverflow.com/q/27513629
tags question: http://stackoverflow.com/q/27524191
tags question: http://stackoverflow.com/q/27494283
tags question: http://stackoverflow.com/q/27563937
tags question: http://stackoverflow.com/q/27621084
tags question: http://stackoverflow.com/q/27561132
tags question: http://stackoverflow.com/q/27569196
tags question: http://stackoverflow.com/q/27594414
tags question: http://stackoverflow.com/q/27502858
tags question: http://stackoverflow.com/q/27505558
tags question: http://stackoverflow.com/q/27571716

http://stackoverflow.com/a/27495903
has body: Use an object to save each circle's x and y coordinates, x and y velocity (in pixels), as well as radius. keep a list of all of your circles. On each iteration of your animation loop, check that each circle's x and y coordinates plus or minus the radius are not on top of one another if the circles advance the number of pixels noted by their x and y velocities. If they are, handle what you want them to do (i.e. change direction, stop, etc.) and then redraw.
score: 0
answers question: http://stackoverflow.com/q/27495650
type: Answer

http://stackoverflow.com/comment/43468060
type: QuestionComment
has text: Hi @Anand deep Singh, you need to paste entire JS and HTML code to give clarity to stackoverflow users. Just pasting array information is not sufficient.
type: Comment
score: 0
comment on: http://stackoverflow.com/q/27519174

http://stackoverflow.com/q/27605081
type: Question
accepted answer: http://stackoverflow.com/a/27606161
score: 0
linked to: http://stackoverflow.com/q/18332983
has body: I'm creating a Google Chart Visualization of type Map with a single pin. As per How to set zoomLevel in google Visualization Map api? , I should be able to use zoomLevel option to control initial zoom level . However, for me, this fails(the code): Drop Point Map As you can see, zoomLevel: 10 is set, but I have no luck on the zoom level, which defaults to maximum zoom level (19) Any ideas as to what I'm missing? Source taken from Visualization: Map - Google Charts — Google Developers fiddle demonstrating issue
answer count: 1
tagged with: google-visualization
tagged with: javascript
tagged with: google-maps-api-3
has answer: http://stackoverflow.com/a/27606161
type: AnsweredQuestion
has title: zoomLevel parameter for Google Visualization not working

masking
tag name: masking
tags question: http://stackoverflow.com/q/27574784
type: Tag

http://stackoverflow.com/comment/43389627
type: Comment
has text: Could you update the files so I can have a better look?
comment on: http://stackoverflow.com/a/27477272
type: AnswerComment
score: 0

http://stackoverflow.com/a/27670799
has body: I understood that you want to use Icon inside your menu. I think you could achieve same result using less code. You should try Bootstrap to do that. It is easy to include icons. Try these options: http://bootsnipp.com/snippets/featured/admin-side-menu http://bootsnipp.com/snippets/featured/collapsible-tree-menu http://bootsnipp.com/snippets/featured/sidebar-menu-group-tree
answers question: http://stackoverflow.com/q/27600635
score: 0
upvote count: 1
downvote count: 1
type: Answer

http://stackoverflow.com/a/27640352
has body: Many Thanks for all response . I could get this resolved by passing JS script as parameter to JQUERY load callback and invoking it there on successfully load of html doc . smthing like this : $('#' + resType + 'Content').load(url, function(responseTxt, statusTxt, xhr) { if (statusTxt == "success") { alert("External content loaded successfully!...calling JS"); new self.dbResourceAnalyze(); } if (statusTxt == "error") alert("Error: " + xhr.status + ": " + xhr.statusText); });
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27634806

http://stackoverflow.com/a/27581618
upvote count: 10
type: Answer
downvote count: 0
has body: I don't think adding a query string to the url will work as it essentially changes it to a different url. However if you simply want to pass parameters you can use the hash to add a fragment to the url ifrm.src = url + '#foo=bar'; http://jsfiddle.net/thpf584n/1/
score: 10
has comment: http://stackoverflow.com/comment/78952400
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27581335
accepted answer of: http://stackoverflow.com/q/27581335

http://stackoverflow.com/comment/43394081
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27478864
type: QuestionComment
has text: If you wan't to "undo" the changes why don't you "undo" them rather then re-rendering the template?

http://stackoverflow.com/comment/43486377
comment on: http://stackoverflow.com/q/27523040
type: QuestionComment
has text: I've added html part
score: 0
type: Comment

inheritance
tags question: http://stackoverflow.com/q/27496813
tags question: http://stackoverflow.com/q/27624527
tags question: http://stackoverflow.com/q/27535520
tag name: inheritance
type: Tag
tags question: http://stackoverflow.com/q/27494663
tags question: http://stackoverflow.com/q/27561028
tags question: http://stackoverflow.com/q/27502491
tags question: http://stackoverflow.com/q/27572886
tags question: http://stackoverflow.com/q/27585547
tags question: http://stackoverflow.com/q/27606331

http://stackoverflow.com/comment/43677838
has text: @hwnd No, since that will also match 'a-a'
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27628318

http://stackoverflow.com/q/27592398
score: 0
linked to: http://stackoverflow.com/q/51352
has title: JS Preview spinner before image is downloaded
has body: I want to show spinner before the image is downloaded in its preview thumbnail after I choose photo to upload. I am using angularjs so I am trying to realize it with ng-show. Like when the image is not downloaded yet I set the $scope.showImage = false and change this param to true only when it is downloaded. I saw solution here but i don't know how to get image src. Thanks! EDIT. Actually this is an upload form. I show the image before upload. I use Danial Farid's library. My code is below: &lt;div ng-show="spin"&gt; &lt;div id="spinner"&gt;&lt;/div&gt; &lt;/div&gt; &lt;div ng-show="files" class="thumbnail col-lg-10 col-lg-offset-1"&gt; &lt;img id="imgId" src="#" alt="my image"&gt; &lt;/div&gt; And this is in controller: $scope.onFileSelect = function($files) { $scope.spin = true; $scope.files = $files; };
has comment: http://stackoverflow.com/comment/43609659
has comment: http://stackoverflow.com/comment/43609286
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43608462
answer count: 0
tagged with: src
has comment: http://stackoverflow.com/comment/43609011
type: Question
tagged with: javascript
tagged with: jquery
tagged with: image

http://stackoverflow.com/q/27501084
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43433526
favorite count: 0
has comment: http://stackoverflow.com/comment/43433472
tagged with: ajax
has body: My html code: <form:form name="vcfForm" id="vcfForm" method="post" enctype="multipart/form-data" action="../acquaintance/readingContactsFromVcfFile"></form:form> Upload My controller : @RequestMapping(value = { "/readingContactsFromVcfFile" }, method = RequestMethod.POST) public @ResponseBody ModelMap readContactsFromVcfFile(@RequestParam("vcfFile") MultipartFile file, HttpServletRequest request) throws UserServiceException { ModelMap modelMap = new ModelMap(); *********************code***************** modelMap.addAttribute("message", "success"); return modelMap; } My jquery code: $(document).on('click','#vcfSubmit', function() { var vcfData = new FormData(); vcfData.append('files[]', $('#vcfForm').get(0).files[0]); $.ajax({ url : "../acquaintance/readingContactsFromVcfFile?vcfFile="+vcfData, type : "post", cache : false, processData: false, contentType: false, success : function(data) { alert(data.message); } }); }); My problem is when i click submit button the page will submitted and return message "success" displayed in page. I want page not refresh when submitting the form or pass file using ajax. How can i solve this problem?
type: Question
has comment: http://stackoverflow.com/comment/43433318
upvote count: 2
score: 0
downvote count: 2
answer count: 1
has answer: http://stackoverflow.com/a/27505332
tagged with: spring-mvc
has comment: http://stackoverflow.com/comment/43433128
tagged with: forms
type: AnsweredQuestion
has title: Ajax send multipart/form-data
accepted answer: http://stackoverflow.com/a/27505332

http://stackoverflow.com/q/27573474
type: Question
has answer: http://stackoverflow.com/a/27573824
has title: Replace url parameters function
answer count: 2
has comment: http://stackoverflow.com/comment/43573336
upvote count: 1
has body: I got this function from here in stack to replace url parameters like that : function replaceUrlParam(paramName, paramValue){ var currentUrl = window.location.href; var pattern = new RegExp('('+paramName+'=).*?(&amp;|$)') var newUrl = currentUrl.replace(pattern,'$1' + paramValue + '$2'); if(newUrl == currentUrl){ newUrl = newUrl + (newUrl.indexOf('?')&gt;0 ? '&amp;' : '?') + paramName + '=' + paramValue } window.history.pushState('',document.title,newUrl); return newUrl; } www.mysite.com/index.php?id=14&amp;&amp;cat=20 and i use it like that: replaceUrlParam('id', 15); like that works fine. But the problem is it duplicates the id if i use same id which is in the url like that. replaceUrlParam('id', 14)--will give---&gt;www.mysite.com/index.php?id=14&amp;&amp;cat=20&amp;&amp;id=14 How can i change this function to not give duplicates when its same id ? Thanks fiddle here
possible better answer: http://stackoverflow.com/a/27573829
has comment: http://stackoverflow.com/comment/43572716
has answer: http://stackoverflow.com/a/27573829
accepted answer: http://stackoverflow.com/a/27573824
linked to: http://stackoverflow.com/q/7171099
has comment: http://stackoverflow.com/comment/43572838
type: AnsweredQuestion
tagged with: url
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0

http://stackoverflow.com/q/27496515
tagged with: function
accepted answer: http://stackoverflow.com/a/27497980
answer count: 1
tagged with: button
has comment: http://stackoverflow.com/comment/43424674
has comment: http://stackoverflow.com/comment/43424779
has comment: http://stackoverflow.com/comment/43424856
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43424787
has answer: http://stackoverflow.com/a/27497980
tagged with: dom
has comment: http://stackoverflow.com/comment/43424715
type: Question
has body: I am having a problem wherein I changed this line: document.body.appendChild(node); to this line: document.getElementById("character").appendChild(node); and now when I click the update button that was just working perfectly, it now reinitializes the page. this is the function that the button calls: updateList: function(){ this.updateStats(); this.derivedStats(); document.getElementById("moveList").innerHTML = ""; var strName; var node = document.getElementById("selectR"); var c = node.childNodes; for(var i=0; i&lt;c.length; i++) { for(strName in this.list) { if(this.list[strName].name==c[i].value) { //var helper = this.list[strName].display(); //document.getElementById("moveList").appendChild(helper); } } } },
tagged with: javascript
has comment: http://stackoverflow.com/comment/43424644
score: 0
has title: Modify the target of a .appendChild() and it causes the program to reinitialize

http://stackoverflow.com/comment/43447613
score: 1
has text: Voting to close this question: The element chosen by the questioner (html5 canvas) is not suitable for their exact requirements. The questioner wants to show/hide individual elements on the canvas without clearing the canvas. Drawings on html5 canvas cannot be shown & hidden individually because the canvas retains no reference to any individual drawing that it has already done onto its surface.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27502214

http://stackoverflow.com/comment/43479376
comment on: http://stackoverflow.com/q/27525382
type: Comment
has text: Do you mean `model.getData()` gives you the second log rather than `model.getData("timestamp")`? In which case `model.getData().timestamp` should work.
score: 0
type: QuestionComment

http://stackoverflow.com/q/27520188
tagged with: angularjs
tagged with: typescript
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/27521336
upvote count: 1
type: Question
has body: I created this appRun.ts file: /// &lt;reference path="app.ts"/&gt; /// &lt;reference path="services/EnumsService.ts"/&gt; app.run(['$rootScope', appRun]); function appRun($rootScope) { $rootScope.Action = Action; $rootScope.AuthTabs = AuthTabs; $rootScope.UserTestStatus = UserTestStatus; $rootScope.Network = Network; $rootScope.TS = TS; } and in EnumsService.ts: enum Action { None, Registering, Authenticating } But when it comes to my Javascript AppRun.js being created it does not know anything about the Action enum. /// &lt;reference path="app.ts"/&gt; /// &lt;reference path="services/EnumsService.ts"/&gt; app.run(['$rootScope', appRun]); function appRun($rootScope) { $rootScope.Action = Action; $rootScope.AuthTabs = AuthTabs; $rootScope.UserTestStatus = UserTestStatus; $rootScope.Network = Network; $rootScope.TS = TS; } //# sourceMappingURL=appRun.js.map
tagged with: enums
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27521336
has comment: http://stackoverflow.com/comment/43471559
answer count: 1
downvote count: 0
has title: How can I add the value of a Typescript enum to my javascript function?
favorite count: 0

http://stackoverflow.com/comment/43795824
has text: It's as you see above; I thought according to the docs, this is all it should take, but it is not working...
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27574784

http://stackoverflow.com/comment/43676495
type: Comment
comment on: http://stackoverflow.com/a/27627565
has text: Can somebody help me echo this javascript with the for-loop for creating the array of items?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43442707
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27506002
type: QuestionComment
has text: Take a look at this page. I think this is what you're after. http://bl.ocks.org/sathomas/1ca23ee9588580d768aa

http://stackoverflow.com/comment/43387849
type: Comment
has text: @oyshee as I said I am not familiar with PHP, probably the json_decode is not needed becuase your data is already a json so try with this: $obj = $_POST['data']
comment on: http://stackoverflow.com/a/27476773
score: 0
type: AnswerComment

http://stackoverflow.com/q/27622998
score: 0
has body: I am trying to set up rows with ng-repeats in them that are limited base don the screen size. I have all the break points set up, and I think in theory I have an idea of how to do this, but my first attempt does not seem to be working. Here's what I'm trying In the controller I have this to check screen size - $(window).resize(function(){ var sizeCheck = window.innerWidth $scope.$apply(function(sizeCheck){ if(sizeCheck &gt;= 2250){ $scope.sizeControl = 6; }else if(sizeCheck &lt; 2250 &amp;&amp; sizeCheck &gt;= 1800){ $scope.sizeControl = 5; }else if(sizeCheck &lt; 1800 &amp;&amp; sizeCheck &gt;= 1600){ $scope.sizeControl = 4; }else if(sizeCheck &lt; 1600 &amp;&amp; sizeCheck &gt;= 1260){ $scope.sizeControl = 3; }else if(sizeCheck &lt; 1260 &amp;&amp; sizeCheck &gt;= 600){ $scope.sizeControl = 2; }else if(sizeCheck &lt; 600){ $scope.sizeControl = 1; } }); }); So in the template I just have : &lt;div ng-repeat="item in marketItemsTest | filter:searchPrivate | limitTo: sizeControl" In the top of the controller I have this to check the initial size : var sizeCheck2 = window.innerWidth if(sizeCheck2 &gt;= 2250){ $scope.sizeControl = 6; }else if(sizeCheck2 &lt; 2250 &amp;&amp; sizeCheck &gt;= 1800){ $scope.sizeControl = 5; }else if(sizeCheck2 &lt; 1800 &amp;&amp; sizeCheck &gt;= 1600){ $scope.sizeControl = 4; }else if(sizeCheck2 &lt; 1600 &amp;&amp; sizeCheck &gt;= 1260){ $scope.sizeControl = 3; }else if(sizeCheck2 &lt; 1260 &amp;&amp; sizeCheck &gt;= 600){ $scope.sizeControl = 2; }else if(sizeCheck2 &lt; 600){ $scope.sizeControl = 1; } This works ok, but I'm wondering if there a more efficient way in javascript, or angular in general. This function fires every single time the window shifts, and runs all these checks, so I'm thinking there must be a better way to do this. Would appreciate any input! Thanks for reading.
answer count: 1
has title: Is there a more efficient way to implement limitTo in AngularJS based on screen size?
tagged with: javascript
tagged with: angularjs
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/27623366

http://stackoverflow.com/q/27557080
has title: CodeMirror - Updating selections
has answer: http://stackoverflow.com/a/27557281
has comment: http://stackoverflow.com/comment/78886197
has comment: http://stackoverflow.com/comment/43540705
type: Question
has comment: http://stackoverflow.com/comment/43541577
tagged with: javascript
has body: So in CodeMirror you can get a selection by calling getCursor() doing the following: cm.getCursor(true) // start selection cm.getCursor(false) // end selection This gives you the an object that holds the line and ch position of the cursor. With that you can mark text: cm.markText(startPos, endPos, options) Once I have marked the text, is it possible to update it? (without actually deleting it and adding a new mark) Ex: var t = cm.markText({ line:0, ch:0 }, { line:0, ch:10 }); t.setEnd({ line:0, ch:5 }); EDIT Since some people might look for it. This is how you modify marked text: var t = editor.markText({ line:0, ch:0 }, { line:0, ch:10 }, {className: someClass}); t.clear(); t = editor.markText({ line:0, ch:0 }, { line:0, ch:5 }, {className: someClass});
accepted answer: http://stackoverflow.com/a/27557281
answer count: 1
downvote count: 0
favorite count: 0
upvote count: 2
tagged with: codemirror
score: 2
type: AnsweredQuestion

http://stackoverflow.com/q/27618117
tagged with: javascript
has comment: http://stackoverflow.com/comment/43657466
score: 0
has comment: http://stackoverflow.com/comment/43657315
answer count: 0
has comment: http://stackoverflow.com/comment/43657340
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43658234
has title: Dynamically filling table with json data taking too long
has comment: http://stackoverflow.com/comment/43657391
has comment: http://stackoverflow.com/comment/43657429
has comment: http://stackoverflow.com/comment/43658345
has body: I have following table which is dynamically changed when some event happens: Time stats It is dynamically filled with json data(_durationStats in this case) in javascript like so: html = ""; var time_stats_tbody = jQuery("#time-stats tbody"); jQuery(_durationStats).each(function(ix) { var el = _durationStats[ix]; html +="<tr"; if(operator_ == "allOperators"){ html+=" data-lane='" + el.target+ "'> " + _units[el.target]+ " " + el.windowNo+ " "; } html+="> " + el.laneText+" " + el.ticketNo + " " + el.createTime + " " + el.startTime + " " + el.endTime + " " + el.waitTime + " " + el.duration + " "; }); time_stats_tbody.html(html); Now, if there are too many json objects, browser freezes and it takes long time to build the table. Namely, I suspect the last javascript line time_stats_tbody.html(html); is taking too long. What can I do to optimize it?
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/43657755
tagged with: dom
type: Question
has comment: http://stackoverflow.com/comment/43658549

http://stackoverflow.com/q/27525083
downvote count: 0
has comment: http://stackoverflow.com/comment/43709753
favorite count: 0
has comment: http://stackoverflow.com/comment/43478868
tagged with: extjs
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/15931863
has comment: http://stackoverflow.com/comment/43582036
has comment: http://stackoverflow.com/comment/43478946
has answer: http://stackoverflow.com/a/39611369
has comment: http://stackoverflow.com/comment/43479396
has comment: http://stackoverflow.com/comment/43478895
has comment: http://stackoverflow.com/comment/43479245
score: 1
has comment: http://stackoverflow.com/comment/43478741
has body: When I use DateField.getValue(), (this.toDate.getValue()=="" &amp;&amp; this.toDate.getValue()=="") I get this error message: Error Msg : DateField.getValue() is not a function following code: function(){ if(!(this.toDate.getValue()=="" &amp;&amp; this.toDate.getValue()=="")) { if(this.frmDate.getValue()&gt;this.toDate.getValue()){ msgBoxShow(160,1); this.frmDate.setValue(""); return; } else { //calc duration var frm = this.frmDate.getValue().format(Wtf.simplifyDateFormat()); var to = this.toDate.getValue().format(Wtf.simplifyDateFormat()); if((frm!=""&amp;&amp;to!="")){ this.expensesds.load({ params:{ frmDate:frm, toDate:to, start:0 }, scope: this, callback: function(rec, opt, succ){ if(succ){ this.expensesds.groupBy("viewby"); } } }); this.expensesds.groupBy("viewby"); } else return; } } else { return; } },
tagged with: mysql
upvote count: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27645913
answer count: 2
has title: Error Msg : DateField.getValue() is not a function
has comment: http://stackoverflow.com/comment/43479251

http://stackoverflow.com/q/27546291
upvote count: 2
has answer: http://stackoverflow.com/a/27546440
tagged with: javascript
has answer: http://stackoverflow.com/a/27546478
tagged with: jquery
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/27546595
has answer: http://stackoverflow.com/a/27546422
accepted answer: http://stackoverflow.com/a/27546422
has title: Receiving multiple data with jQuery ajax POST
downvote count: 1
possible better answer: http://stackoverflow.com/a/27546440
has body: I am using ajax to get the data and populate a select box. In the following code, I echo the output on the ajax.php file, and receive it. Everything works fine. However, as you can see that all of the html is populated in one select box. I want to return data of two separate select boxes instead of one. Therefore my question is, how can I send two different type of data separately from ajax.php and how can I receieve it on success function. $.ajax({ type: "POST", url: "../ajax.php", data: {name: 'select1', id: id}, cache: false, success: function(html){ $(".select1").html(html); } }); Ajax.php only echos the data: //data for select1 foreach($rows as $row){ echo ' x '; } //I want to add another one for select2 foreach($rows1 as $row){ echo ' y '; } die(); and want to receive with something like: success: function(html){ $(".select1").html(data1); $(".select2").html(data2); } Edit: I'm fetching the data using the ajax because I'm using dependent select boxes and fetching the data from the database. So by clicking at select 1, it fetches the data for the select 2 from database, that's why I'm doing that.
tagged with: php
has comment: http://stackoverflow.com/comment/43519039
has answer: http://stackoverflow.com/a/27546812
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43519136
has comment: http://stackoverflow.com/comment/43519084
score: 1
answer count: 6
has answer: http://stackoverflow.com/a/27546653
type: Question

http://stackoverflow.com/q/27622837
possible better answer: http://stackoverflow.com/a/27622983
accepted answer: http://stackoverflow.com/a/27622878
has answer: http://stackoverflow.com/a/27622983
upvote count: 3
has body: I have the following function defined in a service, in which I use $http to get some data and set some of the fields of an object: function getComplexObject () { var complexObject = { 'A': null, 'B': null } $http.get('someURI').then(function(data) { complexObject.A = data; //Do some processing and set B return complexObject; }) }; So until now I've used a promise with the $http service but I don't know how to wrap the function with $q so that I can ultimately use it in the following manner: //Using my function as a promise myService.getComplexObject().then(function (data) { this.complexObject = data; }) I've searched for tutorials on angular promises but most of them simply explain what a promise is or do something similar to what I already did, I'm guessing what I want to do is possible but I can't find the right syntax or the right tutorial.
type: Question
has title: AngularJS : Return a promise which is constructed from the result of another promise in angular?
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/27622878
downvote count: 0
favorite count: 0
tagged with: promise
tagged with: angularjs
tagged with: angular-promise
type: AnsweredQuestion
score: 3

http://stackoverflow.com/comment/43403023
has text: thanks! it works! But i think this way is kind of a workaround? If i want filter more than one property, i have to write more delete statement in clear() function, right? I really curious about why the comparator always returning true still blocks items with null property
type: Comment
comment on: http://stackoverflow.com/a/27485469
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43473599
type: QuestionComment
type: Comment
has text: can you put this in jsfiddle
comment on: http://stackoverflow.com/q/27522193
score: 0

http://stackoverflow.com/q/27629929
score: 0
tagged with: annotations
answer count: 1
tagged with: java
tagged with: javascript
tagged with: vaadin
has body: I try to add js file to output html code in vaadin7.4.13+maven project. I know that it is possible to use vaadin://... protocol which is translated to /VAADIN/ directory. Now I know that this isn't the only one trick it can be used there because I've seen some other protocols being used in @JavaScript annotation but I cannot recall them. Please help me with this. vaadin:// ???:// ???:// ...
has answer: http://stackoverflow.com/a/27630095
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/27630095
has title: list of vaadin's special path variables @JavaScript(value = { "vaadin://...", "???://..." }

http://stackoverflow.com/comment/43495961
type: Comment
has text: Oh also, my naming conventions `policy_number[0]` is redundant for indexed arrays, but necessary for associative ones, so I agree I won't need it in this case.
type: AnswerComment
comment on: http://stackoverflow.com/a/27533723
score: 0

http://stackoverflow.com/q/27618040
upvote count: 6
tagged with: node.js
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/27618171
has title: Node.js deprecated object-keys
downvote count: 0
tagged with: javascript
score: 6
tagged with: windows-7-x64
answer count: 1
accepted answer: http://stackoverflow.com/a/27618171
favorite count: 0
has body: I'm a beginer at node.js, and I'm learning it through a tutorial. I installed node correctly and tested it out with simple console.log calls. The problem is I'm getting an error when trying to run this command: npm-install node-dev -g I get an error: "npm WARN deprecated object-keys@0.2.0: Please update to the latest object keys" I'm running node on windows 7 64-bit Any ideas on what might be wrong?
tagged with: npm

http://stackoverflow.com/q/27606014
tagged with: jquery
has title: Loop through object and replace values
has comment: http://stackoverflow.com/comment/43634306
favorite count: 0
tagged with: ajax
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43635977
score: 1
has comment: http://stackoverflow.com/comment/43634338
has comment: http://stackoverflow.com/comment/43636105
upvote count: 1
has comment: http://stackoverflow.com/comment/43634349
type: Question
has comment: http://stackoverflow.com/comment/43635573
has answer: http://stackoverflow.com/a/27608094
tagged with: javascript
has comment: http://stackoverflow.com/comment/43636760
has comment: http://stackoverflow.com/comment/43634436
answer count: 2
has comment: http://stackoverflow.com/comment/43635647
has body: I have an object which at some points is four levels deep, however I want a function that will cope should more levels be introduced. I'm trying to write a function that will replaced elements such that &lt;span class="ajax-parent1-parent2-parent3-value"&gt;&lt;/span&gt; will be replaced with parent1.parent2.parent3.value. The issue is that the depth is variable, so I could have something like &lt;span class="ajax-parent1-value"&gt;&lt;/span&gt; to be replaced with parent1.value. Finally, it's not always the text to be replaced. Optionally, data-attr can specify an attribute to be used instead (through element.attr(&lt;data-attr&gt;, &lt;value&gt;)). Currently, I'm iterating manually, however it isn't very clean so I was wondering if there is a better way to do it. This also doesn't work for greater than two levels deep. function render(data) { $.each(data, function(parent, value) { $.each(value, function(element, value) { $el = $('.ajax-' + parent + '-' + element); $.each($el, function(key, el) { if ($(el).data('attr')) { $(el).attr($(el).data('attr'), value); } else { $(el).text(value); } } }); }); } Example object: { "profile": { "username": "johnd", "bio": "Some example data about John", "website": "http://john.com", "profile_picture": "http://john.com/me.jpg", "full_name": "John Doe", "counts": { "media": 13, "followed_by": 26, "follows": 49 }, "id": "16" }, "dashboard": { "script": { "tags": ["media"], "stats": { "liked": 0, "lastrun": "never", "duration": 0 }, "status": { "code": 0, "slug": "disabled", "human": "Disabled", "message": "Not running." } }, "account": { "plan": "free", "created": 1419261005373, "updated": 1419261005373 } }, "serverInformation": { "serverName": "Johns API", "apiVersion": "0.0.1", "requestDuration": 22, "currentTime": 1419262805646 }, "requesterInformation": { "id": "redacted", "fingerprint": "redacted", "remoteIP": "redacted", "receivedParams": { "action": "getDashboard", "apiVersion": 1 } } }
downvote count: 0
has answer: http://stackoverflow.com/a/27618603

http://stackoverflow.com/comment/43698879
type: QuestionComment
type: Comment
score: 2
comment on: http://stackoverflow.com/q/27640084
has text: Stop shouting. Might get an answer

audiocontext
type: Tag
tags question: http://stackoverflow.com/q/27552704
tag name: audiocontext

http://stackoverflow.com/q/27621440
upvote count: 4
tagged with: reactjs
has answer: http://stackoverflow.com/a/27700060
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/43667159
favorite count: 0
accepted answer: http://stackoverflow.com/a/27700060
has comment: http://stackoverflow.com/comment/43689028
type: Question
has comment: http://stackoverflow.com/comment/43676676
has title: How to modify the DOM directly in ReactJS
score: 4
has comment: http://stackoverflow.com/comment/43671025
answer count: 1
has comment: http://stackoverflow.com/comment/43686913
has comment: http://stackoverflow.com/comment/43668482
has comment: http://stackoverflow.com/comment/43674307
has comment: http://stackoverflow.com/comment/43666634
has body: Let's say I have two arrays selectedFoobars and unselectedFoobars. These are my data and they are rendered as lists next to each other using ReactJS. When the user clicks on an element in one of the lists I want to remove the element from that list, and add it to the end of the other list. That part is pretty straight forward using React. But, I want the clicked element to sweep across the screen from its old position to its new position in the other list. If the user clicks on and element in the middle of the unselectedFoobars that element should animate across the page to the bottom of the selectedFoobars list. I don't just want the moved element to fade out it the first list and fade in in the second. That would have been easy though, by using the animation hooks provided the animation addon for React. That is one – as far as I can tell – valid example of a problem where one needs to modify the DOM directly to achieve the desired result. Using Backbone.js one could easily do the DOM manipulation manually. This is straight forward and pretty clean in Backbone-world albeit quite but a bit of work. In AngularJS I'd create a directive. It would be pretty unidiomatic Angular. But it would get the job done. What is the cleanest way to handle this and similar cases where direct DOM manipulation is needed using ReactJS?

http://stackoverflow.com/q/27495973
tagged with: javascript
tagged with: jquery
answer count: 2
accepted answer: http://stackoverflow.com/a/27496183
possible better answer: http://stackoverflow.com/a/27496022
downvote count: 0
has title: codes on jsfiddle cannot be converted
favorite count: 0
upvote count: 2
has body: I developed this html5 animation on jsfiddle http://jsfiddle.net/UZMyu/5/ I tried to make it work on plain html document, but it doesnt work. on jsbin,the snow effect is not coming, the photo in the middle not showing up. http://jsbin.com/lonefopuzo/1/edit?html,output $(function() { var COUNT = 180; var masthead = document.querySelector('.masthead'); var canvas = document.createElement('canvas'); var ctx = canvas.getContext('2d'); var width = masthead.clientWidth; var height = masthead.clientHeight; var i = 0; var Snowflake = function() { this.x = 0; this.y = 0; this.vy = 0; this.vx = 0; this.r = 0; this.reset(); } Snowflake.prototype.reset = function() { console.log('Reset was called'); this.x = Math.random() * width; this.y = Math.random() * -height; this.vy = 1 + Math.random() * 3; this.vx = 0.5 - Math.random(); this.r = 1 + Math.random() * 2; this.o = 0.5 + Math.random() * 0.5; } canvas.width = width; canvas.height = height; canvas.style.position = 'absolute'; canvas.style.left = canvas.style.top = '0'; ctx.fillStyle = '#FFF'; var snowflakes = [], snowflake; for (i = 0; i < COUNT; i++) { snowflake = new Snowflake(); snowflakes.push(snowflake); } function update() { ctx.clearRect(0, 0, width, height); for (i = 0; i < COUNT; i++) { snowflake = snowflakes[i]; snowflake.y += snowflake.vy; snowflake.x += snowflake.vx; ctx.globalAlpha = snowflake.o; ctx.beginPath(); ctx.arc(snowflake.x, snowflake.y, snowflake.r, 0, Math.PI * 2, false); ctx.closePath(); ctx.fill(); if (snowflake.y > height) { snowflake.reset(); } } webkitRequestAnimationFrame(update); } webkitRequestAnimationFrame(update); masthead.appendChild(canvas); })(); $(function() { setTimeout(function() { $(".seasons1").addClass("rotate"); }, 1000); }); $(function() { setTimeout(function() { $('.seasons1').animate({ opacity: 1, }, 2000); }, 1000); }); $(function() { setTimeout(function() { $(".seasons1").removeClass("rotate"); }, 10000); }); $(function() { setTimeout(function() { $(".seasons1").addClass("rotate…
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27496183
type: Question
has answer: http://stackoverflow.com/a/27496022

http://stackoverflow.com/comment/43593560
type: Comment
type: QuestionComment
has text: And regarding *javascript doesn't have real arrays, right?* part: well, it's a bit of [an overstatement](http://www.html5rocks.com/en/tutorials/speed/v8/).
score: 0
comment on: http://stackoverflow.com/q/27584439

json2html
tags question: http://stackoverflow.com/q/27502244
tag name: json2html
type: Tag
tags question: http://stackoverflow.com/q/27541105

http://stackoverflow.com/q/27530853
score: 2
has comment: http://stackoverflow.com/comment/43490307
has title: Display how css is being added inline from javascript
tagged with: google-chrome-devtools
type: Question
has body: I am trying to find out how some inline css is being added to my html when the page is scrolled down. I am using chrome dev tools. I think it is supposed to be in console, but I don't see anything show up in there when I scroll the page and know that the javascript is being fired. I assume it is javascript. When I scroll down the page the header size shrinks to a set amount of pixels. I want to change that number but I can't find the source of what is causing the change.
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/43490288
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/43490525
upvote count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27534479
tagged with: css

http://stackoverflow.com/q/27577576
type: Question
tagged with: c#
answer count: 2
tagged with: javascript
has title: Required Field Validation and Current Date Validation on asp textbox Control
score: 0
has answer: http://stackoverflow.com/a/27580110
tagged with: asp.net
has body: I have a control like: &lt;asp:TextBox ID="_txtLeadDate" runat="server"&gt;&lt;/asp:TextBox&gt; &lt;AjaxControl:CalendarExtender ID="_txtLeadDate_CalendarExtender" Format="dd/MMM/yyyy" runat="server" Enabled="True" TargetControlID="_txtLeadDate"&gt;&lt;/AjaxControl:CalendarExtender&gt;&lt;br /&gt; &lt;asp:RequiredFieldValidator ID="RequirePreDate" runat="server" ControlToValidate="_txtLeadDate" ErrorMessage="Please select a Date" ForeColor="Red" Font-Size="10px" SetFocusOnError="True"&gt;&lt;/asp:RequiredFieldValidator&gt; Now I am trying to add another validation that date selected should't be a past date (only current and future date). How can I achieve that. Kindly help.
has answer: http://stackoverflow.com/a/27577611
has comment: http://stackoverflow.com/comment/43580611
type: UnansweredQuestion
tagged with: ajaxcontroltoolkit

http://stackoverflow.com/a/27524443
has body: The problem you have is that when your target input box 'Nachnamevalue' is inside of an IFrame then IE has to navigate to target page first and then to the IFrame as well. If no navigation to the IFrame occures, then the DOM does not contain elements which are inside of IFrame and that is why it was not working. HTH (The sample code uses files which are located on my PC, so replace the url with your actual url from intranet and the name of the 'main.html' with the name of actual page.) Option Explicit ' Add reference to Microsoft Internet Controls (SHDocVw) ' Add reference to Microsoft HTML Object Library Sub AddInfoFromIntranet() Dim ie As SHDocVw.InternetExplorer Dim doc As MSHTML.HTMLDocument Dim url As String ' Navigate to main page first url = "file:///c:/temp/Noldor/" Set ie = New SHDocVw.InternetExplorer ie.Visible = True ie.navigate url & "main.html" While ie.Busy Or ie.readyState <> READYSTATE_COMPLETE: DoEvents: Wend Dim inputs As MSHTML.IHTMLElementCollection Dim iFrames As MSHTML.IHTMLElementCollection Dim iFrame As MSHTML.HTMLFrameElement ' Get top_window frame and navigate to it then Set doc = ie.document Set iFrames = doc.getElementsByName("top_window") If Not iFrames Is Nothing Then Set iFrame = iFrames(0) ie.navigate url & iFrame.src While ie.Busy Or ie.readyState <> READYSTATE_COMPLETE: DoEvents: Wend Set inputs = doc.getElementsByName("Nachnamevalue") If Not inputs Is Nothing Then inputs(0).Value = "Test123" End If End If ie.Quit Set ie = Nothing End Sub Sample HTML of main.html: Sample HTML of top_window.html: Nachname:
accepted answer of: http://stackoverflow.com/q/27506705
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27506705
upvote count: 2
score: 2

http://stackoverflow.com/a/27639012
type: Answer
score: 1
has body: Best way to include javascripts plugins to your rails app is to use gems, if it exist. Thankfully, there is one for selectize, selectize-rails.
answers question: http://stackoverflow.com/q/27637820
accepted answer of: http://stackoverflow.com/q/27637820
upvote count: 2
type: AcceptedAnswer
downvote count: 1
has comment: http://stackoverflow.com/comment/71618188
has comment: http://stackoverflow.com/comment/43696779

http://stackoverflow.com/comment/43473683
type: Comment
has text: can u tell me how to attach one onchange event for multiple dropdown and also like to get dropdown id from onchange event. if u know then please help me with sample code. thanks
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27521085

http://stackoverflow.com/a/27627593
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27491300
score: 1
answers question: http://stackoverflow.com/q/27491300
upvote count: 1
type: AcceptedAnswer
type: Answer
has body: When anything triggers the model to change, something like setter(scope, validate()); in the example above, it will trigger the $formatters to run. The $formatters are passed the $modelValue and can return a value that will be used for the $viewValue. Knowing this, you can use a simple function that just returns the $viewValue in the formatter. With this, updating the model programmatically will not affect the $viewValue, and thus not change the value that appears in &lt;inputs&gt; ctrl.$formatters.push(formatter) function formatter(modelValue){ return ctrl.$viewValue; } For the example in the question, you would want to return the $viewValue only when the $modelValue is undefined. For that you can use this: ctrl.$formatters.push(formatter) function formatter(modelValue){ return modelValue === undefined? ctrl.$isEmpty(ctrl.$viewValue)? undefined : ctrl.$viewValue : modelValue; } Working example: http://jsfiddle.net/TheSharpieOne/q1s7Lf7z/17/

http://stackoverflow.com/comment/43589395
type: AnswerComment
comment on: http://stackoverflow.com/a/27581432
score: 0
type: Comment
has text: As a matter of principle, it's best to ask before answering if you're unsure. The question title is pretty clear though: how to open a (browser action) popup or not depending on a condition.

http://stackoverflow.com/q/27534515
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43509719
tagged with: selenium-webdriver
has comment: http://stackoverflow.com/comment/43649723
answer count: 0
has comment: http://stackoverflow.com/comment/43545075
type: Question
has comment: http://stackoverflow.com/comment/43638336
tagged with: javascript
has body: I'm writing javascript selenium webdriver tests to access a web page. The angular js elements load just fine when I access the page, but if I try to access the page from the selenium tests, the elements don't load. I've already checked to see that I've connected to the correct profile path. What could be causing this? The only error I see in the browser console is "Error: Permission denied to access property '0'", but I know that my account has the correct permissions.
score: 0
has title: Angular js loads in browser but not with selenium
has comment: http://stackoverflow.com/comment/43523416

http://stackoverflow.com/q/27547886
has title: Share and update data using Angular service
accepted answer: http://stackoverflow.com/a/27548133
tagged with: javascript
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/43522120
score: 1
favorite count: 0
has body: I have a service that calls an API like so: app.service("GetDivision", ["$http", function($http){ this.division = function(divisionNumber){ return $http.post("/api/league", {division:divisionNumber}).success(function(data){ return data; }); } }]); I then have 2 (or more) controllers that call the service: GetDivision.division(number); Now, controller A loads the data it gets from the service and displays it in an HTML table or something similar. Controller B has functionality that updates the data in the database. When this happens, I need to update the HTML produced from controller A. So I think I need to do one of the follow but can't understand how to do either: When controller B updates the data, tell controller A to make a new request to the service for the updated data. When controller B updates the data, also update a variable which contains the data in the service. Controller A then watches for the variable change in the service and the HTML is updated.
tagged with: angularjs
has answer: http://stackoverflow.com/a/27548133
type: AnsweredQuestion
upvote count: 1
type: Question

http://stackoverflow.com/comment/43466273
type: Comment
comment on: http://stackoverflow.com/q/27518183
type: QuestionComment
has text: Please include an example - otherwise - I recommend using the IDs of parent elements and creating Ids based off of those.
score: 0

http://stackoverflow.com/comment/43607472
type: AnswerComment
has text: If this doesn't work, check whether the `pointer-events` style property of the tick elements has been set to `none`. If so, you'll need to reset it using d3 or CSS.
type: Comment
comment on: http://stackoverflow.com/a/27588510
score: 0

http://stackoverflow.com/q/27525273
has answer: http://stackoverflow.com/a/27525322
has body: I have the following scenario: You can download from our server some files. If you're a "normal" user, you have a limited bandwidth for example 500kbits. If you're a premium user, you haven't a limit of your bandwidth and can download as fast a possible. But how I can realize this? How does this uploaded &amp; co?
tagged with: javascript
has answer: http://stackoverflow.com/a/27525532
answer count: 3
has answer: http://stackoverflow.com/a/31902560
downvote count: 1
has comment: http://stackoverflow.com/comment/43479716
favorite count: 0
linked to: http://stackoverflow.com/q/4002106
possible better answer: http://stackoverflow.com/a/27525322
has comment: http://stackoverflow.com/comment/43481983
has title: PHP/Javascript: How I can limit the download speed?
has comment: http://stackoverflow.com/comment/43479082
score: 11
tagged with: php
tagged with: limit
has comment: http://stackoverflow.com/comment/43480994
has comment: http://stackoverflow.com/comment/43490704
upvote count: 12
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43481123
accepted answer: http://stackoverflow.com/a/27525532
has comment: http://stackoverflow.com/comment/43479167
type: Question
has comment: http://stackoverflow.com/comment/43479762

audio
tags question: http://stackoverflow.com/q/27552704
tags question: http://stackoverflow.com/q/27574778
tags question: http://stackoverflow.com/q/27545475
tags question: http://stackoverflow.com/q/27528927
tags question: http://stackoverflow.com/q/27613078
tags question: http://stackoverflow.com/q/27611607
tags question: http://stackoverflow.com/q/27491672
tags question: http://stackoverflow.com/q/27592850
tags question: http://stackoverflow.com/q/27558342
tags question: http://stackoverflow.com/q/27612843
tags question: http://stackoverflow.com/q/27490188
tags question: http://stackoverflow.com/q/27622824
type: Tag
tags question: http://stackoverflow.com/q/27535244
tags question: http://stackoverflow.com/q/27572246
tag name: audio
tags question: http://stackoverflow.com/q/27614407
tags question: http://stackoverflow.com/q/27506794
tags question: http://stackoverflow.com/q/27634679
tags question: http://stackoverflow.com/q/27554418
tags question: http://stackoverflow.com/q/27553749
tags question: http://stackoverflow.com/q/27595753
tags question: http://stackoverflow.com/q/27513732
tags question: http://stackoverflow.com/q/27484612

http://stackoverflow.com/q/27623587
has comment: http://stackoverflow.com/comment/43667808
has answer: http://stackoverflow.com/a/27623702
possible better answer: http://stackoverflow.com/a/27623667
accepted answer: http://stackoverflow.com/a/27623702
has title: Saving text with an hash mark (Javascript - PHP - MySQL)
tagged with: php
has comment: http://stackoverflow.com/comment/43667731
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43667743
has body: I am writing simple AJAX functions to send comments to the server and save them in a mySQL database with php. The following code seemed to work just fine for my purposes, basic but did his job, until i tried to put a hash symbol (#) in a comment. Inserting this into the text "crashes" my functions, without saving the written text in the database and returning an empty div basically. This is the ajax call: function sendComment(n){ var xmlhttp = createAjax(); var text = document.getElementById("f"+n).value; if (!validation(text)) return false; xmlhttp.onreadystatechange = function () { if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200){ appendComment(n, xmlhttp.responseText); } } ... url = "comments.php?news="+n+"&amp;text="+text; xmlhttp.open("GET", url, true); xmlhttp.send(); ... } Where createAjax simply creates the xmlhttp object for every browser as standard, validation is a function that checks for many symbols like &lt;,>,=,(,),| with a regular expression. this is the php part: function insertComment($text, $news){ $conn = dbConnect(); $user = $_SESSION["user"]; $text = nl2br(htmlentities($text)); $date = date("Y-m-d H:i:s"); $sql = "INSERT INTO comments(user, news, date, text) VALUES ('".$user."','".$news."','".$date."', '".$text."')"; mysql_query($sql) or die ("Errore in inserimento: ".sql_error()); echo writeSingleComment($user, $date, $text); mysql_close(conn); } It just connects, saves the comment and returns the html code with echo, so that the javascript function can print it. This works with any text apparently, but I can't get it to work with an hash, am I missing something? Sidenotes, I could simply add the symbol to the validation regular expr., but my point is to "print" it, not just excluding it. Thanks in advance! Sidenote 2, the javascript attaches the comment to a static element.
tagged with: mysql
has answer: http://stackoverflow.com/a/27623667
type: Question
upvote count: 2
answer count: 2
linked to: http://stackoverflow.com/q/60174
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/43667709
linked to: http://stackoverflow.com/q/12859942
favorite count: 0
tagged with: ajax

http://stackoverflow.com/q/27594493
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/43612773
tagged with: scope
has comment: http://stackoverflow.com/comment/118995980
answer count: 1
linked to: http://stackoverflow.com/q/5187530
has body: I need to set a local variable inside a for loop in a function, but part of the name of this var needs to be a string, more specifically an array index. See the example: function MyFunction () { var strings = ["first","second","third","fourth"]; for (var i = 0; i &lt; strings.length; i++) { var "My_" + strings[i] + "_var" = "Hi, I'm the " + strings[i] + " var!"; } } I know this is not the correct way, I'm just illustrating what I want to do. I've already tried using window[] or this[], but seems like the var becomes global.
favorite count: 0
has comment: http://stackoverflow.com/comment/43613009
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/5187530
upvote count: 1
has title: How can I set a local variable using a string?
has comment: http://stackoverflow.com/comment/43612986
score: 1
has answer: http://stackoverflow.com/a/27594546
type: Question
has comment: http://stackoverflow.com/comment/43612953

http://stackoverflow.com/a/27636801
has comment: http://stackoverflow.com/comment/43692893
has comment: http://stackoverflow.com/comment/43692661
score: 0
has comment: http://stackoverflow.com/comment/43693139
has comment: http://stackoverflow.com/comment/43693204
has comment: http://stackoverflow.com/comment/43692578
answers question: http://stackoverflow.com/q/27636678
type: Answer
has comment: http://stackoverflow.com/comment/43692625
has body: Install this chrome extension.It would give you path for titanium app automatically https://chrome.google.com/webstore/detail/jsonview/chklaanhfefbnpoihckbnefhakgolnmc?hl=en Thanks
has comment: http://stackoverflow.com/comment/43693022
has comment: http://stackoverflow.com/comment/43692557

http://stackoverflow.com/comment/43526370
type: AnswerComment
score: 0
type: Comment
has text: I know it's vague, just taking a stab at what he might be trying to do.
comment on: http://stackoverflow.com/a/27550107

http://stackoverflow.com/comment/43540544
type: QuestionComment
has text: What is the scope of `visible`?
score: 0
comment on: http://stackoverflow.com/q/27557098
type: Comment

http://stackoverflow.com/a/27594793
has body: The code in the plunker wasn't fine. The foundationDemoApp module was declared as angular.module('foundationDemoApp') instead of angular.module('foundationDemoApp', []) The html was pointing to a module called plunker as opposed to the foundationDemoApp module. After fixing those errors, the script actually loads. http://plnkr.co/edit/8cZEo6pnyjqjmqcUMqmX?p=preview
has comment: http://stackoverflow.com/comment/43613532
downvote count: 0
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27594558

http://stackoverflow.com/comment/43633662
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27605760
has text: I never worked with a local webserver, but i will try
type: Comment

http://stackoverflow.com/q/27512959
has comment: http://stackoverflow.com/comment/43456293
type: AnsweredQuestion
answer count: 6
type: Question
score: 0
accepted answer: http://stackoverflow.com/a/27513012
has comment: http://stackoverflow.com/comment/43456220
tagged with: arrays
has answer: http://stackoverflow.com/a/27513018
tagged with: javascript
has comment: http://stackoverflow.com/comment/43456395
has title: How are items being added to this javascript array here?
has answer: http://stackoverflow.com/a/27513121
has comment: http://stackoverflow.com/comment/43456361
has answer: http://stackoverflow.com/a/27512997
has answer: http://stackoverflow.com/a/27513206
has answer: http://stackoverflow.com/a/27513154
has comment: http://stackoverflow.com/comment/43456286
possible better answer: http://stackoverflow.com/a/27512997
has body: Looking at a beginner's javascript book and trying to understand a small browser program that builds a list with user input. The input box displays and enters strings as input until he just adds " " as an input. Then the list is shown in the browser. Here's the code: var userInput = " "; var namesArray = new Array(); while ( (userInput = prompt("Enter name", " ")) != " ") { namesArray[namesArray.length] = userInput; } namesArray.sort(); var namesList = namesArray.join("&lt;br /&gt;"); var listHolder = document.createElement('div'); var list = listHolder.innerHTML = namesList; document.body.appendChild(listHolder); I just don't have understanding of the way the author adds items to the array. Would someone care to explain how namesArray[namesArray.length] = userInput builds an array? Also here's a fiddle to try it out Thansk in advance!
has answer: http://stackoverflow.com/a/27513012

http://stackoverflow.com/q/27495075
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43421872
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43421884
tagged with: css
has comment: http://stackoverflow.com/comment/43421915
upvote count: 6
has comment: http://stackoverflow.com/comment/43422012
score: 6
has title: How to go to next line by pressing space at end of the current line in textarea
has comment: http://stackoverflow.com/comment/43421949
type: Question
has comment: http://stackoverflow.com/comment/43421984
has comment: http://stackoverflow.com/comment/43421944
tagged with: javascript
has comment: http://stackoverflow.com/comment/43421918
downvote count: 0
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/43421935
has body: My textarea is setup with these two relevant style attributes: white-space: pre-wrap; word-wrap: break-word; The functionality that i am trying to achieve is that when the user presses the space button enough times to reach the right edge of the textarea I want the cursor to move to the next line.
has comment: http://stackoverflow.com/comment/43422056
has answer: http://stackoverflow.com/a/27495410

http://stackoverflow.com/comment/43697737
type: QuestionComment
has text: Have you tried using $('.btnUser').on('click',function(){...})?
comment on: http://stackoverflow.com/q/27639480
score: 0
type: Comment

http://stackoverflow.com/q/27616888
duplicate of: http://stackoverflow.com/q/983267
score: 1
has comment: http://stackoverflow.com/comment/43655142
has comment: http://stackoverflow.com/comment/43655425
has comment: http://stackoverflow.com/comment/43655261
has answer: http://stackoverflow.com/a/27616958
type: Question
has body: I have the following very massive array: var arrayBig = {"count":31,"items":{"76":{"title":"office1","address":"&lt;p&gt;&lt;strong&gt;London&lt;\/strong&gt;&lt;\/p&gt;\r\n&lt;p&gt;Baker Str.&lt;\/p&gt;\r\n&lt;p&gt;Web site: &lt;a href=\"http:\/\/example.org\"&gt;http:\/\/example.org&lt;\/a&gt;&lt;\/p&gt;"},"57":{"title":....... etc. }.... And all I need is to get the first number in 'items', e.g. 76, with jQuery.
has comment: http://stackoverflow.com/comment/43655562
has comment: http://stackoverflow.com/comment/43655129
tagged with: javascript
has answer: http://stackoverflow.com/a/27616971
accepted answer: http://stackoverflow.com/a/27616971
has comment: http://stackoverflow.com/comment/43655225
linked to: http://stackoverflow.com/q/983267
answer count: 2
has title: Multidimensional array - how to get a value
upvote count: 1
tagged with: arrays
has comment: http://stackoverflow.com/comment/43655176
possible better answer: http://stackoverflow.com/a/27616958
favorite count: 0
has comment: http://stackoverflow.com/comment/43655154
type: AnsweredQuestion
downvote count: 0

angularjs
tags question: http://stackoverflow.com/q/27477496
tags question: http://stackoverflow.com/q/27538529
tags question: http://stackoverflow.com/q/27518989
tags question: http://stackoverflow.com/q/27516621
tags question: http://stackoverflow.com/q/27513462
tags question: http://stackoverflow.com/q/27487101
tags question: http://stackoverflow.com/q/27561608
tags question: http://stackoverflow.com/q/27549612
tags question: http://stackoverflow.com/q/27533682
tags question: http://stackoverflow.com/q/27570346
tags question: http://stackoverflow.com/q/27523588
tags question: http://stackoverflow.com/q/27588823
tags question: http://stackoverflow.com/q/27503277
tags question: http://stackoverflow.com/q/27491371
tags question: http://stackoverflow.com/q/27582672
tags question: http://stackoverflow.com/q/27529101
tags question: http://stackoverflow.com/q/27571424
tags question: http://stackoverflow.com/q/27531209
tags question: http://stackoverflow.com/q/27507453
tags question: http://stackoverflow.com/q/27578779
tags question: http://stackoverflow.com/q/27507651
tags question: http://stackoverflow.com/q/27591181
tags question: http://stackoverflow.com/q/27609359
tags question: http://stackoverflow.com/q/27611609
tags question: http://stackoverflow.com/q/27617278
tags question: http://stackoverflow.com/q/27547644
tags question: http://stackoverflow.com/q/27633426
tags question: http://stackoverflow.com/q/27574909
tags question: http://stackoverflow.com/q/27622837
tags question: http://stackoverflow.com/q/27596187
tags question: http://stackoverflow.com/q/27531531
tags question: http://stackoverflow.com/q/27536484
tags question: http://stackoverflow.com/q/27582950
tags question: http://stackoverflow.com/q/27606994
tags question: http://stackoverflow.com/q/27604479
tags question: http://stackoverflow.com/q/27633195
tags question: http://stackoverflow.com/q/27535356
tags question: http://stackoverflow.com/q/27638909
tags question: http://stackoverflow.com/q/27538480
tags question: http://stackoverflow.com/q/27565054
tags question: http://stackoverflow.com/q/27547886
tags question: http://stackoverflow.com/q/27514036
tags question: http://stackoverflow.com/q/27490356
tags question: http://stackoverflow.com/q/27538321
tags question: http://stackoverflow.com/q/27487179
tags question: http://stackoverflow.com/q/27543411
tags question: http://stackoverflow.com/q/27634863
tags question: http://stackoverflow.com/q/27526951
tags question: http://stackoverflow.com/q/27597446
tags question: http://stackoverflow.com/q/27505898
tags question: http://stackoverflow.com/q/27559112
tags question: http://stackoverflow.com/q/27546830
tags question: http://stackoverflow.com/q/27544965
tags question: http://stackoverflow.com/q/27594846
tags question: http://stackoverflow.com/q/27632152
tags question: http://stackoverflow.com/q/27625878
tags question: http://stackoverflow.com/q/27596805
tags question: http://stackoverflow.com/q/27528628
tags question: http://stackoverflow.com/q/27592606
tags question: http://stackoverflow.com/q/27625257
tags question: http://stackoverflow.com/q/27611627
tags question: http://stackoverflow.com/q/27535260
tags question: http://stackoverflow.com/q/27483014
tags question: http://stackoverflow.com/q/27549949
tags question: http://stackoverflow.com/q/27618197
tags question: http://stackoverflow.com/q/27635219
tags question: http://stackoverflow.com/q/27579297
tags question: http://stackoverflow.com/q/27605014
tags question: http://stackoverflow.com/q/27533196
tags question: http://stackoverflow.com/q/27491617
tags question: http://stackoverflow.com/q/27602333
tags question: http://stackoverflow.com/q/27540596
tags question: http://stackoverflow.com/q/27528426
tags question: http://stackoverflow.com/q/27519554
tags question: http://stackoverflow.com/q/27520188
tags question: http://stackoverflow.com/q/27545865
tags question: http://stackoverflow.com/q/27606595
tags question: http://stackoverflow.com/q/27618416
tags question: http://stackoverflow.com/q/27531745
tags question: http://stackoverflow.com/q/27476443

http://stackoverflow.com/a/34113220
upvote count: 2
answers question: http://stackoverflow.com/q/27555729
has body: I had a similar problem but came up with a solution which uses a while loop which forces the script to wait until at least 1 extra column or 1 extra row has been added. So for this to work the formula needs to add data to at least one extra cell other than the one containing the formula, and it needs to extend the sheet's data range (number of rows or columns), for example by adding the formula to the end of the sheet, which looks like what you are doing. Every 0.5 seconds for 10 seconds it checks if extra cells have been added. dataSheet.getRange(5, 4).setValue(ticker); var wait = 0; var timebetween = 500; var timeout = 10000; var lastRow = dataSheet.getLastRow(); var lastColumn = dataSheet.getLastColumn(); while (dataSheet.getLastColumn() &lt;= lastColumn &amp;&amp; dataSheet.getLastRow() &lt;= lastRow){ Utilities.sleep(timebetween); wait += timebetween; if (wait &gt;= timeout){ Logger.log('ERROR: Source data for ' + ticker + ' still empty after ' + timeout.toString() + ' seconds.'); throw new Error('Source data for ' + ticker + ' still empty after ' + timeout.toString() + ' seconds.'); } }
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/comment/43489200
comment on: http://stackoverflow.com/a/27528858
has text: I finally got it: `first.addEventListener("click", function(){ Bold.call(first, first, true); }); ` I don't know what the first `first ` means but it works so it's ok ahah
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/43562966
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27568713
type: Comment
has text: Your function can be reduced to `var cmp = function { var f = 0 + ( a[0] == b[0] ); return a[f] - b[f]; };` but this isn't as fast as yours. Your answer is better for general purposes, my reduced version is better for minimification of code.

http://stackoverflow.com/a/27490941
has comment: http://stackoverflow.com/comment/43413924
answers question: http://stackoverflow.com/q/27490581
downvote count: 0
type: Answer
upvote count: 2
has body: You need to use setInterval to call your code every second, so move it outside of the bigger() function. Also you need the full value for style, including the unit you're using. try this JS Functions
score: 2
has comment: http://stackoverflow.com/comment/43413687

http://stackoverflow.com/a/27545012
type: Answer
score: 0
answers question: http://stackoverflow.com/q/27544922
has body: You could run a JavaScript function to check all of fields have a value. If they don't you could .show() an element with the warning message. Example function from here: function validateForm() { var isValid = true; $('.form-field').each(function() { if ( $(this).val() === '' ) isValid = false; }); return isValid; }

http://stackoverflow.com/a/27586388
score: 1
has body: Do this &lt;div id="MyDiv" runat="server"&gt;&lt;/div&gt; You must have the runat="server" attribute in your DIV tag. Then it becomes a server side control. Thus you'll be able to call it by it's ID as follows in your code behind. MyDiv.InnerText = Response.Write('Wrong Password'); All the best learning ASP.Net and C#
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27586326
answers question: http://stackoverflow.com/q/27586326
type: Answer
downvote count: 0

http://stackoverflow.com/comment/43441081
score: 0
has text: Scroll down to the bottom of index.html. And I'm just following what the tutorial says.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27505245

http://stackoverflow.com/comment/43549112
type: AnswerComment
score: 0
type: Comment
has text: I am talking about customer id which in my mysql database we can say customer code which I have entered while storing customer information
comment on: http://stackoverflow.com/a/27561643

http://stackoverflow.com/q/27623288
tagged with: margin
has answer: http://stackoverflow.com/a/27623692
has comment: http://stackoverflow.com/comment/43668175
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43668111
has comment: http://stackoverflow.com/comment/43667799
type: Question
has body: I use this javascript in order to make 2 divs the same height, based on the content. However when i make the screen smaller the content of div 1 goes underneath div 2 (tried IE and FF). In other words div 1 does not stretch. However when i change the screen size and make it smaller really quick the div does stretch. When I refresh the div with a screen size below 1024px and resize it does stretch until i made the screen size above 1024 and below 1024 again. This all is a bit fuzzy (maybe), but i made this vid to clear things out: https://www.youtube.com/watch?v=lxe7Lr4Jt0s Also see it live here: http://jsfiddle.net/evvwhosz/ or here: http://goo.gl/41IRWm I found that javascript is causing this, for this reason i am trying to remove the javascript (margins) when the screen gets resized below 1024px, but its not working so far. As you can see I really put in some effort to state my problem;) This is because I am searching for a solution for so long already. Please, who can help me out? The code is presented below: This div is longer than the right one. This div is longer than the right one. This div is longer than the right one. This div is longer than the right one. This div is longer than the right one. This div is longer than the right one. This div is longer than the right one. This div is longer than the right one. This div is longer than the right one. This div is longer than the right one. This div is longer than the right one. This div is longer than the right one.LAST Div 2.
has comment: http://stackoverflow.com/comment/43667170
has comment: http://stackoverflow.com/comment/43667792
has title: Remove javascript function when resizing screen?
has comment: http://stackoverflow.com/comment/43669609
has comment: http://stackoverflow.com/comment/43667095
tagged with: javascript
tagged with: resize
has answer: http://stackoverflow.com/a/27623411
has comment: http://stackoverflow.com/comment/43669338
answer count: 3
has answer: http://stackoverflow.com/a/27623677
has comment: http://stackoverflow.com/comment/43667262

http://stackoverflow.com/q/27493172
has comment: http://stackoverflow.com/comment/43426826
tagged with: node.js
tagged with: strongloop
has comment: http://stackoverflow.com/comment/43423306
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/43425909
tagged with: https
type: Question
has body: Earlier I asked a question about what was causing a particular delay in node.js: 150ms delay in performing a HTTPS versus HTTP get request in Node Unsatisfied with some of the answers I received, I decided to try to figure it out myself. I came across StrongLoop api server and decided to try it out just by chance. The result was that it fixed the delay! But I do not have any clue why and what is going on! I would like to know what could possibly be causing this blockage in vanilla node, and why running strongloop fixes it. Here is my test code: var https = require('https'); var http = require('http') console.time("Stage1"); console.time("Stage2"); console.time("Response"); console.time("End"); var options = { hostname: 'www.google.com', method: 'GET' } function request() { console.timeEnd("Stage1"); var req = https.request(options, function(res) { res.on('data', function (chunk) { buffer =+ chunk; }); res.on('end', function () { console.timeEnd("End"); }); }).on('response', function () { console.timeEnd("Response"); }); console.timeEnd("Stage2"); req.end(); } request(); This is what it looks like when I run it in vanilla node.js: C:\Users\Jonathan\Desktop&gt;node test Stage1: 0ms Stage2: 148ms Response: 425ms End: 537ms And this is what it looks like running in SLC: C:\Users\Jonathan\Desktop&gt;slc run test INFO strong-agent not profiling, StrongOps configuration not found. Generate configuration with: npm install -g strongloop slc strongops See http://docs.strongloop.com/strong-agent for more information. supervisor running without clustering (unsupervised) Stage1: 0ms Stage2: 10ms Response: 274ms End: 387ms What is going on??? Why does vanilla node take an additional 100+ ms to perform the https.response() function? What is causing this blockage? PS. I am somewhat confident that it is within the node.js core as Process Monitor shows no file or network reads causing this significant of a delay. EDIT: Additional Info: Yes, I am using the latest version of node, and …
tagged with: javascript
linked to: http://stackoverflow.com/q/27372129
has comment: http://stackoverflow.com/comment/43425998
answer count: 1
downvote count: 0
has title: What is the meaning of this??? Vanilla Node.js I/O blockage clears up when I use strongloop controller API?
has answer: http://stackoverflow.com/a/27495795
favorite count: 0
tagged with: blocking
type: UnansweredQuestion

http://stackoverflow.com/comment/43436389
has text: You have an Object, not a "JSON Object".
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27503113
score: 0

http://stackoverflow.com/comment/43557689
has text: Should this be changed from second to third? ---> subElement.second && subElement.second.length
type: AnswerComment
comment on: http://stackoverflow.com/a/27538380
type: Comment
score: 0

http://stackoverflow.com/comment/43663467
type: QuestionComment
has text: Searching for a matching question is not that easy. But it is also not helpful to answer it over and over again, because someone else having the same problem wont find your question either, as neither the title nor the text will match. That's why I just answered it as a comment.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27621385

amazon-cognito
tags question: http://stackoverflow.com/q/27499629
tag name: amazon-cognito
type: Tag

http://stackoverflow.com/a/27550653
accepted answer of: http://stackoverflow.com/q/27531209
answers question: http://stackoverflow.com/q/27531209
score: 0
type: AcceptedAnswer
type: Answer
has body: After some investigation I managed to find a solution to my initial problem. Even if SoluableNonagon answer's work, I am going to post another way of dealing with my problem. The idea is pretty similar to my second attempt of recompiling the template but I was probably missing something so here is the complete working code: Directives: app.directive('exerciseTemplate', function(){ return{ restrict: 'E', scope: true, templateUrl: '/exercise-template.html' }; }); app.directive('qText', ['$compile', '$timeout', function($compile, $timeout){ return { restrict: 'E', link: function(scope, element, attrs){ $timeout(function(){ var output = element.html().replace(/\[[0-9]\]/g, '&lt;input type="text" ng-model="answers"&gt;'); element.html(output); $compile(element.contents())(scope); }); } } }]); exercise-template.html: &lt;q-text ng-bind-html="parseHtml(question.d.q)"&gt;&lt;/q-text&gt; This will get the inner HTML of &lt;q-text&gt;&lt;/q-text&gt; and pass it to the link function of the directive. Then I use the html() function of jQLite to retrieve the HTML and replace each gap with an input, after this I just have to put back the HTML in the element and recompile the template. After that every single input will be binded with the "answers" variable through the ng-model directive. I had to use $timeout because otherwise, the html() method was returning null, probably because the DOM was not yet ready. No idea if this is a good practise or not, but it's the only way I could find to make it work. Any suggestion or recommendation would be very appreciated.

http://stackoverflow.com/q/27565913
has comment: http://stackoverflow.com/comment/43556824
tagged with: ajax
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43556981
has comment: http://stackoverflow.com/comment/43556819
tagged with: reload
has answer: http://stackoverflow.com/a/27566271
has body: How to implement the following in JavaScript or so? - Wait 120 seconds - Open http://192.168.1.1/internet-disconnect (in an iframe or so, doesn't matter) - Wait 3 seconds - Open http://192.168.1.1/internet-connect - Repeat Here's how I was trying: But it's messy and doesn't work the way it should. Thanks!
type: Question
has answer: http://stackoverflow.com/a/27566824
tagged with: javascript
has title: Auto-reload TWO pages alternatingly
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/43557139

http://stackoverflow.com/comment/43684440
comment on: http://stackoverflow.com/a/27632022
score: 0
type: AnswerComment
type: Comment
has text: is $stateful something new in 1.3? Just started noticing it but only recently and have used angular back to about 1.04

http://stackoverflow.com/q/27538919
has title: Mocha callback test omitted
accepted answer: http://stackoverflow.com/a/27538968
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27538968
tagged with: coffeescript
type: Question
has body: describe 'app', -&gt; it 'should be called by 2', (done) -&gt; f 1, (x) -&gt; console.log 'Hi, callback!' (x).should.eql 2 done() f = (x, g) -&gt; setTimeout g, 5000, x The test above was run, but the console didn't log, so the callback was omitted, the test faked passing. Why did Mocha #done not wait for the delayed callback?
tagged with: javascript
tagged with: mocha.js
score: 0
answer count: 1

http://stackoverflow.com/comment/43532448
comment on: http://stackoverflow.com/q/27553078
type: Comment
type: QuestionComment
has text: Let's see what you've tried so far.
score: 0

http://stackoverflow.com/comment/43572523
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27573406
has text: @ChidiOkeh It looks like you're trying to fix a symptom with the change to `\n`, not the problem itself. Usually firebug also shows a line number (which is clickable). If you check there, perhaps you can find which problem is causing this error. The use of ` ` for new lines in HTML is correct though.
type: AnswerComment

http://stackoverflow.com/comment/43682117
has text: I hope you got an idea.
comment on: http://stackoverflow.com/q/27630657
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27548637
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/27545801
has body: I was using the CDNJS link on the website, which was only version 1.4.0 Did not think it was a couple of versions old.
downvote count: 0

http://stackoverflow.com/a/27614187
answers question: http://stackoverflow.com/q/27614084
has body: Test the order variable in the click handlers, not when binding them. document.getElementById("number0").onclick = function() { if (order == false) { a = parseInt(document.getElementById("number0").innerHTML, 0); console.log("a is " + a); order = true; } else { b = parseInt(document.getElementById("number0").innerHTML, 0); console.log("b is " + b); } }
score: 0
type: Answer

http://stackoverflow.com/q/27537123
score: 0
has comment: http://stackoverflow.com/comment/43503388
type: UnansweredQuestion
has title: Assigning events using Jquery not working in Firefox
has body: I have jquery-1.8.3.js referenced. &lt;script type="text/javascript"&gt; function Assign() { $(".evo").click(function () { showit(this, 'dvEvent'); }); } $(document).ready(Assign); function showit(caller, dv) { alert('has been called'); } &lt;/script&gt; On a asp.net page I have a Gridview inside an UpdatePanel. Each row in the GridView has a hyperlink in it (with NavigateUrl="#") with a CssClass of 'evo'. When I run the page using Internet Explorer and click on any of the hyperlinks in the table (generated by the gridView) that have a class of 'evo' - the function showit() is called and the alert shows. But in Firefox when I click the links nothing happens. What do I need to do to get this working in Firefox? Thanks for any help.
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27538098
has comment: http://stackoverflow.com/comment/43502692
tagged with: asp.net

http://stackoverflow.com/q/27530456
answer count: 1
favorite count: 0
has title: How to add hovers for amCharts Guides?
has comment: http://stackoverflow.com/comment/43489428
has answer: http://stackoverflow.com/a/27540527
type: AnsweredQuestion
tagged with: amcharts
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/43489697
type: Question
has body: In amCharts Area Chart, is it possible to add Balloon for the Guides similar to below? The requirement is to show more information about vertical line when user hovers over it.
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27540527
downvote count: 0

http://stackoverflow.com/a/27532362
answers question: http://stackoverflow.com/q/27532282
type: Answer
has body: Try moving the onClick to the hyperlink but be sure to return true from the function (or create a new JS function that calls _gaq.push and then return true from that) so the click results in the link being followed.
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27532282

http://stackoverflow.com/a/27573417
answers question: http://stackoverflow.com/q/27572921
has comment: http://stackoverflow.com/comment/43573100
has comment: http://stackoverflow.com/comment/43573215
has comment: http://stackoverflow.com/comment/43572949
has comment: http://stackoverflow.com/comment/43573154
has comment: http://stackoverflow.com/comment/43573149
has comment: http://stackoverflow.com/comment/43573177
downvote count: 0
has body: Look at this line: script.src = url.replace('callback=?', 'callback=' + ud); It replaces the callback placeholder in the URL with a unique callback name. Now look at your URL: 'https://api.angel.co/1/search?query=barack&amp;type=User' You didn't put a callback placeholder in it. The replacement replaces nothing, and the service responds with JSON instead of JSONP. That is why it doesn't work. You need to include callback=? in your query string.
has comment: http://stackoverflow.com/comment/43573277
has comment: http://stackoverflow.com/comment/43573194
has comment: http://stackoverflow.com/comment/43573257
type: Answer
has comment: http://stackoverflow.com/comment/43573079
has comment: http://stackoverflow.com/comment/43573195
has comment: http://stackoverflow.com/comment/43573374
score: 1
has comment: http://stackoverflow.com/comment/43573868
upvote count: 1
has comment: http://stackoverflow.com/comment/43573321
has comment: http://stackoverflow.com/comment/43572967
has comment: http://stackoverflow.com/comment/43573362
has comment: http://stackoverflow.com/comment/43573223

http://stackoverflow.com/q/27622444
has comment: http://stackoverflow.com/comment/43665462
has answer: http://stackoverflow.com/a/27622682
score: 2
upvote count: 2
type: Question
type: AnsweredQuestion
has body: UPDATE - Thanks for all the great answers and incredibly fast response. I've learned a great deal from the suggested solutions. I ultimately chose the answer I did because the outcome was exactly as I asked, and I was able to get it working in my application with minimal effort - including the search function. This site is an invaluable resource for developers. Probably a simple task, but I can't seem to get this working nor find anything on Google. I am a Javascript novice and complex JSON confuses the hell out of me. What I am trying to do is make a PhoneGap Application (Phone Directory) for our company. I'll try to explain my reasoning and illustrate my attempts below. I have JSON data of all of our employees in the following format: [ { "id":"1", "firstname":"John", "lastname":"Apple", "jobtitle":"Engineer" }, { "id":"2", "firstname":"Mark", "lastname":"Banana", "jobtitle":"Artist" }, ... and so on ] The mobile framework (Framework 7) that I am using offers a "Virtual List" solution which I need to take advantage of as our directory is fairly large. The virtual list requires you to know the exact height of each list item, however, you can use a function to set a dynamic height. What I am trying to do is create "headers" for the alphabetical listing based on their last name. The JSON data would have to be restructured as such: [ { "title":"A" }, { "id":"1", "firstname":"John", "lastname":"Apple", "jobtitle":"Engineer" }, { "title":"B" }, { "id":"2", "firstname":"Mark", "lastname":"Banana", "jobtitle":"Artist" }, ... and so on ] I've been able to add key/value pairs to existing objects in the data using a for loop: var letter, newLetter; for(var i = 0; i &lt; data.length; i++) { newLetter = data[i].lastname.charAt(0); if(letter != newLetter) { letter = newLetter data[i].title = letter; } } This solution changes the JSON, thus outputting a title bar that is connected to the list item (the virtual list only accepts ONE &lt;li&gt;&lt;/li&gt; so the header bar is a di…
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/43665557
has title: Loop Through JSON, Insert Key/Value Between Objects?
answer count: 3
has answer: http://stackoverflow.com/a/27622600
downvote count: 0
possible better answer: http://stackoverflow.com/a/27622574
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27622574
favorite count: 0
has comment: http://stackoverflow.com/comment/43665609
accepted answer: http://stackoverflow.com/a/27622600
has comment: http://stackoverflow.com/comment/43665552

http://stackoverflow.com/q/27545701
has title: HTML update lag when Angular $scope variable changed
has comment: http://stackoverflow.com/comment/43518142
type: Question
has comment: http://stackoverflow.com/comment/43518088
has body: I have an http request that grabs some data and applies it to a $scope variable: $http.post("/api/division", 1).success(function(data){ $scope.division = data; }); Now in my HTML I iterate through that data and display various bits of information, for example: &lt;div data-ng-repeat="player in division"&gt; &lt;div&gt;{{player.name}}&lt;/div&gt; &lt;div&gt;{{player.number}}&lt;/div&gt; &lt;div&gt;{{player.score}}&lt;/div&gt; &lt;/div&gt; This works great. Now, I have a link that triggers a function to get a new set of data and bind it to the same $scope variable so the frontend will update with new information. Get Division $scope.getDivision = function(){ $http.post("/api/division", 2).success(function(data){ $scope.division = data; }); } Now, the front end does update with the new information, but there seems to be a lag of 5-10 seconds between the data successfully coming back and the HTML updating. So the problem isn't with the speed of the server. Is it something to do with needing to $emit or $broadcast the change to the variable? How can I get rid of the lag?
tagged with: javascript
tagged with: scope
has comment: http://stackoverflow.com/comment/43518157
has comment: http://stackoverflow.com/comment/43518052
score: 0
has comment: http://stackoverflow.com/comment/43518375
tagged with: angularjs
has comment: http://stackoverflow.com/comment/43518011
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43518281
answer count: 0
has comment: http://stackoverflow.com/comment/43519099
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43518259

http://stackoverflow.com/comment/43661516
type: Comment
has text: I am getting alert, but my menu is not getting displayed. If I have error I may not get alert also rite
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27620393

http://stackoverflow.com/a/27591850
score: 1
answers question: http://stackoverflow.com/q/27590399
upvote count: 1
type: Answer
has body: There are at least two errors in the example code. Firstly, when you add the object to the javascript window, you call it "pyBridge", but you then try to reference it in the javascript as "bridgeObj". Obviously, this will throw a ReferenceError which will prevent any further execution of the script. Secondly, the doStuff method is missing a self argument, which will cause a TypeError to be raised by PySide. Dealing with those two issues should be enough to fix your example code, so long as you make sure that the bridge object is added to the javacsript window before the html is loaded. This step is required if you want to reference the bridge object in top-level javascript code. However, if the bridge object is only ever referenced in function-level code, it can be safely added to the javascript window after the html has loaded.
downvote count: 0
has comment: http://stackoverflow.com/comment/43623511

http://stackoverflow.com/q/27566231
answer count: 5
has title: Breaking 10 td's in set of 5 inside tr
upvote count: 4
has answer: http://stackoverflow.com/a/27566521
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/43557791
type: Question
tagged with: javascript
tagged with: jquery
score: 4
accepted answer: http://stackoverflow.com/a/27566497
possible better answer: http://stackoverflow.com/a/27566428
has answer: http://stackoverflow.com/a/27566656
has answer: http://stackoverflow.com/a/27566428
has answer: http://stackoverflow.com/a/27569982
tagged with: http://stackoverflow.com/tag/html
has body: I am getting a page from external site where i have no control. Now the table has something like this: I am getting this all TD's in all one line. now with jquery I want to fix this, with every 5 counts of TD, it should add the closing and add a opening and the remaining TD's should come inside them Trying some like this: if($("#container").find("table>tbody>tr>td").length <=5)){ do the breaking here } Here is an Update, i forgot to mention: the first row always rows always contain the lables within td's and the second reow always contain the data, i tried something like this: $('#mypahe form table>tbody>tr:odd').each(function(){ $(' ').insertAfter(this).append($('>:gt(4)',this)) }); but it started with the labels all on the same line and in the below part, it break the tr into two tr's I Updated question where the code I tried and U gave works only on the first portion and it never works on second tr
has comment: http://stackoverflow.com/comment/43562428
has answer: http://stackoverflow.com/a/27566497
favorite count: 0

http://stackoverflow.com/a/27563534
has body: Perhaps the best option is to use json-schema. You have implementations in a lot of languages. I have used tv4 in javascript with success. In order to integrate with couch db I think the best option is to define a validation function and make use of the json-schema javascript validator.
has comment: http://stackoverflow.com/comment/43554154
answers question: http://stackoverflow.com/q/27563402
has comment: http://stackoverflow.com/comment/43553846
score: 0
type: Answer

http://stackoverflow.com/comment/43654766
comment on: http://stackoverflow.com/q/27616592
type: QuestionComment
score: 3
has text: Where is the `element having box class`?
type: Comment

http://stackoverflow.com/q/27521412
type: Question
has comment: http://stackoverflow.com/comment/43472456
score: 0
tagged with: css
answer count: 1
tagged with: affix
has comment: http://stackoverflow.com/comment/43472298
has body: I have used the affix property to fix the div in a particular pixels from top but this is not working out for me.The sidebar is not fixed out here Here is the code I am using Adolescent gynecology Breast evaluation Birth control/emergency contraception Endometriosis Fibroids HPV vaccination Infertility Menopause and hormonal issues Menstrual problems Minimally invasive surgical approaches Normal and abnormal Pap smears Polycystic ovarian syndrome Premenstrual syndrome Sexual dysfunction Sexually transmitted diseases Vaginitis Urinary and fecal incontinence Advanced laparoscopy Colposcopy services Gynecology surgical procedures Need to know more? Css I used for the above code #sidebar .affix{ top:10px; position:fixed;} Javascript Used $(document).ready(function(){ jQuery("#sidebar").affix({ offset: { top: 700 } }); $("#sidebar").on('affixed.bs.affix', function(){ alert("The left navigation menu has been affixed. Now it doesn't scroll with the page."); }); });
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27521512
tagged with: http://stackoverflow.com/tag/html
has title: Fixing the div of page using affix

http://stackoverflow.com/q/27479538
has title: Block the ui after expanding a collapsible div
tagged with: twitter-bootstrap
has body: In my application I am making ajax call to get some data. I am showing a spinner and blocking the ui by the following code: function myFunction() { $(".spinner").show(); $('#shadow').addClass('blocker'); setTimeout(function() { $(".spinner").hide(); $('#shadow').removeClass('blocker'); }, 3000); } .spinner { position: absolute; right: 45%; bottom: 50%; z-index: 9999; } .shadow { z-index: 900 } .blocker { z-index: 1000; height: 100%; width: 100%; background: #000000; opacity: 0.3; left: 0; top: 0; position: absolute; } Try it 1. What is HTML? 1Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2. What is Twitter Bootstrap? 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 3. What is CSS? 3Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div 2Div Loading... This code working fine till I expend a link. If I hit button after expending any link then the black layer not taking full height of the page. Steps to reproduce:- expend any link hit button scroll down to see the issue. I tried to user overflow property but no luck. How can the black layer take full height in all cases (with link expend)?
tagged with: css
has answer: http://stackoverflow.com/a/27479614
accepted answer: http://stackoverflow.com/a/27479614
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43392419
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43392421
score: 0

http://stackoverflow.com/a/27558873
type: AcceptedAnswer
has body: I was able to solve the issue using css file: the .html file is: the .js file is: // Create a new object based of the HTMLElement prototype var fonixDiv = Object.create(HTMLElement.prototype); // Set up the element. fonixDiv.createdCallback = function() { // Create a Shadow Root var shadow = this.createShadowRoot(); shadow.innerHTML = ' click '; shadow.addEventListener('click', function(e) { console.log('1: '+this.host.dataset.disabled); this.host.dataset.disabled='true'; // set Attribute to the custom element }); shadow.children.d.addEventListener('click', function(e) { this.textContent = "you clicked me :("; shadow.children[1].textContent="Shadow DOM content changed"; this.disabled=true; alert("All: button, text and host should be change"); }); }; // Register the new element. var Xfonix =document.registerElement('fonix-div', {prototype: fonixDiv}); var thehost = document.querySelector('#host1'); thehost.appendChild(new Xfonix()); the .css file is: body {background: #F7F7F7;} fonix-div { display: inline-block; width: 200px; height: 200px; float: left; margin: 0.5em; border-radius: 3px; background: #FFF; box-shadow: 0 1px 3px rgba(0,0,0,0.25); font-family: Helvetica, arial, sans-serif; -webkit-font-smoothing: antialiased; } fonix-div:hover, fonix-div[data-disabled='true']:hover {background: red;} fonix-div:Active {background: green;} fonix-div[data-disabled='true'] {background: green;} fonix-div::shadow p{color: blue;} the output can be seen here:
type: Answer
accepted answer of: http://stackoverflow.com/q/27494513
score: 0
answers question: http://stackoverflow.com/q/27494513

http://stackoverflow.com/comment/43594885
type: Comment
comment on: http://stackoverflow.com/q/27585117
score: 0
type: QuestionComment
has text: Hehe.. I guess so. Wonder why it initially didn't work for me. Never mind.. it works indeed.

http://stackoverflow.com/q/27626168
has comment: http://stackoverflow.com/comment/43672821
has comment: http://stackoverflow.com/comment/43672910
has comment: http://stackoverflow.com/comment/43673431
has body: I am trying to get client mac address using JavaScript ActiveXObject On Windows 8 but it didn't work. actually it works fine on windows 7. Here is My Code: var obj = new ActiveXObject("WbemScripting.SWbemLocator"); var s = obj.ConnectServer("."); var properties = s.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration"); var e = new Enumerator(properties); var output; var outputTemp = ""; var Number6MacAddress = ""; var ReturnedMACAddresesses = ""; output = ' '; outputTemp = ''; output = output + ' Caption MACAddress '; var Counter = 0; while (!e.atEnd()) { e.moveNext(); var p = e.item(); if (!p) continue; output = output + ' '; output = output + ' ' + p.Caption; +' '; output = output + ' ' + p.MACAddress + ' '; //output = output + ' ' + p.Properties_[43].Value + ' '; output = output + ' '; } In Windows 7 it gives the following result: Notice That ID [00000007] detected Network card MACAddress Successfully and this what i am using. Caption MACAddress [00000001] WAN Miniport (IKEv2) null [00000002] WAN Miniport (L2TP) null [00000003] WAN Miniport (PPTP) null [00000004] WAN Miniport (PPPOE) null [00000005] WAN Miniport (IPv6) null [00000006] WAN Miniport (Network Monitor) null [00000007] Qualcomm Atheros AR8151 PCI-E Gigabit Ethernet Controller (NDIS 6.20) 50:E5:49:FC:4D:3F [00000008] WAN Miniport (IP) null [00000009] Microsoft ISATAP Adapter null [00000010] RAS Async Adapter null [00000011] Microsoft Teredo Tunneling Adapter null [00000012] Remote NDIS based Internet Sharing Device null [00000013] Microsoft ISATAP Adapter null But on Windows 8 it gives me the following result NOTICE: My Network Card is not on the list? I don't know why? Caption - MACAddress [00000001] - Microsoft Kernel Debug Network Adapter null [00000002] - Microsoft ISATAP Adapter null [00000003] - Microsoft Teredo Tunneling Adapter null any ideas?
has comment: http://stackoverflow.com/comment/43672923
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43673520
has comment: http://stackoverflow.com/comment/43673652
accepted answer: http://stackoverflow.com/a/27626620
has comment: http://stackoverflow.com/comment/43673586
type: Question
has comment: http://stackoverflow.com/comment/43673501
tagged with: c#
has comment: http://stackoverflow.com/comment/43673618
has comment: http://stackoverflow.com/comment/43673194
tagged with: javascript
has answer: http://stackoverflow.com/a/27626620
score: 0
has comment: http://stackoverflow.com/comment/43673544
has comment: http://stackoverflow.com/comment/43673518
has comment: http://stackoverflow.com/comment/43672816
answer count: 1
has title: Cannot detect client mac address using Javascript ActiveXObject On Windows 8
tagged with: asp.net

google-chrome
tags question: http://stackoverflow.com/q/27558283
tags question: http://stackoverflow.com/q/27499994
tags question: http://stackoverflow.com/q/27515557
tags question: http://stackoverflow.com/q/27535390
tags question: http://stackoverflow.com/q/27481937
tags question: http://stackoverflow.com/q/27482427
tags question: http://stackoverflow.com/q/27576701
tags question: http://stackoverflow.com/q/27618126
tags question: http://stackoverflow.com/q/27477531
tags question: http://stackoverflow.com/q/27520255
tags question: http://stackoverflow.com/q/27523871
tags question: http://stackoverflow.com/q/27628145
tags question: http://stackoverflow.com/q/27555516
tags question: http://stackoverflow.com/q/27624895
tags question: http://stackoverflow.com/q/27519726
tags question: http://stackoverflow.com/q/27494063
tags question: http://stackoverflow.com/q/27518034
tags question: http://stackoverflow.com/q/27603362
tags question: http://stackoverflow.com/q/27574012
tags question: http://stackoverflow.com/q/27619779
tags question: http://stackoverflow.com/q/27533631
tags question: http://stackoverflow.com/q/27596825
tags question: http://stackoverflow.com/q/27553888
tags question: http://stackoverflow.com/q/27518279
tags question: http://stackoverflow.com/q/27578071
tags question: http://stackoverflow.com/q/27578307
tags question: http://stackoverflow.com/q/27613855
tags question: http://stackoverflow.com/q/27474930
tags question: http://stackoverflow.com/q/27603878
tags question: http://stackoverflow.com/q/27565909
tags question: http://stackoverflow.com/q/27622032
tags question: http://stackoverflow.com/q/27484262
tags question: http://stackoverflow.com/q/27546549
tags question: http://stackoverflow.com/q/27561681
tags question: http://stackoverflow.com/q/27528867
tags question: http://stackoverflow.com/q/27583246
tags question: http://stackoverflow.com/q/27608777
tags question: http://stackoverflow.com/q/27632086
tags question: http://stackoverflow.com/q/27525213
tags question: http://stackoverflow.com/q/27531193
type: Tag
tags question: http://stackoverflow.com/q/27545169
tags question: http://stackoverflow.com/q/27484936
tags question: http://stackoverflow.com/q/27619780
tags question: http://stackoverflow.com/q/27524540
tags question: http://stackoverflow.com/q/27493715
tags question: http://stackoverflow.com/q/27635393
tags question: http://stackoverflow.com/q/27616875
tags question: http://stackoverflow.com/q/27575818
tags question: http://stackoverflow.com/q/27515117
tags question: http://stackoverflow.com/q/27496465
tags question: http://stackoverflow.com/q/27624601
tag name: google-chrome
tags question: http://stackoverflow.com/q/27559939
tags question: http://stackoverflow.com/q/27630672
tags question: http://stackoverflow.com/q/27611269
tags question: http://stackoverflow.com/q/27488390
tags question: http://stackoverflow.com/q/27541467
tags question: http://stackoverflow.com/q/27502253
tags question: http://stackoverflow.com/q/27514404
tags question: http://stackoverflow.com/q/27525530
tags question: http://stackoverflow.com/q/27582788
tags question: http://stackoverflow.com/q/27520368
tags question: http://stackoverflow.com/q/27598902
tags question: http://stackoverflow.com/q/27626588
tags question: http://stackoverflow.com/q/27630652
tags question: http://stackoverflow.com/q/27545766
tags question: http://stackoverflow.com/q/27615396
tags question: http://stackoverflow.com/q/27619583
tags question: http://stackoverflow.com/q/27625559
tags question: http://stackoverflow.com/q/27542186
tags question: http://stackoverflow.com/q/27483377
tags question: http://stackoverflow.com/q/27574223
tags question: http://stackoverflow.com/q/27475866
tags question: http://stackoverflow.com/q/27598612
tags question: http://stackoverflow.com/q/27541341
tags question: http://stackoverflow.com/q/27483265
tags question: http://stackoverflow.com/q/27516589
tags question: http://stackoverflow.com/q/27530110
tags question: http://stackoverflow.com/q/27629363

http://stackoverflow.com/comment/43678118
has text: splicing in a loop like that is bad news
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27628460

enyo
tags question: http://stackoverflow.com/q/27538182
tags question: http://stackoverflow.com/q/27604476
type: Tag
tag name: enyo
tags question: http://stackoverflow.com/q/27556505

mysql
tags question: http://stackoverflow.com/q/27491514
tags question: http://stackoverflow.com/q/27622594
tags question: http://stackoverflow.com/q/27540075
tags question: http://stackoverflow.com/q/27536272
tags question: http://stackoverflow.com/q/27630286
tags question: http://stackoverflow.com/q/27505197
tags question: http://stackoverflow.com/q/27572332
tags question: http://stackoverflow.com/q/27575442
tags question: http://stackoverflow.com/q/27489752
tags question: http://stackoverflow.com/q/27625533
tags question: http://stackoverflow.com/q/27547412
tag name: mysql
tags question: http://stackoverflow.com/q/27635336
tags question: http://stackoverflow.com/q/27560114
tags question: http://stackoverflow.com/q/27537927
tags question: http://stackoverflow.com/q/27604148
tags question: http://stackoverflow.com/q/27623587
tags question: http://stackoverflow.com/q/27611042
tags question: http://stackoverflow.com/q/27554520
tags question: http://stackoverflow.com/q/27561568
tags question: http://stackoverflow.com/q/27487124
tags question: http://stackoverflow.com/q/27478808
tags question: http://stackoverflow.com/q/27584293
tags question: http://stackoverflow.com/q/27506373
tags question: http://stackoverflow.com/q/27527641
tags question: http://stackoverflow.com/q/27513315
tags question: http://stackoverflow.com/q/27609565
tags question: http://stackoverflow.com/q/27552575
tags question: http://stackoverflow.com/q/27546504
tags question: http://stackoverflow.com/q/27561282
tags question: http://stackoverflow.com/q/27476919
tags question: http://stackoverflow.com/q/27548709
tags question: http://stackoverflow.com/q/27525083
tags question: http://stackoverflow.com/q/27578858
type: Tag
tags question: http://stackoverflow.com/q/27633108
tags question: http://stackoverflow.com/q/27509674
tags question: http://stackoverflow.com/q/27612163
tags question: http://stackoverflow.com/q/27569698
tags question: http://stackoverflow.com/q/27525913
tags question: http://stackoverflow.com/q/27513632
tags question: http://stackoverflow.com/q/27477046
tags question: http://stackoverflow.com/q/27609652
tags question: http://stackoverflow.com/q/27518708
tags question: http://stackoverflow.com/q/27603188
tags question: http://stackoverflow.com/q/27475074
tags question: http://stackoverflow.com/q/27488887
tags question: http://stackoverflow.com/q/27499309
tags question: http://stackoverflow.com/q/27546104
tags question: http://stackoverflow.com/q/27485839
tags question: http://stackoverflow.com/q/27615657
tags question: http://stackoverflow.com/q/27513252
tags question: http://stackoverflow.com/q/27538657

http://stackoverflow.com/q/27614312
has comment: http://stackoverflow.com/comment/43652318
answer count: 0
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43652101
has comment: http://stackoverflow.com/comment/43651496
has comment: http://stackoverflow.com/comment/43650953
tagged with: angularjs
type: Question
has comment: http://stackoverflow.com/comment/43651573
has comment: http://stackoverflow.com/comment/43652119
has body: I am new to angular. I have been trying to implement bootstrap accordian using 'ui.bootstrap'. Dynamic call working good when have ng-repeat in html as like below. {{group.content}} IsLoaded: {{isLoaded}} When i tried the same in static way like this Test1 Test cont1 IsLoaded: {{isLoaded}} Test2 Test cont2 IsLoaded: {{isLoaded}} '{{isLoaded}}' is not happening. My module controller is as below, var app = angular.module('test-accordion', ['ui.bootstrap']); function AccController($scope) { $scope.oneAtATime = true; $scope.groups = [ { title: "Test1", content: "Dynamic Group Body - 1", anyOldValue: true }, { title: "Test2", content: "Dynamic Group Body - 2", anyOldValue: false } ]; } function LoadingController($scope, $timeout) { $scope.$watch( 'group.anyOldValue', function(value) { if ( value && !$scope.isLoaded) { console.log('loading...'); $timeout(function() { // console.log('loaded'); $scope.isLoaded = '1'; }, 1000); } } ); } Please advice on why isLoaded is not working in static accordion?
score: 0
tagged with: http://stackoverflow.com/tag/json
has title: Angular Bootstrap accordian Dyanmic call not working

http://stackoverflow.com/q/27504434
linked to: http://stackoverflow.com/q/15664933
tagged with: javascript
favorite count: 0
linked to: http://stackoverflow.com/q/27503277
has comment: http://stackoverflow.com/comment/43442764
tagged with: angularjs
has title: Why is $timeout is needed for watch to trigger
has comment: http://stackoverflow.com/comment/43441720
has comment: http://stackoverflow.com/comment/43441120
linked to: http://stackoverflow.com/q/15604196
has answer: http://stackoverflow.com/a/27505302
score: 2
has answer: http://stackoverflow.com/a/27505376
downvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43441793
type: Question
has body: I have a directive that watches the height of an element. That element is updated by a controller that uses a factory method to get data. Unless I have a $timeout in that factory my watch never gets updated. Curious! Can anyone shed light onto why? My controller: $scope.update = function () { apiService.getLinks(function (response) { $scope.links = response; // If I try $scope.$apply() here it says its already in progress, as you'd expect }); } quickLinksServices.factory('quickLinksAPIService', function ($http, $timeout) { quickLinksAPI.getQuickLinks = function (success) { //without this the watch in the directive doesnt get triggered $timeout(function () { }, 100); $http({ method: 'JSON', url: '/devices/getquicklinkcounts' }).success(function (response) { quickLinksAPI.quicklinks = response; quickLinksAPI.saveQuickLinks(); success(response); }); } The directive I'm using is here
has comment: http://stackoverflow.com/comment/43442325
has comment: http://stackoverflow.com/comment/43438900
upvote count: 2
answer count: 2
has comment: http://stackoverflow.com/comment/43442386

http://stackoverflow.com/a/27569599
has comment: http://stackoverflow.com/comment/43564749
type: Answer
has comment: http://stackoverflow.com/comment/43564575
has body: Just replace your OnClientClick with the call to a function: &lt;asp:ImageButton ID="AddToCartBtn" runat="server" RowIndex='&lt;%# Container.DisplayIndex %&gt;' ImageUrl="~/Pictures/ShoppingCart.png" OnClick="AddToCartBtn_Click" OnClientClick="return Redirect();" /&gt; The JS function: function Redirect() { var result = confirm('Are you sure?'); // Do something with result. return true; // return true no matter what the user clicked. }
accepted answer of: http://stackoverflow.com/q/27569055
answers question: http://stackoverflow.com/q/27569055
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43564820

http://stackoverflow.com/comment/43429332
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27498888
has text: had you checked my answer ?

http://stackoverflow.com/a/27609371
type: Answer
has body: Use .off() to unbind the on click event. It should be something like: var marker; map.on('click', mapClicked); function mapClicked(e) { map.off('click', mapClicked); map.removeLayer(marker) marker = new L.Marker(e.latlng, { draggable: true }); marker.bindPopup("&lt;strong&gt;" + e.latlng + "&lt;/strong&gt;").addTo(map); marker.on('dragend', markerDrag); } I didn't test it but it should at least put you in the right direction.
downvote count: 1
has comment: http://stackoverflow.com/comment/43646025
upvote count: 5
score: 4
answers question: http://stackoverflow.com/q/27609294

http://stackoverflow.com/a/27491879
has body: Instead of keeping track of the selected box, you can scroll directly to it, like this: function goToBox(boxid){ $('body').animate({ scrollLeft: $(boxid).offset().left }, 500); }; You'll need to make some changes to your CSS. This removes scrollbars from the window: body { ... overflow: hidden; } You have 3 boxes, all of which are 100% wide. So your container should be 300% wide. Since overflow: hidden has been added to the body, it's no longer needed on the container: #container { ... width: 300%; } Your boxes are 1/3 the width of container, so they need 1/3 width. They no longer need absolute positioning, and float: left causes them to appear side-by-side: .box { ... width: 33.33%; height: 100%; float: left; } Finally, naw_wrap needs fixed positioning, so it stays visible while the body scrolls: #naw_wrap{ ... position: fixed; } Fiddle
has comment: http://stackoverflow.com/comment/43415968
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27491142
answers question: http://stackoverflow.com/q/27491142
upvote count: 2
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/43492910
comment on: http://stackoverflow.com/a/27532094
has text: thanks that was almost what I wanted but I can handle the rest :) if you celebrate, Merry Christmas :)
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/q/27501283
upvote count: 3
tagged with: sapui5
has comment: http://stackoverflow.com/comment/43471233
has comment: http://stackoverflow.com/comment/43470566
has answer: http://stackoverflow.com/a/27522399
has title: Implementing a Tiles layout with a component
has comment: http://stackoverflow.com/comment/43473632
type: AnsweredQuestion
tagged with: javascript
has comment: http://stackoverflow.com/comment/43441590
type: Question
linked to: http://stackoverflow.com/q/25051263
answer count: 1
accepted answer: http://stackoverflow.com/a/27522399
has body: I am trying to create a tile based layout using a component, in openui5. I am basing my code on the TileContainer sample at the ui5 explored site Edit: The component works, but the TileContainer/StandardTile code will not display. If I instantiate the view directly from Index.html, ignoring the component, the tiles display. If I use the Page control to wrap them in the view, it will not work. The List control, however, does display with the component, but not if I also use the Page control to wrap the list. Are the Page and Tile controls not compatible? I've replaced my code with my current version, this should be better able to help others as it now more directly focuses on the problem of using the component with the Tile view, instead of simpler errors I had before which I've now solved. Edit: The problem has been resolved by using the control in the XML view. The tiles now display correctly. My index.html is: My Component.js is: jQuery.sap.require("sap.ui.core.UIComponent"); jQuery.sap.require("sap.ui.core.mvc.ViewType"); jQuery.sap.require("sap.m.Page"); jQuery.sap.declare("component.Component"); sap.ui.core.UIComponent.extend("component.Component", { metadata: { properties: { text: "string" } } }); component.Component.prototype.createContent = function(){ this.oView = sap.ui.xmlview({id:"view1", viewName:"view.Home"}); return this.oView; }; My Component.json is: { "name": "component.Component", "version": "0.1.0", "description": "Tiles Component" } My Home.view.xml is: <mvc:View height="100%" controllerName="view.Home" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m"> //ensure you use the App control, this fixed the problem for me. <StandardTile icon="sap-icon://{icon}" title="{title}" /> </mvc:View> My Home.controller.js is: sap.ui.controller("view.Home", { onInit : function (evt) { var sPath = jQuery.sap.getModulePath("data", "/tiles.json"); var oModel = new sap.ui.model.json.JSONModel(sPath); this.getView().setModel(oModel); } }); My tiles.json is: { "TileCollectio…
downvote count: 0
has comment: http://stackoverflow.com/comment/43471746
favorite count: 0
score: 3

http://stackoverflow.com/q/27560883
has comment: http://stackoverflow.com/comment/43547821
has answer: http://stackoverflow.com/a/27560959
tagged with: time
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27560998
has answer: http://stackoverflow.com/a/27560974
has body: i have a start Time and end time in string. i have split start time (time string format "05:30:00") var dateArray = data.start_time.split(":"); var firstHour = dateArray[0]; var firstMinutes = dateArray[1]; var firstSec = dateArray[2]; now i want to Add 80 minutes to this time and want generate a new time (push in a array) , then i want to add it again n again to a end time limit how it is possible?
type: Question
has title: How to add continuously some Minutes to the time string and generate new time
tagged with: javascript
score: 0
answer count: 3

http://stackoverflow.com/a/32570417
has comment: http://stackoverflow.com/comment/57666932
upvote count: 25
has comment: http://stackoverflow.com/comment/72751389
type: Answer
score: 25
accepted answer of: http://stackoverflow.com/q/27566314
has body: You should use: selectized[0].selectize.focus();
answers question: http://stackoverflow.com/q/27566314
has comment: http://stackoverflow.com/comment/75304932
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/27516836
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27516877
tagged with: jquery
favorite count: 0
tagged with: events
tagged with: css
has body: I have an un-ordered HTML list of images. Each Line (li) element has its own id: When I click each image I would like a larger version of the image to appear, sort of like this: Unfortunately the CSS class associated with #Demo3 does a lot of manipulation to the class associated with all #li elements, so I have to add the anchor in programmatically. I try doing it like this: i = 1; while ($("#li" + i).length > 0) { // If the li id exists myLink = "images/FT/Page" + i + ".jpg"; // create a link var element = document.getElementById("li" + i); // get the element element.onclick = function () { // create an onclick for this element var win = window.open(myLink, '_blank'); win.focus(); } i++; } This does not work! For whatever reason, each image gets the same onclick as the last one in the list. Does anyone know what I'm doing wrong or how to solve this so that each image contained within each li element gets its own onclick? Any other suggestions?
score: 2
type: AnsweredQuestion
has title: Creating several dynamic onclick events in Javascript / Jquery
upvote count: 2
has comment: http://stackoverflow.com/comment/43463846
has answer: http://stackoverflow.com/a/27516877
type: Question
possible better answer: http://stackoverflow.com/a/27516926
linked to: http://stackoverflow.com/q/5376431
has answer: http://stackoverflow.com/a/27516926
has comment: http://stackoverflow.com/comment/43463830
duplicate of: http://stackoverflow.com/q/750486
has comment: http://stackoverflow.com/comment/43474274
answer count: 2
downvote count: 0

http://stackoverflow.com/a/27539486
has comment: http://stackoverflow.com/comment/43525003
has body: I'm assuming that you're looking to make it so that you can change the value of the box (i.e. use backspace to erase the input and be able to enter a new value). With that in mind, here's the solution I devised. This checks whether there is a period in the box, then checks to see if the length of the substring after the period is larger than 2. If it is larger than 2 and the keycode of the most recent keypress is not backspace, then prevent that keypress. The second if statement checks to see if the key is not a number, backspace, or a period. If it isn't any of those, then prevent the keypress. $("#validate").keydown(function(e){ var pressedKey = (e.which || e.keycode); if (e.target.value.indexOf('.') &gt; -1 &amp;&amp; e.target.value.substr(e.target.value.indexOf('.')).length &gt; 2 &amp;&amp; pressedKey != 8) { e.preventDefault(); } if (((pressedKey &lt; 48 || pressedKey &gt; 57) &amp;&amp; (pressedKey &lt; 96 || pressedKey &gt; 105)) &amp;&amp; pressedKey != 8 &amp;&amp; pressedKey != 190) { e.preventDefault(); } }); http://jsfiddle.net/IronFlare/7xpLhhxa/1/
score: 0
has comment: http://stackoverflow.com/comment/45378831
answers question: http://stackoverflow.com/q/27539120
type: Answer
has comment: http://stackoverflow.com/comment/43507619

http://stackoverflow.com/comment/43410915
comment on: http://stackoverflow.com/a/27488108
score: 0
type: Comment
has text: do not forget to put `var` keyword before the `key` variable (i.e `var key = evt.keyCode;`), preventing the variable becoming global.
type: AnswerComment

http://stackoverflow.com/q/27581756
upvote count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/27582697
accepted answer: http://stackoverflow.com/a/27582697
has title: Making A Better Contact List Display with Javascript (CodeCademy)
favorite count: 0
has comment: http://stackoverflow.com/comment/43588060
has comment: http://stackoverflow.com/comment/43587993
has comment: http://stackoverflow.com/comment/43588045
has comment: http://stackoverflow.com/comment/43589876
has body: I'm having a hard time figuring out ways to make the output display in an organised manner. How could I change the output to make it look according to the picture? Ugly Display Nice Display MY CODE var friends = {}; friends.bill = { firstName: "Bill", lastName: "Wang", number: "0000000001", nationality: "Australian", address: ['Street','Microsoft','California','SL','98052'] }; friends.steve = { firstName: "Steve", lastName: "Wozniak", number: "0021221312", nationality: "American", address: ['Street','Apple','California','SL','98052'] }; var list = function(obj){ for(var check in obj){ console.log(check); } }; var search = function(name){ for(var prop in friends){ if(friends[prop].firstName === name) { console.log(friends[prop]); return friends[prop]; } } }; list(friends); search("Bill");
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27582307
downvote count: 0
has comment: http://stackoverflow.com/comment/43588031
has answer: http://stackoverflow.com/a/27582307
score: 1
has comment: http://stackoverflow.com/comment/43587929
type: Question
answer count: 2

http://stackoverflow.com/comment/43589644
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27571837
has text: Ok, I'm not saying to off-topic-or-close it, neither I'm trying to discourage you and you have my +1, I'm just saying to redirect it, considering your "_who possibly wants to help me on this project_" footnote (connect to an internet chess server so that it can combat other chess engines etc.)
score: 0

http://stackoverflow.com/comment/43388481
has text: You might want to see the `watch` function : http://stackoverflow.com/questions/1029241/javascript-object-watch-for-all-browsers
comment on: http://stackoverflow.com/q/27477151
score: 1
type: QuestionComment
type: Comment

http://stackoverflow.com/q/27477397
type: Question
has title: Text area rows should be displayed with XML structure
tagged with: javascript
has comment: http://stackoverflow.com/comment/43388833
has answer: http://stackoverflow.com/a/27477557
answer count: 3
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43388834
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/43388890
has answer: http://stackoverflow.com/a/27477619
accepted answer: http://stackoverflow.com/a/27477557
possible better answer: http://stackoverflow.com/a/27477590
type: AnsweredQuestion
has body: I have small requirement that i want to read text area rows and need to display it like xml format. I tried with following code, it successfully gives the alert with xml structure. we have to display the entire rows with xml format. Here is my code $(document).ready(function(){ $("#saveImgID").click(function(){ var xmlStart = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?> "; var xmlEnd = " "; var lines = $('#fileContent1').val().split(/\n/); var texts = [] for (var i=0; i < lines.length; i++) { if (/\S/.test(lines[i])) { texts.push($.trim(lines[i])); } } for (var i=0; i < texts.length; i++) { alert(xmlStart+" "+texts[i]+" "+xmlEnd); } }); }); I have to display like <?xml version="1.0" encoding="UTF-8" standalone="no"?> 101,abc,andy,1000 202,abc,sachin,2000 303,abc,smith,3000 Here is the fiddle JsFiddle
has answer: http://stackoverflow.com/a/27477590
upvote count: 1

http://stackoverflow.com/a/27497603
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
has body: This one is perfectly working Elements innerMostDivs = doc.select("div:not(:has(div))"); Try it online add your html file add css query as div:not(:has(div)) check resulted elements
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27497507
answers question: http://stackoverflow.com/q/27497507

http://stackoverflow.com/comment/43638664
type: QuestionComment
has text: can you create a jsfiddle to demo the issue please?
score: 1
comment on: http://stackoverflow.com/q/27607193
type: Comment

http://stackoverflow.com/comment/43503663
score: 0
type: AnswerComment
type: Comment
has text: Curiosity killed the cat: Could you provide some reference to that please? I recall that positive integers below 2^32 were integers, everything else a string hashlookup (just talking about array though)..
comment on: http://stackoverflow.com/a/27537686

http://stackoverflow.com/a/27593052
answers question: http://stackoverflow.com/q/27592198
upvote count: 1
type: Answer
has body: I would have 2d array / vector: var vector = [ [ '-135', '-90', '-45'], [ 180, null, '0' ], [ 135, '90', '45' ] ]; Then set the default centre point at 1, 1: var cp = ['1', '1']; Then move around the vector with this centre point variable, as in, if 'W' is pressed move up a row or if 'S' is pressed moved left one row. If both these keys are pressed, then you would move up a row and left one row and you would have selected '-135'. So, to get the variable after a keypress event with this logic I would do: var vector = [ [ '-135', '-90', '-45' ], [ 180, null, '0' ], [ 135, '90', '45' ] ]; var cp = ['1', '1']; this.dw &amp;&amp; cp[1]--; this.da &amp;&amp; cp[0]--; this.ds &amp;&amp; cp[1]++; this.dd &amp;&amp; cp[0]++; this.vector.angle = vector[ cp[0] ][ cp[1] ] You could also set the vector variable globally, that's up to you. If this.vector.angle returns null then there has been no keypress so that's also a nice way to have a fallback for that case. This script also counts opposite keys out, so if 'A' and 'D' are pressed together then there is no horizontal movement in the vector. P.S. I got slightly confused with your original angles, so wouldn't the vector variable really be something like this?: var vector = [ [ '315', '0', '45' ], [ 270, null, '90' ], [ 225, '180', '135' ] ];
downvote count: 0
score: 1

http://stackoverflow.com/comment/43410702
has text: So what is the question. You will need to uniquely identify each element right? So if you are using IDs, then they'll need to be unique. I'm not clear where the hang up is.
comment on: http://stackoverflow.com/q/27489420
score: 0
type: Comment
type: QuestionComment

angularjs-directive
tags question: http://stackoverflow.com/q/27558560
tags question: http://stackoverflow.com/q/27487855
tags question: http://stackoverflow.com/q/27556728
tags question: http://stackoverflow.com/q/27525962
tag name: angularjs-directive
tags question: http://stackoverflow.com/q/27557622
tags question: http://stackoverflow.com/q/27502601
tags question: http://stackoverflow.com/q/27563539
tags question: http://stackoverflow.com/q/27608932
tags question: http://stackoverflow.com/q/27599540
tags question: http://stackoverflow.com/q/27563288
tags question: http://stackoverflow.com/q/27487101
tags question: http://stackoverflow.com/q/27632489
tags question: http://stackoverflow.com/q/27491300
tags question: http://stackoverflow.com/q/27487725
tags question: http://stackoverflow.com/q/27514521
tags question: http://stackoverflow.com/q/27594846
tags question: http://stackoverflow.com/q/27639780
tags question: http://stackoverflow.com/q/27539326
tags question: http://stackoverflow.com/q/27608649
tags question: http://stackoverflow.com/q/27626134
tags question: http://stackoverflow.com/q/27639049
tags question: http://stackoverflow.com/q/27496436
tags question: http://stackoverflow.com/q/27509934
tags question: http://stackoverflow.com/q/27529917
tags question: http://stackoverflow.com/q/27567214
tags question: http://stackoverflow.com/q/27623660
tags question: http://stackoverflow.com/q/27485658
tags question: http://stackoverflow.com/q/27507651
tags question: http://stackoverflow.com/q/27625878
tags question: http://stackoverflow.com/q/27528628
tags question: http://stackoverflow.com/q/27618197
tags question: http://stackoverflow.com/q/27596385
tags question: http://stackoverflow.com/q/27528426
type: Tag
tags question: http://stackoverflow.com/q/27511269
tags question: http://stackoverflow.com/q/27509371
tags question: http://stackoverflow.com/q/27565742
tags question: http://stackoverflow.com/q/27630491
tags question: http://stackoverflow.com/q/27607193
tags question: http://stackoverflow.com/q/27627306
tags question: http://stackoverflow.com/q/27578454
tags question: http://stackoverflow.com/q/27572069
tags question: http://stackoverflow.com/q/27619308
tags question: http://stackoverflow.com/q/27483658
tags question: http://stackoverflow.com/q/27547567
tags question: http://stackoverflow.com/q/27508823
tags question: http://stackoverflow.com/q/27512639
tags question: http://stackoverflow.com/q/27601693

http://stackoverflow.com/a/27499489
downvote count: 0
has comment: http://stackoverflow.com/comment/43466072
score: 3
type: AcceptedAnswer
upvote count: 3
accepted answer of: http://stackoverflow.com/q/27499407
type: Answer
has body: At least two problems there: You're outputting invalid JSON: [ { "Name": "*6", "City": "unused-hs-chain", "City2": "unused-hs-chain", "City3": "unused-hs- chain", "Country": "passthrough" }{ "Name": "*5", "City": "input", "City2": "input", "City3": "input", "Country": "accept" }{ "Name": "*2A", "City": "unused-hs-chain", "City2": "unused-hs-ch You need commas between those objects (after each } and before the next {). Don't generate the JSON manually. Instead, just build up an array of what you want to send back in PHP, then use json_encode so it handles the details for you. You're using properties on the objects in the array that aren't in the JSON. Your code usese arr[i].id, arr[i].chain, and arr[i].action, but the objects in your JSON don't have id, chain, or action properties, they have Name, City, City2, and so on.
answers question: http://stackoverflow.com/q/27499407

http://stackoverflow.com/comment/45457567
type: Comment
comment on: http://stackoverflow.com/a/27613953
score: 0
type: AnswerComment
has text: hmmm, I think I follow, let me think about it

http://stackoverflow.com/comment/43558533
type: Comment
has text: @SowemimoBamidele Use the jQuery `.size()` method. For example: `$(":checked").size()` returns the number of checked elements. http://api.jquery.com/size/
comment on: http://stackoverflow.com/a/27565766
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43483261
comment on: http://stackoverflow.com/q/27526798
type: Comment
has text: The CodePen works fine for me in IE10 and IE11.
type: QuestionComment
score: 0

http://stackoverflow.com/q/27533784
score: -1
has comment: http://stackoverflow.com/comment/43496360
tagged with: validation
answer count: 1
has comment: http://stackoverflow.com/comment/43496316
has answer: http://stackoverflow.com/a/27556131
has comment: http://stackoverflow.com/comment/43496652
favorite count: 0
accepted answer: http://stackoverflow.com/a/27556131
has comment: http://stackoverflow.com/comment/43497588
has comment: http://stackoverflow.com/comment/43498136
has comment: http://stackoverflow.com/comment/43496069
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43497595
downvote count: 2
has comment: http://stackoverflow.com/comment/43496296
upvote count: 1
has comment: http://stackoverflow.com/comment/43497798
has body: I'm creating a fake login experience in a pre-existing prototype. I think my problem is that there's already a click event on the button that advances it to the next div (it's a single page setup with divs that slide in) and I need to add the below validation functionality to the same button. Here's what I have so far: $('#login_button').click(function(e){ var username_input = $('input[placeholder*="Hint"]'), password_input = $('input[placeholder*="Password"]'), username = $(username_input).val(), password = $(password_input).val(), login_errors = 0; if ((username == '') || (password == '')) { console.log("Please enter your username and password."); login_errors = 1; } else if ((username == 'my_username') &amp;&amp; (password == 'my_password')) { console.log("Username and password are correct."); } else { console.log("Your username or password are incorrect. Retry."); login_errors = 1; } if (login_errors != 0){ e.preventDefault(); } }); I'm getting a little lost there at the end. I can get the button to validate the input and to advance to the next page, but I don't know how to get it to do both of these things at the same time.
type: Question
has comment: http://stackoverflow.com/comment/43496321
has comment: http://stackoverflow.com/comment/43496279
has title: Faking a login w/Javascript
tagged with: javascript

http://stackoverflow.com/a/27592325
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27592198
has body: Probably just something like would do instead of a switch: if (this.dd || this.dw || this.da || this.ds) { this.vector.angle = [ -135, -90, -45, 180, 0, 0, 135, 90, 45 ][(this.ds - this.dw + 1) * 3 + (this.dd - this.da + 1)]; }
accepted answer of: http://stackoverflow.com/q/27592198
upvote count: 1
type: AcceptedAnswer

php
tags question: http://stackoverflow.com/q/27479640
tags question: http://stackoverflow.com/q/27567127
tags question: http://stackoverflow.com/q/27554520
tags question: http://stackoverflow.com/q/27622644
tags question: http://stackoverflow.com/q/27475866
tags question: http://stackoverflow.com/q/27618322
tags question: http://stackoverflow.com/q/27530731
tags question: http://stackoverflow.com/q/27511088
tags question: http://stackoverflow.com/q/27585117
tags question: http://stackoverflow.com/q/27498408
tags question: http://stackoverflow.com/q/27487124
tags question: http://stackoverflow.com/q/27491934
tags question: http://stackoverflow.com/q/27482461
tags question: http://stackoverflow.com/q/27565623
tags question: http://stackoverflow.com/q/27577035
tags question: http://stackoverflow.com/q/27577956
tags question: http://stackoverflow.com/q/27478808
tags question: http://stackoverflow.com/q/27513632
tags question: http://stackoverflow.com/q/27591160
tags question: http://stackoverflow.com/q/27542167
tags question: http://stackoverflow.com/q/27489866
tags question: http://stackoverflow.com/q/27617427
tags question: http://stackoverflow.com/q/27600299
tags question: http://stackoverflow.com/q/27543351
tags question: http://stackoverflow.com/q/27548894
tags question: http://stackoverflow.com/q/27506373
tags question: http://stackoverflow.com/q/27513315
tags question: http://stackoverflow.com/q/27546016
tags question: http://stackoverflow.com/q/27588291
tags question: http://stackoverflow.com/q/27602338
tags question: http://stackoverflow.com/q/27620229
tags question: http://stackoverflow.com/q/27506789
tags question: http://stackoverflow.com/q/27602890
tags question: http://stackoverflow.com/q/27478547
tags question: http://stackoverflow.com/q/27619281
tags question: http://stackoverflow.com/q/27528486
tags question: http://stackoverflow.com/q/27626798
tags question: http://stackoverflow.com/q/27507137
tags question: http://stackoverflow.com/q/27589186
tags question: http://stackoverflow.com/q/27624825
tags question: http://stackoverflow.com/q/27631883
tags question: http://stackoverflow.com/q/27611277
tags question: http://stackoverflow.com/q/27485017
tags question: http://stackoverflow.com/q/27626996
tags question: http://stackoverflow.com/q/27538382
tags question: http://stackoverflow.com/q/27625455
tags question: http://stackoverflow.com/q/27478232
tags question: http://stackoverflow.com/q/27610616
tags question: http://stackoverflow.com/q/27549095
tags question: http://stackoverflow.com/q/27612929
tags question: http://stackoverflow.com/q/27521350
tags question: http://stackoverflow.com/q/27513190
tags question: http://stackoverflow.com/q/27582255
tags question: http://stackoverflow.com/q/27608842
tags question: http://stackoverflow.com/q/27532017
tags question: http://stackoverflow.com/q/27603188
tags question: http://stackoverflow.com/q/27560510
tags question: http://stackoverflow.com/q/27553384
tags question: http://stackoverflow.com/q/27500237
tags question: http://stackoverflow.com/q/27563133
tags question: http://stackoverflow.com/q/27476650
tags question: http://stackoverflow.com/q/27498084
tags question: http://stackoverflow.com/q/27478995
tags question: http://stackoverflow.com/q/27525273
tags question: http://stackoverflow.com/q/27609212
tags question: http://stackoverflow.com/q/27546504
tags question: http://stackoverflow.com/q/27475037
tags question: http://stackoverflow.com/q/27589141
tags question: http://stackoverflow.com/q/27519616
tags question: http://stackoverflow.com/q/27607876
tags question: http://stackoverflow.com/q/27620684
tags question: http://stackoverflow.com/q/27619896
tags question: http://stackoverflow.com/q/27587676
tags question: http://stackoverflow.com/q/27619303
tags question: http://stackoverflow.com/q/27573163
tags question: http://stackoverflow.com/q/27476919
tags question: http://stackoverflow.com/q/27569563
tags question: http://stackoverflow.com/q/27618012
tags question: http://stackoverflow.com/q/27497347
tags question: http://stackoverflow.com/q/27506621

http://stackoverflow.com/q/27500941
has title: ng-click doesnt seem to work on programmatically inserted list ( li ) elements
has body: I have a search box which on the input will get a json data from a server and create a menu list from the json data. so, I've created a funcion in the controller that is triggered when there is a change in the search box through ng-change, also the function calls a different function createMenu which injects the list elements with something like, element.append(''+name+' '); but the handleClick method seems to be never triggered when I click the list item. can anyone tell me how to resolve this? any help will be appreciated. thanks! :) //ascript.js var landApp = angular.module('landApp', ['ngRoute']); function navCtrl($scope , $compile, $element, $rootScope , $http) { $scope.handleClick = function(id) { console.log("Clicked"); console.log(id); }; $scope.createMenu = function(elementJson,element) { if(angular.isArray(elementJson)) { angular.forEach(elementJson, function(child , key) { $scope.createMenu(child,element); }); return; } var name = elementJson.name; var id = elementJson.id; var children = elementJson.child; if(name=="Product"){ $scope.createMenu(children,element); return; } var elem = angular.element('&lt;ul&gt;&lt;/ul&gt;'); element.append(elem); $scope.createMenuElement(name,id,elem); if(children != null || children !=undefined) { if(angular.isArray(children)){ angular.forEach(children , function(child,key) { $scope.createMenu(child,elem); }); } else { $scope.createMenu(children,elem); } } } $scope.createMenuElement = function(name,id,element) { element.append('&lt;li id = '+id+' class = product ng-click = handleClick('+id+') &gt;'+name+'&lt;/li&gt;'); } $scope.search_change = function() { if($scope.query.length &gt; 0) { var elem = angular.element('#navigator'); //angular.element('#navigator'); $http.get('/data/search?query=' + $scope.query). success(function(data, status, headers, config) { console.log(data); elem.html(''); var children = data.child; console.log(children); $scope.createMenu(children,elem); }). error(function(data, status, headers, conf…
tagged with: angularjs-scope
type: Question
has comment: http://stackoverflow.com/comment/43432372
answer count: 1
tagged with: javascript
favorite count: 0
linked to: http://stackoverflow.com/q/18157305
has comment: http://stackoverflow.com/comment/43432621
tagged with: angular-ui
has answer: http://stackoverflow.com/a/27501411
accepted answer: http://stackoverflow.com/a/27501411
upvote count: 0
tagged with: angularjs
downvote count: 5
type: AnsweredQuestion
score: -5

http://stackoverflow.com/q/27546804
tagged with: api
has title: Filtering nested JSON javascript
downvote count: 0
has comment: http://stackoverflow.com/comment/43520107
has comment: http://stackoverflow.com/comment/43520214
favorite count: 0
has answer: http://stackoverflow.com/a/27547164
upvote count: 4
has body: I'm creating an API that takes a JSON like this: "hightlights":[ { "title":"Fun", "url":"fun/index.html", "queries": [ "music", "artists", "events", "internet" ] }, { "title":"Internet", "url":"internet/index.html", "queries": [ "javascript", "web", "internet", ] } ] I need to filter the JSON with a word given by user and return with another JSON with only object that contains the word in "queries". If word === 'music', receive: { "title":"Fun", "url":"fun/index.html", "queries":[ "music", "artists", "events", "internet" ] } If word === 'internet', receive: { { "title":"Fun", "url":"fun/index.html", "queries":[ "music", "artists", "events", "internet" ] }, { "title":"Internet", "url":"internet/index.html", "queries":[ "javascript", "web", "internet", ] } My problem is how to nest this values? If anyone can give me some example...I'll appreciate...
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27547045
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/27546973
accepted answer: http://stackoverflow.com/a/27546973
type: Question
has comment: http://stackoverflow.com/comment/43520979
has answer: http://stackoverflow.com/a/27547045
tagged with: javascript
score: 4
tagged with: filter
answer count: 3

http://stackoverflow.com/comment/43553382
comment on: http://stackoverflow.com/a/27555135
type: AnswerComment
has text: Thanks for steering me in the right direction, Dave. Found a different script that's super short and sweet. Will post it.
score: 0
type: Comment

http://stackoverflow.com/comment/43569583
has text: Put the ID before the title in the URL, then just extract the ID and treat the title as junk. You'll want to retrieve the title from the database instead.
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27572073

http://stackoverflow.com/comment/43426303
type: Comment
has text: If so, two options: either `eval('test1').start()`, or else you need to have some container that has all the objects like `var stuff = { test1: test1, tree52: tree52 };` and then you can use something like `stuff['test1'].start()`. Both options were explained in the answer.
score: 1
comment on: http://stackoverflow.com/a/27497330
type: AnswerComment

http://stackoverflow.com/comment/43478062
type: AnswerComment
comment on: http://stackoverflow.com/a/27523756
has text: If I do this once in Controller 1, then won't it make another request when I call it in Controller 2? What if I only want to pass the `userId` in Controller 1 and I just want to fetch the `userData` for that `userId` in Controller 2?
score: 0
type: Comment

http://stackoverflow.com/comment/43689208
has text: @Shlomo I checked and found out that the message from the background is not received by the active tab if the object (variable `responseParams`) is big - about 10KB. What is the limit on the size of the message and is it possible to send large data (up to 50KB) from the background to the active tab? The code in our extension is similar to the code I submitted here but with the name of our company (I removed the name of the company from the question).
comment on: http://stackoverflow.com/q/27508158
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43495522
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27518238
score: 0
has text: @sixfingeredman, I get the same result in Firefox and Chrome with `{}`, namely `file.type = ""`

http://stackoverflow.com/q/27526681
has body: Hello guys i kind of a javascript newbie. Here is my problem I want to get the current url in the iframe where the user browse along.
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/27526735
tagged with: http://stackoverflow.com/tag/html
has title: How to get current iframe url in a javascript var
tagged with: iframe
downvote count: 3
duplicate of: http://stackoverflow.com/q/748727
answer count: 1
accepted answer: http://stackoverflow.com/a/27526735
tagged with: javascript
score: -3
type: AnsweredQuestion
upvote count: 0

http://stackoverflow.com/a/27488326
has comment: http://stackoverflow.com/comment/43412724
score: 0
upvote count: 1
has body: Promises are about something happening in the future; you cannot examine their eventual values now unless you are in possession of a time machine. I am not suggesting you do this, but merely for didactic purposes, if you really want your code to function as you seem to, you could redefine console.log to be promise-aware: console.log = function() { var old_console_dot_log = console.log.bind(console); return function(maybe_promise) { Promise.resolve(maybe_promise).then(old_console_dot_log); }; }(); (This version only handles one argument; handling more is left as an exercise.) Now when you say console.log(foo), it will log the resolved value of foo, but only when it is good and ready, one second from now.
downvote count: 1
has comment: http://stackoverflow.com/comment/43431844
type: Answer
answers question: http://stackoverflow.com/q/27486389
has comment: http://stackoverflow.com/comment/43414480
has comment: http://stackoverflow.com/comment/43413268

http://stackoverflow.com/comment/43463580
score: 0
comment on: http://stackoverflow.com/q/27516308
has text: @RobG If i run the following i get: (1418394563000+0000) `date = convertedDate.replace(/\//g,'') console.log(date);`
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/43606442
type: Comment
comment on: http://stackoverflow.com/a/27591337
type: AnswerComment
score: 0
has text: I'm sure these are good references, but OP's question wasn't really about OAuth at all.

http://stackoverflow.com/a/27604899
upvote count: 6
accepted answer of: http://stackoverflow.com/q/27602993
has body: If your URL is unique for the data that you are querying, then you should use the built in cache inside $http: $http.get('http://www.example.com/path/to/api/endpoint', { cache: true }).success(... This will cache based on the uniqueness of the URL parameter in cacheProvider for you. Here is the documentation for this functionality.
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27602993
has comment: http://stackoverflow.com/comment/43635721
type: Answer
score: 6
downvote count: 0

http://stackoverflow.com/comment/43691590
has text: Before posting an answer, you should check it by running it somewhere. This wouldn't have run, because the original data object is malformed--it can't decide if it wants `territories` to be an array or an object. How can you suggest to someone how to access a property inside an object when the object is not even formed correctly?
type: AnswerComment
comment on: http://stackoverflow.com/a/27633508
type: Comment
score: 0

c#
tags question: http://stackoverflow.com/q/27605683
tags question: http://stackoverflow.com/q/27592020
tags question: http://stackoverflow.com/q/27606055
tags question: http://stackoverflow.com/q/27526411
tags question: http://stackoverflow.com/q/27614462
tags question: http://stackoverflow.com/q/27483265
tags question: http://stackoverflow.com/q/27522326
tags question: http://stackoverflow.com/q/27505270
tags question: http://stackoverflow.com/q/27588060
tags question: http://stackoverflow.com/q/27600507
tags question: http://stackoverflow.com/q/27555515
tags question: http://stackoverflow.com/q/27596965
tags question: http://stackoverflow.com/q/27619591
tags question: http://stackoverflow.com/q/27632648
tags question: http://stackoverflow.com/q/27526650
tags question: http://stackoverflow.com/q/27581741
tag name: c#
tags question: http://stackoverflow.com/q/27516029
tags question: http://stackoverflow.com/q/27596098
tags question: http://stackoverflow.com/q/27531347
tags question: http://stackoverflow.com/q/27567142
tags question: http://stackoverflow.com/q/27622229
tags question: http://stackoverflow.com/q/27537226
tags question: http://stackoverflow.com/q/27624914
tags question: http://stackoverflow.com/q/27619285
tags question: http://stackoverflow.com/q/27630327
tags question: http://stackoverflow.com/q/27553987
tags question: http://stackoverflow.com/q/27489420
tags question: http://stackoverflow.com/q/27604865
tags question: http://stackoverflow.com/q/27555846
tags question: http://stackoverflow.com/q/27534670
tags question: http://stackoverflow.com/q/27566590
tags question: http://stackoverflow.com/q/27485804
tags question: http://stackoverflow.com/q/27566087
tags question: http://stackoverflow.com/q/27572709
tags question: http://stackoverflow.com/q/27530346
tags question: http://stackoverflow.com/q/27577149
tags question: http://stackoverflow.com/q/27484176
tags question: http://stackoverflow.com/q/27626168
tags question: http://stackoverflow.com/q/27494330
tags question: http://stackoverflow.com/q/27540941
tags question: http://stackoverflow.com/q/27508020
tags question: http://stackoverflow.com/q/27530729
tags question: http://stackoverflow.com/q/27634730
tags question: http://stackoverflow.com/q/27591627
tags question: http://stackoverflow.com/q/27542351
tags question: http://stackoverflow.com/q/27616873
tags question: http://stackoverflow.com/q/27530597
tags question: http://stackoverflow.com/q/27617671
tags question: http://stackoverflow.com/q/27637980
tags question: http://stackoverflow.com/q/27525213
tags question: http://stackoverflow.com/q/27602045
tags question: http://stackoverflow.com/q/27632398
tags question: http://stackoverflow.com/q/27565437
tags question: http://stackoverflow.com/q/27535791
tags question: http://stackoverflow.com/q/27507706
tags question: http://stackoverflow.com/q/27508760
tags question: http://stackoverflow.com/q/27617435
tags question: http://stackoverflow.com/q/27623148
tags question: http://stackoverflow.com/q/27606716
tags question: http://stackoverflow.com/q/27514789
tags question: http://stackoverflow.com/q/27543996
tags question: http://stackoverflow.com/q/27500779
tags question: http://stackoverflow.com/q/27598163
tags question: http://stackoverflow.com/q/27554026
tags question: http://stackoverflow.com/q/27596811
tags question: http://stackoverflow.com/q/27574853
tags question: http://stackoverflow.com/q/27572716
tags question: http://stackoverflow.com/q/27481779
tags question: http://stackoverflow.com/q/27522642
tags question: http://stackoverflow.com/q/27511630
tags question: http://stackoverflow.com/q/27619382
tags question: http://stackoverflow.com/q/27629603
tags question: http://stackoverflow.com/q/27525870
tags question: http://stackoverflow.com/q/27575761
type: Tag
tags question: http://stackoverflow.com/q/27515021
tags question: http://stackoverflow.com/q/27520827
tags question: http://stackoverflow.com/q/27480621
tags question: http://stackoverflow.com/q/27631887

http://stackoverflow.com/comment/43463674
type: Comment
type: AnswerComment
has text: I'll check the article. This is what happens when a low level developer tries to make a website... thank you again. :)
comment on: http://stackoverflow.com/a/27516699
score: 0

http://stackoverflow.com/comment/43549368
type: Comment
type: QuestionComment
has text: on and off take as parameter the name of the event type, string
score: 0
comment on: http://stackoverflow.com/q/27561875

yahoo
type: Tag
tag name: yahoo
tags question: http://stackoverflow.com/q/27546206

http://stackoverflow.com/q/27633480
tagged with: mongodb
has comment: http://stackoverflow.com/comment/43686765
tagged with: javascript
has body: I have a mongodb data such as below: { "program" : "DATE TRAINING", "durationStart" : "2014-12-20", "durationEnd" : "2014-12-20", "status" : "Approved" } I'd like to count how many data is durationEnd date is less than today date. From the data above I know I have one. Using nodejs I have tried with the below code but no luck so far. My console.log output for count is 0. var today = new Date(); collection.count({ $or: [{ status: "Pending " + config.TD }, { status: "Approved", durationEnd : {$lte : today } }], evaluationFlag: null }, function(err, count) { console.log("count is " + count); } });
score: 0
has answer: http://stackoverflow.com/a/27633626
has title: Query date less than today in mongodb
answer count: 1
has comment: http://stackoverflow.com/comment/43686794
has comment: http://stackoverflow.com/comment/43686801
tagged with: node.js
tagged with: mongodb-query
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27633626
type: Question

http://stackoverflow.com/comment/43401931
score: 0
comment on: http://stackoverflow.com/q/27484896
type: Comment
type: QuestionComment
has text: Yeah, I am looking what MelanciaUK suggested and using replace instead.

http://stackoverflow.com/comment/43530918
type: QuestionComment
comment on: http://stackoverflow.com/q/27552333
has text: this is the html which is loaded inside a container tag
score: 0
type: Comment

http://stackoverflow.com/q/27566813
tagged with: javascript
tagged with: jquery
has title: how to do function if one of two buttons clicked in jquery?
has answer: http://stackoverflow.com/a/27566825
score: -6
favorite count: 0
upvote count: 1
downvote count: 7
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/13083106
accepted answer: http://stackoverflow.com/a/27566825
has body: I have two different buttons that should call the same function, so I want to call the function if one of the two buttons is clicked, for example: if(button1.isclicked() || button2.isclicked()) alert("clicked"); how to do this in jquery?
duplicate of: http://stackoverflow.com/q/13083106
type: Question
has comment: http://stackoverflow.com/comment/43558555
answer count: 1

http://stackoverflow.com/comment/44093123
type: Comment
comment on: http://stackoverflow.com/a/27825781
type: AnswerComment
score: 0
has text: Anyone tested this [http://jsfiddle.net/t5qd03a9/] in IE.9? It does not work here. It works on Chrome and FF but not IE9 even with the oldest and latests jQuery versions (1.6.4 to 2.1.0 and everything in between). You can't change contents of a in IE. You'll have to replace the entire element from (from http://stackoverflow.com/questions/18434903/innerhtml-not-working-in-ie) is this accurate?

http://stackoverflow.com/q/27479859
score: -1
tagged with: arrays
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/27479875
duplicate of: http://stackoverflow.com/q/15274632
tagged with: dictionary
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/15274632
downvote count: 2
has title: Return certain keys from an array
upvote count: 1
type: Question
has body: I have an array with this structure: var resellerList = [ { fId : 1, fName : 'Reseller 1 Name', fCityCode : 1, fTel : '+1234567890' }, { fId : 2, fName : 'Reseller 2 Name', fCityCode : 1, fTel : '+1234567890' }, { fId : 3, fName : 'Reseller 3 Name', fCityCode : 2, fTel : '+1234567890' }, { fId : 4, fName : 'Reseller 4 Name', fCityCode : 1, fTel : '+1234567890' }, { fId : 5, fName : 'Reseller 5 Name', fCityCode : 2, fTel : '+1234567890' }, { fId : 6, fName : 'Reseller 6 Name', fCityCode : 3, fTel : '+1234567890' }, { fId : 7, fName : 'Reseller 7 Name', fCityCode : 1, fTel : '+1234567890' } ]; Now I want select only objects with fCityCode : 1 . I know I should use map to found the index of value but map will return just index of one value. var ePos = resellerList.map(function (x) { return x.fCityCode; }).indexOf(1); What should I do ?
has answer: http://stackoverflow.com/a/27479875
tagged with: javascript

http://stackoverflow.com/a/27495989
type: Answer
has body: Have you see the tutorials on MSDN? In particular, the Detecting collisions in a 2D HTML5 game seems relevant to your interests. In particular, here's the code used to detect collisions in that tutorial: var circlesOverlap = function(circleA, circleB) { // Public. Returns true if the SVG circles A and B overlap, false otherwise. var deltaX = circleA.cx.baseVal.value - circleB.cx.baseVal.value; var deltaY = circleA.cy.baseVal.value - circleB.cy.baseVal.value; var distance = Math.sqrt( (deltaX*deltaX) + (deltaY*deltaY) ); // The classic distance-between-two-points formula. var radiusA = circleA.r.baseVal.value; // The radius of circle A. var radiusB = circleB.r.baseVal.value; // The radius of circle B. if (circleA.id == circleB.id) // If true, circleA and circleB are the same circle. return false; return distance &lt;= (radiusA + radiusB); }; // circlesOverlap() that.circlesOverlap = circlesOverlap; Note that the technique used in the tutorial is basically: Track each object Calculate the distance between the objects Respond accordingly (e.g. when the distance is zero). (Update: added the sample that seems most relevant to your question, per the comments below) Do take time to read the full tutorial, though, for the full context and to ensure that due credit is duly credited. Hope this helps... -- Lance
has comment: http://stackoverflow.com/comment/43427904
accepted answer of: http://stackoverflow.com/q/27495650
answers question: http://stackoverflow.com/q/27495650
has comment: http://stackoverflow.com/comment/43427664
has comment: http://stackoverflow.com/comment/43426415
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43428091

http://stackoverflow.com/q/27614711
has title: Hiding a Div Class using J Query on when page is opened
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43651342
possible better answer: http://stackoverflow.com/a/27614763
has body: I am trying to hide a div class field using j query and i am unable to do so. It is a ticket field in a support form. That needs to be hidden at the beginning and reflect when a particular value is selected. I does not work. I have tried it two different ways and it does not work. Below is the HTML Code, HTML Image and the JQuery Code that i have used. HTML: iOS Plugin Details Please provide the iOS Plugin version details for your request. Example: iOS GA5.0.38 J Query Code: One Hides only field and label remains visible. var iosPluginId = "21158635"; $(document).ready(function() { if(cust_tags == "kony_internal") { $('#request_custom_fields_'+iosPluginId).hide(); } }); JQuery Code: Two Both the label and field are visible. $(".form-field string optional request_custom_fields_21158635").hide();
type: Question
has comment: http://stackoverflow.com/comment/43651271
has answer: http://stackoverflow.com/a/27614805
accepted answer: http://stackoverflow.com/a/27614805
has comment: http://stackoverflow.com/comment/43651347
tagged with: javascript
has comment: http://stackoverflow.com/comment/43651252
has comment: http://stackoverflow.com/comment/43651211
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/27614763
tagged with: jquery
linked to: http://stackoverflow.com/q/1041344

http://stackoverflow.com/q/27525530
has comment: http://stackoverflow.com/comment/43480426
has body: I would like to check programmatically if java script is enabled for any browser, For IE I could use the below registry entry, but I am not able to find for chrome or other browsers. Please help. Key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\InternetSettings\Zones\3 subkey: 1400 Value 0 [enabled], 3 [Disabled] I am creating a inno setup and want to use the code in it.
has comment: http://stackoverflow.com/comment/43480172
tagged with: javascript
type: Question
score: 0
has title: Check programmatically [reg entry] if java script is enabled for chrome/firefox and other browsers
has comment: http://stackoverflow.com/comment/43479906
tagged with: firefox
has comment: http://stackoverflow.com/comment/43480211
tagged with: inno-setup
has comment: http://stackoverflow.com/comment/43479931
has comment: http://stackoverflow.com/comment/43481084
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43480695
tagged with: google-chrome

http://stackoverflow.com/q/27518183
has answer: http://stackoverflow.com/a/27519225
downvote count: 1
has comment: http://stackoverflow.com/comment/43466273
favorite count: 0
has comment: http://stackoverflow.com/comment/43466268
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27518236
upvote count: 0
has comment: http://stackoverflow.com/comment/43466457
has comment: http://stackoverflow.com/comment/43467831
has comment: http://stackoverflow.com/comment/43467740
has comment: http://stackoverflow.com/comment/43466576
type: Question
has comment: http://stackoverflow.com/comment/43466334
has title: Is there any way to make IDs unique to any element on the page, not to the document
has body: I tried to google, but failed. I want the element with an ID to be unique relatively to, for example, his parent, not to the document itself. Is there a way to do that? Ok, since you need an example. I have a huge form, with tons of radio buttons and inputs, e.g.: 2 radio buttons with IDs. Each with label. Never Daily I can not afford to change this setup. And I have a button that clones (via .clone()) this form. As you may guess, it all breaks, because IDs and labels are not unique.
has answer: http://stackoverflow.com/a/27518210
tagged with: javascript
score: -1
linked to: http://stackoverflow.com/q/13001236
answer count: 3
has comment: http://stackoverflow.com/comment/43466411
has comment: http://stackoverflow.com/comment/43466307
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/43412552
has text: your code is working fine try to check your file paths.
comment on: http://stackoverflow.com/q/27490284
type: Comment
score: 0
type: QuestionComment

http://stackoverflow.com/q/27536982
upvote count: 0
has title: Remove the image tag when image is not uploaded to Channel Advisor. No jQuery method please
tagged with: javascript
has answer: http://stackoverflow.com/a/27537096
tagged with: channel
answer count: 1
favorite count: 0
downvote count: 1
accepted answer: http://stackoverflow.com/a/27537096
tagged with: jssor
type: AnsweredQuestion
tagged with: tags
score: -1
has body: I am designing a template in Channel Advisor for an eBay store and it doesn't allow jQuery. I used JSSOR (non-jQuery one) for my slider in order to make it responsive and swipe/touch friendly. When I use template tags in like: I have 10 of {{ITEMIMAGEURL1}} and {{THUMB(ITEMIMAGEURL)}} tags number from 1-10 in the slider template, {{ }} are the image paths from Channel Advisor. In order to have this gallery work on all current listings, I need to delete some of the div tags correspond to how many images an ad has/uploaded to channel advisor. Lets say I have this: and a listing has only 4 sets of pictures/first 4 sets image paths. How do I delete the div tags that wrap around the images from 5-10? Thank you in advance!!
tagged with: image
type: Question

http://stackoverflow.com/comment/43525444
type: Comment
has text: the context that you are using `return` is innappropriate and misleading. `return` is a key word in javascript that tells a function its job is finished and allows it to give a value back to its caller. in your code you dont use the `return` keyword, you just print (console.log) the variable
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27549044

http://stackoverflow.com/comment/43543703
type: Comment
type: AnswerComment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/67283/discussion-between-thinkerer-and-edamon).
comment on: http://stackoverflow.com/a/27540207
score: 0

http://stackoverflow.com/a/27566333
has comment: http://stackoverflow.com/comment/43558873
has comment: http://stackoverflow.com/comment/43558254
type: Answer
upvote count: 2
has body: Please check this code this will works for you cleaner Here is link for JSFiddle for your code jsfiddle
has comment: http://stackoverflow.com/comment/43558782
answers question: http://stackoverflow.com/q/27566009
score: 2
has comment: http://stackoverflow.com/comment/43558128
has comment: http://stackoverflow.com/comment/43558591
has comment: http://stackoverflow.com/comment/43558009
has comment: http://stackoverflow.com/comment/43558968
has comment: http://stackoverflow.com/comment/43557759
has comment: http://stackoverflow.com/comment/43558298
downvote count: 0

http://stackoverflow.com/a/27616311
answers question: http://stackoverflow.com/q/27614295
has comment: http://stackoverflow.com/comment/44830904
has comment: http://stackoverflow.com/comment/43674292
accepted answer of: http://stackoverflow.com/q/27614295
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44830867
type: Answer
has comment: http://stackoverflow.com/comment/43675140
upvote count: 3
has body: Sup Rasof, look at this directory root&gt;projectName&gt;.meteor&gt;local&gt;db&gt;journal Delete all Prealloac, i have the same issue, its some functionality from mongodb to preallocate date for you, i research some and looks like data is kinda ignored for meteor on the deploy, but like you are using nitrous.io you are actually using space of the box, so its not possible run the box. Are you getting the "error: enospc, no space left on device"? if its that just delete prealloc files Edit Meteor Reset also Works
score: 3
has comment: http://stackoverflow.com/comment/43663816

fullcalendar
tags question: http://stackoverflow.com/q/27498706
tags question: http://stackoverflow.com/q/27516932
tags question: http://stackoverflow.com/q/27604359
tags question: http://stackoverflow.com/q/27556290
tag name: fullcalendar
tags question: http://stackoverflow.com/q/27626181
tags question: http://stackoverflow.com/q/27487864
tags question: http://stackoverflow.com/q/27630314
tags question: http://stackoverflow.com/q/27639027
tags question: http://stackoverflow.com/q/27540029
tags question: http://stackoverflow.com/q/27570056
tags question: http://stackoverflow.com/q/27506409
type: Tag
tags question: http://stackoverflow.com/q/27551631
tags question: http://stackoverflow.com/q/27563657

http://stackoverflow.com/comment/43563479
comment on: http://stackoverflow.com/q/27568945
has text: @JimBrutan: Not sure if this is the source of your problems, but if you are calling `a1.push(video_object);` more than once, then you will be pushing the *same* object into the array each time.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27496183
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27495973
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27495973
score: 1
has body: check the jsfiddle Check the JSBin you have few mistakes just fixed it for you first missing $ at the beginning and remove the () from the end of the function missing some prefixes in your CSS and you're using webkitRequestAnimationFrame which works in chrome only change it to requestAnimationFrame
type: AcceptedAnswer

http://stackoverflow.com/q/27521967
type: AnsweredQuestion
has body: My requirement is to get 11th to 20th record from the database model. For example in SQL, SELECT * FROM tbl LIMIT 5,10; # Retrieve rows 6-15 How can i achieve the same in sails.js? I used .limit(20) to limit 20records ..but if i want to retrieve 11th to 20th records only , then i tried to use .skip(10) but it didnt work. For example, Table.find(query).sort(qSort).skip(10).limit(20).exec(cb);//limit 20records and skip 10 records Please correct me if iam wrong and help me to solve the problem. Thanks!
upvote count: 2
type: Question
has answer: http://stackoverflow.com/a/27529488
tagged with: sails.js
has title: To find records between a range - SAILS.JS
tagged with: mongodb
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/27529488
tagged with: node.js
score: 2

http://stackoverflow.com/comment/43429349
has text: please help me what to do its been long time i am working on it
type: Comment
comment on: http://stackoverflow.com/q/27499193
score: 0
type: QuestionComment

http://stackoverflow.com/comment/43449609
score: 0
type: AnswerComment
has text: But the most right option will be to use the `model`
type: Comment
comment on: http://stackoverflow.com/a/27509405

http://stackoverflow.com/comment/44539337
type: AnswerComment
has text: @jfriend00 i would like to share my code with you so that you can take a look and see if i am doing something incorrectly. There is some confidential code that i wish to not share online - hence the request to PM
type: Comment
comment on: http://stackoverflow.com/a/27559675
score: 0

http://stackoverflow.com/q/27531347
answer count: 1
tagged with: events
tagged with: asp.net
type: UnansweredQuestion
has body: I have a RadioButtonList with 2 selections as ListItems with a server OnSelectedIndexChanged event and a clientside onchange event. Markup Code looks like this: &lt;asp:RadioButtonList ID="rdViewSelection" runat="server" RepeatDirection="Horizontal" AutoPostBack="true" OnSelectedIndexChanged="rdoSelection_SelectedIndexChanged" onchange="SelectedIndexChanged();"&gt; &lt;asp:ListItem Enabled="true" Selected="True" Text="1" Value="1"&lt;/asp:ListItem&gt; &lt;asp:ListItem Enabled="true" Selected="False" Text="2" Value="2"&gt;&lt;/asp:ListItem&gt; &lt;/asp:RadioButtonList&gt; Javascript method for the controls Client onchange event looks like this: function SelectedIndexChanged() { var rdoSelection = document.getElementById("&lt;%=rdoSelection.ClientID%&gt;"); for (var i = 0; i &lt; rdoSelection.cells.length; i++) { for (var x = 0; x &lt; rdoSelection.cells[i].all.length; x++) { if (rdoSelection.cells[i].all[x].checked) { // Store value in Hidden Field document.getElementById("&lt;%=SelectedValue.ClientID%&gt;").value = rdoSelection.cells[i].all[x].defaultValue; } } } } I also have a asp:LinkButton control that performs some server side actions when the user clicks it; but in addition to the server method that is called, there is also a onClientClick method that changes the selected Value of the RadioButtonList. For simplicity I have removed all but the offending line of client code that is causing the issue I am having but it this looks like this: function ChangeSelectedIndex() { rdoSelection.cells[1].childNodes[0].checked = true; } When the selected node of the RadioButtonList is changed via the client code that is called from the LinkedButton, the value is successfully changed on the page and the Server OnSelectedIndexChanged event fires. But if I manually click the unselected node (after the 1st programmatic change), the server side OnSelectedIndexChanged method is not called. But any selection change performed after that calls the server event successfully. Its as i…
has title: RadioButtonList not firing on subsequent change event when value is set via javascript
type: Question
tagged with: c#
tagged with: javascript
has answer: http://stackoverflow.com/a/29390830
score: 0

http://stackoverflow.com/q/27509022
score: 2
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
tagged with: google-forms
has comment: http://stackoverflow.com/comment/43450891
has comment: http://stackoverflow.com/comment/43455111
has comment: http://stackoverflow.com/comment/43455183
possible better answer: http://stackoverflow.com/a/27513662
favorite count: 0
has answer: http://stackoverflow.com/a/27513662
type: Question
upvote count: 2
answer count: 2
has comment: http://stackoverflow.com/comment/43450800
accepted answer: http://stackoverflow.com/a/27514677
has comment: http://stackoverflow.com/comment/43448427
has comment: http://stackoverflow.com/comment/43457378
has title: Google spreadsheet website form jQuery script block the sending of
tagged with: google-sheets
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43456459
has body: I have my form in html. I copied action, entry keys and hidden inputs from orginal Google Form. Submit I have te jQuery script, which display confirm: When i delete this script, form is sending, and save to google, but after click submit, I am redirecting to google "Thank You" page. I want to no redirect and display confirm just like in script. How to fix this problem ?
has answer: http://stackoverflow.com/a/27514677

http://stackoverflow.com/comment/43599852
score: 0
has text: It uses OFB mode. As I wrote, in general I just need to encrypt, doesnt need to be AES/GCM.
type: Comment
comment on: http://stackoverflow.com/q/27492135
type: QuestionComment

http://stackoverflow.com/q/27528799
answer count: 1
has body: I have created a script with a gui Window with groups and panels. My issue is when I fire the script either from After Effects or from the Extendscript Debugger, I can't see the whole title on my panel title. Below is a link to the image highlighting the error I am seeing. https://drive.google.com/a/whirlpool.com/file/d/0B51dXC1EPNW7NGJHTUZtY1JKMVE/view?usp=sharing Here is the original problem code below: var myWin = (this instanceof Panel) ? this : new Window("palette", "Mozaik", undefined, {resizeable: true , maximizeButton: true}); var panelZero = myWin.add('panel', undefined, 'Define your Mozaik Size'); panelZero.alignment = ['100','300']; panelZero.alignChildren = ['fill','fill']; sizePickGUI = panelZero.add('edittext', undefined, '100'); //sizePickGUI variable which is used as sizePick parameter in shape buillding functions sizePickGUI.value = 100; sizePickGUI.onChange = function(){ this.value = this.text } sizePickGUIVal= sizePickGUI.value; var panelOne = myWin.add('panel', undefined, 'Define Area'); widthPickGUI = panelOne.add('edittext', undefined, '1000'); //widthPickGUI variable which is used as widthPick variable in shape building functions panelOne.alignment = ['100','fill']; panelOne.alignChildren = ['fill','fill']; widthPickGUI.value = 1000; widthPickGUI.onChange = function(){ this.value = this.text } widthPickGUIVal = widthPickGUI.value; heightPickGUI = panelOne.add('edittext', undefined, '1000'); //heightPickGUI variable which is used as heightPick variable in shape building functions heightPickGUI.value = 1000; heightPickGUI.onChange = function(){ this.value = this.text } heightPickGUIVal = heightPickGUI.value var groupTwo = myWin.add ('group', undefined, 'Shape Picker'); // Shape Picker GUI group groupTwo.add('statictext', undefined, 'Shape Picker'); var square = groupTwo.add('radiobutton', undefined, 'Square'); //square radio button var triangle = groupTwo.add('radiobutton', undefined, 'Triangle');// triangle radio button var circle = groupTwo.ad…
has comment: http://stackoverflow.com/comment/43486477
has title: How to change the window panel title size?
type: UnansweredQuestion
tagged with: extendscript
tagged with: after-effects
type: Question
has comment: http://stackoverflow.com/comment/43490082
tagged with: javascript
has comment: http://stackoverflow.com/comment/43555808
score: 0
has answer: http://stackoverflow.com/a/27727084
has comment: http://stackoverflow.com/comment/43490294

http://stackoverflow.com/comment/43441273
type: AnswerComment
has text: and `UPDATE facebook_like SET likes = likes + 1 WHERE postID = ?`
type: Comment
comment on: http://stackoverflow.com/a/27505610
score: 1

http://stackoverflow.com/comment/43473627
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27521807
score: 0
has text: @DevendraSoni added on top of post

http://stackoverflow.com/comment/43443267
has text: Great, thanks! JavaScript has trained me to ignore the obvious answer because it basically never works. Should have tried it this time :)
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27504852

http://stackoverflow.com/comment/43446992
score: 0
comment on: http://stackoverflow.com/q/27505333
type: Comment
type: QuestionComment
has text: in Javascript installation it also doesn't work. Is there any possibility that I have to enable JavaScript in Django?

http://stackoverflow.com/comment/43502211
type: Comment
type: QuestionComment
has text: @Teemu Thanks for your suggestion. I know its not secure but the page it goes to doesn't have anything valuable. I just need a light secure layer feature
comment on: http://stackoverflow.com/q/27512559
score: 0

http://stackoverflow.com/a/27636544
upvote count: 3
type: Answer
has comment: http://stackoverflow.com/comment/43692917
downvote count: 0
has body: angular.module('ui.bootstrap.demo', ['ui.bootstrap']) - be sure you have ui.bootstrap. Read how to install it http://angular-ui.github.io/bootstrap/ Here is your updated jsfiddle http://jsfiddle.net/e31k5e6L/1/
score: 3
accepted answer of: http://stackoverflow.com/q/27636237
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43692400
answers question: http://stackoverflow.com/q/27636237

http://stackoverflow.com/comment/43641412
type: Comment
has text: if you search for "jquery dynamically add div to page" the first [link](http://stackoverflow.com/questions/10954911/dynamically-add-div-to-html-page-using-javascript-or-jquery) is a stack question that is what you should look into. perhaps a little more time researching would be of benefit to you before you post a question that is most definitely out there.
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27609399

http://stackoverflow.com/q/27610589
tagged with: javascript
score: 0
tagged with: shadow-dom
answer count: 1
has body: I need to extract the content from the element. My custom element is called as follows Important text So the question is: How do I get this text inside my polymer element ? My polymer element now looks like this: Polymer('my-element', { ready: function () { this.show = true; //var text = this.$.content.getDistributedNodes(); // doesn't work } }); Any suggestions how I can achieve this ?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27611100
has comment: http://stackoverflow.com/comment/43654765
tagged with: polymer
type: Question
has title: Access contents of <content> within a Polymer element
has comment: http://stackoverflow.com/comment/43645356

http://stackoverflow.com/q/27626935
tagged with: javascript
has body: My website has a script which redirects users to a landing page with prompts to download our app or return to the desktop site. However, when they hit "Desktop" from their mobile phones, it will loop them back to the landing page. Is there a way to override this once someone has visited the page? Our website is www.hotshotsnet.com. Thanks!
favorite count: 0
has title: Avoiding Redirects for Users Who Have Already Visite
downvote count: 1
type: Question
type: AnsweredQuestion
tagged with: cookies
tagged with: overriding
score: -1
has answer: http://stackoverflow.com/a/27627255
accepted answer: http://stackoverflow.com/a/27627255
upvote count: 0
answer count: 1

http://stackoverflow.com/q/27620551
score: 1
favorite count: 0
has title: can we add a value of attr src Instead of the value of attr class in the list of values in list.js?
type: Question
answer count: 1
has body: this is my code html: and this is my code js: var test = [{name:"Joo",born:1986,source:"impat.png"}, {name:"Jonas",born:1888,source:"impat.png"}]; var options = { item: " " } var listObj = new List('users', options,test); I know it doesn't work but I hope someone offers me a good solution
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
has answer: http://stackoverflow.com/a/27620758
tagged with: listjs
tagged with: javascript
type: UnansweredQuestion
downvote count: 0

http://stackoverflow.com/a/27684798
type: Answer
has comment: http://stackoverflow.com/comment/43783694
answers question: http://stackoverflow.com/q/27619632
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27619632
has comment: http://stackoverflow.com/comment/43783760
has comment: http://stackoverflow.com/comment/43783880
has body: After long reading of your question i think this is cause of your problem if you can find this in your project you will see the controller code and also the logic of how pages are split based on this value. @ViewBag.LastSrvId Find ViewBag.LastSrvId in your project and you will get in controller code and there you can see the logic setting page number. I have seen your code and i can see that page is refreshed based on this viewbag value passed as query string to controller "Roster/WallDisplay2" and in this controller there would be all logic of how your pages will be shown. Update Your controller folder is not in the project it may be written separately and included in project as dll file that's why you are unable to locate Controller code and Controller folder.
has comment: http://stackoverflow.com/comment/43783742
score: 2
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43783894
has comment: http://stackoverflow.com/comment/43787017

http://stackoverflow.com/comment/43524188
has text: Are you unable to edit that HTML file? Not sure what edit restriction you mean.
comment on: http://stackoverflow.com/q/27548713
score: 0
type: Comment
type: QuestionComment

django
tags question: http://stackoverflow.com/q/27608614
tags question: http://stackoverflow.com/q/27602811
tags question: http://stackoverflow.com/q/27488832
type: Tag
tags question: http://stackoverflow.com/q/27610768
tags question: http://stackoverflow.com/q/27561608
tag name: django
tags question: http://stackoverflow.com/q/27601864
tags question: http://stackoverflow.com/q/27572607
tags question: http://stackoverflow.com/q/27508409
tags question: http://stackoverflow.com/q/27636880
tags question: http://stackoverflow.com/q/27575533
tags question: http://stackoverflow.com/q/27606198
tags question: http://stackoverflow.com/q/27487199
tags question: http://stackoverflow.com/q/27615577
tags question: http://stackoverflow.com/q/27572846
tags question: http://stackoverflow.com/q/27565731
tags question: http://stackoverflow.com/q/27488497
tags question: http://stackoverflow.com/q/27505333

http://stackoverflow.com/a/27846125
type: Answer
has body: I would like to bring up my understanding for discussion.. when we AMD, we define the module. Unless the module (in this case is main, the defined source) is able to accepting the plugin and allow the plugin to change the properties, i guess we're not able to hijack it or it will be an anti-pattern? what about we extend/clone the defined source, like define("plugin", ["main"], function(obj) { return $.extend(true, {}, obj, {opt: "B"}); }); http://jsfiddle.net/r75e446f/6/ here the plugin module is always using the main module as its dependency, then when using the module we just directly use the plugin module and no longer need to require the main module? (by the way i understand this defeat the definition of 'plugin', but my direction is that we're dealing with the module as what the requireJs designed to be) --2nd approach-- if you do really want to do it the plugin way, how about the loader plugin? like the text plugin we always using `require('text!abc.json'). So write a loader and register it to the requireJs's config, and then we could use it. (more)
upvote count: 1
downvote count: 1
score: 0
answers question: http://stackoverflow.com/q/27533392

http://stackoverflow.com/comment/43520854
comment on: http://stackoverflow.com/a/27547036
type: AnswerComment
score: 0
type: Comment
has text: Great! Glad you found this answer helpful. Enjoy!

http://stackoverflow.com/a/27576768
type: Answer
answers question: http://stackoverflow.com/q/27576641
type: AcceptedAnswer
has body: You need to isolate the instance of .sonuc span within the views-row instance based on which button was clicked Try this: $('.share').click(function() { var product_name = $(this).closest('.views-row').find(".sonuc span").html(); /* FB code */ }); What you currently have will always get the html from the first .sonic contained in the page
score: 0
accepted answer of: http://stackoverflow.com/q/27576641

http://stackoverflow.com/comment/43690373
type: QuestionComment
comment on: http://stackoverflow.com/q/27635618
has text: try `append` instead of `add`.
score: 0
type: Comment

http://stackoverflow.com/comment/43699273
type: QuestionComment
has text: Than just place it as you would normally do on index.html
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27639683

http://stackoverflow.com/comment/43518281
has text: Since the function that is doing the $http.post is the same in both cases (apart from the second parameter 2) it's probably not to do with that bit of code. How is the link calling the function?
score: 0
comment on: http://stackoverflow.com/q/27545701
type: QuestionComment
type: Comment

http://stackoverflow.com/q/27599165
type: AnsweredQuestion
has body: I have a HTML table tag as following &lt;table class="globaltable" border="0" cellspacing="0" cellpadding="0" width="100%" align="center" height="72%" onclick="alert(this.offsetHeight)"&gt; where in IE8 i have onclick value as 420, in chrome as 480 and in firefox as 472. How do i make it uniform across different browsers.
type: Question
has answer: http://stackoverflow.com/a/27599383
linked to: http://stackoverflow.com/q/14809502
has answer: http://stackoverflow.com/a/27599504
has comment: http://stackoverflow.com/comment/43621547
has answer: http://stackoverflow.com/a/27599427
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27599504
has comment: http://stackoverflow.com/comment/43621531
has answer: http://stackoverflow.com/a/27599421
score: 0
accepted answer: http://stackoverflow.com/a/27599383
has answer: http://stackoverflow.com/a/27599541
answer count: 5
has title: How to set table height on chrome and firefox
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/q/27624851
accepted answer: http://stackoverflow.com/a/27625003
type: Question
has body: Now, I have a little problem: when using fiddler. It works, but on my server it doesn't work and I don't understand why. http://jsfiddle.net/5mvKE/501/ My page: test div For the script, I tried to put into , and external (see above), but nothing works. I used only (compatible HTML 5) and also ` but this does not affect the result.
score: -2
tagged with: javascript
has title: Move div works in Fiddle, but not in my page
upvote count: 0
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/43670363
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
downvote count: 2
has comment: http://stackoverflow.com/comment/43670176
has answer: http://stackoverflow.com/a/27625003

http://stackoverflow.com/q/27574428
upvote count: 3
has body: I am trying to write a function that will take two objects, people in this case, and swap only two of their attributes. Here is my function for the Person: function Person (tall, weight, gender, iq, favoriteColor) { this.tall = tall; this.weight = weight; this.gender = gender; this.iq = iq; this.favoriteColor = favoriteColor; } var joe = new Person("6-2", 180, "male", 130, "blue"); var bob = new Person("5-11", 150, "male", 120, "red"); So i want to swap JUST their IQs and favoriteColor. So far I have: function Swap(a, b) { var i = a; a = b; b = i; console.log(a, b); } This obviously swaps all their properties, but i cannot figure out how to swap just two and still have them log as objects. I have tried: function Swap(a, b) { var a = a.iq + a.favoriteColor; var b = b.iq + b.favoriteColor; var i = a; a = b; b = i; console.log(a, b); } but this returns in the console: 120red 130blue. Technically it swapped the two values, but their structure as an object is gone and the other three properties that they were supposed to keep of their own are also gone. How do I write the swap function to do this? Thanks!
downvote count: 1
accepted answer: http://stackoverflow.com/a/27574501
type: Question
linked to: http://stackoverflow.com/q/16201656
tagged with: object
has title: Swapping two properties of objects with function in javascript
has answer: http://stackoverflow.com/a/27574538
tagged with: javascript
has answer: http://stackoverflow.com/a/27574599
possible better answer: http://stackoverflow.com/a/27574538
score: 2
tagged with: function
tagged with: jquery
has comment: http://stackoverflow.com/comment/43574460
favorite count: 0
has answer: http://stackoverflow.com/a/27574501
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27574516

http://stackoverflow.com/q/27584566
answer count: 1
tagged with: jsbin
has body: I drew 6 sprites (which are squares) and they are suppose to spawn on my canvas after certain amount of seconds (I have a timer) but only one of them is being drawn at 0,0 coordinates for some reason, and even after the certain amount of seconds, none of the sprites are being drawn. I would really appreciate some help and if you have any questions leave a comment below and i will answer immediately. You can see the demo here which you will clearly understand what i am talking about. Or Here is all of my code for Javascirpt: //Setting the canvas and context var canvas = document.getElementById('canvas'); var context = canvas.getContext('2d'); var canvasWidth = canvas.width; var canvasHeight = canvas.height; var keys = []; // contains, for each keyCode, the key status //================ // CAR Class //================ //Uploading obstacle car var carImage = new Image(); carImage.src = "img/Car.png"; function Car(x, y, speed, mod, angle) { this.x = x; // x center of car this.y = y; // y center of car this.speed = speed; this.mod = mod; this.angle = angle; this.listenInput = function(dt) { if (keys[37]) { this.x -= this.speed*dt; } if (keys[39]) { this.x += this.speed*dt; } }; this.move = function (dt) { this.x += dt*(this.speed * this.mod) * Math.cos(Math.PI / 180 * this.angle); this.y += dt*(this.speed * this.mod) * Math.sin(Math.PI / 180 * this.angle); if (this.y &gt; canvasHeight + 150) { this.spawn(); } }; this.draw = function () { context.save(); context.translate(this.x, this.y); context.rotate(this.angle* Math.PI / 180); context.drawImage(carImage, -(carImage.width / 2), -(carImage.height / 2)); context.restore(); if (this.x &gt; context.canvas.width){ context.beginPath(); context.fillStyle = "red"; context.font = "50px Verdana"; context.fillText("Out of bounds! Get Back!", 100, 100); } if (this.x &lt; 0){ context.beginPath(); context.fillStyle = "red"; context.font = "50px Verdana"; context.fillText("Out of bounds! Get Back!", 100, 100); } }; this.testCollision…
accepted answer: http://stackoverflow.com/a/27585207
type: AnsweredQuestion
tagged with: sprite
has answer: http://stackoverflow.com/a/27585207
type: Question
tagged with: javascript
score: 0
has title: Sprites not drawing on canvas (Javascript)

http://stackoverflow.com/comment/43639479
type: QuestionComment
score: 0
has text: @user3340234 It appears to be loading for me: http://i.imgur.com/Wm6VDsO.png.
type: Comment
comment on: http://stackoverflow.com/q/27605234

http://stackoverflow.com/a/27628240
score: 5
type: Answer
has body: With protractor, you execute end-to-end tests (like if you were a user clicking on the interface - buttons, anchors - and reading what's rendered on - what you decide to finally expose to the view), you don't have access to the JavaScript variables encapsulated inside your controllers. The kind of test you're talking about is a unit test, where you only test your doLogin function, by injecting a $scope object populated with the proper data and then you assert that it does exactly what you expected by testing js variables. Although, if $scope.authentication.user modifies the view when set to true (like if you display "Authentication successfull", or even route to an other view), you can assert with protractor that this behavior went through (by checking the "Authentication successfull" message in the DOM after you triggered the loggin) - but keep in mind this is still e2e testing.
upvote count: 6
has comment: http://stackoverflow.com/comment/45701337
downvote count: 1
answers question: http://stackoverflow.com/q/27627781

http://stackoverflow.com/comment/43532895
comment on: http://stackoverflow.com/q/27552806
score: 0
type: Comment
type: QuestionComment
has text: Why do your ` ` elements have IDs?

http://stackoverflow.com/q/27524180
answer count: 3
tagged with: refresh
has answer: http://stackoverflow.com/a/27524429
has title: Refresh just home page
has body: I am currently designing a system which includes a homepage that show the person who logs in only the work they have to do. I have been asked to set up this homepage to refresh every 3 minutes which I have done using this code: function startTimer() { var now = new Date(); var minutes = now.getMinutes(); var seconds = now.getSeconds(); var secTime = minutes*60*seconds; if(secTime % (3*60) == 0){ var refreshTime = 3*60*1000; } else { var refreshTime = (secTime % (3*60)) * 1000; } setTimeout('refresh()', refreshTime);} function refresh() { window.location.href = 'myURL'; } startTimer(); The problem I currently have is that when I navigate away from this page, but still in the system, it keeps returning me to homepage and I lose what I am working on. Is there a way that I can keep refreshing homepage for those who haven't moved away from it and stop it when someone does? I am very new to Javascript so please be patient if I ask a lot of question. Thank you in advance for any help given.
type: AnsweredQuestion
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27524491
type: Question
has answer: http://stackoverflow.com/a/27524491
accepted answer: http://stackoverflow.com/a/27524429
score: 0
has answer: http://stackoverflow.com/a/27524528

http://stackoverflow.com/comment/43650949
has text: Do your rest binding like this , and u will get your desired result.
type: AnswerComment
comment on: http://stackoverflow.com/a/27614544
score: 0
type: Comment

http://stackoverflow.com/comment/43592575
score: 1
comment on: http://stackoverflow.com/q/27584033
has text: suggest you grab a pencil and paper and write the formulas down you need first, then work that into your code
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27606308
type: Question
has comment: http://stackoverflow.com/comment/43635468
score: 0
has comment: http://stackoverflow.com/comment/43635572
tagged with: canvas
accepted answer: http://stackoverflow.com/a/27607005
tagged with: arrays
answer count: 1
has title: Removal of object from array depending on object value
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/43635544
has body: I am having a few problem with my JavaScript game. I have 3 enemies on the screen and they can be shot at by the controllable player. The problem is that when you kill certain enemies they are removed, but sometimes other ones are too. The following code is fed these variables (x, y and angle may vary): enemys - an array of objects: { x: 646, y: 343, angle: 137, speed: 0, canSeePlayer: 0, health: 10, fireCooldown: 10 } The code: enemys.forEach(function(enemy) { var enemyIndex = enemys.indexOf(enemy); if (enemys[enemyIndex].health &lt;= 0) { enemys.splice(enemy, 1); } }); Is it possible to remove a object from an array based on value any easier way?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27607005
upvote count: 1
downvote count: 1

http://stackoverflow.com/tag/svg
tags question: http://stackoverflow.com/q/27475465
tags question: http://stackoverflow.com/q/27504385
tags question: http://stackoverflow.com/q/27554083
tags question: http://stackoverflow.com/q/27569194
tags question: http://stackoverflow.com/q/27560731
tags question: http://stackoverflow.com/q/27593634
tags question: http://stackoverflow.com/q/27587453
tags question: http://stackoverflow.com/q/27543124
tags question: http://stackoverflow.com/q/27607544
tags question: http://stackoverflow.com/q/27572161
tags question: http://stackoverflow.com/q/27533178
tags question: http://stackoverflow.com/q/27485185
tags question: http://stackoverflow.com/q/27514394
tags question: http://stackoverflow.com/q/27625710
tags question: http://stackoverflow.com/q/27500353
tags question: http://stackoverflow.com/q/27517482
tags question: http://stackoverflow.com/q/27607867
tags question: http://stackoverflow.com/q/27546598
tags question: http://stackoverflow.com/q/27501189
tags question: http://stackoverflow.com/q/27505517
tags question: http://stackoverflow.com/q/27497436
tags question: http://stackoverflow.com/q/27490104
tags question: http://stackoverflow.com/q/27596877
tags question: http://stackoverflow.com/q/27526405
tags question: http://stackoverflow.com/q/27629533
tags question: http://stackoverflow.com/q/27581216
tag name: svg
tags question: http://stackoverflow.com/q/27494590
tags question: http://stackoverflow.com/q/27618393
tags question: http://stackoverflow.com/q/27511153
tags question: http://stackoverflow.com/q/27568071
tags question: http://stackoverflow.com/q/27632621
tags question: http://stackoverflow.com/q/27547791
tags question: http://stackoverflow.com/q/27542928
tags question: http://stackoverflow.com/q/27599941
tags question: http://stackoverflow.com/q/27495894
tags question: http://stackoverflow.com/q/27604250
tags question: http://stackoverflow.com/q/27518279
tags question: http://stackoverflow.com/q/27626856
tags question: http://stackoverflow.com/q/27576143
tags question: http://stackoverflow.com/q/27489143
tags question: http://stackoverflow.com/q/27518293
tags question: http://stackoverflow.com/q/27479297
tags question: http://stackoverflow.com/q/27475258
tags question: http://stackoverflow.com/q/27574743
tags question: http://stackoverflow.com/q/27557040
tags question: http://stackoverflow.com/q/27502804
tags question: http://stackoverflow.com/q/27596652
tags question: http://stackoverflow.com/q/27533358
tags question: http://stackoverflow.com/q/27624668
tags question: http://stackoverflow.com/q/27639415
tags question: http://stackoverflow.com/q/27552367
tags question: http://stackoverflow.com/q/27625735
tags question: http://stackoverflow.com/q/27506002
tags question: http://stackoverflow.com/q/27484303
tags question: http://stackoverflow.com/q/27607174
type: Tag

http://stackoverflow.com/comment/43471232
type: QuestionComment
has text: A JSFiddle or something similar would be nice
comment on: http://stackoverflow.com/q/27520889
score: 0
type: Comment

http://stackoverflow.com/q/27571930
has comment: http://stackoverflow.com/comment/43596881
answer count: 0
has comment: http://stackoverflow.com/comment/43569743
has body: I've developing a drawing application, which would allow the user to draw a neon like doodle. Most of the functionality works - but I am having issues with the "undo" function. I try and remove the last child from the drawingcanvas - but it doesn't make any difference // Canvas code // var app ={ stage:null, stagetools:null, erase:0, container:null, loader:null, stageArea:null, backgroundContainer:null, backgroundBounds:null, oldPt:0, oldMidPt:0, midPt:0, NUM_LINES: -1, manifest:[], toolsAssets:[], lineArray:[], lineArray2:[], lineArray3:[], filters2:[], filters:[], mouseDOWN:false, bgscale:true, maskFilter:null, init: function(chosenNum){ //setup this.stagetools = new createjs.Stage('canvasTools'); this.stagetools.enableDOMEvents(true); this.stagetools.enableMouseOver(10); createjs.Touch.enable(this.stagetools); this.stage = new createjs.Stage('canvas'); this.stage.autoClear = true; this.stage.enableDOMEvents(true); this.stage.snapToPixelEnabled = true; this.stage.enableMouseOver(10); createjs.Touch.enable(this.stage); createjs.Ticker.setFPS(5000); createjs.Ticker.addEventListener('tick', this.tick); //loader this.manifest = [ {src:'images/brush.png', id:'brush', link: 'tool'}, {src:'images/undo.png', id:'undo', link: 'tool'}, {src:'images/eraser.png', id:'eraser', link: 'tool'}, {src:'images/clear.png', id:'clear', link: 'tool'} ]; switch(chosenNum) { case 0: this.manifest.push({src:'images/NeonCanvases-image1.jpg',id:'fc0', link:'car'}); break; case 1: this.manifest.push({src:'images/NeonCanvases-image2.jpg',id:'fc1', link:'car'}); break; case 2: this.manifest.push({src:'images/NeonCanvases-image3.jpg',id:'fc2', link:'car'}); break; case 3: this.manifest.push({src:'images/NeonCanvases-image4.jpg',id:'fc3', link:'car'}); break; case 4: this.manifest.push({src:'images/NeonCanvases-image5.jpg',id:'fc4', link:'car'}); break; case 5: this.manifest.push({src:'images/NeonCanvases-image6.jpg',id:'fc5', link:'car'}); break; default: this.manifest.push({src:'images/NeonCan…
type: Question
has comment: http://stackoverflow.com/comment/43579876
has comment: http://stackoverflow.com/comment/43571006
score: 0
has title: Easeljs - creating a neon drawing application - with undo, delete, brush size, colour options
tagged with: javascript
type: UnansweredQuestion
tagged with: easeljs
tagged with: createjs
has comment: http://stackoverflow.com/comment/43597170
has comment: http://stackoverflow.com/comment/43570198

http://stackoverflow.com/q/27554307
type: Question
tagged with: http://stackoverflow.com/tag/html
has title: window.history.back() sometimes refreshes and sometimes doesn't
has comment: http://stackoverflow.com/comment/43534917
score: 0
answer count: 1
has body: I am finding that when I use the back button on the browser or window.history.back(); the page being loaded sometimes refreshes and sometimes doesn't. I have not been able to reproduce this reliably but it is causing a problem in that I do not want the page being gone back to refresh is it displays different information every time it is refreshed. I either need to ensure the back button and window.history.back(); do not cause a refresh, or I need to be able to detect on the page that it is being redisplayed as the result of a back button so I can somehow stop it being refreshed. Is anyone able to explain why it sometimes refreshes and sometimes doesn't and what if anything I can do about it?
has answer: http://stackoverflow.com/a/27554590
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/a/27530972
answers question: http://stackoverflow.com/q/27514761
score: 1
has body: If I understood your question correctly, would this work? // - I use two support functions that can probably be found in other JSes frameworks, and they're down below. function calculateMySizes(someElement) { var childDiv = findChild(someElement, "DIV"); var totalWidth = 0; var totalHeight = 0; var maxWidth = 0; var maxHeight = 0; do { if(childDiv.offsetLeft &gt; maxWidth) { maxWidth = childDiv.offsetLeft; totalWidth += childDiv.offsetLeft; } if(childDiv.offsetTop &gt; maxHeight) { maxHeight = childDiv.offsetTop; totalHeight += childDiv.offsetTop; } } while (childDiv = nextElement(childDiv)); alert("object's current width is: " + totalWidth + " and it's child's largest width is: " + maxWidth); alert("object's current height is: " + totalHeight + " and it's child's largest height is: " + maxHeight); } // - Returns the next Element of object function nextElement(object) { var nextObject = object; while (nextObject = nextObject.nextSibling) { if (nextObject.nodeType == 1) { return nextObject; } } return nextObject; } // - Returns the first child of elementName found function findChild(object, elementName) { for (var i = 0; i &lt; object.childNodes.length; i++) { if (object.childNodes[i].nodeType == 1) { if (object.childNodes[i].nodeName.toUpperCase() == childName) { return object; } if (object.childNodes[i].hasChildNodes()) { var child = findChild(object.childNodes[i], childName, countMatch); if (child) { return child; } } } } } I can think of a scenario where the child object's bounding box is deceptively smaller than it's own children, in the case of a float or position:absolute element, and to fix that a recursive call for all the children would be required, but other than this scenario, this should give you the minimum width/height of any element according to their children's sizes.
downvote count: 0
has comment: http://stackoverflow.com/comment/43491033
type: Answer
upvote count: 1

http://stackoverflow.com/q/27605280
tagged with: pre
has comment: http://stackoverflow.com/comment/43632870
accepted answer: http://stackoverflow.com/a/27605418
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43633137
tagged with: css
favorite count: 0
has comment: http://stackoverflow.com/comment/43632645
has comment: http://stackoverflow.com/comment/43633105
has comment: http://stackoverflow.com/comment/43632959
type: Question
upvote count: 2
has title: How To Add In The End Of Every Line In Tag?
tagged with: php
answer count: 1
has comment: http://stackoverflow.com/comment/43632659
has comment: http://stackoverflow.com/comment/43632721
has body: I am sharing codes in my WordPress blog but I don't want to use any plugin or third party to host and format my codes. I add codes and use &lt;pre&gt;&lt;/pre&gt; tags around it but the problem is that when someone copy it then all line break disappear and the pasted code becomes in one line that sometime confuse the user or some time stop working. So now is there any trick to add line break or &lt;br/&gt; in the end of every line of &lt;pre&gt;&lt;/pre&gt; tag only using PHP or JavaScript. You can see some error DEMO's here... How To Add List Style V1-Optimized Blogger Posts In Blogspot? How To Add Grid Style V1-Optimized Blogger Posts In Blogspot? and many more of my posts have this error. To check this error, Just copy the &lt;pre&gt;&lt;/pre&gt; tag codes and paste it anywhere and see that there will be no line break as code shows on blog. How to fix it?
has comment: http://stackoverflow.com/comment/43632758
has answer: http://stackoverflow.com/a/27605418
has comment: http://stackoverflow.com/comment/43632730
has comment: http://stackoverflow.com/comment/43632830
score: 2
has comment: http://stackoverflow.com/comment/43632824
has comment: http://stackoverflow.com/comment/43632740
has comment: http://stackoverflow.com/comment/43632715
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/27569792
type: Question
tagged with: javascript
has title: Trying to accomplish imagemagick.js functionality in javascript; How to use Processing.js to identify and convert image?
tagged with: image
score: 0
tagged with: imagemagick
has comment: http://stackoverflow.com/comment/43595288
has body: I'm having a problem with Chrome where it prints grayscale images from my website with a red overlay. This is a known bug with Chrome that is supposedly being fixed, but until it is I need to find a way to make my images print correctly. I found this hack in a thread about the issue that mentions imagemagick: I found that this was happening to grayscale jpgs. Using imagemagick I was able to mass-reprocess images to avoid this issue using the following commands. if identify -format "%r" file.jpg returns "PsuedoClass Gray" or "PsuedoClassGray" then run the following: convert file.jpg -type Truecolor file.jpg However, I imagemagick.js doesn't work; I tried using it and got an error "require is not defined", and discovered that I cannot use node.js script in my browser. Apparently Processing.js is supposed to be a decent javascript library to mimic imagemagick, but I can't figure out how to do the same things. This is what I was trying to do with imagemagick: im.identify(['-format', '%wx%h', '@Model.DatabaseName' + '.jpg'], function(err, output) { if (err) throw err; // if output returns PsuedoClass Gray, do im.convert }); How can I do this with Processing.js, or is there another library that I should use to do this?
has answer: http://stackoverflow.com/a/27626454
answer count: 1
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43662773
tagged with: process
tagged with: processing.js

http://stackoverflow.com/q/27598311
answer count: 2
has answer: http://stackoverflow.com/a/27598331
downvote count: 0
tagged with: jquery
has title: Check box change event is not working in firefox jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27598362
has body: Here is my code. This code is not working in mozilla firefox browser. My Html &lt;input class="staff_check" name="select_staff" type="checkbox" value="@Model.Caregivers[i].AgencyUserID" /&gt; Script var selected_staff = []; var selected_staff_names = []; $('input[name="select_staff"').change(function () { console.log('ds'); if (this.checked) { selected_staff.push($(this).val()); selected_staff_names.push('&lt;span class="selected_staff"&gt;' + $(this).parent('label').text().trim() + '&lt;/span&gt;'); } else { var idx = $.inArray($(this).val(), selected_staff); if (idx &gt; -1) { selected_staff.splice(idx, 1); selected_staff_names.splice(idx, 1); } } }); This works fine in google chrome. But it'nt work in mozilla firefox.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44000307
score: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/27598362
type: Question
tagged with: firefox
tagged with: javascript
has comment: http://stackoverflow.com/comment/44001435
possible better answer: http://stackoverflow.com/a/27598331

http://stackoverflow.com/q/27564858
has title: dojo widget doesn't render unless browser window is resized
has answer: http://stackoverflow.com/a/28086036
tagged with: dojo
type: Question
has comment: http://stackoverflow.com/comment/43556656
answer count: 1
has comment: http://stackoverflow.com/comment/43570862
accepted answer: http://stackoverflow.com/a/28086036
tagged with: javascript
has body: The widget does not get rendered in the TabContainer unless the browser(I'm using Chrome) window is resized or Developer tool is opened. I have tried the solutions provided on earlier threads like setting the height and width of the BorderContainer, TabContainer and ContentPanes but there is no difference. The following is my code snippet. To the attachpoint "steps" I'm attaching certain data. This tab "Steps" is the problem. Any solution? Below is my code... ${tName} Action Attributes Action Substeps
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
tagged with: widget
score: 0

http://stackoverflow.com/a/48424082
answers question: http://stackoverflow.com/q/27605332
has body: function persistence(num) { if(num.toString().length &gt; 1){ var mult = 1; var splitStr = num.toString().split(''); for(var i = 0; i&lt;splitStr.length; i++) { mult *= parseInt(splitStr[i]); } return 1 + persistence(mult); } else{ return 0; }
score: 0
type: Answer

http://stackoverflow.com/comment/43455836
comment on: http://stackoverflow.com/a/27512778
type: AnswerComment
has text: Thank you. It is now 1 / 4. But when I'm not seen 4/4. Its return 3/4
score: 0
type: Comment

http://stackoverflow.com/q/27545921
type: Question
score: 0
has title: Gmail contacts api access error
tagged with: https
tagged with: google-oauth
has comment: http://stackoverflow.com/comment/43546060
has comment: http://stackoverflow.com/comment/43526221
answer count: 0
tagged with: ssl
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43518442
tagged with: google-contacts-api
has body: I want access client gmail contacts using gmail api. but it give error like "Uncaught SecurityError: Blocked a frame with origin "http://" from accessing a frame with origin "https://accounts.google.com". The frame requesting access has a protocol of http", the frame being accessed . my code GET CONTACTS FEED

http://stackoverflow.com/comment/43472319
type: QuestionComment
has text: If the user is not logged in, the userData promise should not be resolved. Probably better calling the getUserData() from controllers that can be used in both logged out and in. Then when the user logs in, resolve this promise and the controller can update it's data.
comment on: http://stackoverflow.com/q/27520826
score: 0
type: Comment

http://stackoverflow.com/a/27534074
answers question: http://stackoverflow.com/q/27532853
has body: It seems you didn't miss anything, it works fine for me. Here is a sample plunker: http://plnkr.co/edit/BbVs7pEEFGTunXVkxCMj?p=preview If it doesn't work the first time, make sure to initialize the value of the first checkbox (ng-model="globalChecked" in your code). &lt;input type='checkbox' ng-click="checkAll(toplevel)" ng-model="toplevel"&gt; &lt;div ng-repeat="obj in objects"&gt; &lt;input type='checkbox' ng-model="obj.checked"&gt; &lt;/div&gt; $scope.objects = []; for(var i = 0; i &lt; 100; i++) { if (!$scope.objects[i]) $scope.objects[i] = {checked: false}; } $scope.checkAll = function(val){ for(var i = 0; i &lt; 100; i++){ console.log($scope.objects[i]); $scope.objects[i].checked = val; } }
score: 0
has comment: http://stackoverflow.com/comment/43498402
has comment: http://stackoverflow.com/comment/43498160
type: Answer
has comment: http://stackoverflow.com/comment/43497620

http://stackoverflow.com/comment/43619303
comment on: http://stackoverflow.com/q/27570877
type: QuestionComment
has text: @TomKriek, anything I can put on the web. Preferably without expense.
type: Comment
score: 0

http://stackoverflow.com/a/27518762
answers question: http://stackoverflow.com/q/27518568
has body: Your userService shouuld return a promise , this.login = function(){ return userService.logIn(username, password) }; and then in the controller , var login = Parse.User.login($scope.username, $scope.password).then(function(){ $scope.isLoggedIn=true; }).error(function(){ $scope.isLoggedIn=false; }) And in the Parse.User service it should return a promise , Parse.User.login=function(username,pwd){ return $http.post('/someUrl', {userName:username,password:pwd}) }
score: 0
type: Answer

http://stackoverflow.com/comment/43540633
comment on: http://stackoverflow.com/q/27557164
has text: Your question is confusing. Are you well versed in JavaScript DOM manipulations in general and selectors in particular??
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/43611582
comment on: http://stackoverflow.com/q/27593311
score: 0
type: Comment
type: QuestionComment
has text: Alright, a few times, empty data is being returned but I don't see how that should cause the above behavior

http://stackoverflow.com/a/27612158
type: Answer
has body: procTech.insert({"count":1,"tech":'techName' }); procTech.insert({"count":2,"tech":'techName1' }); procTech.insert({"count":3,"tech":'techName2' }); procTech.insert({"count":3,"tech":'techName2' }); procTech.insert({"count":3,"tech":'techName2' }); procTech.insert({"count":4,"tech":'techName3' }); var query = procTech.select("count","tech"); // 3 rows for ( var x=0; x&lt;query.length-1; x++ ) { console.log(query[x][0], query[x][1]); }
accepted answer of: http://stackoverflow.com/q/27611925
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27611925
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/43580778
has text: he has a few other issues there
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27577904
type: Comment

http://stackoverflow.com/comment/43492561
type: Comment
comment on: http://stackoverflow.com/a/27531586
type: AnswerComment
score: 0
has text: I have specific clients that still on IE8. In a perfect world, sure, I will design a perfect site. But in reality, if you got hand over with an older project, there is always budget/time/management involved that you just do your best.

http://stackoverflow.com/a/27627061
upvote count: 12
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27624668
score: 12
has body: If you were using solid color fills, it would be straightforward to transition them to gray and then back to color -- just use the d3 transition of the fill property instead of the fill-opacity and stroke-opacity properties. However, the colors in this case aren't actually associated with the elements in your selection. Instead, they are specified within the &lt;stop&gt; elements of the &lt;radialGradient&gt; created for each category. (Actually, they are currently created for each individual circle -- see my note below.) Therefore, you need to select these elements to transition the stop colors. Because you're transitioning all elements in a given category at the same time, you wouldn't need to create additional gradient elements -- you just need a way to select the gradients associated with those categories, and transition them. Here's your original code for creating the gradient elements, and referencing them to color the circles: var grads = svg.append("defs").selectAll("radialGradient") .data(nodes) .enter() .append("radialGradient") .attr("gradientUnits", "objectBoundingBox") .attr("cx", 0) .attr("cy", 0) .attr("r", "100%") .attr("id", function(d, i) { return "grad" + i; }); grads.append("stop") .attr("offset", "0%") .style("stop-color", "white"); grads.append("stop") .attr("offset", "100%") .style("stop-color", function(d) { return color(d.cluster); }); var node = svg.selectAll("circle") .data(nodes) .enter() .append("circle") .style("fill", function(d, i) { return "url(#grad" + i + ")"; }) .call(force.drag) .on("mouseover", fade(.1)) .on("mouseout", fade(1)); The fade() function you're currently using generates a separate event handler function for each element, which will then select all the circles and transition them to the specified opacity, or to full opacity, according to whether they are in the same cluster as the circle that received the event: function fade(opacity) { return function(d) { node.transition().duration(1000) .style("fill-opacity", funct…
accepted answer of: http://stackoverflow.com/q/27624668

http://stackoverflow.com/comment/129879734
type: Comment
comment on: http://stackoverflow.com/a/73494693
score: 0
type: AnswerComment
has text: Please include a code example in your answer so readers can verify the solution will work for their needs and so there's no confusion as to how to implement the solution you're describing.

http://stackoverflow.com/q/27494570
answer count: 1
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
tagged with: php
has title: How to add two integer values in jQuery and have an output in $ ammount
has body: I have the following code : $(document).ready(function(){ $('input').iCheck ({ checkboxClass: 'icheckbox_square-blue', radioClass: 'iradio_square-blue', increaseArea: '20%' // optional }); var sum = 0; $(".btn-checkbox-choice").blur(function(){ $(this).parseNumber({format:"#,###.00", locale:"us"}); $(this).formatNumber({format:"#,###.00", locale:"us"}); }); $(".btn-checkbox-plan").blur(function(){ $(this).parseNumber({format:"#,###.00", locale:"us"}); $(this).formatNumber({format:"#,###.00",locale:"us"}); }); $('input').on('ifChecked', function(event){ if($(".btn-checkbox-plan").is(':checked')){ $("#output").html($(this).val()); } else if($(".btn-checkbox-choice").is(':checked')){ $("#output-choice").html($(this).val()); } }); if($('.btn-checkbox-choice').is(':checked') && $('.btn-checkbox-plan').is(':checked')){ sum = parseInt($('.btn-checkbox-choice').val()) + parseInt($('.btn-checkbox-plan').val()); //alert(sum); $('#output').html(sum); //console.log(sum); } }); checkout.php <input class="btn-checkbox-choice" type="radio" name="groupeight" value="49.99" <?php if (!isset($_POST['radio']) || isset($_POST['radio']) && $_POST['radio'] == '49.99'): ?>checked="checked"<?php endif; ?> /> Yes <input class="btn-checkbox-choice" type="radio" name="groupeight" value="0.00" <?php if (!isset($_POST['radio']) || isset($_POST['radio']) && $_POST['radio'] == '0.00'): ?>checked="checked"<?php endif; ?> /> No <input class="btn-checkbox-plan" type="radio" name="groupnine" value="699" <?php if (!isset($_POST['radio']) || isset($_POST['radio']) && $_POST['radio'] == '699'): ?>checked="checked"<?php endif; ?> /> Silver Plan $699 <input class="btn-checkbox-plan" type="radio" name="groupnine" value="999" <?php if (isset($_POST['radio']) && $_POST['radio'] == '999'): ?>checked="checked"<?php endif; ?>/> Gold Plan $999 I am trying to output the total price of the .btn-checkbox-plan and .btn-choice-plan with $ sign in front of the total amount. However, my code doesn't work. I don't get th…
score: 0
upvote count: 1
downvote count: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27494607

http://stackoverflow.com/q/27570404
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27603998
has comment: http://stackoverflow.com/comment/43618285
has body: My js lives inside a FF addon so has access to prilivaged api. Currently I'm able to append a string to a file or truncate a file and write the string. But is there an easy way to prepend a string to a file? So my string is placed at the beginning of file, then existing content follows. new file FileUtils.openSafeFileOutputStream(file, FileUtils.MODE_WRONLY | FileUtils.MODE_CREATE | FileUtils.MODE_TRUNCATE) append to file FileUtils.openFileOutputStream(file, FileUtils.MODE_WRONLY | FileUtils.MODE_APPEND) main.js contents .. Cu.import("resource://gre/modules/NetUtil.jsm"); Cu.import("resource://gre/modules/FileUtils.jsm"); var filename = 'test.txt', ostream, string = 'test content', file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile); file.initWithPath('/home/user/'); file.append(fileName); try { if (file.exists() === false) { file.create(Ci.nsIFile.NORMAL_FILE_TYPE, 420); } ostream = FileUtils.openSafeFileOutputStream(file, FileUtils.MODE_WRONLY | FileUtils.MODE_CREATE | FileUtils.MODE_TRUNCATE); var converter = Cc["@mozilla.org/intl/scriptableunicodeconverter"].createInstance(Ci.nsIScriptableUnicodeConverter); converter.charset = "UTF-8"; var istream = converter.convertToInputStream(combinedString); NetUtil.asyncCopy(istream, ostream, function (status) { if (!components.isSuccessCode(status)) { console.log('success: ' + file.path); } else { console.log('error: ' + file.path); } }); } catch (e) { return false; }
type: Question
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27603998
answer count: 1
tagged with: firefox-addon-sdk
has comment: http://stackoverflow.com/comment/43630178
has title: Prepend string to a file in javascript?

http://stackoverflow.com/q/27519415
has comment: http://stackoverflow.com/comment/43468497
has answer: http://stackoverflow.com/a/27519453
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27519511
type: Question
has body: We have one table in which we have three td like this: HTML: Smith We need a function that checks the check-box as soon as the text field receives any input. If the text field is cleared of all input (becomes empty) the check-box should become unchecked again. Can someone lead me into the right direction?
tagged with: checkbox
tagged with: cordova
tagged with: textfield
has title: how check box check and unchecked automatically
score: 0
answer count: 3
accepted answer: http://stackoverflow.com/a/27519511
possible better answer: http://stackoverflow.com/a/27519449
has answer: http://stackoverflow.com/a/27519449

http://stackoverflow.com/comment/43651641
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27596020
has text: I was able to get it working on a rails new app with no issue by just dropping the code into application.css and application.js you can see them here. [Rails Page Change Animation](https://gist.github.com/11d6c3b43622f8f2b837) It's possible the javascript is not firing do you have any errors on your javascript console?

http://stackoverflow.com/a/27613365
answers question: http://stackoverflow.com/q/27613354
has body: At the moment you have var Name1 = John; Javascript is interpreting John as a variable not a string! To make it interpret john as a string you must wrap it in " " or ' ' Solution 1 var Name1 = 'John'; var Name2 = 'Doe'; var formVariables = Name1 + Name2; alert(formVariables); Solution 2 var John = 'John'; var Doe = 'Doe'; var Name1 = John; var Name2 = Doe; var formVariables = Name1 + Name2; alert(formVariables);
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 2
score: 2
accepted answer of: http://stackoverflow.com/q/27613354

http://stackoverflow.com/q/27554095
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27554154
tagged with: javascript
answer count: 1
downvote count: 0
accepted answer: http://stackoverflow.com/a/27554154
favorite count: 0
linked to: http://stackoverflow.com/q/1732348
tagged with: regex
score: 2
upvote count: 2
has title: javascript regex to match all custom commented out sections, but not other text
has body: Say I have a html doc like so: &lt;!--FOO--&gt; some text &lt;!--BAR--&gt; some other text &lt;!--FOO--&gt; some more text &lt;!--BAR--&gt; How can I write a javascript regex that matches both cases of &lt;!--FOO--&gt;anytext&lt;!--BAR--&gt; but not the text in between ('some other text' in this case). My regex that I thought would work is /&lt;!--FOO--&gt;(.|\n)*&lt;!--BAR--&gt;/ but it catches the 'some other text' as well.
type: Question

http://stackoverflow.com/q/27486513
has body: I have a JQuery Flot Line Chart. I have not used JQuery Flot Charts before, and have little experience with JQuery Flot Charts. I have looked around, and cannot find answer to this elsewhere. The data array for the JQuery Flot line chart is as follows: var twitter = [[1, 27], [2, 34], [3, 51]] When user hovers over each data point in line chart, user is presented with a ToolTip. The ToolTip currently displays the following: ToolTip Example, Data Point One > Twitter: | X:1 | y:27.00 I can see that this is controlled in the Var Options here: var options = { grid : { hoverable : true }, colors : ["#568A89", "#3276B1"], tooltip : true, tooltipOpts : { **//content : "Value $x Value $y",** Now, each of my data arrays are displaying a different point of data. For example: Data Array One: Displaying Number of User Profile Views Data Array Two: Displaying Number of User Points Data Array Three: Displaying Number of Friends Now, when user hovers of each of these data points, user needs to be able to see what each data point relates to. For example: When user hovers over > Data Array One: [1, 27] ToolTip needs to display > 27 Profile Views When user hovers over > Data Array Two: [2, 34] ToolTip needs to display > 34 User Points How can i customize what the ToolTip displays ? How can i have different ToolTip Content for each individual data array ? Thank you for your help and support with this question.
type: Question
tagged with: javascript
tagged with: jquery
score: 0
tagged with: flot
answer count: 1
has answer: http://stackoverflow.com/a/27487747
has title: How To Add Content To JQuery Flot Chart Data Array ToolTip
type: UnansweredQuestion

http://stackoverflow.com/comment/43448732
type: QuestionComment
score: 2
has text: Don't use regex for this. jQuery has lots of methods for amending the DOM without hacking around text. What output are you trying to achieve?
comment on: http://stackoverflow.com/q/27509329
type: Comment

http://stackoverflow.com/a/27606106
has body: You want to have them bold in your HTML, so: example = "Hello World";
type: Answer
answers question: http://stackoverflow.com/q/27606025
has comment: http://stackoverflow.com/comment/43635838
score: 0

http://stackoverflow.com/q/27526203
has comment: http://stackoverflow.com/comment/43482434
tagged with: sockets
has body: I am working on a browser-game in Node.Js and I have this script : game.js >> var config = require('./game_config.js'); var mysql = require('mysql'); var app = require('express')(); var http = require('http').Server(app); var io = require('socket.io')(http); var connexion = mysql.createConnection({ 'host': config.DB_HOST, 'user' : config.DB_USER, 'password' : config.DB_PASS, 'database' : config.DB_NAME }); var Player = require('./server/class.player.js'); io.on('connect', function(socket) { console.log('Co'); var player socket.on('login', function(data) { connexion.query("SELECT * FROM player WHERE nick = '"+data.login+"' AND pass = '"+data.pass+"'", function(err, rows) { if (err) { throw err; } else { if (rows.length == 0) { var dataRet = "LOG"; socket.emit('login', dataRet); } else { var p = rows[0]; var dataRet = new Player(p.id, p.nick, p.map_id, p.x, p.y, connexion).toJson(); console.log(dataRet); } // Without setTimeout it wouldn't work because the object didn't have the time to instantiate setTimeout(function() { socket.emit('login', dataRet); },1000); } }); }); socket.on('disconnect', function(socket) { console.log('Disco'); }); }); class.Player.js >> var Player = function (id, name, map_id, x, y, connexion) { this.id = id; this.name = name; this.map_id = map_id ; this.x = x; this.y = y; this.link = connexion; this.toJson = function () { return { 'id' : this.id, 'name' : this.name, 'map_id' : this.map_id, 'x' : this.x, 'y' : this.y }; } } module.exports = User; So basicly, my code works fine thanks to the "setTimeout()" in game.js (for the socket.emit() event). If I don't use it, the object 'dataRet' doesn't have the time to instantiate due to the asynchronousity of Node.js, so the socket emits "undefined" or "null". So I was thinking, there MUST be a way to listen for an object instantiation in order to emit it through socket.io as soon as it's done.
tagged with: node.js
score: -1
has comment: http://stackoverflow.com/comment/43481645
has title: Is it possible to listen for object instantiation in Node.js?
has comment: http://stackoverflow.com/comment/43481280
downvote count: 1
tagged with: socket.io
has answer: http://stackoverflow.com/a/27526698
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/43482756
upvote count: 0
answer count: 1
tagged with: websocket
accepted answer: http://stackoverflow.com/a/27526698
tagged with: javascript
has comment: http://stackoverflow.com/comment/43481230
favorite count: 0

http://stackoverflow.com/q/27505558
has answer: http://stackoverflow.com/a/27505592
has answer: http://stackoverflow.com/a/27505771
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/27505791
accepted answer: http://stackoverflow.com/a/27505771
score: 1
upvote count: 1
type: AnsweredQuestion
has body: I have a text box which is holding some values and it has a submit button and it also have a slider so when i am clicking the button the slider changes but i want that i will not click on that submit button,instead changing the value in the textbox wil affect the slider moving.Here is a fiddle upto what i have done http://jsfiddle.net/dhirajbodicherla/VbM9g/1/ This is the jQuery code var slider = $(".slider").slider({ value: 50, animate: true }); $('#animate').click(function(){ slider.slider('value', $('#val').val()); });
has title: How to make effect of text box value changes to a jQuery functionality
tagged with: javascript
type: Question
possible better answer: http://stackoverflow.com/a/27505592
answer count: 3

http://stackoverflow.com/q/27539752
has answer: http://stackoverflow.com/a/27539770
has answer: http://stackoverflow.com/a/27539773
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27539773
type: Question
upvote count: 2
answer count: 3
downvote count: 1
tagged with: javascript
tagged with: jquery
tagged with: asp.net
favorite count: 0
linked to: http://stackoverflow.com/q/3582619
possible better answer: http://stackoverflow.com/a/27540489
has answer: http://stackoverflow.com/a/27540489
tagged with: css
has body: I wanted to show and hide my TextBox based on value selected in RadiobuttonList. I wrote the following code for that $("#&lt;%= rbtnIsPFEnabled.ClientID %&gt;").click(function () { pfno = $("#&lt;%= txtPFNo.ClientID %&gt;"); if ($("#&lt;%= rbtnIsPFEnabled.ClientID %&gt; input:checked").val() == "Yes") { pfno.css("dispay") = "block"; } else pfno.css("dispay") = "none"; }); Though I had achieved my task by using JQuery.show() and JQuery.hide() but was not satisfied as I wanted to know why first approach failed. Second is I used $("#&lt;%= rbtnIsPFEnabled.ClientID %&gt;") in above code, can I reduce it to one by using something else second time like this or anything else? I tried $(this+" input:checked").val() and $(this.toString()+" input:checked").val() but it did not work, so I had to repeat it.
score: 1
has title: JQuery.css("display") = "block" not working

http://stackoverflow.com/comment/43642091
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27609592
has text: I don't need hyperlinks, I just need to find out which word is clicked.
score: 0

http://stackoverflow.com/comment/43422025
comment on: http://stackoverflow.com/q/27494513
score: 0
type: Comment
type: QuestionComment
has text: Why the background of the host is not BLUE! And why the border is not around the full hist! If I clicked the button the host background will be GREEN as I want,

http://stackoverflow.com/q/27493189
tagged with: http://stackoverflow.com/tag/html
tagged with: input
has comment: http://stackoverflow.com/comment/43419414
has answer: http://stackoverflow.com/a/27508753
upvote count: 3
type: UnansweredQuestion
type: Question
tagged with: charts
score: 3
has body: I have a chart which shows two columns of data. When the page loads, I need to show 0 for both bars in the chart. Then I want to give the control to the user the change the values using two text boxes. Possibly using 'keyup', so the user does not have to hit a submit button. var barvalues = [0,0]; I am planning on using HTML/CSS and JS, JQUERY. I can use any charts out there as long as it's not HTML5. Users are coming from IE 8, 9, 10 and 11. The problem I have is binding the data from the input field 'on-the-fly' to the barvalues array. How can i do it? How can I dynamically change/modify the values of the array so the chart get's updated whenever I hit the tab from the input box? Thanks!!
has title: How to insert values to an array using input fields?
has answer: http://stackoverflow.com/a/27494413
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/a/27597439
has comment: http://stackoverflow.com/comment/43618484
answers question: http://stackoverflow.com/q/27597425
has comment: http://stackoverflow.com/comment/43619218
has body: You need to escape all the forward slashes. &gt; var regex = /http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&amp;=]*)?/i; &gt; regex.test("http://myweb.com/api/v1/customer") true
has comment: http://stackoverflow.com/comment/43618566
has comment: http://stackoverflow.com/comment/43618582
upvote count: 1
has comment: http://stackoverflow.com/comment/43618622
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/q/27506111
has answer: http://stackoverflow.com/a/28850581
type: Question
upvote count: 12
has answer: http://stackoverflow.com/a/27506327
tagged with: javascript
tagged with: jquery
tagged with: jquery-ui-datepicker
score: 12
has answer: http://stackoverflow.com/a/41458246
downvote count: 0
has answer: http://stackoverflow.com/a/27510005
favorite count: 0
has answer: http://stackoverflow.com/a/70477749
possible better answer: http://stackoverflow.com/a/27506151
has title: Jquery datepicker change event trigger and input's default change event
has body: I have datepicker &lt;input type='text' class='inp'&gt; &lt;script&gt; $('.inp').datepicker(); $(".inp").on("change",function (){ console.log('inp changed'); }); &lt;/script&gt; When I first change '.inp' manually type there a value, then immediately I click on datepicker's opened calendar. I get two 'change' event listeners. First from manual change, then from datepicker change. How can I avoid this?
accepted answer: http://stackoverflow.com/a/27506327
has answer: http://stackoverflow.com/a/27506151
tagged with: datepicker
has answer: http://stackoverflow.com/a/30671178
answer count: 10
has answer: http://stackoverflow.com/a/27506178
has comment: http://stackoverflow.com/comment/43442409
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/59834380
has answer: http://stackoverflow.com/a/57321939

http://stackoverflow.com/a/27518368
has body: You may refer to How is mime type of an uploaded file determined by browser?. It first checks the file extension name, so a *.json file will have file.type as application/json. If not found, it will enquiry the system for the file type, make sure your upload file is recognized as json file. According to https://developer.mozilla.org/en-US/docs/Web/API/Blob.type, it would be empty if unknown.
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/27518238
has comment: http://stackoverflow.com/comment/43467507
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43508170

http://stackoverflow.com/q/27532880
has comment: http://stackoverflow.com/comment/43494706
tagged with: php
has title: JavaScript Form Cloning
tagged with: cloning
has comment: http://stackoverflow.com/comment/43497233
score: 0
type: UnansweredQuestion
type: Question
has body: I am trying to clone simple "directors / members" form. When I hit "add member button" it clones everything the form, but it does not erases zip code field. Also, when I submit the form it does not submit the first two fields of the cloned forms. It takes values of first name and last name and assigns it to address and city and so on... So, to summarize it does not send two fields, and I think it's state and zip fields of cloned forms that give me troubles, but I can't see why. $y=0; $clone=1; do{ ?> <div id="<?php echo "clonedSection$clone"; ?>" class="clonedSection" > <label id="<?php echo "member_label$clone"; ?>" > <?php echo "Director / Member $clone"; ?> First name<input style="margin: 2px; margin-left: 5px; margin-right: 5px;" type="text" name="<?php echo "member_firstname$clone"; ?>" id="<?php echo "member_firstname$clone"; ?>" value="<?php echo $split_members[$y][0];?>"> <?php echo $member_errors[$y]["member_first_name"];?> Last name<input style="margin: 2px; margin-left: 5px; margin-right: 5px;" type="text" name="<?php echo "member_lastname$clone"; ?>" id="<?php echo "member_lastname$clone"; ?>" value="<?php echo $split_members[$y][1];?>"> <?php echo $member_errors[$y]["member_last_name"];?> Street address<input style="margin: 2px; margin-left: 5px; margin-right: 5px;" type="text" name="<?php echo "member_address$clone"; ?>" id="<?php echo "member_address$clone"; ?>" value="<?php echo $split_members[$y][2];?>"> <?php echo $member_errors[$y]["member_address"];?> City <input style="margin: 2px; margin-left: 5px; margin-right: 5px;" type="text" name="<?php echo "member_city$clone"; ?>" id="<?php echo "member_city$clone"; ?>" value="<?php echo $split_members[$y][3];?>"> <?php echo $member_errors[$y]["member_city"];?> State<select style="margin: 2px; margin-left: 5px; margin-right: 5px;" name="<?php echo "member_state$clone"; ?>" id ="<?php echo "member_state$clone"; ?>"> <?php //$states = listStates(statesList()); foreach($states as $value){ echo ' '.$value.' …
has comment: http://stackoverflow.com/comment/43494511
tagged with: forms
has answer: http://stackoverflow.com/a/27532959
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43495845

http://stackoverflow.com/comment/43644194
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27606750
has text: Honestly no, I didn't think of that. But why would document.ready fire, if the scripts are not fully loaded ?

http://stackoverflow.com/comment/43644169
score: 0
comment on: http://stackoverflow.com/q/27609687
has text: @charlietfl I don't know how to build the fiddle so it works. Here's what I did: http://jsfiddle.net/9L4y5zf9/1/
type: QuestionComment
type: Comment

http://stackoverflow.com/a/27540527
has body: Yes, you can. You should add balloonText to the guide object, not like you did but like this: "guides": [{ category: "2001", toCategory: "2003", lineColor: "#CC0000", lineAlpha: 1, fillAlpha: 0.2, fillColor: "#CC0000", dashLength: 2, inside: true, labelRotation: 90, label: "fines for speeding increased", "balloonText": " asaassssss", }, { category: "2007", lineColor: "#CC0000", lineAlpha: 1, dashLength: 2, inside: true, labelRotation: 90, label: "motorcycle fee introduced" }] http://jsfiddle.net/5pdunxqf/2/
type: Answer
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/56048604
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27530456
answers question: http://stackoverflow.com/q/27530456

http://stackoverflow.com/comment/43639229
score: 0
type: Comment
has text: Oops, Yeah I completely forgot that. Thanks
comment on: http://stackoverflow.com/a/27607908
type: AnswerComment

http://stackoverflow.com/q/27482185
tagged with: javascript
score: 0
has body: var isH5 = !! document.createElement('canvas').getContext Would you say, that above JS code snippet is a good method of recognising a Browser's HTML5 capability? Also see What is the !! (not not) operator in JavaScript? in case of IE quirks mode, it should still return false. Update: Thanks for all the Modernizr links, we are using above recognising logic in conjunction with Modernizr already.
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/784929
has answer: http://stackoverflow.com/a/27482307
type: UnansweredQuestion
has title: Recommended method for recognising Browser's HTML5 capability?
has comment: http://stackoverflow.com/comment/43396939
type: Question
answer count: 1

http://stackoverflow.com/comment/54080315
score: 0
type: Comment
comment on: http://stackoverflow.com/a/32467898
type: AnswerComment
has text: I saw the issue in safari. In some of the browser, it's throwing exceptions for the command document.execCommand('copy'), thus it's going to the cache block and showing the prompt. But in safari, it doesn't throw any error and thus no prompt is shown. So to solve it I've written var linkCopied = false; linkCopied = document.execCommand('copy'); And then in finally block if there is no error and the linkCopied is false, then shown the prompt.

http://stackoverflow.com/a/27495034
downvote count: 0
answers question: http://stackoverflow.com/q/27477531
type: Answer
score: 1
upvote count: 1
has body: A Chrome app and a Chrome extension are different things. Check out this article. A general explanation is that extensions are part of your Chrome browser, hence having fewer UI elements, while a Chrome app is a standalone app that can be independent from your browser (still runs on Chrome though). I don't think it being on a Chromebook makes a difference here.

http://stackoverflow.com/q/27622270
answer count: 1
downvote count: 0
linked to: http://stackoverflow.com/q/4303829
tagged with: jquery
favorite count: 0
tagged with: ajax
has body: I have some code that is working to pull an xml value using jQuery $.ajax however once the application is running in the browser any changes to the xml .doc and a subsequent browser refresh does not display the new saved xml value xmlImagePath. What can be done to force the new xml value on browser refresh? $.ajax({ type: "GET", url: "/Images/referal_Image_Config.xml", dataType: "xml", success: function (xml) { //read xml file $(xml).find('image').each(function () { if ($(this).attr('active') == 'true') { var xmlImagePath = $(this).find('pathName').text();
has answer: http://stackoverflow.com/a/27622291
tagged with: http://stackoverflow.com/tag/xml
score: 1
upvote count: 1
type: AnsweredQuestion
tagged with: javascript
duplicate of: http://stackoverflow.com/q/4303829
type: Question
has comment: http://stackoverflow.com/comment/43665084
has comment: http://stackoverflow.com/comment/43665064
accepted answer: http://stackoverflow.com/a/27622291
has title: jQuery reloading xml doc requires browser close?

http://stackoverflow.com/comment/43496850
comment on: http://stackoverflow.com/q/27534025
has text: [Check this out](http://plnkr.co/edit/v6mYosIAAvbmBOlr1flV?p=preview) if you need a simple example for a nested repeat of a 2 diminutional array
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27537472
has body: a.sum(b).sum(c); That should do it.
type: Answer
score: -1
downvote count: 2
upvote count: 1
answers question: http://stackoverflow.com/q/27537448

http://stackoverflow.com/q/27635873
accepted answer: http://stackoverflow.com/a/27636091
favorite count: 0
has comment: http://stackoverflow.com/comment/43691075
has body: Is there a javascript that prevents the loading of a link on a page, for example: ads.link.com , www.link.com ? Does anyone know if it is possible ? event.preventDefault();
type: AnsweredQuestion
score: 3
has title: javascript which prevents the loading of a specific url?
upvote count: 3
has comment: http://stackoverflow.com/comment/43691141
has answer: http://stackoverflow.com/a/27636091
type: Question
downvote count: 0
tagged with: javascript
answer count: 1
tagged with: url

http://stackoverflow.com/a/43637891
type: Answer
answers question: http://stackoverflow.com/q/27506002
has body: If I read the question right, "someProperty" will provide the radius value, and "time" provides the angle. I would suggest transforming these datum to polar coordnates as described here: d3.js Plot elements using polar coordinates Theta would be the angle converted from "time". r would be "someProperty"
score: 0

http://stackoverflow.com/comment/43415438
type: Comment
comment on: http://stackoverflow.com/a/27491926
has text: I don't think `$(document).on("ready", fn)` does what you expect it to do.
score: 0
type: AnswerComment

http://stackoverflow.com/a/27518574
type: AcceptedAnswer
has body: Yes, you need to add the Wijmo module in order to use the custom directives provided by Wijmo.
type: Answer
accepted answer of: http://stackoverflow.com/q/27500354
score: 0
answers question: http://stackoverflow.com/q/27500354

http://stackoverflow.com/q/27622186
upvote count: 1
has title: Expand particular accordian by default
downvote count: 1
answer count: 1
favorite count: 0
tagged with: accordion
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/27622375
has body: I have multiple accordian div like Platform Status On ready I am setting $(".accordion").accordion({ autoHeight: false, animated: false, collapsible: true, active: false, heightStyle: "content" }); Now I want 1st Accordian to be expanded by default on load. I tried setting $( ".accordion" ).accordion( "option", "active", 1 ); But it doesn't help.
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27622375
score: 0

http://stackoverflow.com/a/27520577
score: 1
has body: You could use fs.readFileSync in that simple case : var returnURLS = function(file) { var text = fs.readFileSync(file).toString(); var lines = text.split('\n'); lines.forEach(function(line, callback){ var url = "http://www." + line; Urls.push(url); }); return Urls; }; That's perfectly OK when you don't need parallelism, like in this small utility program. But the solution you'll reapply everywhere else is to be wholly asynchronous by not returning the result but passing it as argument to a callback : var fetchURLS = function(callback) { fs.readFile(file, function(err, logData){ if (err) throw err; var text = logData.toString(); var lines = text.split('\n'); lines.forEach(function(line, callback){ var url = "http://www." + line; Urls.push(url); }); callback(Urls); }); }; }; fetchURLS('textFileWithListOfURLs.txt', function(urls){ console.log("2: ", urls); }); When your code grows in complexity, it becomes convenient to use promises to reduce the "callback hell".
answers question: http://stackoverflow.com/q/27520495
downvote count: 0
type: Answer
upvote count: 1

http://stackoverflow.com/q/27576143
downvote count: 2
has title: Color area in SVG xlink imported file using JavaScript
upvote count: 1
has body: I have following index.html file: <circle cx="50" cy="50" r="25" stroke="black" stroke-width="3" fill="blue" /> <image id="def" x="0" y="0" height="500" width="500" xlink:href="red.svg" /> and file red.svg: <circle cx="50" cy="50" r="25" stroke="black" stroke-width="3" fill="red" /> In browser I see at index.html file 2 circles. Blue and red. It is ok. I want to change color of circle after I click on it. At "inline" blue circle it works. But in inserted svg (red) nothing happens. How can I color imported image? Or is there any other working way how to import svg file? I cannot uset jQuery.load() because I need import files from file:// url.
has answer: http://stackoverflow.com/a/27577292
type: Question
tagged with: xlink
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
score: -1
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
type: UnansweredQuestion

http://stackoverflow.com/comment/43540177
has text: @Eses, the onchange, is an attribute attach to select element. This attribute has to be a function, that will be executed on the change of the element. It the same thing if you want to add a onclick function for example
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27556360

http://stackoverflow.com/q/27612372
linked to: http://stackoverflow.com/q/9350746
accepted answer: http://stackoverflow.com/a/55837311
answer count: 5
has body: I am trying to write a JS code that will cancel the "btn_submit" buttons .onclick event if the given number already exists in the database. I use AJAX to query the DB for the given number and to determine if the should send the data to a .php site which will upload the question. To determine this I need the numOfRows variable's value, but because I set it in AJAX it will stay on 0. The validation() function will finish before my AJAX query finishes and this causes the problem that will always state that the given number does not exist in the DB (numOfRows will always stay on 0). How can I await the AJAX query's finish before I compare the numOfRows to 0 in my validation() function's ending lines? If the number already exists in the DB, I need to return false to this line: document.getElementById("btn_submit").onclick = validation; Thank you! var textAreaList; var numOfRows = 0; var finished = false; document.getElementById("btn_submit").onclick = validation; textAreaList = document.getElementsByClassName("text_input"); function validation() { loadNumRows(); try { document.getElementById('failure').hidden = true; } catch(e) { console.log(e.message); } textAreaList = document.getElementsByClassName("text_input"); var failValidation = false; for (var i = 0; i &lt; textAreaList.length; i++) { console.log(textAreaList[i]); if (textAreaList[i].value == "") { textAreaList[i].style.border = "2px solid #ff0000"; failValidation = true; } else { textAreaList[i].style.border = "2px solid #286C2B"; } } return !(failValidation || numOfRows != 0); } function loadNumRows(){ $.ajax({ url: 'php/SeeIfNumberExists?number=' + document.getElementById('number_inp').value, type: "GET", cache: false, success: function (html) { numOfRows = parseInt(html); } }); }
linked to: http://stackoverflow.com/q/31322068
linked to: http://stackoverflow.com/q/14220321
has answer: http://stackoverflow.com/a/27612453
linked to: http://stackoverflow.com/q/23803743
tagged with: php
downvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43647075
has answer: http://stackoverflow.com/a/55837311
has answer: http://stackoverflow.com/a/67884427
score: 46
type: Question
upvote count: 47
has answer: http://stackoverflow.com/a/71109582
tagged with: javascript
has title: How to await the ajax request?
tagged with: jquery
has comment: http://stackoverflow.com/comment/119253566
possible better answer: http://stackoverflow.com/a/27612493
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/27612493

http://stackoverflow.com/comment/43452755
comment on: http://stackoverflow.com/a/27511180
type: AnswerComment
score: 0
has text: Thanks for the explanation! I'll accept your answer as soon as it'll let me ^^
type: Comment

http://stackoverflow.com/q/27623926
has comment: http://stackoverflow.com/comment/43670132
tagged with: encoding
has comment: http://stackoverflow.com/comment/43670094
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/35847946
score: 0
has comment: http://stackoverflow.com/comment/43670055
has comment: http://stackoverflow.com/comment/43670068
tagged with: decoding
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43668345
has body: I found an encoded javascript inside my template. I decoded it using a online decoder. I edited the then-newly decoded javascript. How can I encode this edited javascript again and use inside my teplate? Here's code: var _0xb8b1=["\x72\x20\x31\x61\x28\x75\x29\x7B\x76\x2E\x54\x28\x27\x3C\x50\x20\x70\x3D\x22\x31\x31\x22\x3E\x3C\x69\x20\x70\x3D\x22\x67\x20\x67\x2D\x31\x66\x22\x3E\x3C\x2F\x69\x3E\x20\x27\x2B\x31\x67\x2B\x27\x20\x3C\x2F\x50\x3E\x27\x29\x3B\x6A\x3D\x28\x57\x29\x3F\x4D\x2E\x31\x65\x28\x28\x6D\x2E\x37\x2B\x31\x29\x2A\x4D\x2E\x31\x6C\x28\x29\x29\x3A\x30\x3B\x68\x3D\x31\x33\x20\x31\x64\x28\x29\x3B\x33\x20\x65\x3D\x27\x3C\x7A\x20\x31\x68\x3D\x22\x4A\x22\x3E\x27\x3B\x41\x28\x33\x20\x69\x3D\x30\x3B\x69\x3C\x49\x3B\x69\x2B\x2B\x29\x7B\x33\x20\x32\x3D\x75\x2E\x48\x2E\x32\x5B\x69\x5D\x3B\x33\x20\x47\x3B\x33\x20\x6F\x3B\x34\x28\x69\x3D\x3D\x75\x2E\x48\x2E\x32\x2E\x37\x29\x71\x3B\x41\x28\x33\x20\x6B\x3D\x30\x3B\x6B\x3C\x32\x2E\x36\x2E\x37\x3B\x6B\x2B\x2B\x29\x7B\x34\x28\x32\x2E\x36\x5B\x6B\x5D\x2E\x39\x3D\x3D\x27\x56\x27\x29\x7B\x6F\x3D\x32\x2E\x36\x5B\x6B\x5D\x2E\x38\x3B\x71\x7D\x7D\x41\x28\x33\x20\x6B\x3D\x30\x3B\x6B\x3C\x32\x2E\x36\x2E\x37\x3B\x6B\x2B\x2B\x29\x7B\x34\x28\x32\x2E\x36\x5B\x6B\x5D\x2E\x39\x3D\x3D\x27\x58\x27\x26\x26\x32\x2E\x36\x5B\x6B\x5D\x2E\x5A\x3D\x3D\x27\x31\x30\x2F\x46\x27\x29\x7B\x47\x3D\x32\x2E\x36\x5B\x6B\x5D\x2E\x66\x2E\x31\x76\x28\x22\x20\x22\x29\x5B\x30\x5D\x3B\x71\x7D\x7D\x34\x28\x22\x45\x22\x44\x20\x32\x29\x7B\x33\x20\x6C\x3D\x32\x2E\x45\x2E\x24\x74\x7D\x43\x20\x34\x28\x22\x4C\x22\x44\x20\x32\x29\x7B\x33\x20\x6C\x3D\x32\x2E\x4C\x2E\x24\x74\x7D\x43\x20\x33\x20\x6C\x3D\x22\x22\x3B\x31\x6A\x3D\x32\x2E\x31\x6B\x2E\x24\x74\x3B\x34\x28\x6A\x3E\x6D\x2E\x37\x2D\x31\x29\x6A\x3D\x30\x3B\x68\x5B\x69\x5D\x3D\x6D\x5B\x6A\x5D\x3B\x73\x3D\x6C\x3B\x61\x3D\x73\x2E\x78\x28\x22\x3C\x68\x22\x29\x3B\x62\x3D\x73\x2E\x78\x28\x22\x59\x3D\x5C\x22\x22\x2C\x61\x29\x3B\x63\x3D\x73\x2E\x78\x28\x22\x5C\x22\x22\x2C\x62\x2B\x35\x29\x3B\x64\x3D\x73\x2E\x31\x32\x28\x62\…
has title: Decode an encoded javascript, edit and then encode again
type: Question

http://stackoverflow.com/comment/43394661
type: Comment
type: QuestionComment
has text: Extract 'HREF' but not 'TXT': `TAG POS=1 TYPE=IMG ATTR=SRC:* EXTRACT=HREF`
score: 0
comment on: http://stackoverflow.com/q/27479102

http://stackoverflow.com/a/28856165
has comment: http://stackoverflow.com/comment/102690454
answers question: http://stackoverflow.com/q/27508409
has comment: http://stackoverflow.com/comment/102694163
score: 0
type: Answer
has body: Why not using a browser tool like firebug in browser or google chome debugging tools (depending on the browser you use), If your code is client side, since I assume that the server side part of the application is written in python scripts it's the easiest solution. I have also used JSDT in eclipse but it was not as convenient. For the error you posted I think it's server-side / networks error, check your views.py or an example from the django tutorial to see if it is exposed in WSGI (django default web server ).

http://stackoverflow.com/a/27622978
type: Answer
has comment: http://stackoverflow.com/comment/43679448
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27584422
score: 6
answers question: http://stackoverflow.com/q/27584422
has body: What's the equivalent "post to server and save on server" scheme in node.js (client+server)? (using express for example) being specific to your code, it should be looking something like this. client-side:- $("#save-button").on('click', save); function save(e) { $.ajax({ type: "POST", url: "/php/save", data: { projectname: $('#projectname').text(), data: $('#textbox').text() }, success: function(data) { alert('Data saved'); }, error: function(data) { console.log(data); } }); } And server side:- router.post('/php/save', function(req, res) { // server side var projectName = req.body.projectname; var data = req.body.data; // save the data here to database }); here the way I receive the post data in node, I need to require body-parser module so this should be added at the top, var bodyParser = require('body-parser'); this will parse your http request body so you can access the parameters directly as req.body.data. Is it common / good practice to use $.ajax(...) on client and node.js on server? $.ajax(...) on client :- Of-course , why not.. don't we use $.ajax(...) when we use different backend technologies like .net or java? So there is no need for changing your front end, It is just you are using a different technology on the back-end node on server :- Now this is quite opinion based, node is new, we javascript developers love node, because it is single technology on serverside and client as well, I would say node is fantastic.. but there are other people who would say node is crap. I would rather skip answering this part. node.js introduced a new way of thinking, making ajax not-needed-anymore... I think you are pointing towards websockets. yes node is a different way of thinking. This does not really replace ajax, you can find some info here The purpose of WebSockets is to provide a low-latency, bi-directional, full-duplex and long-running connection between a browser and server. WebSockets open up new application domains to browser applications that were not really p…
type: AcceptedAnswer
upvote count: 6
has comment: http://stackoverflow.com/comment/43683643

http://stackoverflow.com/a/27511333
has comment: http://stackoverflow.com/comment/43452773
has body: 1) Why is option1 returning a NaN, if I have previously used a parseInt every time a number is stored in the array? Because Math.max takes several Numbers and you're passing it an array. 2) What do the Math and null inside the parenthesis represent or do in option2 and option3 respectively? apply takes a this parameter, which is not used inside the Math.max function, so passing null or Math (or probably anything else) works. I would use the version passing Math. Reason being that if you supply null, the global object (window in the case of a browser) is used instead. Passing Math is a bit more explicit. As a sidenote, options 2 and 3 are both pretty standard ways to find the maximum value of an array. 3) Why is the actual number missing in the output message? (sorry for this one being off-topic) Because you need to concatenate the result with your message string: alert("The highest number in the array is " + b);
has comment: http://stackoverflow.com/comment/43452757
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27511246
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/43454122
upvote count: 3
has comment: http://stackoverflow.com/comment/43453377
accepted answer of: http://stackoverflow.com/q/27511246
has comment: http://stackoverflow.com/comment/43453924
score: 3

http://stackoverflow.com/comment/43591375
comment on: http://stackoverflow.com/q/27583345
type: QuestionComment
score: 0
has text: @ try-catch-finally The first function gets json data from different urls, it passes the data to the second. The second takes the individual jason files and combines them. That combination/array is then passed to the third where I do some editing. Finally the edited array gets passed to the fourth function where I'll do something else, like further editing or posting the results to my page.
type: Comment

tablefilter
tags question: http://stackoverflow.com/q/27563984
tag name: tablefilter
type: Tag

http://stackoverflow.com/q/27523588
has title: Setting and getting data value from service in Angular JS
has comment: http://stackoverflow.com/comment/43476458
accepted answer: http://stackoverflow.com/a/27523756
type: AnsweredQuestion
upvote count: 3
type: Question
score: 3
has comment: http://stackoverflow.com/comment/43476319
has answer: http://stackoverflow.com/a/27523756
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/43476322
favorite count: 0
has comment: http://stackoverflow.com/comment/43476187
has body: So this is my service that I use to fetch user details. angular.module('app') .factory('userDetailService', function($http) { var userData = {}; function getUserDetails(userId) { if (userId) { return $http.get("/users/" + userId).success(function(data) { angular.copy(data[0], userData); }); } } return { userData: userData, getUserDetails: getUserDetails } }) Now in Controller 1 that uses this service, I have this bit of code which works fine as I get the relevant data. $scope.getUserId = function(userId) { if (userId) { $scope.userData = userDetailService.userData; userDetailService.getUserDetails(userId).success(function() { console.log($scope.userData); //Prints valid user data }); } }; After this function executes in Controller 1, I try to do the following in Controller 2: $scope.userData = userDetailService.userData; console.log($scope.userData); //Prints null But $scope.userData is null. Isn't the whole purpose of using a service to share data between controllers? Since I have already set the value of userData in Controller 1, shouldn't I be able to access it in Controller 2? Weirdly enough, the modal dialog which is the template for Controller 2 is able to access data in the form of {{userData.first_name}} or {{userData.last_name}}. If this works, why is $scope.userData null? What am I missing? Edit: Template 1: &lt;div id="myModal" ng-controller="Controller 1"&gt; &lt;modal-configure-user&gt;&lt;/modal-configure-user&gt; &lt;a data-toggle="modal" data-target="#configureUserModal" href="#" ng-click="getUserId(user.id)" data-id="user.id"&gt;{{user.first_name + ' ' +user.last_name}}&lt;/a&gt; &lt;/div&gt; Template 2: &lt;div ng-controller="Controller 2" id="configureUserModal"&gt; &lt;/div&gt; Both are modal dialog windows.
tagged with: angularjs

http://stackoverflow.com/a/27545917
score: 0
type: Answer
has body: tools&gt;Internet Options&gt;security tab, click "Reset all zones to default" remove the site from Trusted sites list... it is probably already mapped to the same security zone as the opener (intranet). Select the File&gt;Properties dialog in IE to determine which security zone a page/domain is mapped to. For more info: https://social.msdn.microsoft.com
answers question: http://stackoverflow.com/q/27545635

http://stackoverflow.com/comment/43478791
score: 0
comment on: http://stackoverflow.com/q/27525048
type: Comment
type: QuestionComment
has text: Do you want `var promise = myService.showAll();` to be synchronous?

http://stackoverflow.com/comment/43579717
score: 1
comment on: http://stackoverflow.com/q/27577284
type: Comment
type: QuestionComment
has text: all `$http` is asynchronous. My suggestion is to rewrite `getUser` to return the `$http` promise and use `then` in controller. You could cache the request so it doesn't have to hit server each time

http://stackoverflow.com/comment/43697046
comment on: http://stackoverflow.com/a/27625574
type: Comment
has text: I'm not sure I understand. Is it `roadTaxData.provinceWeightFuelPricesData` that's the issue? Passing multiple vehicleTypes to php is the same as passing one array, but with the added complexity of dual encoding -- the query parameters are themselves a key-value hash (http query encoded), and each vehicleType's fueldPricesData is also a key-value hash (json encoded). I have a nodejs version of the php `http_build_query()` call that builds a php compatible hierarchical query string, but I'm not sure that's what you're looking for (it's in http://npmjs.org/package/arlib)
score: 0
type: AnswerComment

http://stackoverflow.com/a/28451521
upvote count: 4
score: 3
has body: You need this to support Internet Explorer versions below 10 and Safari Please review Server Proxy Implementations samples (.NET, PHP, Java) Internet Explorer versions below 10 and Safari can't save a file and require the implementation of a server proxy. Set the proxyURL option to specify the server proxy URL. In ASP.NET MVC the function will be something like this: [HttpPost] public ActionResult ExportButtonSave(string contentType, string base64, string fileName) { var fileContents = Convert.FromBase64String(base64); return File(fileContents, contentType, fileName); } Please note that all you need to make the export work is add it to toolbar even if you don't add it to grid, check http://dojo.telerik.com/@MohQut/OdEpE
downvote count: 1
answers question: http://stackoverflow.com/q/27597310
type: Answer

http://stackoverflow.com/a/27479889
score: 22
answers question: http://stackoverflow.com/q/27479750
has comment: http://stackoverflow.com/comment/68790371
type: Answer
upvote count: 22
accepted answer of: http://stackoverflow.com/q/27479750
downvote count: 0
has comment: http://stackoverflow.com/comment/133441726
has comment: http://stackoverflow.com/comment/85499903
type: AcceptedAnswer
has body: First, parse the JSON into an array of Objects: var data = JSON.parse(json); Then combine sort and slice to achieve your goal: var top10 = data.sort(function(a, b) { return a.Variable1 &lt; b.Variable1 ? 1 : -1; }) .slice(0, 10); See Array.sort

http://stackoverflow.com/a/27500074
answers question: http://stackoverflow.com/q/27499530
has comment: http://stackoverflow.com/comment/43440894
has comment: http://stackoverflow.com/comment/43441126
type: Answer
has body: css .swiper-slide { overflow-y: auto; }
has comment: http://stackoverflow.com/comment/43444817
upvote count: 4
has comment: http://stackoverflow.com/comment/43432041
has comment: http://stackoverflow.com/comment/43440968
downvote count: 0
score: 4

http://stackoverflow.com/comment/43473237
type: AnswerComment
has text: The best you can do is to call an ajax on these events, which seem unnecessary in this scenerio. Is there any reason you didnt want to use JS?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27521913

http://stackoverflow.com/comment/43640549
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27609144
score: 0
has text: What problem are you experiencing exactly?

http://stackoverflow.com/q/27488141
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/43408166
has comment: http://stackoverflow.com/comment/43407943
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43408020
has comment: http://stackoverflow.com/comment/43408268
has comment: http://stackoverflow.com/comment/43408224
has comment: http://stackoverflow.com/comment/43407871
tagged with: javascript
has answer: http://stackoverflow.com/a/27488327
tagged with: ajax
type: Question
has title: validate if URL is present in JQuery
has body: I have to open a URL in a new tab in my JQuery code. I am using the below code to do it. window.open(result + PATHtoCALL); It works fine however in some cases the report will not be available in the URL and I get the below output in the new browser tab {"success":false,"timestamp":1408690695881,"error":{"code":"0"}}. So I thought it might be a good idea to first validate if the Report is ready. If I get success in it then I will call the window.open(result + PATHtoCALL); So I wrote the below code in Ajax to validate it. However it is always going in the error code. $.ajax({ url: result + PATHtoCALL, type: 'POST', dataType: 'json', success: (function(resp, statusText, xhr) { if (resp.success) { console.log('.............Passed'); } else { console.log('.........Failed'); } }).bind(this), error: (function(xhr, statusText, error) { console.log('11111111111111111111111111111111',error); }).bind(this) }); However the above Ajax code always fails and the error is "SyntaxError: Unexpected token &lt;" If I run window.open(result + PATHtoCALL); it works fine. What is the mistake here in Ajax code ? Is there a better alternative than this approach ? I am sorry if it is really trivial. I am very new to Javascript.
has comment: http://stackoverflow.com/comment/43408143

dom-events
tags question: http://stackoverflow.com/q/27573454
tags question: http://stackoverflow.com/q/27518156
tags question: http://stackoverflow.com/q/27573002
tags question: http://stackoverflow.com/q/27559766
tags question: http://stackoverflow.com/q/27541764
tags question: http://stackoverflow.com/q/27514036
type: Tag
tags question: http://stackoverflow.com/q/27567677
tags question: http://stackoverflow.com/q/27636078
tags question: http://stackoverflow.com/q/27503594
tags question: http://stackoverflow.com/q/27494163
tag name: dom-events
tags question: http://stackoverflow.com/q/27580926
tags question: http://stackoverflow.com/q/27547156
tags question: http://stackoverflow.com/q/27509931

http://stackoverflow.com/q/27636167
has answer: http://stackoverflow.com/a/27639062
tagged with: ember.js
has body: There is a lot of buzz around EmberJS' Fastboot and I have been reading about it here. However, I haven't gotten the whole idea: What does it mean to "boot JavaScript apps on the serve"? Why should it be done? I have no experience in writing web applications. Nevertheless, I know that the server side handles requests from client by sending a JSON (e.g.) response. Then, the client takes it and mainly wraps it with HTML &amp; CSS. So why do I need to boot my JavaScript app? Thanks.
has comment: http://stackoverflow.com/comment/43694625
has title: Can someone explain me what is so special about EmberJS Fastboot?
type: AnsweredQuestion
type: Question
upvote count: 4
accepted answer: http://stackoverflow.com/a/27639062
downvote count: 0
answer count: 1
tagged with: javascript
score: 4
favorite count: 0

http://stackoverflow.com/q/27512244
tagged with: javascript
tagged with: http://stackoverflow.com/tag/q
has body: Is it possible to write NodeJS code that executes several async steps in a sequential way, where some steps get executed or bypassed based on conditional statements? Let me try to write an example in pseudo code. Imagine you have something like step1.then(step2).then(step3); Now let's add an option: var opt = true; How is it possible to achieve something like: step1.then(opt &amp;&amp; step2).then(step3); Or, if we had let's say 2 different possible steps in the middle: step1.then(opt ? step2 : step3).then(step4); EDIT If the optional step was at the beginning instead? (opt &amp;&amp; step1).then(step2).then(step3); It would be awesome if anyone could shed some light or come up with proposals! Thanks
downvote count: 0
answer count: 1
has title: NodeJS sequential async with conditional statements
tagged with: asynchronous
accepted answer: http://stackoverflow.com/a/27512364
favorite count: 0
linked to: http://stackoverflow.com/q/22594978
tagged with: promise
upvote count: 2
tagged with: node.js
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43455329
has comment: http://stackoverflow.com/comment/43456248
type: Question
has answer: http://stackoverflow.com/a/27512364

http://stackoverflow.com/comment/43478596
comment on: http://stackoverflow.com/a/27511401
has text: As long as your <tb> elements are inside the `.question` divs, it shouldn't be a problem.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/78829924
type: AnswerComment
comment on: http://stackoverflow.com/a/28487454
type: Comment
has text: The issue has just been updated to *Fixed*. Hopefully it will be rolled out soon.
score: 1

http://stackoverflow.com/comment/44502459
score: 3
comment on: http://stackoverflow.com/q/27560743
type: Comment
type: QuestionComment
has text: Unfortunately, this is not possible.... :( Here is a report on the [issue](https://code.google.com/p/chromium/issues/detail?id=352527#c15) where they say `We do send a change event when a user chooses to autofill. I think the "bug" you're observing is that username/pw fields aren't really autofilled until the user interacts with the page (for security/privacy reasons).` Hope this helps.

http://stackoverflow.com/q/27619051
type: Question
score: 0
has answer: http://stackoverflow.com/a/27619079
answer count: 1
has title: how to conditionally navigate between slides?
accepted answer: http://stackoverflow.com/a/27619079
type: AnsweredQuestion
has body: i am using a basic custom made slider which functions perfectly using jquery. Now, i want to use "next" and "prev" function in the slider only once, second time when a user clicks the link it scrolls somewhere in the page. i have worked out a code which looks like this: var position = 0; $('#control_prev').click(function () { if (position &gt; 0) { ///if user is on second slide allow him back to default slide . (0 is the default slide) moveLeft(); position -= 1; } else if(position = 0){ /// if user tries to go to previous while on default slide nagivate him to home section. $('.control_prev').attr('href', '#home'); $('.control_prev').addClass( "secondary url" ); position -= 1; } alert(position); }); $('#control_next').click(function () { if (position = 0) { // if a user tries to view second slide while on default slide we allow him. moveRight(); position += 1; } else if(position &gt; 0){ // if a user is on second slide and wants to go next slide we navigate him to a different section. $('.control_next').attr('href', '#business-events'); $('.control_next').addClass( "secondary url" ); position += 1; } alert(position); }); The i am using alert() to check the position value but the value is 0 all the time. is it a problem with declaring variable or do you see a flaw in the logic itself? Please suggest me a way i can solve this problem. Thanks in advance. -Cheers -Max
tagged with: javascript
linked to: http://stackoverflow.com/q/22745716
tagged with: jquery

http://stackoverflow.com/q/27516990
has answer: http://stackoverflow.com/a/27517025
accepted answer: http://stackoverflow.com/a/27517018
has answer: http://stackoverflow.com/a/27517062
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/43464033
has answer: http://stackoverflow.com/a/27517027
has comment: http://stackoverflow.com/comment/43464065
tagged with: regex
answer count: 4
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/27517018
has title: jQuery won't fire
upvote count: 2
has body: I tried to implement this code on this page here and this is my fiddle JSFiddle and everything seems to work fine (the filtering) But when i try to implement it in my page, jQuery doesn't seem to work and i don't know why. Below is my code on my filter.php page : Filter Apple Green Grapes Green Orange Orange Can anyone tell me what did i do wrong ?
linked to: http://stackoverflow.com/q/9127498
type: Question
possible better answer: http://stackoverflow.com/a/27517025
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/43454201
comment on: http://stackoverflow.com/q/27511630
has text: @bheklilr I think then it has to do with my specs :)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43653580
type: AnswerComment
comment on: http://stackoverflow.com/a/27616010
type: Comment
has text: I have defined closeAction on child window. But still it is not destroyed. Parent class has hide on closeAction. How can I override that? I can not change parent class code.
score: 0

http://stackoverflow.com/comment/49029550
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/30474997
score: 0
has text: the first one is not my code. I dont understan what happened.

http://stackoverflow.com/a/27499446
type: Answer
upvote count: 1
downvote count: 1
type: AcceptedAnswer
has body: Try using ajax from client, if it works then javascript is enabled With jQuery you can simply: $.ajax({ url: "/checkjavascript.php" }); if your php receives call from client then Javascript is enabled in the client
answers question: http://stackoverflow.com/q/27499422
score: 0
accepted answer of: http://stackoverflow.com/q/27499422

http://stackoverflow.com/comment/43663784
type: Comment
comment on: http://stackoverflow.com/a/27620946
score: 0
type: AnswerComment
has text: $(window).load - it's not working locally. No errors. I think this is a problem with WordPress

http://stackoverflow.com/comment/43512494
type: QuestionComment
has text: ya the data should not be consistent, but whats the solution for that.@devqon
comment on: http://stackoverflow.com/q/27542167
score: 0
type: Comment

http://stackoverflow.com/q/27498173
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43427539
upvote count: 2
has comment: http://stackoverflow.com/comment/43427533
accepted answer: http://stackoverflow.com/a/27498229
has body: Consider, this is some response data I got from Ajax. This content is applicable for users. </td OK </td Here, I need to get only the contents This content is applicable for users. by splitting the html tags. Normally, we use like var tokens = this.value.split(" "); Based on Array tokens[0], tokens[1], we will get the values. How can I get the values by splitting html tags. Any help would be highly appreciated. I want to use only jquery to achieve this. And it should be simplified.
type: Question
has title: How to split html tags in jquery?
has comment: http://stackoverflow.com/comment/43427513
tagged with: javascript
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/27498229
tagged with: jquery
favorite count: 0
linked to: http://stackoverflow.com/q/13140043
tagged with: http://stackoverflow.com/tag/html
duplicate of: http://stackoverflow.com/q/13140043

http://stackoverflow.com/comment/66914695
type: Comment
comment on: http://stackoverflow.com/a/39778142
type: AnswerComment
has text: did you mean: step 2. var scope = _$rootScope_.$new() ? (you missed the hyphen)
score: 0

http://stackoverflow.com/a/27587664
type: AcceptedAnswer
type: Answer
score: 5
has body: Found one option - using getCapabilities() to retrieve the current browser name: afterEach(function() { browser.driver.getCapabilities().then(function(caps) { var browserName = caps.caps_.browserName; if (browserName !== "internet explorer") { browser.manage().logs().get("browser").then(function (browserLog) { expect(browserLog.length).toEqual(0); }); } }); }); In this case browser logs would not be checked if running against Internet Explorer.
answers question: http://stackoverflow.com/q/27587571
upvote count: 5
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27587571

http://stackoverflow.com/a/27636716
type: Answer
has body: try to verify if is hover, like this: function hoverPics() { if( ! $('.image-hover').is(':hover') ) { $(".image-hover").css({ "filter": "gray", "-webkit-filter": "grayscale(100%)" }); } } function changeMeBack() { $(".image-hover").css("-webkit-filter", "grayscale(0%)"); }
score: 0
answers question: http://stackoverflow.com/q/27636569

http://stackoverflow.com/comment/43697596
has text: Something like this could work - http://jsfiddle.net/vnPbV/64/
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27630672

http://stackoverflow.com/comment/43666079
score: 0
has text: Yep. If you want the output to be `a s`, just get the last 3 characters from the string..
comment on: http://stackoverflow.com/q/27622697
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27601452
tagged with: jquery
has body: Link "Goods" click event is not working after "Shops" clicked Goods Shops Full code: http://jsfiddle.net/01j2s7xj/12/
favorite count: 0
has title: link click event is not working
type: UnansweredQuestion
score: -5
has comment: http://stackoverflow.com/comment/43625422
duplicate of: http://stackoverflow.com/q/203198
has answer: http://stackoverflow.com/a/27601509
type: Question
linked to: http://stackoverflow.com/q/203198
downvote count: 5
tagged with: javascript
upvote count: 0
answer count: 1

http://stackoverflow.com/q/27607041
has title: Applying style in tags with javascript (without jQuery)
answer count: 2
upvote count: 1
accepted answer: http://stackoverflow.com/a/27607099
tagged with: javascript
linked to: http://stackoverflow.com/q/1409225
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27607099
tagged with: css
possible better answer: http://stackoverflow.com/a/27607068
type: AnsweredQuestion
downvote count: 0
has body: I need to apply display: inline; for every li in the page using javascript. Is there a way to do it? I can't use jQuery. It will be like: li{ display: inline; } It's kind a simple problem, but I don't know why I didn't find it at google...
type: Question
duplicate of: http://stackoverflow.com/q/1409225
score: 1
has answer: http://stackoverflow.com/a/27607068

http://stackoverflow.com/a/27620107
answers question: http://stackoverflow.com/q/27617330
has body: Firebug uses internal Firefox APIs to get the HTTP request information including the HTTP status code of the response. This information is just available to code with specific privileges and is not exposed to the page itself. So if you want to access the status code of all requests your page makes, you need to write an extension for your browser. For AJAX requests you do within your JavaScript, you can get their HTTP status via the status property of the XMLHttpRequest. function makeRequest(url) { var req = new XMLHttpRequest(); req.onreadystatechange = function logStateChange() { if (req.readyState === 4) { // 'req.status' contains the HTTP status code of the response console.log(req.status); } } req.open('GET', url); req.send(); }
score: 0
type: Answer

onfocus
tag name: onfocus
tags question: http://stackoverflow.com/q/27516175
type: Tag

http://stackoverflow.com/q/27505460
tagged with: date
has comment: http://stackoverflow.com/comment/43440879
type: Question
has body: My scenario is to convert the data of milliseconds to a date format. I have tried a lot as here http://jsbin.com/jeququ/1/ but it is only working for a limited milliseconds value, and fails if the value is high. I am looking to replicate the functionality as http://www.ruddwire.com/handy-code/date-to-millisecond-calculators/#.VJAp9lWUe1R Milliseconds Since : Thu Jan 01 1970 05:30:00 GMT+0530
answer count: 2
has answer: http://stackoverflow.com/a/27561558
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27505500
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27505500
downvote count: 0
favorite count: 0
linked to: http://stackoverflow.com/q/4673527
linked to: http://stackoverflow.com/q/1090869
has title: How to Convert Milliseconds to Date in JS?
accepted answer: http://stackoverflow.com/a/27561558
has comment: http://stackoverflow.com/comment/43441003
tagged with: datetime
upvote count: 7
type: AnsweredQuestion
score: 7

http://stackoverflow.com/q/27560132
score: -1
favorite count: 0
has body: I am using SAPUi5 for Time.The time fValue is PT12H50M00S.When showing on dropdownbox it is showing Nan,result is shown as NaN:NaN:NaN PM,How to convert this to values. var oItemTemplate2 = new sap.ui.core.ListItem({ text: { path: "SlotTi", formatter: function(fValue) { jQuery.sap.require("sap.ui.core.format.DateFormat"); var oTimeFormat = sap.ui.core.format.DateFormat.getTimeInstance({ pattern: "KK:mm:ss a" }); if (fValue != undefined || fValue != null) { fValue = fValue.toString(); } return oTimeFormat.format(new Date(fValue)); } } });
linked to: http://stackoverflow.com/q/47593990
type: AnsweredQuestion
tagged with: sapui5
duplicate of: http://stackoverflow.com/q/47593990
has answer: http://stackoverflow.com/a/27563461
downvote count: 1
type: Question
upvote count: 0
answer count: 1
tagged with: javascript
has title: Time in sapui5 is Nan Value
accepted answer: http://stackoverflow.com/a/27563461

http://stackoverflow.com/comment/43583208
score: 0
has text: Hi Peter, it's shown in, <div class="userwall-post-content"
type: Comment
comment on: http://stackoverflow.com/q/27578925
type: QuestionComment

http://stackoverflow.com/a/27485028
has body: So you append the text to the top not the bottom. var txt = document.getElementById("yourId"); txt.value = "New String" + "\n" + txt.value; And what I think you actually are after function hasVertScrollbar(elem) { //see if there is a scrollbar, return true if there is return elem.clientHeight < elem.scrollHeight; } function addMessage (str) { var textarea = document.getElementById("txtArea"); //remove all of the padding if there var val = textarea.value.replace(/^\n+/,""); //update the value with the new message val += (new Date()).toLocaleTimeString() + ": " + str + "\n"; textarea.value = val; //Create a loop where we add a line break, Loop until we have a scrollbar. var padding = []; while (!hasVertScrollbar(textarea)) { padding.push("\n"); textarea.value = "\n" + textarea.value; } //After the loop we have one too many, so chop off the extra padding.pop(); //update the textarrea with the padding and updated text textarea.value = padding.join("") + val; //scroll to bottom textarea.scrollTop = textarea.scrollHeight; } function chat(e) { var msg = document.getElementById("message"); addMessage(msg.value); msg.value = ""; e.preventDefault(); return false; } document.getElementById("frm").addEventListener("submit", chat, false); #txtArea { width: 275px; height: 300px; display: block; } Message: Send Now the problem with using a textarea is you are not going to be able to use different colors for different users. If you really want to do that, you are going to have to use a div and insert brs or set top padding of the first element.
upvote count: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/27484877
downvote count: 0
answers question: http://stackoverflow.com/q/27484877
has comment: http://stackoverflow.com/comment/43403557
score: 1
type: AcceptedAnswer

http://stackoverflow.com/a/27611663
answers question: http://stackoverflow.com/q/27577770
has body: With a fresh head after a few days rest, and with the insight of this post I realized I didn't need to do all this just to add default values. Thankfully, just adding the following to the init worked perfectly: value: msField.attr('data-default').split(','), (I'm adding the values into the HTML under the data-default attribute via PHP. Code: deleted. Problem: solved.
type: Answer
accepted answer of: http://stackoverflow.com/q/27577770
score: 0
type: AcceptedAnswer

http://stackoverflow.com/q/27591726
has answer: http://stackoverflow.com/a/27592097
score: 0
has comment: http://stackoverflow.com/comment/43607137
accepted answer: http://stackoverflow.com/a/27592097
tagged with: jquery-ui
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27591801
has body: my html form is like this. Duration 1month duration 2month duration 3month duration from date (i used date picker here) To date (i used date picker here) Now what i want is when i select duration as 1 month and from date then in to date it should display date after 30 days and when i select in duration 2 month and from date then in to date it should display date after 60 days
has answer: http://stackoverflow.com/a/27591801
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
type: Question
has comment: http://stackoverflow.com/comment/43607210
answer count: 2
has title: Want to display to date based on duration selection and from date

http://stackoverflow.com/comment/43483121
comment on: http://stackoverflow.com/a/27527243
type: AnswerComment
has text: won't this just get rid of the (,) ?
type: Comment
score: 1

http://stackoverflow.com/a/27626885
answers question: http://stackoverflow.com/q/27626764
downvote count: 0
has body: Have a look Here its a beautifier that deminifies javascript. at the bottom, it has a list of various plugins and extensions for browsers, check them out. you might be interested in FireFox Deminifier , its supposed to deminify and style your javascript when its retrieved from the server. (source: mozilla.net)
has comment: http://stackoverflow.com/comment/44050742
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/q/27543409
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27584915
type: Question
answer count: 2
tagged with: famous-angular
has body: I need to make opacity of a surface to transform from 0 to 1 like this: stateModifier.setTransform( Transform.multiply(Transform.opacity(1), Transform.rotateX(0)), { duration : 500, curve: Easing.inOutSine } ); But Transform.opacity doesn't exist. I know this is basic but how to transform opacity with other properties like translate or rotate. I know modifier has setOpacity according to http://famo.us/guides/animations UPDATE I thought stateModifier.setOpacity is async that can be animated in parallel with others such as translate or scale but it is NOT async. It happens first THEN moves to the next animation. That's why I asked this question.
tagged with: javascript
score: 0
possible better answer: http://stackoverflow.com/a/27584915
tagged with: css
has answer: http://stackoverflow.com/a/27556844
accepted answer: http://stackoverflow.com/a/27556844
has title: Animate Opacity async with other Transform functions
tagged with: famo.us

http://stackoverflow.com/q/27630118
downvote count: 0
tagged with: incompatibility
favorite count: 0
has comment: http://stackoverflow.com/comment/43680954
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 0
has comment: http://stackoverflow.com/comment/43680993
score: 1
has comment: http://stackoverflow.com/comment/43680913
upvote count: 1
type: Question
tagged with: internet-explorer
has body: This may have an existing post with a different title, but I'm not quite sure what to search for, I wish to scour a large set of html, css and javascript documents for incompatible attributes, tags and functions/variables with modern browsers but am not sure where to start. so far I've come up with these regular expressions to help identify possible problems: &lt;applet&gt;|&lt;basefont&gt;|&lt;center&gt;|&lt;dir&gt;|&lt;font&gt;|&lt;isindex&gt;|&lt;menu&gt;|&lt;s&gt;|&lt;strike&gt;|&lt;u&gt; ## Deprecated HTML Tags [ ]align[ ]*[\=\:]|[ ]alink[ ]*[\=\:]|[ ]background[ ]*[\=\:]|[ ]bgcolor[ ]*[\=\:]|[ ]clear[ ]*[\=\:]|[ ]compact[ ]*[\=\:]|[ ]color[ ]*[\=\:]|[ ]border[ ]*[\=\:]|[ ]hspace[ ]*[\=\:]|[ ]link[ ]*[\=\:]|[ ]noshade[ ]*[\=\:]|[ ]nowrap[ ]*[\=\:]|[ ]size[ ]*[\=\:]|[ ]start[ ]*[\=\:]|[ ]text[ ]*[\=\:]|[ ]type[ ]*[\=\:]|[ ]value[ ]*[\=\:]|[ ]vlink[ ]*[\=\:]|[ ]width[ ]*[\=\:]|[ ]vspace[ ]*[\=\:] ## deprecated css attributes (in certain tags). My main aim is to generify our company's website to be compatible with most modern browsers. right now our site malfunctions within anything above IE9 and don't even try to put it on chrome or firefox! Are there any tools out there to help analyze what may be causing the issues? any help would be great. Even a list of things that are known to cause compatability problems. Kind regards, me.
tagged with: javascript
has title: detect incompatibility issues in html, css and javascript for modern browsers
has comment: http://stackoverflow.com/comment/43680881

http://stackoverflow.com/comment/43606934
score: 0
type: AnswerComment
type: Comment
has text: Ok guys, I think I get it. The DOM element is a JavaScript Object, and the markup is the element parsed from the actual HTML. But how do I tell if a certain property in the JS object exists in the markup or not?
comment on: http://stackoverflow.com/a/27591523

http://stackoverflow.com/q/27505856
has title: jQuery datepicker parsing year with one digit
type: AnsweredQuestion
tagged with: jquery-ui-datepicker
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27505922
score: 0
tagged with: datepicker
answer count: 1
accepted answer: http://stackoverflow.com/a/27505922
has body: I have jQuery datepicker with dateFormat d.m.yy which should parse dates like 1.1.1990 or 31.12.2014. The problem is that the parseDate() function parses successfully even date 1.1.1 as 1.1.2014. My question is - can I restrict somehow the parse to reject such dates? I want only years with four digits to be parsed.
has comment: http://stackoverflow.com/comment/43441702

http://stackoverflow.com/q/27542167
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/43512494
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43511710
has answer: http://stackoverflow.com/a/27542800
tagged with: php
has answer: http://stackoverflow.com/a/27543062
score: 2
has comment: http://stackoverflow.com/comment/43512504
downvote count: 0
has body: I'm trying to make multiple calls to Ajax, i have fields like time intervals and no of calls to ajax under that time period. Now the problem is, while making multiple calls to same Ajax, there may be chances of merging of data with the other data that were send to Ajax earlier. I am not sure that it will happen. Here my Ajax call. callAjax = function () { var dataIn = inObj.data || {}; var successFunc = inObj.success || function () {}; var passOn = inObj.passOn || {}; var myParams = {drape:1,type:'GET'}; myParams.url = this.homeComingUrl; $.extend(myParams,params); var data = this.fillAction(action,dataIn); if (myParams.drape) { vidteq.utils.drapeSheer(action); } var that = this; var magicCall = $.ajax({ url:myParams.url, type:myParams.type, data:data, success: function (response) { // TBD we need better error handling if (myParams.drape) { vidteq.utils.undrapeCurtain(action); } successFunc(response,passOn); }, error:function(response) { if (myParams.drape) { vidteq.utils.undrapeCurtain(action); } that.gui.io.handleError(response); } }); } saveEvents = function () { this.commitEditingEvent(); var dataEvents = this.collectEventsToSave(); //$('#calendar').fullCalendar('removeEvents'); var that = this; if (vidteq.eTrainer==1) { dataEvents = arguments[0]; } if (!dataEvents.length) { alert("Nothing to save");return; } this.callAjax('updateEvents',{ data : { events : JSON.stringify(dataEvents) }, success : function (response,passOn) { that.handleGetEvent(response,passOn); } },{type:'POST'}); } This may not be required for understanding the problem. If any body can explain how Ajax handles multiple calls, then it'll really helpful.
has comment: http://stackoverflow.com/comment/43511663
type: Question
upvote count: 2
answer count: 2
has title: multiple calls to ajax simultaneously
has comment: http://stackoverflow.com/comment/43511759
tagged with: javascript
has comment: http://stackoverflow.com/comment/43511703
tagged with: jquery
has comment: http://stackoverflow.com/comment/43512540

http://stackoverflow.com/comment/43526181
comment on: http://stackoverflow.com/q/27549522
has text: Depending your jq version, consider instead to use `$('#stripe-submit').prop("disabled", true);`
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/43418024
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27492805
type: AnswerComment
has text: Setting the body's view to undefined removes the bitmap I have as the body's background. I can resize the body with your suggestion, but not without losing the bitmap. Any way to have the bitmap being used as the view retained and scaled? updating my question to include keeping a bitmap intact.

http://stackoverflow.com/a/27551522
type: AcceptedAnswer
downvote count: 0
has body: Please see https://docs.angularjs.org/tutorial/step_05 section "A Note on Minification" for documentation. For the comment you wrote under MarcoS' answer; So is it right that the second parameter can either be an object, function constructor or an array where the array also has different possible declaration possibilities? The second parameter can either be a function, or an array consisting of names of dependencies as string, and the controller function as last element. The second parameter cannot be an object. The first parameter can be an object in to declare a set of controllers at once: {"nameOfController": function(aDInameThatIsUnsafe){...}, "anotherController": ["firstDI", "secondDI", function(firstDI, secondDI) {...}]}
type: Answer
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/27548746
answers question: http://stackoverflow.com/q/27548746

http://stackoverflow.com/q/27628947
answer count: 2
possible better answer: http://stackoverflow.com/a/27630636
has title: javascript: how to access window.top from window.opener?
has answer: http://stackoverflow.com/a/27630636
has comment: http://stackoverflow.com/comment/43678577
accepted answer: http://stackoverflow.com/a/27629008
has comment: http://stackoverflow.com/comment/43678596
type: AnsweredQuestion
tagged with: dom
type: Question
has body: I am trying to refer to window.top in my popup window here http://www.globalrph.com/davescripts/popup.htm once in the popup I want to access the main window's document but window.top is returning undefined.
tagged with: javascript
has answer: http://stackoverflow.com/a/27629008
score: 0

http://stackoverflow.com/a/27519893
has comment: http://stackoverflow.com/comment/43470665
has comment: http://stackoverflow.com/comment/43469885
has comment: http://stackoverflow.com/comment/43470077
type: Answer
has comment: http://stackoverflow.com/comment/43471118
has comment: http://stackoverflow.com/comment/43469847
has comment: http://stackoverflow.com/comment/43469448
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27519571
has body: Note: As per your currently provided code, the sqr root will only be printed if number = '9' if(request.getParameter("number").matches("9")) If you don't mind having a little html formatting as part of the servlet reply, try this: Enter number: test5.jsp <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ page language="java" import="java.sql.* ,java.util.*, javax.servlet.*,javax.servlet.http.*, abc.database"%> <% String toPrint = ""; int numb = 0; numb = Integer.parseInt(request.getParameter("number")); if(request.getParameter("number").matches("9")) //if (request.getParameter("number").value { numb = Integer.parseInt(request.getParameter("number")); toPrint += "Square root of " + numb + " is " + Math.sqrt(numb); } else { toPrint += "Enter a number!"; } %> <% Connection conn = null ; ResultSet rs = null; PreparedStatement ps = null ; %> <% database obj =new database(); conn = obj.connect(); ps = conn.prepareStatement("select field2 from test4 where field1 = "+numb+""); rs = ps.executeQuery(); while(rs.next()) { String x = rs.getString(1); toPrint += " the value is "+x; } conn.close(); rs.close(); out.print(toPrint); %>
answers question: http://stackoverflow.com/q/27519571
score: 1
has comment: http://stackoverflow.com/comment/43471564
has comment: http://stackoverflow.com/comment/43471334
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43473127

http://stackoverflow.com/comment/43606571
comment on: http://stackoverflow.com/a/27591424
score: 0
type: AnswerComment
has text: I am not sure about this. parts contains the list of keys (in parts[value]) that are used in model. In other words, the key of model is the value of parts. When I use console.log(model[value]) it returns the right variable but after the 'model is undefined' error.
type: Comment

http://stackoverflow.com/comment/43538850
type: Comment
comment on: http://stackoverflow.com/a/27555780
has text: A for loop in this case is definitely not needed.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43574473
type: AnswerComment
comment on: http://stackoverflow.com/a/27573524
type: Comment
has text: Works beautifully now. After I was playing around with the tag I was trying to figure out the JS to listen for the elements to load :p Thank you much!
score: 1

http://stackoverflow.com/comment/43572673
score: 0
type: Comment
type: QuestionComment
has text: Is this all you have? You want to increase / decrease by 50, why do you have 1000?
comment on: http://stackoverflow.com/q/27573573

http://stackoverflow.com/a/27528328
score: 0
has body: You could listen for the transitionend-event and restart the animation once that happens. This will make it run "forever". As soon as you notice a :hover, you can stop the ongoing transition. Take a look over here for a reference how to better control the CSS3 transitions.
type: Answer
has comment: http://stackoverflow.com/comment/43486432
answers question: http://stackoverflow.com/q/27528296
has comment: http://stackoverflow.com/comment/43485464
has comment: http://stackoverflow.com/comment/43486500
has comment: http://stackoverflow.com/comment/43485914

http://stackoverflow.com/q/27570106
tagged with: node.js
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
possible better answer: http://stackoverflow.com/a/27570244
has answer: http://stackoverflow.com/a/27570244
tagged with: javascript
has title: How can I separate a code in two files, and still make it work in node.js?
has body: (NODE.JS) I have the following html form: Name: Email: And i want send a confirmation message, for this i'm using the Sendgrid - https://sendgrid.com . I already made the code, and is working 100%. Code bellow: My route.js var express = require('express'); var router = express.Router(); var auth = require('../authentication/sendgrid'); var sendgrid = require('sendgrid')(auth.sg.username, auth.sg.password); router.get('/', function(req, res) { res.render('index'); }); router.post('/', function(req, res) { sendgrid.send({ to: req.body.email, from: "confirmation@mycompany.com", subject: "Confirmation email" html: "some html for the body email", }, function(err, json) { if (err) { return console.error(err); } console.log(json); }); }); module.exports = router; Now i want separete this code in two files, the route, and the sendgrid.. for example: ROUTE.JS: router.post('/', function(req, res) { something here that make the sendgrid send the email. }); sendGrid.js sendgrid.send({ to: req.body.email, from: "confirmation@mycompany.com", subject: "Confirmation email" html: "some html for the body email", }, function(err, json) { if (err) { return console.error(err); } console.log(json); }); I dont know how to do that, i need this to my personal organization, i hate this code mess in my application, and also for maintenance. Somebody, please?
answer count: 3
upvote count: 1
has answer: http://stackoverflow.com/a/27570289
accepted answer: http://stackoverflow.com/a/27570283
linked to: http://stackoverflow.com/q/21831119
favorite count: 0
has answer: http://stackoverflow.com/a/27570283

http://stackoverflow.com/a/27582023
upvote count: 1
has comment: http://stackoverflow.com/comment/43591605
has body: So I must say I don't really see the logic in allowing explicitly; instead you should exclude explicitly as by default everything is allowed. You buy a computer after it having passed all your criteria, you don't buy 10 computers, then throw away those that don't fit your criteria. So, no need to touch the Ctrl &amp; other function keys, you're making it needlessly complicated. If you look carefully at your extremely long if clause, you will notice the following: (event.keyCode === 190 under which you stated // let it happen, don't do anything. So periods will always be added regardless. Here are the gotchas with your current approach: with the keydown event, all keycodes produce the same value with Caps Lock on or not, because they're the same keys. So you cannot distinguish between period . and semicolon ;. with the keydown event, keycodes for the same number on a numpad and on the keyboard are different, because they are different keys. Disabling the Shift key (like you did), forces AZERTY users to use Caps Lock because AZERTY keyboards produce the non-numerical char when Shift is off. As a result you are much better off using the keypress event, which returns the character value. Here is a refactored and much more concise function, that achieves exactly the same: $('#jquery').on("keypress", function (event) { var k = event.keyCode || event.charCode; if (k === 46 &amp;&amp; this.value.match(/\./g) || (k &lt; 48 &amp;&amp; k !== 46 ) || k &gt; 57) { event.preventDefault(); } }); Test it here: http://jsfiddle.net/kevinvanlierde/5ay3cory/6/ NOTE: Because Mozilla Firefox sucks at making the difference between keydown and keypress, it messes up and disables all control keys too.
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27571040
type: Answer

http://stackoverflow.com/a/27581443
has comment: http://stackoverflow.com/comment/43596983
type: Answer
answers question: http://stackoverflow.com/q/27581407
has comment: http://stackoverflow.com/comment/43587176
upvote count: 12
has comment: http://stackoverflow.com/comment/43587247
has body: You could reduce all that to one line: $("input:radio").change(function () {$("#postGender").prop("disabled", false);}); jsFiddle example
accepted answer of: http://stackoverflow.com/q/27581407
score: 12
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/43832935
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27525829
has text: You have to supply more information. What version of ExtJS do you use, how does the store cfg look and so on. Best would be a fiddle.sencha.com which reproduce the error.

http://stackoverflow.com/comment/43400235
type: QuestionComment
comment on: http://stackoverflow.com/q/27483817
has text: Idea 1: Draw hemispheres instead of spheres (`phiStart` and `phiLength` params: http://threejs.org/docs/#Reference/Extras.Geometries/SphereGeometry). Idea 2: Set an offset of the spheres on the `normal` depending on the sphere radius and bone thickness (you'll need that info) in the point where the sphere should be placed so it will not be visible on the other side.
score: 0
type: Comment

http://stackoverflow.com/comment/43412496
score: 0
type: Comment
type: QuestionComment
has text: I'd also suggest to separate modules into files and just have a build step that compiles them together.
comment on: http://stackoverflow.com/q/27490295

http://stackoverflow.com/comment/43452735
type: Comment
has text: You are creating an array with one element, the contents of the one input field. It's probably not what you actually want.
type: QuestionComment
comment on: http://stackoverflow.com/q/27511246
score: 0

http://stackoverflow.com/a/27573703
answers question: http://stackoverflow.com/q/27573064
score: 0
type: Answer
has body: A short way $("table tr &gt; td em").each(function(){ $( this ).replaceWith( $( this ).text() ); });

http://stackoverflow.com/comment/43509536
type: AnswerComment
has text: You can't have that in JavaScript. If you have commas between objects, you need to hold them in an array. If you need an object that holds other objects, you need an object with an array inside, like in my example. I added some more info to my answer.
type: Comment
comment on: http://stackoverflow.com/a/27541030
score: 0

http://stackoverflow.com/comment/43402323
type: QuestionComment
has text: Before I read using readAsText
type: Comment
score: 0
comment on: http://stackoverflow.com/q/27482473

http://stackoverflow.com/comment/43640699
comment on: http://stackoverflow.com/q/27609234
has text: Have you looked at the [`.each`](http://api.jquery.com/jquery.each/) documentation?
type: Comment
score: 7
type: QuestionComment

http://stackoverflow.com/q/27571601
has comment: http://stackoverflow.com/comment/43569857
has comment: http://stackoverflow.com/comment/43569442
has comment: http://stackoverflow.com/comment/43568755
has comment: http://stackoverflow.com/comment/43570162
has comment: http://stackoverflow.com/comment/43569770
has body: Looking for any information on why a change event would fire on a without position or z-index, and why it wouldn't fire if those styles do exist. This problem occurs in Firefox only. Change event does not fire on tab 1 2 Change event does not fire on tab 1 2 Change event sample code (using jQuery $('select').on('change', function(e){ console.log(e.type) }); Please see this CodePen for a working example.
downvote count: 1
has comment: http://stackoverflow.com/comment/43569991
has comment: http://stackoverflow.com/comment/43569343
type: Question
has comment: http://stackoverflow.com/comment/43570205
has comment: http://stackoverflow.com/comment/43569798
upvote count: 5
has comment: http://stackoverflow.com/comment/43569433
has comment: http://stackoverflow.com/comment/43569631
tagged with: javascript
has comment: http://stackoverflow.com/comment/43570022
has comment: http://stackoverflow.com/comment/43569426
score: 4
has comment: http://stackoverflow.com/comment/43568595
has comment: http://stackoverflow.com/comment/43569896
has comment: http://stackoverflow.com/comment/43569463
has comment: http://stackoverflow.com/comment/43569608
has title: In firefox, when a select has position and a z-index, why do change events not fire on tab?
has comment: http://stackoverflow.com/comment/43569782
has comment: http://stackoverflow.com/comment/43569907
has comment: http://stackoverflow.com/comment/43568993
has comment: http://stackoverflow.com/comment/43569914
has answer: http://stackoverflow.com/a/27572435
tagged with: firefox
has comment: http://stackoverflow.com/comment/43570080
answer count: 1
has comment: http://stackoverflow.com/comment/43569594
favorite count: 0
has comment: http://stackoverflow.com/comment/43569986
has comment: http://stackoverflow.com/comment/43570184
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43570115
has comment: http://stackoverflow.com/comment/43569419

http://stackoverflow.com/q/27610093
tagged with: http://stackoverflow.com/tag/html
has body: I try to make dynamic form, that will be created from server and sended to client. In server I create this code: &lt;div ng-app="myapp"&gt; &lt;div&gt; &lt;form ng-controller="MyController"&gt;&lt;br&gt; &lt;input id="desc" pattern="[A-Z][a-z 0-9]*" required="" type="text" class="InputDoc" ng-model="Document.desc"&gt;&lt;br&gt; &lt;input id="number" min="4" max="40" required="" type="number" class="InputDoc" ng-model="Document.number"&gt;&lt;br&gt; &lt;/form&gt; &lt;/div&gt; &lt;/div&gt; And client have only div tag as place, where I want to store output: &lt;div id="result"&gt; &lt;/div&gt; But in JavaScript file, when data was downloaded from XHR function, I create element div and script: var div = document.createElement("div"); div.setAttribute("ng-app", "myapp"); var script = document.createElement("script"); div.innerHTML = res; script.innerHTML = "angular.module('myapp', []).controller('MyController', function($scope){ $scope.Document = {}; $scope.Document.title = 'test1'; $scope.Document.desc = 'test3'; });"; div.appendChild(script); document.getElementById("result").appendChild(div); After this, my page is rendered exacly, how I imagine, but input types, and controller are not binding, and values aren't set. But, if I copy rendered content, and save it as other page and run, then everything works and is fine. How to dynamically set that form ? I should have some dynamic bindings, because sometimes these inputs will be 5, sometimes 10.
has comment: http://stackoverflow.com/comment/43643530
answer count: 0
linked to: http://stackoverflow.com/q/18157305
has title: Angular JS dynamic ng-app and ng-controller
type: Question
has comment: http://stackoverflow.com/comment/43654009
has comment: http://stackoverflow.com/comment/43642589
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/43653926
has comment: http://stackoverflow.com/comment/43648595
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/q/27562883
type: UnansweredQuestion
type: Question
tagged with: javascript
score: 0
has body: I have done many tries but i am not sure why this is so buggy. I know limiting question is being asked before. and i have implemented the solution for there solution. but that solution seems buggy. http://stackoverflow.com/questions/2867479/limiting-number-of-characters-in-a-contenteditable-div actually it works but sometimes it sends the total amount in the ajax post.. if you see the ajax post in below pic. you can see it is posting unusual character.. How ever i have tried to put limit to only 2 characters?? Here is the Code Below. var sum=0; //Now Need to Get Available Months on Based of Year $('tr.tableRow td.inner').on('click',function(e){ // e.preventDefault(); // e.stopImmediatePropagation(); $(this).attr('contentEditable','true'); $(this).addClass('inputCopyCat'); $(this).focus(); var lastColumnTotal = $(this).parent().find('.totalTD').text(); var lastColumnSelector = $(this).parent().find('.totalTD'); // console.log(lastColumn); max = 1; sum = Number(lastColumnTotal) - Number($(this).text()); var editorSelector = $(this); editorSelector.keyup(function(e){ $tr=$(this).closest('tr'); $tr.find('td.inner').each(function(){ //console.log(Number($(this).text())); sum += Number($(this).text()); }); //$tr.find('td.inner:last-child').text(sum); check_charcount(editorSelector, max, e); }); editorSelector.keydown(function(e){ check_charcount(editorSelector, max, e); }); function check_charcount(editorSelector, max, e) { if(e.which != 8 &amp;&amp; editorSelector.text().length &gt; max) { // $('#'+content_id).text($('#'+content_id).text().substring(0, max)); e.preventDefault(); e.stopPropagation(); Parexons.notification('You can Not Add More Characters','warning'); } } }); $('tr.tableRow td.inner').focusout(function(e){ // e.preventDefault(); // e.stopImmediatePropagation(); $('td.inputCopyCat').removeAttr('contentEditable'); $('td.inputCopyCat').removeClass('inputCopyCat'); var hoursWorked = Number($(this).text()); var dateOfHoursWorked = $(this).attr('td-data'); var p…
tagged with: jquery
tagged with: ajax
has title: jQuery/javascript | limit Characters in contenteditable="true"
has comment: http://stackoverflow.com/comment/43551489
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/2867479
has comment: http://stackoverflow.com/comment/43551528
has comment: http://stackoverflow.com/comment/43553158
answer count: 0

http://stackoverflow.com/q/27498932
type: UnansweredQuestion
has body: Ive got this template on the front end: if tournament .tournament if round each round ul(class='round#{currentRound} of#{rounds}') each match li each participant if winner .participant.winner a(href='#') span.participant-title #{displayName} span.participant-number #{rank} span.participant-id #{id} span.participant-status #{status} span.participant-round #{thisRound} span.participant-match #{thisMatch} else if pending .participant a(href='#') span.participant-title Waiting... span.participant-number xxx span.participant-id #{id} span.participant-status #{status} span.participant-pending span.participant-disagree #{disagree} span.participant-round #{thisRound} span.participant-match #{thisMatch} else .participant.loser a(href='#') span.participant-title #{displayName} span.participant-number #{rank} span.participant-id #{id} span.participant-status #{status} span.participant-round #{thisRound} span.participant-match #{thisMatch} else h1#not-found Tournament Not Found and this helper: tournament: function(){ if (this.tournament) { return true; }else{ return false; } }, round: function() { var tournament = this.tournament.brackets; var rounds = tournament.length; var results = []; tournament.map(function(value, index){ var currentRound = index + 1; results.push({rounds: rounds, currentRound: currentRound, matches: value}); }); return results; }, match: function(){ return this.matches; }, participant: function(){ var results = []; this.map(function (value, index) { var type = value['win']; var obj = { id: value['id'], rank: value['id'].slice(0,3), displayName: value['displayName'], thisRound: value['round'], thisMatch: value['match'], status: type, disagree: value['disagree'] }; if (value['disagree']) { console.log("value:", value); } if (type === true || type === 'undetermined') { obj.winner = true; }else if (type === 'pending'){ obj.pending = true; }else{ obj.loser = true; } results.push(obj); }); return results; } The helper is getting ran everytime the tournament ob…
has comment: http://stackoverflow.com/comment/43428851
tagged with: render
type: Question
has comment: http://stackoverflow.com/comment/43429264
tagged with: javascript
score: 0
has title: Meteor template doesn't re-render even though its helper is called?
tagged with: templates
tagged with: meteor
answer count: 0

http://stackoverflow.com/a/27475307
score: 1
has body: here is your code modified to output the href value in three different ways, pick which ever you like. Link Test Click me however I am pretty sure that's not your intent. I am not sure why you are using $ as your function name, nor why are you trying to output the href. Your intent is not clear, but I have a feeling you are not approaching things correctly.
downvote count: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27475088
answers question: http://stackoverflow.com/q/27475088
type: Answer
upvote count: 1

http://stackoverflow.com/comment/43670124
score: 0
type: QuestionComment
has text: I guess u need to remove second declaration of $cookieStore: 'auth_token': function($cookieStore) <- here. When u write $cookieStore in controller/factory function -- this means injection. when u write it in usual function -- u just name your local variable.
comment on: http://stackoverflow.com/q/27623628
type: Comment

http://stackoverflow.com/a/27625748
type: Answer
has body: Javascript is going to be a very important language to pick up if you want to become a web developer. I would recommend learning a dom manipulation library like jQuery at first (once you get more experience i would recommend angular or another MVVM javascript library). Here is a short introduction to the use of the jQuery library in javascript which you can learn more about here http://jquery.com/. var selects = $("select"); //get every select tag (kind of like a css selector) and store them selects.on("change", function() { //when any of those select tag's values change var didntChange = selects.not(this); //get the tag the didn't just change and store it didntChange.val(""); //remove its value enabler(); //call the enabler function }); //function declaration - enables and disables buttons as necessary function enabler() { $("#activator").prop("disabled", !$("#inactive").val()); //disable activator if no inactive value $("#deactivator").prop("disabled", !$("#active").val()); //disable deactivator if no active value $("#editor").prop("disabled", !$("#active").val() &amp;&amp; !$("#inactive").val()); //disable editor if no values } enabler(); //invoke / call the enabler function select { width : 100px; } .resize { width : 100px; height : 100px; float : left; } .resize div { height : 33%; } .resize button { height : 100%; width : 100%; } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;select multiple="multiple" id="active" class="resize"&gt; &lt;option&gt;a&lt;/option&gt; &lt;option&gt;b&lt;/option&gt; &lt;option&gt;c&lt;/option&gt; &lt;/select&gt; &lt;div class="resize"&gt; &lt;div&gt; &lt;button id="activator"&gt;&amp;lt;&lt;/button&gt; &lt;/div&gt; &lt;div&gt; &lt;button id="editor"&gt;Edit&lt;/button&gt; &lt;/div&gt; &lt;div&gt; &lt;button id="deactivator"&gt;&amp;gt;&lt;/button&gt; &lt;/div&gt; &lt;/div&gt; &lt;select multiple="multiple" id="inactive" class="resize"&gt; &lt;option&gt;a&lt;/option&gt; &lt;op…
answers question: http://stackoverflow.com/q/27624971
upvote count: 3
accepted answer of: http://stackoverflow.com/q/27624971
type: AcceptedAnswer
downvote count: 0
score: 3

http://stackoverflow.com/comment/43425092
comment on: http://stackoverflow.com/a/27495829
has text: does that help? if so I'll change my answer.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27518940
score: 0
answers question: http://stackoverflow.com/q/27518880
type: Answer
has body: You're missing a closing parenthesis : else if (choice2 === "scissors"
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/43467645

http://stackoverflow.com/comment/43441512
type: QuestionComment
score: 3
comment on: http://stackoverflow.com/q/27505740
has text: Try this json.data[0][0].metadata.id;
type: Comment

http://stackoverflow.com/comment/43607484
type: Comment
comment on: http://stackoverflow.com/q/27569553
score: 0
type: QuestionComment
has text: @AwesomeGuy yes on click (cross or any other clickable element of choice)

http://stackoverflow.com/comment/43677450
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27627202
type: Comment
has text: "pass reference type by value" --- it's called "call by sharing" http://en.wikipedia.org/wiki/Evaluation_strategy#Call_by_sharing

http://stackoverflow.com/q/27570278
has comment: http://stackoverflow.com/comment/43566444
answer count: 1
tagged with: backbone.js-collections
has body: I am searching a backbone collection like this, search: function( filterValue ) { var filterThroughValue = function(data) { return _.some(_.values(data.toJSON()), function(value) { if(value != undefined) { value = (!isNaN(value) ? value.toString() : value); return value.indexOf(filterValue) &gt;= 0; } }); }; return App.Collections.filterCollection = this.filter(filterThroughValue); } The search parameters come from an text input, I am wanting to return results regardless or letter casing is this possible? Can I get the params and what is being searched to lowercase?
tagged with: javascript
has answer: http://stackoverflow.com/a/27570621
type: AnsweredQuestion
tagged with: backbone.js
type: Question
accepted answer: http://stackoverflow.com/a/27570621
score: 0
has title: backbone make collection searches case insenitive

http://stackoverflow.com/comment/43680113
type: Comment
has text: The Server side Python code for /setupaddcalendarevent gets executed. But I am expecting Javascript to prevent this action and execute the somefunction()
comment on: http://stackoverflow.com/q/27629638
score: 0
type: QuestionComment

http://stackoverflow.com/q/27528867
type: Question
answer count: 2
tagged with: firefox
possible better answer: http://stackoverflow.com/a/27529502
has title: Canvas element + Javascript working in Chrome and Firefox, not in Internet Explorer
downvote count: 0
tagged with: javascript
tagged with: html5-canvas
has answer: http://stackoverflow.com/a/27542131
favorite count: 0
accepted answer: http://stackoverflow.com/a/27542131
has answer: http://stackoverflow.com/a/27529502
upvote count: 1
has body: I am using a modified version of the Leaflet FullCanvas Plugin to draw lines on a map. These lines work perfectly find on Firefox and Chrome, but on Internet Explorer (version 11, I'm using Windows 8.1) these lines never get reset when moving/zooming the map. I made a Fiddle to illustrate the problem: http://jsfiddle.net/tee99z65/ Try dragging and zooming while on Chrome or Firefox, and then Internet Explorer (11). What is going on in this code? The method that gets called every time the lines need to be redrawn is drawCanvas() : drawCanvas: function () { var canvas = this.getCanvas(); var ctx = canvas.getContext('2d'); var me = this; ctx.clearRect(0, 0, canvas.width, canvas.height); var bounds = this._myMap.getBounds(); if (!this.options.filterPointsInBounds) bounds = new L.LatLngBounds([-90, -180], [90, 180]); var points = this._myQuad.retrieveInBounds(this.boundsToQuery(bounds)); points.forEach(function (point) { var d = point.data; if (d.draw &amp;&amp; !d.draw(d)) return; // allows dynamic filtering of curves var spoint = me._myMap.latLngToContainerPoint(new L.LatLng(d.slat, d.slon)); if (d.tlat &amp;&amp; d.tlon) { var tpoint = me._myMap.latLngToContainerPoint(new L.LatLng(d.tlat, d.tlon)); me.drawCurve(point, spoint, tpoint, d.style ? d.style(d) : null); } }); }, Does anyone have any idea what's going on here? A fix would be nice, but I'm already happy if anyone can point out why this is happening so I can attempt a fix myself.
type: AnsweredQuestion
tagged with: leaflet
score: 1
tagged with: google-chrome

http://stackoverflow.com/comment/43565442
type: QuestionComment
has text: change your error handler function to : `error: function(xhr, status, error) { var err = eval("(" + xhr.responseText + ")"); alert(err.Message); }` so you can meaningful error.
score: 1
type: Comment
comment on: http://stackoverflow.com/q/27570005

animation
tags question: http://stackoverflow.com/q/27521142
tags question: http://stackoverflow.com/q/27573619
tags question: http://stackoverflow.com/q/27534088
tags question: http://stackoverflow.com/q/27639415
tags question: http://stackoverflow.com/q/27475692
type: Tag
tags question: http://stackoverflow.com/q/27486846
tags question: http://stackoverflow.com/q/27510139
tags question: http://stackoverflow.com/q/27601793
tag name: animation
tags question: http://stackoverflow.com/q/27556778
tags question: http://stackoverflow.com/q/27610683
tags question: http://stackoverflow.com/q/27626645
tags question: http://stackoverflow.com/q/27554831
tags question: http://stackoverflow.com/q/27525597
tags question: http://stackoverflow.com/q/27475932
tags question: http://stackoverflow.com/q/27629578
tags question: http://stackoverflow.com/q/27590683
tags question: http://stackoverflow.com/q/27586410
tags question: http://stackoverflow.com/q/27568267
tags question: http://stackoverflow.com/q/27475694
tags question: http://stackoverflow.com/q/27496899
tags question: http://stackoverflow.com/q/27509500

http://stackoverflow.com/q/27483550
tagged with: cross-platform
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27483819
answer count: 1
has body: I would like to create an image object programmatically and stretch image to view's size, not image size. Here is my code. what is missing ? var createButton = new SMF.UI.Image(); createButton.image = "answer.png"; createButton.top = 5; createButton.width = 38; createButton.height = 38; createButton.left = 5; createButton.onShow = function(e) { alert("object created"); };
tagged with: smartface.io
type: AnsweredQuestion
has title: Create image object programmatically
accepted answer: http://stackoverflow.com/a/27483819
score: 0

http://stackoverflow.com/q/27491060
has answer: http://stackoverflow.com/a/27491127
tagged with: for-loop
upvote count: 0
has answer: http://stackoverflow.com/a/27491105
tagged with: javascript
has title: javascript function won't loop
has answer: http://stackoverflow.com/a/29551475
downvote count: 4
possible better answer: http://stackoverflow.com/a/27491108
has answer: http://stackoverflow.com/a/27491093
accepted answer: http://stackoverflow.com/a/27491093
has comment: http://stackoverflow.com/comment/43413735
favorite count: 0
has body: Here is a piece of a javascript practice problem that I am working on: function combo(str){ var splitStr=str.split(""); for (var i=0; i&lt;splitStr.length; i++){ return splitStr[i]; } } console.log(combo("dog")); Why won't the loop return all three letters? It prints "d" and stops. If I take the loop out of the function, it works. What am I doing wrong? Please explain.
answer count: 5
score: -4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27491108
has comment: http://stackoverflow.com/comment/43413755
type: Question

http://stackoverflow.com/q/27552624
has title: javascript function called on pageload rather than when button is clicked in dynamically generated table
has answer: http://stackoverflow.com/a/27552668
answer count: 2
tagged with: button
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/27552668
possible better answer: http://stackoverflow.com/a/27552663
has answer: http://stackoverflow.com/a/27552663
type: AnsweredQuestion
has body: I am dynamically generating an HTML table of variable length with javascript, and inside that form I am inserting a button for each row. The button should call a function when it is clicked, but right now the function is called for each row upon page load/table generation. If there are multiple buttons (since I create one for each row), each button calls the function. I know this because I have an alert with the name of the caller in upVoteA(). Here is the portion of the call that creates the button (entire function is at the bottom of this post): var tr1 = document.createElement('TR'); var upvote = document.createElement('button') upvote.name = i + offset upvote.onclick = upVoteA(upvote.name) upvote.innerHTML = "Upvote link" tr1.appendChild(upvote) Am I missing some property to change this behavior? What is wrong with my code? Also, here is the full function I call to generate the table in case that is helpful.. function answerTableText(idd, offset) { var answerDiv = document.getElementById("answerShow") while(answerDiv.firstChild){ answerDiv.removeChild(answerDiv.firstChild) } if(qnumans_array[idd] &gt;0) { var table = document.createElement('TABLE'); var tableBody = document.createElement('TBODY'); table.appendChild(tableBody); for (var i=0; i&lt;qnumans_array[idd]; i++){ var tr = document.createElement('TR'); var td1 = document.createElement('TD') td1.innerHTML = answer_array[i + offset] var td2 = document.createElement('TD') var tr1 = document.createElement('TR'); //tr1.innerHTML = "Upvote" var upvote = document.createElement('button') upvote.name = i + offset upvote.onclick = upVoteA(upvote.name) upvote.innerHTML = "Upvote link" tr1.appendChild(upvote) var tr2 = document.createElement('TR'); tr2.innerHTML = "Downvote" td2.appendChild(tr1) td2.appendChild(tr2) td1.padding = "1em" td2.padding = "1em" tr.appendChild(td1) tr.appendChild(td2) tr.style.borderBottom = "thin solid #37434E" tr.style.borderTop = "thin solid #37434E" tableBody.appendChild(tr); } answerDi…
type: Question

http://stackoverflow.com/comment/43478670
comment on: http://stackoverflow.com/a/27525001
has text: So what did you mainly fix?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27572267
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/43570436
tagged with: asp.net
favorite count: 0
has answer: http://stackoverflow.com/a/27573776
has body: I have an Asp.net page my code is as <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="fisrt_page.aspx.cs" Inherits="my_project.fisrt_page" %> <......................my elements.....................> my design looks like image below https://plus.google.com/u/0/104984108592274133808/posts/4GdoUjboqi2?pid=6094624686097586866&oid=104984108592274133808 but I want that my design fill all the page and hide the spaces as images from my design Sorry for my bad English but please help me my css was as html, head, body, form { height: 100%; width: 100%; } .inputbox { background: white; border: 1px solid #DDD; border-radius: 5px; box-shadow: 0 0 5px #DDD inset; color: #666; outline: none; height: 25px; width: 275px; font-size: 20px; }
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43570743
tagged with: css
score: -1
type: AnsweredQuestion
upvote count: 3
type: Question
accepted answer: http://stackoverflow.com/a/27573776
has comment: http://stackoverflow.com/comment/43570467
has title: make mydesign fill the asp.net page
tagged with: javascript
downvote count: 4
has comment: http://stackoverflow.com/comment/43572841

http://stackoverflow.com/comment/43506163
type: QuestionComment
comment on: http://stackoverflow.com/q/27521796
type: Comment
has text: ok solved it by myself. using querystring. i removed all the javascript.
score: 0

http://stackoverflow.com/a/27566823
score: 1
type: AcceptedAnswer
downvote count: 0
has body: Just a guess but usually this is because you are using two different asynchronous systems together. While it is possible in limited situations, you generally want to avoid calling non-indexedDB ajax functions like an async flagged XMLHttpRequest. A simple fix would be to call catalogue.retrieve first, and then call indexedDB.open with a higher version within catalogue.retrieve's callback. This way the statements within the onupgradeneeded transaction occur while the VERSION_CHANGE transaction is active. Right now it looks like the transaction becomes in active (the onupgradeneeded function finishes and exits) before the call to catalogue.retrieve completes. In other words, do: catalogue.retrieve(function(catalogue) { var r = indexedDB.open(...); r.onupgradeneeded = function() { var db = r.result; for(var k in catalogue) { //... db.createObjectStore(...); } }; });
type: Answer
has comment: http://stackoverflow.com/comment/43653769
accepted answer of: http://stackoverflow.com/q/27552661
answers question: http://stackoverflow.com/q/27552661
upvote count: 1

http://stackoverflow.com/a/27480870
has body: Demo $(document).ready(function() { $('.menu').click(function() { $('.submenu').slideToggle('600'); /* using slideToggle will make the list slide elegantly */ }); }); /* some changes to make it look elegant. */ body { font-family: helvetica; } .menu { width: 300px; margin: auto; vertical-align: top; padding: 0; font-size: 18px; color: white; text-align: center; background: #34495E; border: 0px; border: 2px solid #2C3E50; -webkit-box-shadow: inset 0 -2px #34495E; box-shadow: inset 0 -2px #34495E; } .submenu { width: 300px; background-color: #6D767F; padding: 0px; margin: 0 auto; text-align: center; font-size: 15px; color: #FFF; display: none; } ul { margin: 0; padding: 0; } ul li { list-style: none; padding: 11px; margin: 0px; text-transform: lowercase; } ul li a { text-decoration: none; font-size: 1.1em; color: #FFF; } ul li a:visited { text-decoration: none; } .submenu ul li:hover { background-color: #719ECC; } menu Mountain Bike gopro Shoei Helmet
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/27480672
downvote count: 0
type: Answer

http://stackoverflow.com/q/27616818
has title: Words go out of the borders in d3.js tag cloud
answer count: 1
tagged with: d3.js
has answer: http://stackoverflow.com/a/27664002
type: AnsweredQuestion
tagged with: tag-cloud
type: Question
accepted answer: http://stackoverflow.com/a/27664002
has body: I want to create word tag cloud using d3 .. I found a good example here but the problem that the words go outside the borders especially in case of large fonts and this screenshot for the problem and here's my code &lt;script src="../lib/d3/d3.js"&gt;&lt;/script&gt; &lt;script src="../d3.layout.cloud.js"&gt;&lt;/script&gt; &lt;script&gt; var fill = d3.scale.category20(); d3.layout.cloud().size([600, 600]) .words([ "Hello", "world", "normally", "you", "want", "more", "words", "than", "this" ].map(function(d) { return { text: d, size: 10 + Math.random() * 90 }; })) .padding(5) .rotate(function() { return ~~(Math.random() * 2) * 90; }) .font("Impact") .fontSize(function(d) { return d.size; }) .on("end", draw) .start(); function draw(words) { d3.select("body").append("svg") .attr("width", 700) .attr("height", 700) .append("g") .attr("transform", "translate(150,150)") .selectAll("text") .data(words) .enter().append("text") .style("font-size", function(d) { return d.size + "px"; }) .style("font-family", "Impact") .style("fill", function(d, i) { return fill(i); }) .attr("text-anchor", "middle") .attr("transform", function(d) { return "translate(" + [d.x, d.y] + ")rotate(" + d.rotate + ")"; }) .text(function(d) { return d.text; }); } &lt;/script&gt; anyone know a solution for this?
tagged with: javascript
score: 0

http://stackoverflow.com/comment/43709877
comment on: http://stackoverflow.com/q/27636258
type: Comment
type: QuestionComment
score: 0
has text: You mean in the symfony file router (routing.yaml) ? or my path to the partial files?

http://stackoverflow.com/comment/43530640
comment on: http://stackoverflow.com/a/27550783
type: Comment
score: 0
type: AnswerComment
has text: I never used load as the iframe is already fully loaded when I use the colpick function... Is there another utility for the load function?

http://stackoverflow.com/comment/43455220
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27508153
has text: Thanks for the response, however native JS is a requirement for this implementation

http://stackoverflow.com/comment/43414445
type: Comment
type: QuestionComment
has text: So add another timeout?
score: 3
comment on: http://stackoverflow.com/q/27491439

testing
tags question: http://stackoverflow.com/q/27633683
tags question: http://stackoverflow.com/q/27519926
tag name: testing
tags question: http://stackoverflow.com/q/27560985
tags question: http://stackoverflow.com/q/27535564
tags question: http://stackoverflow.com/q/27508249
tags question: http://stackoverflow.com/q/27494888
tags question: http://stackoverflow.com/q/27516683
tags question: http://stackoverflow.com/q/27509362
tags question: http://stackoverflow.com/q/27579297
tags question: http://stackoverflow.com/q/27570025
type: Tag
tags question: http://stackoverflow.com/q/27493715
tags question: http://stackoverflow.com/q/27576381
tags question: http://stackoverflow.com/q/27520961
tags question: http://stackoverflow.com/q/27544508
tags question: http://stackoverflow.com/q/27477868
tags question: http://stackoverflow.com/q/27489917
tags question: http://stackoverflow.com/q/27596995
tags question: http://stackoverflow.com/q/27513414
tags question: http://stackoverflow.com/q/27488451

http://stackoverflow.com/comment/43629421
type: Comment
comment on: http://stackoverflow.com/q/27603579
has text: Because you are referencing `this` in both objects which has been overwritten in the moment the second object has been initialised.
type: QuestionComment
score: 0

http://stackoverflow.com/a/49024317
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27503585
has body: In my case, after a little modification, it works fine. $('#txtTimeSlot').on('change', function () { var len = $(this).tagsinput('items').length; if (len &gt; 0) { var $input = $($(this).prev().children('input').get(0)); $input.attr('placeholder', ''); } else { var $input = $($(this).prev().children('input').get(0)); $input.attr('placeholder', $(this).attr('placeholder')); } });

http://stackoverflow.com/q/27518536
accepted answer: http://stackoverflow.com/a/27518590
tagged with: charts
type: AnsweredQuestion
has body: I am using Angular-chart. Below is my JS $scope.Fchart = { series: "Employer", data: [ {x:"abc",y:450},{x:"bcd",y:500},{x:"cds",y:350} ] }; My HTML look like below &lt;div ac-chart="chartType" ac-data="Fchart" ac-config="config" id='chart' class='chart'&gt;&lt;/div&gt; Here is my App.js var myApp = angular.module('myApp', ['ngRoute','ui.bootstrap','myApp.config','ui.select2','ngToast','angularCharts']); When i run the application. I am getting undefined is not function in console. Also i am not getting the chart. What went wrong ? Can any one help me. Thanks,
has comment: http://stackoverflow.com/comment/43467018
has comment: http://stackoverflow.com/comment/43466927
answer count: 1
tagged with: javascript
score: 0
tagged with: angularjs
has title: Angular chart is not working
type: Question
has answer: http://stackoverflow.com/a/27518590

http://stackoverflow.com/a/27629579
type: Answer
upvote count: 6
score: 6
has comment: http://stackoverflow.com/comment/45702090
answers question: http://stackoverflow.com/q/27627781
type: AcceptedAnswer
downvote count: 0
has body: There is a function called evaluate that allows you to evaluate an angular expressions given an element. Select a DOM element for which you want to examine the scope, then call evaluate. There is an example in the documentation: http://angular.github.io/protractor/#/api?view=ElementArrayFinder.prototype.evaluate
accepted answer of: http://stackoverflow.com/q/27627781

http://stackoverflow.com/q/27622189
upvote count: 1
tagged with: xul
tagged with: http://stackoverflow.com/tag/xml
favorite count: 0
answer count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/25310666
has comment: http://stackoverflow.com/comment/44538352
has body: I use xul inteface to load an xml file and then I want to display it's graphical tree using XUL trees but I don't know how to do it. please could anyone told me how to implement it, or is there any other tool that allows me to generate th graphical tree of my xml file? thank you
tagged with: tree
has title: how to bind loaded xml in xul tree
downvote count: 0
score: 1
type: Question
tagged with: javascript
tagged with: graphic

api
tags question: http://stackoverflow.com/q/27589346
tags question: http://stackoverflow.com/q/27632874
tags question: http://stackoverflow.com/q/27561548
tags question: http://stackoverflow.com/q/27614561
tags question: http://stackoverflow.com/q/27560211
tags question: http://stackoverflow.com/q/27607808
type: Tag
tags question: http://stackoverflow.com/q/27546804
tag name: api
tags question: http://stackoverflow.com/q/27483847
tags question: http://stackoverflow.com/q/27595259
tags question: http://stackoverflow.com/q/27612843
tags question: http://stackoverflow.com/q/27636969
tags question: http://stackoverflow.com/q/27552705
tags question: http://stackoverflow.com/q/27513600
tags question: http://stackoverflow.com/q/27535244
tags question: http://stackoverflow.com/q/27607161
tags question: http://stackoverflow.com/q/27531102

http://stackoverflow.com/q/27566477
upvote count: 1
downvote count: 1
has title: how to put php string jQuery validation error message
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
tagged with: jquery-validate
has body: I'm using jquery validation to validate a form the js code looks like this: form.validate({ messages: { years_of_experience: { range: "&lt;?php echo Translation::tr('profileform.error.yearsOfExperience');?&gt;" } }, rules: { years_of_experience: { range: [0, 100] } } }); Translation::tr('profileform.error.yearsOfExperience') -> makes a simple mysql call to the database and returns a string (the error message for the element) but the problem is that i can't display the error message (i get blank). if i change the javasctipt code like this it works just fine: form.validate({ messages: { years_of_experience: { range: "Please select a number from 0 to 100" } }, rules: { years_of_experience: { range: [0, 100] } } }); Can you help me ? Thanks
favorite count: 0
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/27566931
tagged with: php
has answer: http://stackoverflow.com/a/27569654
has comment: http://stackoverflow.com/comment/43558082
score: 0

http://stackoverflow.com/q/27572021
has comment: http://stackoverflow.com/comment/53835006
type: Question
has comment: http://stackoverflow.com/comment/43576373
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery
has title: jQuery Mobile slider refresh
tagged with: slider
downvote count: 0
has body: I have a range input like this: &lt;input type="range" min="0" max="7" step=".5" name="slider" id="slider" value="0" required="required" /&gt; jQueryMobile auto initializes this and draws a slider. Then I try to update the its value programatically. $("#slider").val(2) ; $("#slider").slider('refresh') ; But I get an error about the slider not ben initialized. I then initialize the slider before refreshing but jQM draws a second slider. $("#slider").slider().slider('refresh') ; How can I update a slider that has been auto-initialized and have it refresh? [UPDATE] I have found a workaround by setting data-role="none" so that JQM does not initialize. I also changed input type from range to number. I then initialize the slider programatically. &lt;input type="number" data-role="none" min="0" max="7" step=".5" name="slider" id="slider" value="0" required="required" /&gt; $("#slider").slider() ;
has comment: http://stackoverflow.com/comment/43572935
favorite count: 0
answer count: 0
upvote count: 2
type: UnansweredQuestion
score: 2

http://stackoverflow.com/a/27598120
score: 0
answers question: http://stackoverflow.com/q/27594046
has body: Maybe try to use .indexOf() to do the matching ? Documentation for(var l=0;l&lt;fileNames.length;l++){ if(emailByLabel.indexOf(fileNames[l][0]) !== -1) { var ss = SpreadsheetApp.openById(fileNames[l][1]).getSheets()[0]; Logger.log(fileNames[l][0]); Logger.log(fileNames[l][1]); ss.getRange(2,1,emailByLabel.length,5).setValues(emailByLabel); } else { Logger.log("MATCH, BROKE!"); Logger.log(fileNames[l][0]); Logger.log(fileNames[l][1]); } } }
type: Answer

http://stackoverflow.com/comment/43542492
score: 2
comment on: http://stackoverflow.com/q/27558131
has text: JavaScript doesn't magically add things like `?ts=12345666` to your URL, so that's probably some quirkiness on your server.
type: QuestionComment
type: Comment

http://stackoverflow.com/q/27497714
type: Question
answer count: 2
upvote count: 0
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/43426781
has body: I have values stored in the following variable nad have a json structure. But values are not being stored to json. code given below. var ReportSelected = []; var PeopleSelected = []; var FilterSelected = []; var summaryJson = { "reportselectedjson" : [], "PeopleSelected" : [], "FilterSelected" : [] }; for ( var int = 0; int &lt; ReportSelected.length; int++) { summaryJson.reportselectedjson.push(ReportSelected[int]); } for ( var int2 = 0; int2 &lt; PeopleSelected.length; int2++) { summaryJson.PeopleSelectedjson.push(PeopleSelected[int2]); } for ( var int3 = 0; int3 &lt; FilterSelected.length; int3++) { summaryJson.FilterSelectedjson.push(FilterSelected[int3]); } console.log(JSON.stringify(summaryJson)); this gives no value in json.
has comment: http://stackoverflow.com/comment/43426777
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27497755
has title: Not able to create json
tagged with: http://stackoverflow.com/tag/json
downvote count: 2
has comment: http://stackoverflow.com/comment/43426852
has answer: http://stackoverflow.com/a/27497786

http://stackoverflow.com/q/27596093
has comment: http://stackoverflow.com/comment/43616088
tagged with: javascript
has answer: http://stackoverflow.com/a/27596129
has answer: http://stackoverflow.com/a/27596168
has comment: http://stackoverflow.com/comment/43616122
answer count: 3
possible better answer: http://stackoverflow.com/a/27596151
downvote count: 0
has answer: http://stackoverflow.com/a/27596151
favorite count: 0
has comment: http://stackoverflow.com/comment/43616163
accepted answer: http://stackoverflow.com/a/27596129
has title: Javascript: if 'abstract' is a reserved word why I am still able to use it as an identifier?
has comment: http://stackoverflow.com/comment/43616110
has comment: http://stackoverflow.com/comment/43616093
type: AnsweredQuestion
tagged with: identifier
score: 1
upvote count: 1
tagged with: reserved-words
type: Question
has body: I am reading a book about JavaScript where I read about reserved words, I tried all the reserved words to us as an identifier but no one is allowed except 'abstract', I am still able to use 'abstract' as an identifier even it is a reserved word! I tried Internet Explorer, Chrome, Firefox and it is working as an identifier, why is it still allowed as an identifier even it is a reserved word? Thanks function myFunction(a, b) { abstract = a+b; alert("Sum = "+abstract); } TestScript Try it

http://stackoverflow.com/comment/43449249
type: Comment
comment on: http://stackoverflow.com/q/27504207
score: 0
has text: @vbo Please read the "Background" regarded in the question that you meant carefully to know that the two questions are different.
type: QuestionComment

http://stackoverflow.com/comment/43519105
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27545235
score: 0
has text: Hm, not sure, so you talking about CTRL key? That is works too for me.

http://stackoverflow.com/comment/43388981
has text: where's the call to update your rating on change of stars?
comment on: http://stackoverflow.com/q/27475967
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/q/27529782
type: Question
has title: RSA encryption: reproducing JS behaviour with PHP
has answer: http://stackoverflow.com/a/27544110
answer count: 1
tagged with: javascript
upvote count: 1
tagged with: phpseclib
linked to: http://stackoverflow.com/q/4484246
has comment: http://stackoverflow.com/comment/43505766
favorite count: 0
has body: I am trying to convert a piece of JS code based on Dave Shapiro's 'RSA in Javascript' library (http://ohdave.com/rsa/) to PHP (I am trying to create a PHP crawler for a page that uses JS to encrypt the login form) Here is the JS code I am trying to replicate: var encryptionExponent = '010001'; var modulus = '00c6d7c11554aab59454b558169da42db14dec4ae0aacd9311aaec4260040fbb474885b5b1b73a5a40288f6ec301db37f920b05a0ad9f8119453b2b6b9ec4cca163ab3ab51e2d334eade81efeb01bed16e4f15fb2143e422cd3dec91a1b96ede4229ca9141ed27ffa72e643340a8db68b3ce38f65a8f59f570851196a76d2cbd67'; setMaxDigits(130); var keyPair = new RSAKeyPair(encryptionExponent, null, modulus); var encrypted = encryptedString(keyPair, 'test'); console.log(encrypted); Here is the encrypted output of the JS code: c026f303aaa7114c7c0328e7112755eaa33c8f785908206c36d96e56bbee141c0a5504a41cbb8acf52de8254fa225ee0007b78fcd7791ce7a930ea1f3cd582329d05330c33d98354410562982f85f8997069c1535df062224103a09d1b2a4d0bf1bfa454f882af2a9828ed214c405f75d74cab8077c384bdef0c7f28a84eb8fe Here is my PHP code, based on PHPSecLib: $rsa = new Crypt_RSA(); $rsa-&gt;modulus= new Math_BigInteger('00c6d7c11554aab59454b558169da42db14dec4ae0aacd9311aaec4260040fbb474885b5b1b73a5a40288f6ec301db37f920b05a0ad9f8119453b2b6b9ec4cca163ab3ab51e2d334eade81efeb01bed16e4f15fb2143e422cd3dec91a1b96ede4229ca9141ed27ffa72e643340a8db68b3ce38f65a8f59f570851196a76d2cbd67', 16); $rsa-&gt;publicExponent= new Math_BigInteger('010001', 16); $key = $rsa-&gt;getPublicKey(); $rsa-&gt;loadKey($key); $rsa-&gt;setEncryptionMode(CRYPT_RSA_ENCRYPTION_PKCS1); $ciphertext = $rsa-&gt;encrypt("test"); echo bin2hex($ciphertext)."\n"; Here is the encrypted output of the PHP code: 147e59d33fa0f5757bdd0a18822843aa6511f7c82d3398d503c19fb11e65b6b238694407cadf0c79655dfb4c2e0ab465e5e8e4025e2f579ea160be760af121aa7e303f875f813848cff2a82fd8c4d24f8bc87981e99c7a22216546013fb54210c06752833ac8722db789212636bf8c9be94b589b8def8af8c632df7c4dac432a The output is different, even though the exponent an…
downvote count: 0
type: UnansweredQuestion
tagged with: encryption
tagged with: php
has comment: http://stackoverflow.com/comment/43491758
score: 1
tagged with: rsa
has comment: http://stackoverflow.com/comment/43494398

http://stackoverflow.com/q/27551634
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/43529517
tagged with: events
linked to: http://stackoverflow.com/q/6348494
has comment: http://stackoverflow.com/comment/43529502
has comment: http://stackoverflow.com/comment/43529870
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27551742
upvote count: 2
duplicate of: http://stackoverflow.com/q/6348494
has comment: http://stackoverflow.com/comment/43529588
has comment: http://stackoverflow.com/comment/43529643
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27551742
has body: I am developing an app and speed is a concern. When attaching events to elements there are two ways that I know how to do it: element.addEventListener('click', function() { // code to execute onclick }) or element.onclick = function() { // code to execute onclick } Which way is more efficient and robust? ...even though both work, which is the correct/preferred way?
has comment: http://stackoverflow.com/comment/43529526
has title: Proper and most efficient way to add events in Javascript?

http://stackoverflow.com/comment/43392962
type: Comment
comment on: http://stackoverflow.com/a/27477092
score: 0
type: AnswerComment
has text: It's a nice idea, but javascript doesn't have this.

http://stackoverflow.com/q/27616698
tagged with: jquery-animate
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27616744
type: Question
has title: Change element size jQuery
tagged with: http://stackoverflow.com/tag/html
tagged with: css
possible better answer: http://stackoverflow.com/a/27616735
has answer: http://stackoverflow.com/a/27616735
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/27616744
has body: I want to change element size by animate function. But when I do this, all my page elements are slide down. Is there any existing way to avoid sliding down elements of page? My code: $(".animated_blue_1").delay(800).animate({ "height":230, "width":230 },500, function () { $(".animated_blue_1").animate({ "height":200, "width":200 },500); });
has comment: http://stackoverflow.com/comment/43654729
has comment: http://stackoverflow.com/comment/43654710

http://stackoverflow.com/q/27487611
accepted answer: http://stackoverflow.com/a/39361455
has title: Adding JavaScript To Many Pages(More than 500) in asp.net without MasterPage
upvote count: 2
has body: I am working on Project in which there are more than 500 .aspx pages(Popups uses ShowModelDialog) I want Suppress/Disable Enter Key for each Page I want to Add Below Code for Every page (all Popup )or for every Request made by User. Unfortunately There is no master page in the project &lt;script type="text/javascript"&gt; function stopRKey(evt) { var evt = (evt) ? evt : ((event) ? event : null); var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null); if ((evt.keyCode == 13) &amp;&amp; (node.type=="text")) {return false;} } document.onkeypress = stopRKey; &lt;/script&gt; void Application_BeginRequest(object sender, EventArgs e) { // Code that runs on application shutdown System.Web.UI.Page mypage = (System.Web.UI.Page)HttpContext.Current.Handler; if (mypage != null) { mypage.ClientScript.RegisterClientScriptBlock(GetType(), "MyScriptKey", "alert('hi')", true); } } I try to add this script in Global.asax in Application_BeginRequest but no luck
has comment: http://stackoverflow.com/comment/43406916
has comment: http://stackoverflow.com/comment/43407136
has comment: http://stackoverflow.com/comment/43407351
has comment: http://stackoverflow.com/comment/43407068
type: Question
has comment: http://stackoverflow.com/comment/43407055
tagged with: javascript
tagged with: page-lifecycle
answer count: 2
has answer: http://stackoverflow.com/a/39361455
downvote count: 0
tagged with: .net
has comment: http://stackoverflow.com/comment/43406976
tagged with: asp.net
favorite count: 0
has comment: http://stackoverflow.com/comment/43407156
has answer: http://stackoverflow.com/a/27488209
has comment: http://stackoverflow.com/comment/43408438
has comment: http://stackoverflow.com/comment/43407080
has comment: http://stackoverflow.com/comment/43406970
has comment: http://stackoverflow.com/comment/43407242
possible better answer: http://stackoverflow.com/a/27488209
has comment: http://stackoverflow.com/comment/43406860
score: 2
type: AnsweredQuestion

http://stackoverflow.com/q/27583120
type: Question
tagged with: internet-explorer
has title: HTML window open in IE
tagged with: javascript
has body: This works fine in Chrome. But in IE it opens a window, and the current window from where the hyperlink is clicked goes blank. How do I fix this? 86C2EC58
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/43590896
has comment: http://stackoverflow.com/comment/43590898
accepted answer: http://stackoverflow.com/a/27583353
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27583353
has comment: http://stackoverflow.com/comment/43590781

http://stackoverflow.com/comment/43513643
score: 1
type: AnswerComment
has text: Please change the backslash in type specifiers to forward slash.
type: Comment
comment on: http://stackoverflow.com/a/27542161

http://stackoverflow.com/comment/43692157
type: Comment
score: 1
comment on: http://stackoverflow.com/q/27636364
type: QuestionComment
has text: Why would you even want to check for the password value? Why check for the value of ANY property other than the uniquely indexed one, for that matter? While I understand your curiosity about the inner workings of MongoDB, it hardly matters in your current example- just fetch the document with the unique email, and then make other checks in your `exec` function.

http://stackoverflow.com/q/27515122
type: Question
upvote count: 1
answer count: 1
tagged with: ios
tagged with: javascript
favorite count: 0
tagged with: android
has comment: http://stackoverflow.com/comment/43608537
downvote count: 0
type: UnansweredQuestion
has title: Widget does not display on IOS and Android
score: 1
has body: I have a web app that allows the user to embed quoting widget's on their own personal websites. The widget is built in our app and then we give them a piece of JS that they can embed wherever they please. Example embed code: &lt;script src="https://pinney.dataraptor.com/quoting/widget/widgets/18.js"&gt;&lt;/script&gt; The issue here is that on any mobile device (Tested on IOS and Android) the widget simply won't render. I've tested on my android phone in Chrome, Firefox and IE and interestingly enough it does show in the IE app but not the others. To see for yourself fire up http://www.wholesaleinsurance.net on a mobile device.
has answer: http://stackoverflow.com/a/27592752

http://stackoverflow.com/comment/43661321
comment on: http://stackoverflow.com/a/27620217
type: Comment
has text: using ` top: -100000px;` seems a bad idea. Use `display: none` instead.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43654028
type: QuestionComment
has text: could probably simplify how you create `keypay1` if this is it's sole use
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27616231

http://stackoverflow.com/comment/43506540
comment on: http://stackoverflow.com/q/27539335
score: 0
type: Comment
type: QuestionComment
has text: @mybirthname open the image in a new tab and click on it.

http://stackoverflow.com/comment/43694421
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27636211
has text: please check this i am trying this type http://jsfiddle.net/vipinwasim/vkgg9rg1/6/

http://stackoverflow.com/q/27489039
type: Question
has answer: http://stackoverflow.com/a/27489142
upvote count: 0
score: -2
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/43409830
has title: Javascript: find word in a div and display everything after that word?
type: UnansweredQuestion
downvote count: 2
has body: This is a difficult to explain so please bear with me. I need to find a word in a div and then display up to 5 other words after that word in another div. I can find the word using javascript and it works fine but I don't know how to display the words after it in another div! This is my current code: HTML: Try it This will take sometimes, maybe about 2 hours so what the code above does is that it will find the word about in the div map-directions and it will display everything in the div called demo. is there any way to just find the word about and display the 5 or 4 words after the word about? I hope i have not confused you guys. Thanks in advance.

http://stackoverflow.com/comment/43460219
score: 0
type: AnswerComment
has text: Thank you very much :) I had some other problems but finally I managed to do it properly. Thanks again!
type: Comment
comment on: http://stackoverflow.com/a/27511685

http://stackoverflow.com/comment/43483919
has text: Oh, didn't realise that! That that php will literally output the jquery below?
score: 0
comment on: http://stackoverflow.com/a/27527633
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/43458573
comment on: http://stackoverflow.com/q/27514109
has text: Having the relevant CSS would be critical to assisting you.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43486312
type: Comment
comment on: http://stackoverflow.com/a/27528563
has text: @Nick: Then adjust it to do what you want. There's more than enough here to get you going. If you only want to search `Name` properties, and leave the `Name` part off the path, you can do that.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/43642569
has text: Thanks Kevin, I am aware console is better, however in actual code I am using neither, I need to display the content in a new window(its huge data, here is only a snapshot).
comment on: http://stackoverflow.com/q/27610080
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/27486345
upvote count: 1
has body: This is EASY with jQuery! All these blendings of HTML and Regex is just not good. You're using jQuery, just do it the jQuery way. Also, I'm not sure why a parameter would ever have an apostrophe, but if it's value has one, then try using .apply. Create your elements in your loops and assign info where it belongs. It's as simple as follows: var details = rows.data[i].details, // simply guessing at some form of how you got your param // beging creating your elements. First, the div.section, which appears to be your wrapper, this will come into play later section = $('&lt;div /&gt;', { class: 'section clear' }), // now to create the image element. I know yours is wrapped in a span, but I'll show you a quick add for that a little later img = $('&lt;img /&gt;', { alt: '', height: '32', src: pic_square, width: '32' }), // now for your username span, I'm assuming this is your label userName = $('&lt;span /&gt;', { class: 'user_name', text: rows.data[i].name }), // here I create your link, notice I don't add the "onclick" method yet, just wait, // going to show you use of apply lnkSelect = $('&lt;a /&gt;', { class: 'blue_button blue_button_small flt_right', href: 'javascript:void(0)', style: 'line-height: 16px; height: 18px; margin: 6px 15px 0 0;', text: 'Select' }); // Here is where it all comes together // jQuery's append/prepend methods are very powerful, // Notice you can join multiple elements in another with just simple comma separation, // You'll also notice that IMG span wrapper I was talking about earlier coming back! section.append( // First element in your div.section is the image, but alas! we need that SPAN tag around it! // I simply use jQuery to create a SPAN tag and then append the image to it! Viola! $('&lt;span /&gt;').append(img), // Now to append that username span userName, // finally, add the link clicker! lnkSelect ).appendTo($('body')); // this Trixy part is like "append", except it adds this element to whatever we pass in the selector! Thus, "append…
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27485356
score: 1

http://stackoverflow.com/comment/43623742
has text: Interesting would be the difference between the directives. Why not using the same directive everywhere?
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27599540

angular-material
tags question: http://stackoverflow.com/q/27600115
type: Tag
tag name: angular-material
tags question: http://stackoverflow.com/q/27605207

http://stackoverflow.com/comment/43431799
type: Comment
comment on: http://stackoverflow.com/a/27500540
has text: Then you can use your function depends on this.checked
score: 0
type: AnswerComment

wordpress
tags question: http://stackoverflow.com/q/27610429
tags question: http://stackoverflow.com/q/27588861
tags question: http://stackoverflow.com/q/27517288
tags question: http://stackoverflow.com/q/27535491
tags question: http://stackoverflow.com/q/27568688
tags question: http://stackoverflow.com/q/27497154
tags question: http://stackoverflow.com/q/27521049
tags question: http://stackoverflow.com/q/27509329
tags question: http://stackoverflow.com/q/27593513
tags question: http://stackoverflow.com/q/27505885
tags question: http://stackoverflow.com/q/27579507
tags question: http://stackoverflow.com/q/27585987
tags question: http://stackoverflow.com/q/27635186
tags question: http://stackoverflow.com/q/27594479
tags question: http://stackoverflow.com/q/27555426
tags question: http://stackoverflow.com/q/27617586
tag name: wordpress
tags question: http://stackoverflow.com/q/27514919
tags question: http://stackoverflow.com/q/27482056
tags question: http://stackoverflow.com/q/27537671
tags question: http://stackoverflow.com/q/27549320
tags question: http://stackoverflow.com/q/27575836
tags question: http://stackoverflow.com/q/27619207
tags question: http://stackoverflow.com/q/27540258
tags question: http://stackoverflow.com/q/27628928
tags question: http://stackoverflow.com/q/27496152
tags question: http://stackoverflow.com/q/27556180
tags question: http://stackoverflow.com/q/27594647
tags question: http://stackoverflow.com/q/27584187
tags question: http://stackoverflow.com/q/27567262
tags question: http://stackoverflow.com/q/27622120
tags question: http://stackoverflow.com/q/27527559
tags question: http://stackoverflow.com/q/27572783
tags question: http://stackoverflow.com/q/27620771
type: Tag

http://stackoverflow.com/comment/70883885
type: Comment
type: AnswerComment
has text: now the most recent way is: npm install @type/es6-promise --save
comment on: http://stackoverflow.com/a/37924017
score: 0

http://stackoverflow.com/q/27609234
favorite count: 0
has comment: http://stackoverflow.com/comment/43640874
has answer: http://stackoverflow.com/a/27609280
score: -2
has comment: http://stackoverflow.com/comment/43640738
has body: I am in the process of trying to understand the reasons behind why certain things work. In the code below it animates 3 objects 1 at a time when I put in function(i) and then ().delay(i*1000). How does adding an argument "i" go from animating everything to one at a time?
has comment: http://stackoverflow.com/comment/43640699
downvote count: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27609280
has comment: http://stackoverflow.com/comment/43640744
tagged with: javascript
type: Question
upvote count: 0
answer count: 1
has title: Trying to figure out how function(i) works
has comment: http://stackoverflow.com/comment/43640990
tagged with: jquery

http://stackoverflow.com/a/27595627
has body: These Elements $('#chances').replaceWith('&lt;p&gt; You have '+ (max_Guess - history_Guess.length) + ' chances left!&lt;/p&gt;'); $('#hot_Cold').replaceWith('&lt;p&gt;'+status_Guess()+above_Below()+'&lt;/p&gt;'); no longer exist if you click the submit button again. Try this: $(function(){ // your other code here $('#submit').click(function(){ history_Guess.push($('#text').val()); $('#chances').replaceWith("&lt;p id='chances'&gt; You have "+ (max_Guess - history_Guess.length) + ' chances left!&lt;/p&gt;'); $('#hot_Cold').replaceWith("&lt;p id='hot_Cold'&gt;"+status_Guess()+above_Below()+'&lt;/p&gt;'); return false; }); Really, I would not replace anything. Instead overwrite the contents of an HTML Element with $(selcetor).html('code goes here');. $(function(){ // your other code here $('#submit').click(function(){ history_Guess.push($('#text').val()); $('#chances&gt;p').html('You have '+(max_Guess - history_Guess.length)+' chances left!'); $('#hot_Cold&gt;p').html(status_Guess()+above_Below()); return false; // don't even use the event Object });
type: Answer
accepted answer of: http://stackoverflow.com/q/27595529
answers question: http://stackoverflow.com/q/27595529
downvote count: 0
has comment: http://stackoverflow.com/comment/43615142
score: 1
has comment: http://stackoverflow.com/comment/43615128
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/a/27570965
type: Answer
has body: Apparently Scattercharts don't support annotations yet. The easy workaround is to change: var chart = new google.visualization.ScatterChart(document.getElementById('chart_GIPvsPCP')); to var chart = new google.visualization.LineChart(document.getElementById('chart_GIPvsPCP')); and then specify: lineWidth: 0, to get the same effect. Thanks Samuel Cook. Official response from Google here: https://code.google.com/p/google-visualization-api-issues/issues/detail?can=2&amp;start=0&amp;num=100&amp;q=&amp;colspec=ID%20Stars%20Modified%20Type%20Status%20Priority%20Milestone%20Owner%20Summary&amp;groupby=&amp;sort=&amp;id=1817
upvote count: 1
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/27553594

http://stackoverflow.com/q/27545235
has comment: http://stackoverflow.com/comment/43517176
has comment: http://stackoverflow.com/comment/43519105
has comment: http://stackoverflow.com/comment/43518245
has comment: http://stackoverflow.com/comment/43518499
tagged with: internet-explorer
tagged with: internet-explorer-11
score: 1
has comment: http://stackoverflow.com/comment/43517960
has answer: http://stackoverflow.com/a/27562928
type: Question
has comment: http://stackoverflow.com/comment/43517877
has comment: http://stackoverflow.com/comment/43518104
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/43518371
answer count: 1
has comment: http://stackoverflow.com/comment/43530676
type: UnansweredQuestion
has title: jQuery keydown handler receives keydown event when Ctrl is pressed in URL field of IE11
tagged with: keydown
has comment: http://stackoverflow.com/comment/43518754
upvote count: 1
has comment: http://stackoverflow.com/comment/43536667
has body: In IE11 there is a strange behavior of firing a keydown event. Please use the following URL to reproduce: http://jsfiddle.net/marbug/79dz6ajz/ There is a form with two input fields: &lt;form&gt; &lt;input class="usernameField" type="text" &gt;&lt;/input&gt;&lt;br&gt; &lt;input class="passwordField" type="password" &gt;&lt;/input&gt;&lt;br&gt; &lt;/form&gt; and there are the following handlers (jQuery 1.11.0): $(document).ready( function() { $('.usernameField').keydown( function(event) { console.log('usernameField keydown'); }); $('.usernameField').keyup( function(event) { console.log('usernameField keyup'); }); $('.passwordField').keydown( function(event) { console.log('passwordField keydown'); }); $('.passwordField').keyup( function(event) { console.log('passwordField keyup'); }); }); 1) Let's reproduce the issue with the username field Put focus at username field. Then click at browser's URL field. Press Ctrl on keyboard. The keydown handler of the username field receives an event. I.e. see 'usernameField keydown' in console. 2) Now let's do the same with password field Put focus at password field. Then click at browser's URL field. Press Ctrl on keyboard. The keydown handler of the password field receives an event. I.e. see 'passwordField keydown' in console. Is this a bug of IE11 or jQuery? P.S. Keyup event (for Ctrl key) is not fired in all of these cases. It's also strange.

http://stackoverflow.com/a/27637154
answers question: http://stackoverflow.com/q/27637074
score: 6
type: Answer
upvote count: 6
has body: querySelectorAll is a NodeList array-like collection, but it's not an array, since it doesn't inherit from Array.prototype. To convert it to real array you would use slice this way: var myArray = [].slice.call(document.querySelectorAll('.selected')); It is possible to use slice like this due to the fact that Array.prototype.slice is intentionally generic method, meaning that it's internal implementation doesn't check if this value is actually Array instance. So slice can be used with any array-like objects, having numeric indexes and length property.
downvote count: 0

http://stackoverflow.com/comment/43479068
comment on: http://stackoverflow.com/a/27521879
type: AnswerComment
score: 0
type: Comment
has text: Thanks, James. But hen I replace my code with yours, it sends request to the url of the webpage, instead of url provided in `get` function

http://stackoverflow.com/comment/43412381
comment on: http://stackoverflow.com/a/27489275
type: AnswerComment
score: 0
type: Comment
has text: Your solution sounds perfomant, but the **clone** does _not_ hold a reference to its source. Unless you suggest I make a stack for every clone/source pair and build a special case of a dictionary, where, say, `elems[0]` is the source and `elems[1]` is the clone. But, still, I was really looking for a solution that holds a reference to the source within the context of the clone jQuery object (or even better, the clone DOMElement).

http://stackoverflow.com/q/27549522
has comment: http://stackoverflow.com/comment/43525227
has comment: http://stackoverflow.com/comment/43525266
score: -2
has title: Prevent a form from Submitting preventDefault issue
tagged with: javascript
has comment: http://stackoverflow.com/comment/43526181
has comment: http://stackoverflow.com/comment/43525264
upvote count: 1
answer count: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/43525249
type: UnansweredQuestion
has body: I'm trying to stop my form from submitting by doing the following but it is continuing to submit when I hit the submit button: $(document).ready(function($) { //When the form is submitted do this... $("#stripe-payment-form").submit(function(e) { e.preventDefault(); // disable the submit button to prevent repeated clicks $('#stripe-submit').attr("disabled", "disabled"); // send the card details to Stripe Stripe.createToken({ number: $('.card-number').val(), cvc: $('.card-cvc').val(), exp_month: $('.card-expiry-month').val(), exp_year: $('.card-expiry-year').val() }, stripeResponseHandler); // prevent the form from submitting with the default action return false; }); }); Can anyone tell me why?
has comment: http://stackoverflow.com/comment/43525390
has answer: http://stackoverflow.com/a/27549995
has comment: http://stackoverflow.com/comment/43525268
has comment: http://stackoverflow.com/comment/43525372
has comment: http://stackoverflow.com/comment/43525454
downvote count: 3
has comment: http://stackoverflow.com/comment/43525335
type: Question

http://stackoverflow.com/q/27540315
downvote count: 2
tagged with: request
tagged with: php
has comment: http://stackoverflow.com/comment/43508395
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27540455
upvote count: 3
has answer: http://stackoverflow.com/a/27540363
has comment: http://stackoverflow.com/comment/43508162
tagged with: post
type: Question
possible better answer: http://stackoverflow.com/a/27540363
tagged with: javascript
has body: how to create a post with request in php or javascript for steam web API Example post: https://api.steampowered.com/IEconService/CancelTradeOffer/v1/?key=STEAM_API_KEY&amp;tradeofferid=TRADE_OFFER_ID when i use it in a browser i get: Method Not Allowed This API must be called with a HTTP POST request In C# this was written as: private bool CancelTradeOffer(ulong tradeofferid) { string options = string.Format("?key={0}&amp;tradeofferid={1}", ApiKey, tradeofferid); string url = String.Format(BaseUrl, "CancelTradeOffer", "v1", options); Debug.WriteLine(url); string response = SteamWeb.Fetch(url, "POST", null, null, false); dynamic json = JsonConvert.DeserializeObject(response); if (json == null || json.success != "1") { return false; } return true; }
answer count: 3
has answer: http://stackoverflow.com/a/27540455
has comment: http://stackoverflow.com/comment/43508303
has title: how to create a POST with request in php or javascript
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/27542112

http://stackoverflow.com/comment/43540132
score: 0
has text: perhaps you should start by reading http://learn.jquery.com
type: QuestionComment
comment on: http://stackoverflow.com/q/27556963
type: Comment

http://stackoverflow.com/q/27508020
has comment: http://stackoverflow.com/comment/43448219
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27508191
tagged with: asp.net-mvc-4
score: 2
upvote count: 2
has body: I have a method within a controller: [HttpGet] public JsonResult GetPreference(params string[] settings) { // Do things related to getting preferences return Json(preferencesList); } Is the only means to pass parameters to this method from an AJAX call an array? Are there any more graceful or elegant methods? $.get(url, { settings: [color, rotation] });
type: Question
tagged with: c#
tagged with: javascript
has title: Is the only way to use 'params' in a controller action to give it an array from JavaScript?
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/43446299

http://stackoverflow.com/comment/43715287
has text: EDIT : I finally found the file to the file. Now I have an 403 error (forbiden). I cannot do a request on a static html file?
comment on: http://stackoverflow.com/q/27636258
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27574404
has comment: http://stackoverflow.com/comment/43599067
score: 1
has answer: http://stackoverflow.com/a/27606063
has title: WebAPI using BreezeJS throws an error as soon as I use $skip
tagged with: asp.net-web-api2
has comment: http://stackoverflow.com/comment/43618984
has body: I have a working WebAPI (v2) which utilizes the awesome BreezeJS product. I am attempting to add paging capabilities, but as soon as I include $skip in the URL as a parameter, the WebAPI generates this error: { $id: "1", $type: "System.Web.Http.HttpError, System.Web.Http", Message: "An error has occurred." } Debugging the API does not give me any additional information, since it doesn't crash. The parameters I'm passing are: http://www.example.com/api/Test/Designs?$skip=5&amp;$top=5&amp;$inlinecount=allpages&amp; If I call it without the $skip parameter, it works fine. The other "$" params seem to work just fine, as I can call: http://www.example.com/api/Test/Designs?$top=3 and it works as expected. I have verified that I'm not using any BreezeQueryable attributes or anything, so $skip should be allowed. Additional setup info if it helps: SQL Server Express v2012 Breeze on the server side is v1.5.0.0 Entity Framework v6 Microsoft.Data.OData is v5.6 Is there something else I need to have enabled in order to utilize paging? Or is there a way I can find the true cause of this error? I can provide a working URL if requested. Thank you.
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/43618869
accepted answer: http://stackoverflow.com/a/27606063
type: AnsweredQuestion
tagged with: breeze
upvote count: 1
type: Question

http://stackoverflow.com/a/70103277
upvote count: 1
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27586566
has body: 100% CSS-Only Solution This can be done 100% entirely in CSS. Because the stroke can be defined in many ways, not all of which can be controllable with stroke:none, you can use instead: stroke-opacity: 0, which will make the stroke invisible. #hover-box:hover { stroke-opacity: 0; } Source From MDN Web Docs - stroke-opacity... The stroke-opacity attribute is a presentation attribute defining the opacity of the paint server (color, gradient, pattern, etc) applied to the stroke of a shape. Note: As a presentation attribute stroke-opacity can be used as a CSS property. Working Demo Normal Strokes... &lt;svg height="80" width="300"&gt; &lt;g fill="none"&gt; &lt;path stroke="red" d="M5 20 l215 0" /&gt; &lt;path stroke="black" d="M5 40 l215 0" /&gt; &lt;path stroke="blue" d="M5 60 l215 0" /&gt; &lt;/g&gt; Sorry, your browser does not support inline SVG. &lt;/svg&gt; The same exact code as normal strokes, but with stroke-opacity:0;... &lt;svg height="80" width="300" style="stroke-opacity:0;"&gt; &lt;g fill="none"&gt; &lt;path stroke="red" d="M5 20 l215 0" /&gt; &lt;path stroke="black" d="M5 40 l215 0" /&gt; &lt;path stroke="blue" d="M5 60 l215 0" /&gt; &lt;/g&gt; Sorry, your browser does not support inline SVG. &lt;/svg&gt;

http://stackoverflow.com/a/27622557
has comment: http://stackoverflow.com/comment/43699471
has comment: http://stackoverflow.com/comment/43747785
has body: try following. i think that should fix it. link must contain studentClass somewhere it's not a input field so can't use val() . i.e data-class="studentclass" in above link. $(document).ready(function(){ $("#updateit").on('click', function(e){ e.preventDefault(); var studentClass =$(this).data('class'); // get studentclass form link. $.ajax({ type:"GET", url:"update_cust_vend.php", data:"updateit="+studentClass, success:function(data){ $("#update_modal").html(data); $("#update_customer_vendor").modal(); } }); }); });
has comment: http://stackoverflow.com/comment/43671148
score: 0
has comment: http://stackoverflow.com/comment/43747523
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27622351
answers question: http://stackoverflow.com/q/27622351
has comment: http://stackoverflow.com/comment/43671427
has comment: http://stackoverflow.com/comment/43671322
type: Answer
has comment: http://stackoverflow.com/comment/43670290
has comment: http://stackoverflow.com/comment/43696848
has comment: http://stackoverflow.com/comment/43671576
has comment: http://stackoverflow.com/comment/43690105
has comment: http://stackoverflow.com/comment/43699177

http://stackoverflow.com/comment/43436402
type: Comment
has text: I have updated the fiddle.Chcek the hAxis.textStyle property inside options.There you can set font style.
comment on: http://stackoverflow.com/a/27481305
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43484456
type: Comment
comment on: http://stackoverflow.com/a/27514498
score: 0
type: AnswerComment
has text: I went a different route and was able to accomplish what I wanted. Thanks for your help!

http://stackoverflow.com/q/27543974
has comment: http://stackoverflow.com/comment/43515189
has comment: http://stackoverflow.com/comment/43517023
has comment: http://stackoverflow.com/comment/43515025
type: Question
has comment: http://stackoverflow.com/comment/43515295
tagged with: javascript
upvote count: 3
has title: Why does this return an invalid date with moment js
answer count: 1
tagged with: momentjs
favorite count: 0
has comment: http://stackoverflow.com/comment/43514830
type: UnansweredQuestion
has body: This moment(1420066800000); returns a moment object with an invalid date, why? EDIT: moment(1420066800000).isValid() returns true! But: the moments' property _d.__proto__ is an "Invalid Date" object. That's what confused my, since I thought this was causing wrong behaviour in my application.
score: 3
has comment: http://stackoverflow.com/comment/43515066
has comment: http://stackoverflow.com/comment/43515118
downvote count: 0
has answer: http://stackoverflow.com/a/27544111

http://stackoverflow.com/comment/43564240
comment on: http://stackoverflow.com/a/27568585
score: 0
type: AnswerComment
has text: You'll need to start debugging this with the JavaScript debugger that comes with the browser you are using. If you have to use IE8, then you might be better off using Firefox or Chrome, because their dev tools are really good.
type: Comment

http://stackoverflow.com/a/27569936
upvote count: 3
has body: If it's a large number of words you need to filter, you're probably better off moving that logic from JS to PHP. Also, with JavaScript I can still manipulate the POST request to get bad words into your database. How do you implement a good profanity filter? Filter a set of bad words out of a PHP array filtering bad words from text How do I replace bad words with php?
score: 3
downvote count: 0
answers question: http://stackoverflow.com/q/27569563
type: Answer
has comment: http://stackoverflow.com/comment/43565448
has comment: http://stackoverflow.com/comment/43565655

http://stackoverflow.com/a/27489330
type: Answer
accepted answer of: http://stackoverflow.com/q/27489015
score: 0
has body: I've fixed it. modalXPTO.AdditionalJavaScriptCallback = "myFunction(" + "{parentContainer:'" + modalXPTO.ModalDivId + "', htmlFieldPrefix:'" + modalXPTO.HtmlFieldPrefix + "'}" + ")"; It is because of the misplaced "'". I wanted to pass an object with two parameters, but because of these characters I was passing a string instead.
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27489015

http://stackoverflow.com/a/29610840
type: Answer
upvote count: 121
has comment: http://stackoverflow.com/comment/99559911
score: 121
answers question: http://stackoverflow.com/q/27491672
has comment: http://stackoverflow.com/comment/98077145
downvote count: 0
has body: On OS X, go to System Preferences, then Notifications. Choose Firefox and uncheck Play sound for notifications to get rid of the sound.

http://stackoverflow.com/comment/43473882
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27522315
has text: @putvande `#registercontainer` is the absolute parent, everything is stored in there. It contains a seperate background and margins. It runs like this: `#registercontainer` -> `#submenugender` -> `.submenu` -> `.sprite` -> `.male/.female`

set-theory
type: Tag
tag name: set-theory
tags question: http://stackoverflow.com/q/27623204

http://stackoverflow.com/comment/43469404
has text: timeApp.controller('set',function($scope){ $scope.call=function(){ $scope.url="/html/login.html"; }; });
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27519554
score: 0

http://stackoverflow.com/comment/43676213
type: QuestionComment
comment on: http://stackoverflow.com/q/27627460
type: Comment
has text: put some js breakpoints early in chrome and see what happens. Better than console.log. If they're not getting hit at all you have a bigger problem.
score: 0

http://stackoverflow.com/q/27549427
upvote count: 10
tagged with: css
has body: In Visual Studio 2013, how do I minify Javascript and CSS in the post-build step? I'd like to have every single css and js file compress into a .min.js, or .min.css in the same folder. I don't want to check in the minified files, but rather just have them generated post-build.
has comment: http://stackoverflow.com/comment/63707761
linked to: http://stackoverflow.com/q/2307972
type: Question
score: 9
has comment: http://stackoverflow.com/comment/43525100
tagged with: javascript
has comment: http://stackoverflow.com/comment/43525188
has answer: http://stackoverflow.com/a/33591143
answer count: 2
linked to: http://stackoverflow.com/q/14778660
downvote count: 1
tagged with: minify
has title: In Visual Studio 2013, how do I minify Javascript and CSS in the post-build step
favorite count: 0
linked to: http://stackoverflow.com/q/7675567
has answer: http://stackoverflow.com/a/31608179
tagged with: visual-studio-2013
tagged with: post-build-event
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43525363

http://stackoverflow.com/comment/43664624
score: 0
type: AnswerComment
has text: I don't have to do a.getAttribute('id')? a.id will work?
type: Comment
comment on: http://stackoverflow.com/a/27622059

http://stackoverflow.com/a/27540092
upvote count: 1
has body: Yes, you cannot match QUERY_STRING in RewriteRule. Use RewriteCond instead and fix your regex pattern: RewriteCond %{QUERY_STRING} (?:^|&amp;)z=([^&amp;]+) [NC] RewriteRule ^(sheet\.csv)/?$ /chart/%1/$1? [NC,L,R=302] Make sure this rule is placed before other rules.
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/27538643
answers question: http://stackoverflow.com/q/27538643

http://stackoverflow.com/q/27483658
has comment: http://stackoverflow.com/comment/43399763
has body: I have a directive in which I bind focus and click events to element: app.directive('mydirective', function () { return { link: function ($scope, $element, $attrs) { $element.bind('click focus', function (e) { foo(e); }); } }; }); I want to call foo once if focus or click event fired. But when clicking on element, focus event gets fired and foo gets called twice. how to prevent calling foo for the second time? Edit: Yes. I wasn't a good idea to mix hover with click and focus. Thanks every body
has answer: http://stackoverflow.com/a/27484080
has answer: http://stackoverflow.com/a/27483982
type: Question
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/43399916
possible better answer: http://stackoverflow.com/a/27484080
tagged with: javascript
score: 15
answer count: 3
has comment: http://stackoverflow.com/comment/43399747
downvote count: 1
upvote count: 16
accepted answer: http://stackoverflow.com/a/27483786
favorite count: 0
has comment: http://stackoverflow.com/comment/43399788
tagged with: angularjs
has comment: http://stackoverflow.com/comment/43399672
has answer: http://stackoverflow.com/a/27483786
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43399976
has title: how to call foo only if click OR focus fired

http://stackoverflow.com/a/27513595
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/43462983
has comment: http://stackoverflow.com/comment/43471777
has comment: http://stackoverflow.com/comment/43466091
has body: If the issue is that you need to know when all the images the HTML that you applied to #ajaxoutput have been loaded (and thus their size is known to the browser), then you can do that like this by monitoring the onload event for each of the images you added to the HTML: function display_result(data){ var dfd = new $.Deferred(); var imgWaiting = 0; $("#ajaxoutput").html(data).find("img").each(function() { if (!this.complete) { // img is still loading, install a load handler so we know when it's done ++imgWaiting; this.onload = this.onerror = function() { --imgWaiting; if (imgWaiting === 0) { dfd.resolve(); } } } }); if (imgWaiting === 0) { dfd.resolve(); } return dfd.promise(); } Then, you can do: return getData(table).then(display_result).then(equalise); Which is a classic design pattern with promises for serializing several async operations.
upvote count: 5
answers question: http://stackoverflow.com/q/27512548
score: 5
has comment: http://stackoverflow.com/comment/43462517

http://stackoverflow.com/comment/43617782
type: QuestionComment
has text: You have `return {value: product.name};` but your json does not have `name` keys. Maybe try `$results[] = array('name'=>$row);` in your `ajax.php`
comment on: http://stackoverflow.com/q/27597037
score: 0
type: Comment

http://stackoverflow.com/comment/43651088
comment on: http://stackoverflow.com/q/27613500
has text: Maybe instead of `request.object.save`, just `response.success`.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43493922
type: Comment
comment on: http://stackoverflow.com/a/27532669
score: 0
type: AnswerComment
has text: It adds 1 to the index and the checks for modulus 3 being equal to 0: this should return true for 2, 5, 8, 11, etc. Though I like Juan's answer better so up-voted his, mine is another working alternative

http://stackoverflow.com/comment/43421532
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27493468
has text: Zord, thanks a million for the suggestion. I am going to try to apply it now.
type: AnswerComment

http://stackoverflow.com/q/27509500
has answer: http://stackoverflow.com/a/27509742
has body: pretty new to this - I am trying to fade a single value in a table and I am coming unstuck. I have a large table and I need to fad two cells of it. to keep it simple here are the two cells: £10 £164.67 Any help would be brilliant
type: Question
has comment: http://stackoverflow.com/comment/43449456
has title: Fading text in a cell in a table
tagged with: javascript
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/27509742
favorite count: 0
tagged with: animation
type: AnsweredQuestion
upvote count: 1
downvote count: 1

http://stackoverflow.com/comment/43679858
type: QuestionComment
comment on: http://stackoverflow.com/q/27629630
score: 5
has text: question is far too broad without being able to see basic layout html and css. Suggest you create a demo in jsfiddle.net that outlines your issue
type: Comment

parse-cloud-code
tags question: http://stackoverflow.com/q/27587814
tags question: http://stackoverflow.com/q/27614260
tags question: http://stackoverflow.com/q/27521233
type: Tag
tag name: parse-cloud-code
tags question: http://stackoverflow.com/q/27613500
tags question: http://stackoverflow.com/q/27608459

http://stackoverflow.com/a/27574809
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27558794
has body: Solved! I gave a show id to the iframe, and emptied the src tag, so it can be populated by my script. &lt;iframe id="show" width="100%" height="610" src=""&gt;&lt;/iframe&gt; In the js script, I used an onClick function, which creates a variable that will be set by a second function findDoc. This function creates the findDoc variable based on the data.key and puts that in the show iframe, in the src tag. $(document).ready(function (){ $('#areas').mapster({ onClick : findDoc, singleSelect : true, clickNavigate: false, render_highlight : { altImage : 'Images/map2.png' }, mapKey: 'module', fill : true, altImage : 'Images/map2.png', fillOpacity : 1 }); }); function findDoc(data){ var srcBegin = 'https://docs.google.com/spreadsheets/d/'; var srcEnd = '/pubhtml?widget=true&amp;amp;headers=false'; var srcMid = data.key; $('#show').attr('src',(srcBegin+srcMid+srcEnd)); } Then I set the module keys in each area of the map to the correspondent Google Doc id: &lt;area module="1q7tRr6IkCDjS_mmDRWCj-ViExIPQn8imOu6MTiwKyWw" shape="circle" coords="463,461,63" href="#" alt="social"/&gt; And it works fine. It may seem simple for real programmers... For me, it was a real joy to get it running! :)

http://stackoverflow.com/a/27568245
score: 0
has body: My solution: $('#tree_structure').bind('move_node.jstree', function (e, data) { if(data.parent !== '#') { var infoAfterDnd = getTargetElementAndWhere(data); if(infoAfterDnd .target.length &gt; 0 &amp;&amp; infoAfterDnd.where !== '') { console.log(infoAfterDnd); } } }); getTargetElementAndWhere = function(data) { var where = ''; var $parent = $('#' + data.parent); var $target = $('li:nth-child(' + data.position + ')', $parent); if($target.length &gt; 0) where = 'after'; else { where = 'inside'; $target = $parent; } return { where: where, target: $target }; },
type: Answer
answers question: http://stackoverflow.com/q/27566389

http://stackoverflow.com/comment/43391089
type: AnswerComment
has text: My level is pretty much copy cut and paste...i can piece codes together and edit them kinda but i cant write out code. When I read through it, it kind makes sense but some parts I dont get. Is there any way I can test out code online with a temp or demo database...is there anywhere online where this is possible...like js fiddle but with a database?
comment on: http://stackoverflow.com/a/27477923
type: Comment
score: 0

http://stackoverflow.com/q/27485688
answer count: 1
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/43404527
has title: passing parameter/input data to custom elements in javascript
accepted answer: http://stackoverflow.com/a/27486829
linked to: http://stackoverflow.com/q/26324758
has body: I'm trying to implement the same code of this using JavaScript, so wrote the below code as btn.js file: // Create a new object based of the HTMLElement prototype var SaveBtn = Object.create(HTMLElement.prototype); // Set up the element. SaveBtn.createdCallback = function() { // Create a Shadow Root var shadow = this.createShadowRoot(); this.type='button'; // Add an event listener to the image. this.addEventListener('click', function(e) { alert('got a click'); document.getElementById("ShowButton").value= "Hide Filter"; }); }; // Register the new element. var Xbtn =document.registerElement('save-button', { prototype: SaveBtn, extends: 'input' }); and called it in the other function main.js as below: window.addEventListener("load", onLoad, false); function onLoad() { var host = document.querySelector('#host'); var el = new Xbtn(); host.appendChild(el); } this worked fine, and gave me blanket button. now I want to pass the 'text' to be displayed into the button, I tried the below: in the index.html I've: &lt;div id="host"&gt;&lt;/div&gt; &lt;input id="ShowButton" type="button" value="Show Filter"/&gt; in main.js: el.value = 'click me'; and in the btn.js: this.value = this.getAttribute('text'); but failed, and the button still empty! considering that the other button value is changed upon the click any thought?
type: AnsweredQuestion
upvote count: 1
type: Question
tagged with: custom-component
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/27486829
has comment: http://stackoverflow.com/comment/43403968

http://stackoverflow.com/a/27504306
score: 0
has body: Try this: $.datepicker.formatDate('dd M yy', new Date('29, 05, 2014')));
answers question: http://stackoverflow.com/q/27504176
type: Answer

http://stackoverflow.com/a/27636581
score: 1
answers question: http://stackoverflow.com/q/27636527
downvote count: 0
type: Answer
has body: I think its same for both way. If you want to use php then you will have to use inline css or style tag and its simple to. Like $color = (!dbValue?"defaule value":dbValue); &lt;style&gt; .header{ background-color:&lt;?=$color?&gt;: color:#000; } &lt;/style&gt;
upvote count: 1

http://stackoverflow.com/comment/43542147
score: 0
type: Comment
type: QuestionComment
has text: Google is your friend (>59000 hits like this one: http://stackoverflow.com/questions/9602321/php-preg-match-delimiter-must-not-be-alphanumeric-or-backslash )
comment on: http://stackoverflow.com/q/27557767

http://stackoverflow.com/comment/43474778
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27522914
has text: Use google before asking here.
score: 0

http://stackoverflow.com/comment/43529522
type: Comment
type: QuestionComment
has text: I dont now how I get data from this object and create instansies of Pagination and Category for every config/lastestVideos instancies and react to what user change page I must change act page in lastestvideos after I call render object methods to render new videos and how I can share this data for same instance
score: 0
comment on: http://stackoverflow.com/q/27551558

http://stackoverflow.com/q/27601264
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43625791
has comment: http://stackoverflow.com/comment/43625460
has comment: http://stackoverflow.com/comment/43629265
has comment: http://stackoverflow.com/comment/43625321
type: Question
has comment: http://stackoverflow.com/comment/43626949
has title: Trying to add promo code functionality to discount number
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/27602944
has body: Try adding a calculator function for a promo code. Demo code: http://apollo.us/promo/ JS code: http://apollo.us/promo/js/webEstimator.js When you write promo code - test or test1 - final TOTAL price change. The final total price is displayed on the : var $total = $(".W_E-total"); // show total price Promocode function: var $finalprice = $('.W_E-total').val(); var promocode; $('#update').click(function() { promocode = $('#promocode').val(); total = $('.W_E-total').val(); finalprice = total; if ((promocode == 'test') || (promocode == 'test1')) { finalprice = +finalprice * 0.9; } else if (promocode.length &lt; 1) { finalprice = +finalprice * 1; } else { alert("Invalid Promo Code"); finalprice = 0; } $('.W_E-total').val(finalprice); }); You pressing the button "Update TOTAL Price" - TOTAL be changed. What needs to change in the code? Thank you! Happy Holidays!
tagged with: promotion-code
answer count: 1
tagged with: calculator
tagged with: jquery
has comment: http://stackoverflow.com/comment/43625175
has answer: http://stackoverflow.com/a/27602944
has comment: http://stackoverflow.com/comment/43626796
has comment: http://stackoverflow.com/comment/43629471
has comment: http://stackoverflow.com/comment/43625327

http://stackoverflow.com/a/27528313
score: 0
has body: Thanks for the reply. I guess being from a perl background what i was looking to do is say i have various checkboxs with the different names example of one might be BOB i would have some sort of java array like fields[BOB] = [ array of servers ] when i checked the box it would then go and look up the list of servers using the key of BOB and then populate the dropdown box with the list of servers. The way I was thinking of doing this is to build some sort of hash within java from which a select dropdown could be produced. so in the event that the user unchecked a box that they had already checked the key and subsequent values would be removed from the hash. i am not really sure on how to achieve this within Java as i only dabble with it.
type: Answer
answers question: http://stackoverflow.com/q/27526863

http://stackoverflow.com/q/27549403
upvote count: 1
has comment: http://stackoverflow.com/comment/43525516
type: Question
has answer: http://stackoverflow.com/a/27549802
tagged with: javascript
has title: jQuery show on tag on mobile Safari
accepted answer: http://stackoverflow.com/a/27549802
has comment: http://stackoverflow.com/comment/43525199
downvote count: 0
answer count: 1
has body: This works on Chrome and Firefox, but not on mobile Safari. I'm trying to simple show an img when a link is clicked. jQuery 1.10.1 HTML Region Colorado JS CSS .loading { display: none; } The img does not show when the link is clicked. The image DOES show if I change the href to "#" to test. The image IS VISIBLE if I just go back in the browser after following the link, but of course I'm trying to get it to show when the link is clicked. Am I missing something simple to get this working on mobile Safari?
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: safari
has comment: http://stackoverflow.com/comment/43525456
type: AnsweredQuestion
score: 1

http://stackoverflow.com/q/27612618
tagged with: arrays
answer count: 1
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/43808481
has comment: http://stackoverflow.com/comment/43808301
has comment: http://stackoverflow.com/comment/43647575
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27613015
has title: How to create a gallery with different states
has comment: http://stackoverflow.com/comment/43648096
type: Question
tagged with: actionlistener
has body: I have a gallery page with four different sections: art, tattoo, info and gallery. The first image of each is displayed in a DIV called imageWrap when the headings are clicked, while the arrow icons (visible on section highlight) cycle through the images and notes via variables which reference a number of arrays. I want to make the arrow buttons reference the correct variable set dependending on which section is active. Is there a way to listen for the current gallery state and modify the action listeners to handle the correct variable? The page with the issue is located here: www.christopherwynne.com/tattoo I am still fairly new at Java, and any insight would be greatly appreciated.

http://stackoverflow.com/comment/43642506
score: 0
comment on: http://stackoverflow.com/q/27606954
type: Comment
type: QuestionComment
has text: I'm not able to reproduce this issue with the info you've supplied - http://plnkr.co/edit/BWBJkhjVfMMoWvj6rwSB?p=preview - How/where are you loading the json?

http://stackoverflow.com/comment/43441267
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27505591
has text: did you try .css("text-transform","capitalize");

http://stackoverflow.com/q/27561028
has comment: http://stackoverflow.com/comment/43556396
score: 0
answer count: 1
tagged with: javascript
tagged with: inheritance
type: UnansweredQuestion
has body: So I'm working on a project and I want to have a Site superclass that houses methods and data for multiple pages - the pages having their own constructor that extends the Site superclass. Currently I have a constructor function that has it's own dedicated methods for it's use that is used on multiple pages. Something like this: function MyFeatureConstructor () { // some shared data for this feature }; MyFeatureConstructor.prototype.init = function (args) { // initialize } MyFeatureConstructor.prototype.clickEvent = function (e) {...} // other stuff specific to this feature function SomePageConstructor () { // shared data for this page } SomePageConstructor.prototype.init = function (args) { // initialize } SomePageConstructor.prototype.clickEvent1 = function (e) {...} // other stuff for this page From there I call them var a = new MyFeatureConstructor; // call this on the same page as SomePageConstructor a.init(args) var b = new SomePageConstructor; b.init(args) Except the 'MyFeatureConstructor' is used among other pages. So I'm not quite sure how to move it from it's own constructor function to a set of methods for the Site class. I thought of just taking the methods and placing them on the constructor of the Site superclass, but then that might cause some conflicts later on. I also thought of placing them in a plain object, but then they're not so much exclusive to the feature itself, more like just a bunch of static methods. I don't feel that it's a appropriate to place a constructor function in the Site class, is it? Maybe I'm over thinking this?
has answer: http://stackoverflow.com/a/27561406
type: Question
has title: JavaScript Prototype Superclass

http://stackoverflow.com/a/27603469
has comment: http://stackoverflow.com/comment/43629204
has body: missing . before otherwise in $routeProvider
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43629325
accepted answer of: http://stackoverflow.com/q/27603343
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/27603343
has comment: http://stackoverflow.com/comment/43629163
score: 1
downvote count: 0

http://stackoverflow.com/comment/43700411
has text: Ok, thanks. I'll definitely take your advice and not use the filter. What do you think would be best - a directive? doing it in each controller?
comment on: http://stackoverflow.com/a/27632022
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/43524746
type: QuestionComment
comment on: http://stackoverflow.com/q/27549213
score: 1
has text: There's no iframe in your html. Why are you setting the src in the script to the entire html of a frame?
type: Comment

http://stackoverflow.com/comment/43584518
type: QuestionComment
has text: Ok, I'll try that. I just wonder how to communicate with my server in JavaScript.
score: 0
comment on: http://stackoverflow.com/q/27579781
type: Comment

http://stackoverflow.com/q/27571272
has answer: http://stackoverflow.com/a/27571347
has answer: http://stackoverflow.com/a/27571328
tagged with: http-redirect
tagged with: php
has comment: http://stackoverflow.com/comment/43568122
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27571391
has comment: http://stackoverflow.com/comment/43567969
accepted answer: http://stackoverflow.com/a/27571347
type: Question
has body: I'd like the following PHP code to redirect to a specified page after completion of the function. I tried a few different methods but it doesn't ever seem to do anything. The current action that this is taking is that after the button to call the function is pressed, it redirects to an empty page. Any help would be much appreciated. function quote_upvote_button($quoteid, $canvote, $ajaxy=FALSE) { $s = ' class="quote_plus" id="quote_plus_'.$quoteid.'"'; if (!$canvote) { $url = '+'; if ($ajaxy) { return ' '.$url.' '; } return $url; } return '+'; }
has comment: http://stackoverflow.com/comment/43567882
tagged with: javascript
has title: Modifying PHP function to redirect after action
score: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/27571328

http://stackoverflow.com/comment/43521087
comment on: http://stackoverflow.com/q/27544538
has text: Use the CF UI stuff or use jQuery, but do not use both. Since you are already using jQuery, I would suggest you go with that. The CF UI functionality is poorly implemented, severely limited and outdated.
type: Comment
type: QuestionComment
score: 4

http://stackoverflow.com/comment/43438245
type: Comment
has text: You can add this line `window.onload = convertData`.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27503777

http://stackoverflow.com/q/27564259
favorite count: 0
tagged with: regex
type: AnsweredQuestion
upvote count: 2
score: 0
downvote count: 2
accepted answer: http://stackoverflow.com/a/27564288
has comment: http://stackoverflow.com/comment/43554226
has body: I'm used to using Regex in PHP but haven't really used it much in Javascript; I looked around but couldn't really find an answer other than just a bunch of tutorials on the regex syntax which I don't need. For example I want to do the below, but with Regex: if (location != '/group_breaks.php' &amp;&amp; location != '/group_breaks' &amp;&amp; location != '/group_breaks/') { } My regex would be: /^\/group_breaks(\.php|\/)?$/ So I could do this in PHP I could do: if (!preg_match('/^\/group_breaks(\.php|\/)?$/', $location)) { } What is the alternative in Javascript?
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/43554409
has title: How can I execute this regex in Javascript?
answer count: 3
possible better answer: http://stackoverflow.com/a/27564283
has answer: http://stackoverflow.com/a/27564283
has comment: http://stackoverflow.com/comment/43553859
has answer: http://stackoverflow.com/a/27564288
has answer: http://stackoverflow.com/a/27564291

http://stackoverflow.com/comment/43452225
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27509876
type: AnswerComment
has text: It doesn't work, very slow is opening the website. I think it should be better to use GET and to put if-else in the ?

http://stackoverflow.com/q/27512639
type: Question
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/43455636
score: 3
has title: Angular append directive template to table
tagged with: javascript
has answer: http://stackoverflow.com/a/27513029
has answer: http://stackoverflow.com/a/27513053
answer count: 3
has comment: http://stackoverflow.com/comment/43455820
downvote count: 0
favorite count: 0
tagged with: angularjs
has body: I have situation when i need to repeat multiple tbody in one table, what im trying to do is to make every tbody directive and i want its template to append to table, but when im put the directive inside the table tag its put his content outside the table. the cart draw directive: return { restrict : 'AE', templateUrl: 'client/cart/views/cart-draw.html', scope : {}, replace: true, controller : controller } the tpl: //some content the html: here is the plunker, if you inspect element you will see the tbody is out of the table: http://plnkr.co/edit/9wEGFE5K0w0ayp6qo8Lx?p=preview
possible better answer: http://stackoverflow.com/a/27513029
type: AnsweredQuestion
upvote count: 3
has answer: http://stackoverflow.com/a/27513049
accepted answer: http://stackoverflow.com/a/27513049
has comment: http://stackoverflow.com/comment/43455591

http://stackoverflow.com/q/27493628
accepted answer: http://stackoverflow.com/a/27493750
score: 0
has comment: http://stackoverflow.com/comment/43418951
answer count: 1
has comment: http://stackoverflow.com/comment/43419014
tagged with: javascript
type: AnsweredQuestion
has title: For loop adding object that is being read as undefined
tagged with: angularjs
type: Question
has answer: http://stackoverflow.com/a/27493750
has body: My problem is that length is being read as a property in my for loop. I have four choices in my array but length is coming thru as the 5th and is being read as undefined. Any idea why length is being added? if($scope.ansType==='CHECKBOX') { for(var i = 0; $scope.items.length &gt; 0; i++) { console.log($scope.items[i]); if ($scope.items[i].exclusive === true) { $timeout(function () { $('input').addClass('none-of-the-above'); $('.none-of-the-above').on('click', function () { $(this).attr('checked'); $('input:checkbox').removeAttr('checked'); }); },100); } } }

http://stackoverflow.com/a/27637050
downvote count: 0
has comment: http://stackoverflow.com/comment/110664025
score: 19
answers question: http://stackoverflow.com/q/27636704
accepted answer of: http://stackoverflow.com/q/27636704
type: AcceptedAnswer
upvote count: 19
type: Answer
has body: If you are adding this HTML dinamically, you should use the .on() method, like: $(document).on('change', '.detectThisChange', function() { // your code }); Give it a try and let me know if it helps.
has comment: http://stackoverflow.com/comment/43693203

google-maps-api-3
tags question: http://stackoverflow.com/q/27638541
tags question: http://stackoverflow.com/q/27552653
tags question: http://stackoverflow.com/q/27572514
tags question: http://stackoverflow.com/q/27547192
tags question: http://stackoverflow.com/q/27584993
tags question: http://stackoverflow.com/q/27626282
tags question: http://stackoverflow.com/q/27499750
tags question: http://stackoverflow.com/q/27513292
tags question: http://stackoverflow.com/q/27475186
tags question: http://stackoverflow.com/q/27513991
tags question: http://stackoverflow.com/q/27637866
tags question: http://stackoverflow.com/q/27539380
tags question: http://stackoverflow.com/q/27530756
tags question: http://stackoverflow.com/q/27501825
tags question: http://stackoverflow.com/q/27605081
tags question: http://stackoverflow.com/q/27493545
tags question: http://stackoverflow.com/q/27527084
tags question: http://stackoverflow.com/q/27520224
tags question: http://stackoverflow.com/q/27505444
tags question: http://stackoverflow.com/q/27535626
tags question: http://stackoverflow.com/q/27539459
tags question: http://stackoverflow.com/q/27490124
tags question: http://stackoverflow.com/q/27629166
tags question: http://stackoverflow.com/q/27524422
tags question: http://stackoverflow.com/q/27555740
tags question: http://stackoverflow.com/q/27630341
tag name: google-maps-api-3
tags question: http://stackoverflow.com/q/27495931
type: Tag
tags question: http://stackoverflow.com/q/27600643
tags question: http://stackoverflow.com/q/27525913
tags question: http://stackoverflow.com/q/27626189
tags question: http://stackoverflow.com/q/27580774
tags question: http://stackoverflow.com/q/27496168
tags question: http://stackoverflow.com/q/27550140
tags question: http://stackoverflow.com/q/27587555
tags question: http://stackoverflow.com/q/27624103
tags question: http://stackoverflow.com/q/27565082
tags question: http://stackoverflow.com/q/27639295
tags question: http://stackoverflow.com/q/27566463
tags question: http://stackoverflow.com/q/27629304
tags question: http://stackoverflow.com/q/27626541

http://stackoverflow.com/q/27585886
score: 1
upvote count: 1
type: Question
has body: I'm creating a program in Meteor JS. All the JS files are loaded at once, in a certain order. A lot of variables need to be global, in order to work, but at the same time, I want my JS to be modular. For FILE 3 to use the functions in FILE 1 and FILE 2, the functions have to be declared as variable assignments like in FILE 2 or else, they are not accessible outside of the file. I don't believe this is an issue of hoisting, because main.js is loaded last, those are the functions that use the functions in FILE 1 and 2. Either way, I theoretically should be able to see the function in the console if it is on a global level. FILE 1 function foo() { } // This is not global outside of the file. Why? FILE 2 bar = function() { } // This is considered global. Functions in FILE 1 can access the function just fine, but if placed outside the file, the function or console cannot access them. Is this a Meteor JS thing? A JavaScript thing? Someone help me understand and learn. :)
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/27585899
answer count: 1
tagged with: meteor
favorite count: 0
has title: Function declaration is not global if from a different file, if not assigned to a variable
accepted answer: http://stackoverflow.com/a/27585899
type: AnsweredQuestion

http://stackoverflow.com/comment/43645421
score: 1
has text: Thats the answer! +1 . Put it as the answer and I will accept it. Thanks. @markE
comment on: http://stackoverflow.com/q/27611111
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27493987
answer count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/json
type: Question
has comment: http://stackoverflow.com/comment/43419812
tagged with: javascript
has title: Callback function in jquery getjson
score: 0
has comment: http://stackoverflow.com/comment/43419820
upvote count: 1
downvote count: 1
tagged with: callback
favorite count: 0
tagged with: ajax
has body: Is there a way to do the following: var baseURL = "https://maps.googleapis.com/maps/api/"; reverseGeocode(latlng, function (err, res) { if (err) { callback(err); } else if (res.error) { callback(res.error); } else { callback(null, findPostal(res.body)); } }); function reverseGeocode(coords, callback) { var query = { sensor: "false", latlng: coords[0] + "," + coords[1] }; $.getJSON(baseURL + "geocode/json", query).done(callback); } The callback in the getJSON call always results with an in err.
has comment: http://stackoverflow.com/comment/43419679

http://stackoverflow.com/comment/43658549
has text: @ninty9notout I have several such tables. I once worked in angularjs and remember how it was like a piece of cake to do similar things. Never hurts considering! Is there readily available libraries for what you are describing? I'm thinking of using something like this tablesorter.com/docs/example-pager.html But I'm not sure if it asynchronous? And if it is applicable for dynamically changed tables?
score: 0
comment on: http://stackoverflow.com/q/27618117
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43495951
score: 1
has text: As it is now, "moreLink" is a string, so you just set href to the actual text "moreLink" instead of a variable's value.
comment on: http://stackoverflow.com/q/27533752
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27610826
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: Video is playing on top of the page instead of playing in the location where clicked
tagged with: css
type: AnsweredQuestion
type: Question
has body: I have a problem with positioning of the video opened when clicked. I have a image linked to youtube video. The image is abit down of the web page (we need to scroll a bit). When ever I click on the video the youtube link is opened at the top of the page instead of playing where clicked.Please suggest how to change the position of the video. http://jsfiddle.net/UxLHR/21/ X
tagged with: javascript
has answer: http://stackoverflow.com/a/27611069
accepted answer: http://stackoverflow.com/a/27611069
score: 0

http://stackoverflow.com/comment/43462797
type: Comment
comment on: http://stackoverflow.com/q/27514926
score: 2
has text: You never append your view to the DOM. why do you expect `$('#errors-dialog')` to exist? You should render the view, append it to the DOM, and use `view.$()` to query elements, instead of using global jQuery selectors
type: QuestionComment

http://stackoverflow.com/q/27510350
has title: JQuery carousel is jumpy
answer count: 2
score: 5
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27511161
tagged with: carousel
tagged with: css
has body: The carousel shifts/jumps slightly when it transitions and I'm not sure what's wrong. $(".timer").css("display"); $(".timer:gt(5)").css("display", "none"); function move_first() { //console.debug("animate"); $(".timer").eq(0).stop().animate({ opacity: 0.00, width: "toggle" }, 500, function() { $(this).insertAfter($(".timer").eq(-1)); $(this).css('opacity', '1'); $(".timer").eq(5).animate({ opacity: 1.00, width: "toggle" }, 500, function() { $(".timer").css("display"); $(".timer:gt(5)").css("display", "none"); }); }); setTimeout(move_first, 3000); } move_first(); Here's the link to the jsfiddle: Jumpy Carousel Any ideas?
type: UnansweredQuestion
type: Question
upvote count: 5
has answer: http://stackoverflow.com/a/27510878

http://stackoverflow.com/comment/43655770
has text: @haakym then, how i can use it ?
type: QuestionComment
comment on: http://stackoverflow.com/q/27617143
score: 0
type: Comment

http://stackoverflow.com/q/27492154
has comment: http://stackoverflow.com/comment/43415811
tagged with: javascript
has comment: http://stackoverflow.com/comment/43415808
has comment: http://stackoverflow.com/comment/43415895
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43416095
has comment: http://stackoverflow.com/comment/43415985
has comment: http://stackoverflow.com/comment/43416060
favorite count: 0
has title: Trouble swapping images using Javascript
type: UnansweredQuestion
has body: I have created my own javascript class as such: function BeersOfTheWeek(){ this.htmlImgObj = document.getElementById("beerImage"); this.imgSources = ["guinness.jpeg","Heineken.png","SAM-ADAMS-BEER.jpg"]; this.currentImgNmbr = 0; this.htmlImgObj.src = this.imgSources[this.currentImgNmbr]; this.htmlImgObj.className = 'slideInRight'; } BeersOfTheWeek.prototype.rotateNextBeer = function(){ if(this.currentImgNmbr == (this.imgSources.length - 1)){ this.currentImgNmbr = 0; } else { this.currentImgNmbr++; } this.htmlImgObj.src = this.imgSources[this.currentImgNmbr]; this.htmlImgObj.className = 'slideInRight'; }; I'm trying to use the rotateNextBeer() function to continuously display another image every five seconds, and I am doing this by calling: &lt;script&gt; window.setInterval("globals.botw.rotateNextBeer()",5000); &lt;/script&gt; in my html file. I have a .js file that contains some global variables for my project, and the relevant code for this object is this: var globals = {}; globals.botw = new BeersOfTheWeek(); My issue is that my website will display the first image in imgSources no problem, but when window.setInterval() is triggered every five seconds, nothing happens. It seems to get stuck and the first image displayed never changes.
has comment: http://stackoverflow.com/comment/43416277
score: -3
has comment: http://stackoverflow.com/comment/43415861
downvote count: 3
tagged with: dom
has answer: http://stackoverflow.com/a/27492192
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/43415945
has answer: http://stackoverflow.com/a/27492202
upvote count: 0

http://stackoverflow.com/q/27575442
has body: I need to put a javascript variable in js file to php variable in php file to do action in sql db later. I use local server Apache to do this. My javascript variable is "uid" In my js file I've insert this : function post() { $.ajax({ type: "POST", url: "proc.php", data: uid, }); } In my php file named "proc.php" the code is : &lt;?php $myvar = $_POST['uid']; echo 'myvar'; ?&gt; Is it possible to display by echo "myvar" in alert box to know if my code works ?
has comment: http://stackoverflow.com/comment/43576464
has comment: http://stackoverflow.com/comment/43622015
downvote count: 3
tagged with: mysql
has comment: http://stackoverflow.com/comment/43576393
linked to: http://stackoverflow.com/q/857670
has comment: http://stackoverflow.com/comment/43576432
tagged with: javascript
type: AnsweredQuestion
tagged with: sql
has comment: http://stackoverflow.com/comment/43576436
favorite count: 0
has answer: http://stackoverflow.com/a/27618771
type: Question
upvote count: 1
has title: Upload PHP with jQuery
score: -2
tagged with: php
answer count: 1
accepted answer: http://stackoverflow.com/a/27618771

http://stackoverflow.com/a/27553781
has body: You're executing your code before the document is loaded. Solution: window.onload = function() { (function drawCanvas(){ var canv = document.getElementById('testcanvas1'); if(canv.getContext){ alert("test"); var context = doof.getContext('2d'); context.fillStyle = "rgb(255, 0, 255)"; context.fillRect(0, 0, canvas.width, canvas.height); } })(); }
answers question: http://stackoverflow.com/q/27553726
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27553726
type: Answer

http://stackoverflow.com/a/27588076
has comment: http://stackoverflow.com/comment/43600256
type: Answer
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/43600270
has body: Two options come to mind You could use an object and jsx spread attributes var props = {onKeyDown: this.handleKeyDown}; return ( &lt;input {...props} name="foo" /&gt; &lt;input {...props} name="bar" /&gt; &lt;input {...props} name="qux" /&gt; ); You could create a custom component var MyInput = React.createClass({ handleKeyDown: function() { // ... }, render: function() { return ( &lt;input onKeyDown={this.handleKeyDown} /&gt; ); } }); Then use it like this in another component render: function() { return ( &lt;MyInput name="foo" /&gt; &lt;MyInput name="bar" /&gt; &lt;MyInput name="qux" /&gt; ); }
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27577256
answers question: http://stackoverflow.com/q/27577256

http://stackoverflow.com/comment/43508673
type: AnswerComment
comment on: http://stackoverflow.com/a/27540553
type: Comment
has text: I don't think so. In his example he is not setting the handle variable. @AmitJoki
score: 0

http://stackoverflow.com/a/27528436
has body: js: core, widget, position, menu, selectmenu. But these you can already have from the builder page: http://jqueryui.com/download/ css: selectmenu.css If you want you can also add core.css and/or menu.css but as far as I can see now, they're not mandatory.
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27524303
type: Answer
answers question: http://stackoverflow.com/q/27524303
downvote count: 0
score: 1

http://stackoverflow.com/a/27555737
answers question: http://stackoverflow.com/q/27555699
type: Answer
upvote count: 12
downvote count: 0
has body: The load function is asynchronous, so the data is not loaded when the second call executes. Perform it in a callback function instead: $('#tabs').load('CommonTabs.html', function () { $('#Tab1').addClass("active"); });
score: 12

http://stackoverflow.com/comment/43576966
has text: Both values are strings, so whether you use `===` or `==` makes no difference.
comment on: http://stackoverflow.com/q/27575255
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27558552
tagged with: angularjs
downvote count: 0
type: AnsweredQuestion
score: 1
type: Question
answer count: 1
has body: I have written a simple click-to-edit directive using an isolate scope so that it's reusable. When I use it, the source value ( '=' ) in the controller scope is never updated, though its original value is applied within the directive. It's as if the binding is one-way ( '@' ). Here's the code: app.directive("ngClickToEdit", function() { return { template: '&lt;div&gt;' + '&lt;div ng-show="enabled"&gt;' + '&lt;input ng-change="validator()" ng-blur="enabled=false" ng-model="source"/&gt;' + '&lt;/div&gt;' + '&lt;div ng-show="!enabled" ng-bind="source" ng-click="enable()"&gt;&lt;/div&gt;' + '&lt;/div&gt;', restrict: "E", replace: true, scope: { validator: '&amp;', source: '=', }, link: function(scope, element) { scope.enabled = false; var input = element.children()[0].firstChild; scope.enable = function() { scope.enabled = true; setTimeout(function() { input.focus(); input.select(); }, 200); }; }, }; }); Here is an invocation in the controller (edited to wrap in ng-if div block): &lt;div ng-if='name'&gt; &lt;ng-click-to-edit validator='validateName()' source='name' /&gt; &lt;/div&gt; When validateName() in the controller scope is invoked the value of 'name' is the original value and not the (changed) value in the directive's input control. The model is not updated. Why? Resolved: The ng-if block creates a child scope, passing name as a string primitive due to prototypal inheritance. Passing an object reference into the directive solves the problem. See a revised plunker here.
tagged with: javascript
has title: angular two-way bind with isolate scope appears to be one-way
has answer: http://stackoverflow.com/a/27559043
accepted answer: http://stackoverflow.com/a/27559043
upvote count: 1
favorite count: 0

http://stackoverflow.com/comment/43497494
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27534120
has text: @FelixKling: Empty string would be nice. So I guess the next check is .IndexOf("?") and then another on that for value > 0? What a convoluted way to do what should be a simple check.

http://stackoverflow.com/q/27636806
accepted answer: http://stackoverflow.com/a/27636915
tagged with: nashorn
type: AnsweredQuestion
score: 2
downvote count: 0
tagged with: java
type: Question
upvote count: 2
tagged with: reactjs
tagged with: javascript
has title: Using React with Nashorn throws "ReferenceError: "console" is not defined"
answer count: 1
favorite count: 0
has body: Im using "react": "~0.12.2" And the following code: @RequestMapping("/") @ResponseBody private String home() throws ScriptException, IOException { loadReact(); InputStream jsStream = resourceLoader.getResource("classpath:public/js/server.js").getInputStream(); engine.eval(new InputStreamReader(jsStream)); return engine.eval("renderServerside()").toString(); } private void loadReact() throws ScriptException, IOException { InputStream jsStream = resourceLoader.getResource("classpath:public/lib/react/react.js").getInputStream(); // React expects 'window' or 'global' to be set engine.eval("var global = this"); engine.eval(new InputStreamReader(jsStream)); } My server.js looks like this: function renderServerside() { var MyComponent = React.createClass({ render: function () { return React.DOM.h1(null, 'Hi, ' + this.props.msg) } }); return React.renderComponentToString(MyComponent({msg: 'World!'})); } And getting this exception: javax.script.ScriptException: ReferenceError: "console" is not defined in &lt;eval&gt; at line number 18108] with root cause jdk.nashorn.internal.runtime.ECMAException: ReferenceError: "console" is not defined So how can nashorn not provide a console? I tired to implement the basic example from this page: React with Nashorn
has answer: http://stackoverflow.com/a/27636915

http://stackoverflow.com/a/27505254
has body: If this data is comming from a database, I suggest you treat this on your server before you send to your view. But you can also use a javascript for that if you don't want this to happen on the server. Check out this answer: Remove accents/diacritics in a string in JavaScript You could use something like: var finalString = removeDiacritics(initialString).toUpperCase();
downvote count: 0
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/27504310

http://stackoverflow.com/comment/43515367
type: AnswerComment
type: Comment
has text: @Silver89 you can use this approach to make only the outline of the triangles : http://jsfiddle.net/webtiki/kmenstqs/1/
comment on: http://stackoverflow.com/a/27543758
score: 0

http://stackoverflow.com/comment/43527325
comment on: http://stackoverflow.com/a/27549732
type: Comment
has text: Thanks for the answer! Unfortunately this doesn't work with my situation. See question update for more details.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43529643
type: Comment
score: 1
has text: Just a sidenote, use references instead of anonymous functions, that way you can remove a listener too.
type: QuestionComment
comment on: http://stackoverflow.com/q/27551634

http://stackoverflow.com/q/27585558
score: 4
has title: Data Model Definition Standard in JavaScript/Node
answer count: 1
favorite count: 0
tagged with: data-objects
upvote count: 4
has comment: http://stackoverflow.com/comment/43700613
tagged with: node.js
type: AnsweredQuestion
has body: I recently started programming in JavaScript (Server side) and Node.js. I come from Java background where there is a concrete standard on how you define Data Object, which is Java Bean. Do we have any such standards in JavaScript/Node on how we define Data Objects (similar to Java Beans)? I have researched at many places and couldn't find any standards. I have seen following styles but not sure which is better or recommended: //bean1.js module.exports = function() { var obj = {}; obj.name = ''; obj.department = ''; return obj; } //bean2.js module.exports = function() { this.name = ''; this.department = ''; return this; } //bean3.js module.exports = function(param) { var obj = {}; if(param === undefined) { return obj; } obj.name = param.name; obj.department = param.department; return obj; } //bean4.js module.exports = { name : ''; department : ''; }
downvote count: 0
has comment: http://stackoverflow.com/comment/43641313
type: Question
has answer: http://stackoverflow.com/a/28261001
accepted answer: http://stackoverflow.com/a/28261001
tagged with: javascript

http://stackoverflow.com/q/27557114
linked to: http://stackoverflow.com/q/27608071
accepted answer: http://stackoverflow.com/a/27575984
tagged with: google-chrome-os
upvote count: 1
answer count: 1
has title: HID compliant device will not enumerate using chrome.hid API on ChromeOS
has comment: http://stackoverflow.com/comment/43575817
has comment: http://stackoverflow.com/comment/43612104
tagged with: usb
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/27575984
tagged with: javascript
favorite count: 0
has body: Using a USB HID sensor I can only seem to enumerate the device with the chrome.usb API on ChromeOS. On OS X I can enumerate with the chrome.hid API with no problem. What could be the reasons for HID devices not being identified as such on ChromeOS?
tagged with: google-chrome-app
type: Question
tagged with: hid
score: 1

http://stackoverflow.com/comment/43624733
type: QuestionComment
has text: I find event.target.id references the area with onclick="areaClick(evt)" when clicked (rather than evt.targetElement): function areaClick(evt) { alert(event.target.id);}
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27572161

http://stackoverflow.com/comment/43572634
type: Comment
type: QuestionComment
has text: 1. Add event handlers to button 2. In both event handlers, get the value of textBox 3. Increase or decrease value based on which button was pressed 4. Set new value to textBox 5. Profit
comment on: http://stackoverflow.com/q/27573573
score: 0

http://stackoverflow.com/comment/43425588
type: Comment
has text: I might've oversimplified my answer. Calling `x()` (or using `.call()` etc) will result in `call` being used, or - if the object in question is not callable, i.e. has no `call` internal property - an exception being thrown. This can trivially be tested by using [`typeof x == "function"`](http://es5.github.io/#x11.4.3). However, writing `new x` will call the `construct` internal property. All user-defined functions (such as `f` or `A`) [have this property](http://es5.github.io/#x13.2.2). Plain user-created objects (`a`, `b`, `{}`) have neither call nor construct.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27495468

http://stackoverflow.com/comment/43662002
score: 0
comment on: http://stackoverflow.com/q/27619896
type: Comment
type: QuestionComment
has text: @OnlyMAJ Yes I know that, that is why broken page is shown due to spaces in the URL, so I encoded filename with urlencode, so the speaces are replaced by + sign in the url but still download is not initiated

http://stackoverflow.com/comment/43500840
score: 0
type: Comment
type: QuestionComment
has text: `$(this).closest('.task-title').find('.request_hidden_id').text()`
comment on: http://stackoverflow.com/q/27536198

http://stackoverflow.com/comment/43469013
comment on: http://stackoverflow.com/a/27513688
score: 0
type: AnswerComment
has text: If you need to diplay several users, you need to plan it in your HTML. Right now, your HTML is for one user only...
type: Comment

http://stackoverflow.com/comment/43611030
type: Comment
comment on: http://stackoverflow.com/a/27593731
score: 1
has text: ... unless there's a reason for [automatic semicolon insertion (ASI)](http://www.ecma-international.org/ecma-262/5.1/#sec-7.9.1).
type: AnswerComment

http://stackoverflow.com/a/27631301
score: 0
has comment: http://stackoverflow.com/comment/43683117
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43683060
has comment: http://stackoverflow.com/comment/43683208
accepted answer of: http://stackoverflow.com/q/27631248
answers question: http://stackoverflow.com/q/27631248
type: Answer
has comment: http://stackoverflow.com/comment/43683218
has comment: http://stackoverflow.com/comment/43683078
has comment: http://stackoverflow.com/comment/43683154
has body: You are loading 2 versions of the main jQuery library but not jQueryUI. The jQueryUI resources on code.jQuery.com are in the ui directory. Example http://code.jquery.com/ui/1.11.2/jquery-ui.min.js I can see possible confusion since there is a common version number so all you need is to add in the /ui/ directory to what you have

http://stackoverflow.com/comment/43677865
score: 0
type: Comment
type: QuestionComment
has text: it wuld be useful to have a fiddle with the relevant part of your code, for example just one select menu with a clear button
comment on: http://stackoverflow.com/q/27628449

http://stackoverflow.com/comment/43444833
type: QuestionComment
score: 0
has text: What session driver are you using? `app/config/session.php`
comment on: http://stackoverflow.com/q/27507137
type: Comment

http://stackoverflow.com/tag/json
tags question: http://stackoverflow.com/q/27628573
tags question: http://stackoverflow.com/q/27611949
tags question: http://stackoverflow.com/q/27522981
tags question: http://stackoverflow.com/q/27629194
tags question: http://stackoverflow.com/q/27541974
tags question: http://stackoverflow.com/q/27563856
tags question: http://stackoverflow.com/q/27525771
tags question: http://stackoverflow.com/q/27572678
tags question: http://stackoverflow.com/q/27512138
tags question: http://stackoverflow.com/q/27544042
tags question: http://stackoverflow.com/q/27524364
tags question: http://stackoverflow.com/q/27494497
tags question: http://stackoverflow.com/q/27624103
tags question: http://stackoverflow.com/q/27523736
tags question: http://stackoverflow.com/q/27589450
tags question: http://stackoverflow.com/q/27484559
tags question: http://stackoverflow.com/q/27514495
tags question: http://stackoverflow.com/q/27618305
tags question: http://stackoverflow.com/q/27607876
tags question: http://stackoverflow.com/q/27561224
tags question: http://stackoverflow.com/q/27479030
tags question: http://stackoverflow.com/q/27563402
tags question: http://stackoverflow.com/q/27527438
tags question: http://stackoverflow.com/q/27522652
tags question: http://stackoverflow.com/q/27493987
tags question: http://stackoverflow.com/q/27562786
tags question: http://stackoverflow.com/q/27534189
tags question: http://stackoverflow.com/q/27524087
tags question: http://stackoverflow.com/q/27479750
tags question: http://stackoverflow.com/q/27541915
tags question: http://stackoverflow.com/q/27484069
tags question: http://stackoverflow.com/q/27614312
tags question: http://stackoverflow.com/q/27622444
tags question: http://stackoverflow.com/q/27605683
tags question: http://stackoverflow.com/q/27513286
tags question: http://stackoverflow.com/q/27561548
tags question: http://stackoverflow.com/q/27631973
tags question: http://stackoverflow.com/q/27542861
tags question: http://stackoverflow.com/q/27525544
tags question: http://stackoverflow.com/q/27546951
tags question: http://stackoverflow.com/q/27491380
tags question: http://stackoverflow.com/q/27536526
tags question: http://stackoverflow.com/q/27571542
tags question: http://stackoverflow.com/q/27552631
tags question: http://stackoverflow.com/q/27477854
tags question: http://stackoverflow.com/q/27506310
tags question: http://stackoverflow.com/q/27622121
tags question: http://stackoverflow.com/q/27625981
tags question: http://stackoverflow.com/q/27620229
tags question: http://stackoverflow.com/q/27596450
tags question: http://stackoverflow.com/q/27580474
tags question: http://stackoverflow.com/q/27573692
tags question: http://stackoverflow.com/q/27494244
tags question: http://stackoverflow.com/q/27474839
tags question: http://stackoverflow.com/q/27616231
tags question: http://stackoverflow.com/q/27528225
tags question: http://stackoverflow.com/q/27591966
tags question: http://stackoverflow.com/q/27476086
tags question: http://stackoverflow.com/q/27548916
tags question: http://stackoverflow.com/q/27499407
tags question: http://stackoverflow.com/q/27623446
tags question: http://stackoverflow.com/q/27593344
tags question: http://stackoverflow.com/q/27486833
tags question: http://stackoverflow.com/q/27591678
tags question: http://stackoverflow.com/q/27584358
tags question: http://stackoverflow.com/q/27601485
tags question: http://stackoverflow.com/q/27561744
tags question: http://stackoverflow.com/q/27558209
tags question: http://stackoverflow.com/q/27563382
type: Tag
tags question: http://stackoverflow.com/q/27624842
tags question: http://stackoverflow.com/q/27617218
tags question: http://stackoverflow.com/q/27475074
tags question: http://stackoverflow.com/q/27616715
tags question: http://stackoverflow.com/q/27540809
tags question: http://stackoverflow.com/q/27581519
tags question: http://stackoverflow.com/q/27532401
tags question: http://stackoverflow.com/q/27637008
tags question: http://stackoverflow.com/q/27576701
tags question: http://stackoverflow.com/q/27625125

http://stackoverflow.com/comment/43419124
type: Comment
comment on: http://stackoverflow.com/q/27493672
type: QuestionComment
has text: `html2canvas` needs to be in the document, or the canvas it creates needs to be in the document?
score: 0

http://stackoverflow.com/comment/43598230
type: Comment
score: 1
has text: Are you running this on a server? Or are you just opening the doc in a browser with a local file path for a URL? If the latter, the relative `src` will cause problems. Also, are you sure you haven't checked `don't show any more alerts for this page` or anything similar in your browser?
type: AnswerComment
comment on: http://stackoverflow.com/a/27586887

http://stackoverflow.com/a/27581610
accepted answer of: http://stackoverflow.com/q/27572026
answers question: http://stackoverflow.com/q/27572026
has body: Your events object has a few mismatching parentheses that would cause javascript errors, I would suggest keeping an eye on the console for js errors all times. To accomplish hover effect, you could simply define the hover state options in your series or plotOptions marker: { states: { hover: { fillColor: '#000' } } } Handling hover @ jsFiddle If you don't want the same hover effect across all points and have some specific logic, you could use the mouseOver and mouseOut events like you were trying. Note that it may feel sluggish if not implemented well. events: { mouseOver: function () { this.update({ color: '#000' }); }, mouseOut: function () { this.update({ color: this.series.color }); } } Custom hover @ jsFiddle
type: Answer
score: 1
upvote count: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/27616280
has body: I am executing multiple $http calls in parallel (async). My code logic looks something like this - $scope.ids = [1, 2, 3, 4]; var promises = []; for(var i in $scope.ids){ promises.push( $http.get('http://0.0.0.0/t2/' + $scope.ids[i]) ); } $q.all(promises).then( function(res){ console.log(res); }, function(res){ console.log(res); } ); Now the $q.all() docs say that Returns a single promise that will be resolved with an array/hash of values, each value corresponding to the promise at the same index/key in the promises array/hash. If any of the promises is resolved with a rejection, this resulting promise will be rejected with the same rejection value. Now when all the promises pass, I get an expected response of an array containing 4 elements. Success -> Object[4] However, in the case where all fail, the res output shows only the one which failed. Failure -> Hash This is as expected and what the Angular Docs mention. In my case I want to know the status of all the http request I made, even if it was a failure I require the result. Certainly $q.all() will break out the moment one of the promises fails. I want to wait till all the promises have either passed or failed and then get the results. How do I do this?
type: Question
upvote count: 4
answer count: 1
downvote count: 0
tagged with: javascript
score: 4
favorite count: 0
has answer: http://stackoverflow.com/a/27616491
tagged with: asynchronous
tagged with: angularjs
tagged with: angular-promise
has title: Getting status of multiple promises executed asynchronously
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27616491

http://stackoverflow.com/comment/43461221
comment on: http://stackoverflow.com/q/27514973
type: Comment
type: QuestionComment
has text: Same problem after swapping and placing the scrollTop inside ajax call success..
score: 0

http://stackoverflow.com/a/27570542
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43566406
has body: This is to do with the logic in which you display messages, every time you type a message the ng-repeat is evaluated again, and the getDate() function is re-evaluated since it's used inside the ng-repeat. You need to find a way to attach the date of the message to the message object itself, have a look at my fork Date: {{message.date}} Message: {{message.content}} Basically messageLog now a has a list of message objects each of which have their own time and content: $scope.messageLog.push({content:message,date:new Date()}); the track by expression is needed to let the ng-repeat have a way to distinguish between items to overcome the dupes error.
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/43567008
score: 1
answers question: http://stackoverflow.com/q/27570346
accepted answer of: http://stackoverflow.com/q/27570346

http://stackoverflow.com/comment/43688634
comment on: http://stackoverflow.com/a/27631491
type: AnswerComment
type: Comment
has text: you should also check this link : http://stackoverflow.com/questions/16710302/html5-file-api-with-filename-path
score: 0

http://stackoverflow.com/comment/43698073
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27639415
has text: Did you want to change the fill or the stroke? You mention one in the question and one in the previous comment.

http://stackoverflow.com/q/27495914
answer count: 2
has answer: http://stackoverflow.com/a/27553640
tagged with: javascript
score: 0
tagged with: sencha-touch-2
tagged with: sencha-touch
accepted answer: http://stackoverflow.com/a/27553640
has title: Sencha Touch click event on slide nav item
type: AnsweredQuestion
has body: I have two questions here: on click on list item in slide nav load a new page content on click of home icon on bottom of screen, take the use back to main view I have followed following code sample to get Facebook like menu Steps: Described steps Git Code: Repo URL Demo site: Tutorial demo url I am successful to get the sliding menu work as per the demo, but I am not able to set a click events for all items in menu and on home icon. here is what I want to do. app/views/Navigation.js (as per the demo code structure) Ext.define('SlideNav.view.Navigation', { extend: 'Ext.List', xtype: 'navigation', requires : ['Ext.data.Store'], config: { cls : 'nav-list', itemTpl : '{title}', data : [{ title : 'About' },{ title : 'Item 2' },{ title : 'Item 3' }] }, // This part is new listeners: { itemtap: function (list, index, item, record) { //Ext.Msg.alert('Selected Link', record.data.itemId); switch (record.data.itemId) { default: { this.onAboutButtonTap(); break; } } } }, onAboutButtonTap: function () { this.fireEvent("goToAboutMeCommand", this); } }); Up on clicking each item on this list, I want to load a new content on the page. so far i was able to do this: app/controller/app.js (as per the Git structure) refs: { main : 'main', navigation : 'navigation', navBtn: 'button[name="nav_btn"]', aboutView: "AboutViewType" }, navigationView: { itemtap: function (list, index, target, record) { this.toggleNav(); }, // This is new line goToAboutMeCommand: "onGoToAboutMeCommand" }, ..... ...... onGoToAboutMeCommand: function () { console.log("onGoToAboutMeCommand"); this.showAboutMe(); }, showAboutMe: function () { Ext.Viewport.setActiveItem(this.getAboutView()); } When user clicks on any of the items in the slide menu, it will fire "onAboutButtonTap" and loads the AboutView content, but nav menu doesn't work after that not sure if I am doing this right. Also if you see the GIT code and demo there is home icon on demo, I want to attach a click event for that home icon and when user click…
possible better answer: http://stackoverflow.com/a/27522931
type: Question
has answer: http://stackoverflow.com/a/27522931

http://stackoverflow.com/q/27498487
tagged with: ember.js
type: AnsweredQuestion
score: 3
accepted answer: http://stackoverflow.com/a/27540829
has body: How can we call a function with parameters in emblem's conditional statement. Like I have a function: priorExist: (prior) -&gt; @get("priors").findBy("condition", prior) But I get an error when I call it in emblem like this if priorExist(name) Is there any way to call above function in emblem?
upvote count: 3
type: Question
tagged with: emblem.js
tagged with: ember-data
tagged with: javascript
has title: Call a function in emblem conditional statement
has answer: http://stackoverflow.com/a/27540829
answer count: 1
downvote count: 0
favorite count: 0

http://stackoverflow.com/q/27603094
tagged with: dust.js
has title: Combine @math and @size in dust.js
score: 0
has body: I need to get size + 1 of an array. I tried the following but I can't figure the right syntax : {@@math key="{@@size key=\"UsedFields\"}" method="add" operand="1" /} PS: this code runs on a MVC app, thus the double @
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27610223
answer count: 1
type: UnansweredQuestion

http://stackoverflow.com/comment/43496236
has text: @FlavienVolken subItem in [0,1,2] - that would be the position in the elements? Won't that cause the second PageItem to also repeat the same subItems from the previous pageItem?
type: Comment
score: 0
comment on: http://stackoverflow.com/q/27533682
type: QuestionComment

http://stackoverflow.com/q/27477868
score: 2
tagged with: phantomjs
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/27478187
tagged with: testing
has title: Unable to click on a link with CasperJS
has body: I am trying to click a link with CasperJS, but am receiving this odd error: [warning] [phantom] Loading resource failed with status=fail (HTTP 200): http://njit.edu/. Here is my code: // Creating a casper module instance var casper = require('casper').create({ verbose: true, logLevel: "debug" }); var config = { url: 'http://telluswho2.herokuapp.com/', }; casper.start(config.url); casper.then(function() { console.log(this.getCurrentUrl()); this.click('a.btn-lg:nth-child(3)'); console.log(this.getTitle()); }); casper.run(function() { console.log(this.getTitle()); this.exit(); }); Here are the solutions I have tried: casperjs njit.js casperjs njit.js --ssl-protocol=any casperjs njit.js --ssl-protocol=tlsv1 casperjs njit.js --ignore-ssl-errors=yes casperjs njit.js --ignore-ssl-errors=true casperjs njit.js --ignore-ssl-errors=false casperjs --ssl-protocol=any njit.js casperjs --ssl-protocol=tlsv1 njit.js casperjs --ignore-ssl=yes njit.js All of these possible solutions result in the same error. Any ideas?
tagged with: ssl
tagged with: javascript
answer count: 1
downvote count: 0
favorite count: 0
tagged with: casperjs
has answer: http://stackoverflow.com/a/27478187
upvote count: 2

http://stackoverflow.com/comment/43476091
comment on: http://stackoverflow.com/a/27523305
type: Comment
score: 0
type: AnswerComment
has text: And for the backlashes, did you remove them?

http://stackoverflow.com/comment/43534335
type: Comment
type: QuestionComment
has text: I made it work with document.getElementById("iframe").contentWindow.jQuery("#picker").colpick({...}) in the example I was trying to build. There must be something wrong in my original code. I will check it again.
score: 0
comment on: http://stackoverflow.com/q/27550633

http://stackoverflow.com/comment/43568595
comment on: http://stackoverflow.com/q/27571601
type: Comment
type: QuestionComment
has text: It works for me. When I hit `tab` it prints `blur` on both respectively. Is it possibly your browser? BTW, the code in your post is invalid - you mean `...z-index: 1;"`
score: 1

http://stackoverflow.com/q/27595405
has comment: http://stackoverflow.com/comment/43614736
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/43614566
accepted answer: http://stackoverflow.com/a/27595430
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27595428
has comment: http://stackoverflow.com/comment/43614541
score: 0
answer count: 3
upvote count: 1
downvote count: 1
has title: val() is showing empty string when it actually contains a value
type: Question
tagged with: javascript
has body: My generated code looks like this in chrome's developer tools: &lt;tbody&gt; &lt;tr&gt; &lt;td&gt; &lt;span class="LiveAgentStatusField" value="Online" &gt; Online &lt;/span&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; Please note that this html code is generated by salesforce and I don't have much control over this except the span. My jQuery code: $(".LiveAgentStatusField").each(function(index) { if ($(this).val() === 'online' || $(this).val() === 'Online') { $(this).css("color", "#0EBE5E"); } else if ($(this).val() === 'offline' || $(this).val() === 'Offline') { $(this).css("color", "#ccc"); } }); There are two wield things happening to me: When I am using .LiveAgentStatusField, it works pretty fine. But when I was using span.LiveAgentStatusField, it doesn't even go into the if code during debugging. Although the value of the span tag should have a value of 'Online', $(this).val() is actually "" during debugging. I added a line under this to catch the val() === "" branch and made sure this is pointing to the right element. Actually, I have already resolved my code issue with using .html(). But I am quite keen to find out why it is acting strange.
possible better answer: http://stackoverflow.com/a/27595422
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27595430
has answer: http://stackoverflow.com/a/27595422

http://stackoverflow.com/comment/43650417
score: 0
has text: Try this: oneDay = null; or delete oneDay;
comment on: http://stackoverflow.com/q/27614200
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27634741
accepted answer: http://stackoverflow.com/a/27783344
has title: Interactive share through JS not rendering
score: 1
upvote count: 1
type: Question
type: AnsweredQuestion
tagged with: javascript
has body: Can someone explain to me why the following code isn't working? I have copied the code from Google and I need the "onshare" facility which I don't believe is available through the standard HTML. There are no JS errors - and nothing renedered: Title of the document google_test After some investigation (5/1/15) I discovered that in the response (net panel in firebug) I was getting an error back in a hidden text box. This was because my origin url was wrong, but now I get the following: Any idea what this might mean?
has answer: http://stackoverflow.com/a/27783344
answer count: 2
downvote count: 0
tagged with: google-plus
favorite count: 0
possible better answer: http://stackoverflow.com/a/27635192
has answer: http://stackoverflow.com/a/27635192

http://stackoverflow.com/a/27479089
type: Answer
score: 0
answers question: http://stackoverflow.com/q/27478461
has comment: http://stackoverflow.com/comment/43416617
has comment: http://stackoverflow.com/comment/43392126
has body: You have to link your js file to your html. Add link at the bottom of your html page after end tag Here's what I tried and it works.. function checkAllTextBoxes() { if (document.form01.actualFirstName.value.length < 2) { alert("First name is too short- must be at least two characters or more."); return false; } return true; } First Name:
has comment: http://stackoverflow.com/comment/43427520
has comment: http://stackoverflow.com/comment/43393711

http://stackoverflow.com/comment/43485292
comment on: http://stackoverflow.com/a/27492642
has text: @SamBattat Eh, it's actually another thing entirely. I deleted my answer because this method doesn't actually work
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/43586381
score: 0
type: Comment
type: QuestionComment
has text: Is the "ProjectedYieldCalender.aspx/GetData" page returns an json data?
comment on: http://stackoverflow.com/q/27580943

http://stackoverflow.com/comment/43588112
has text: Uh... that's not how it works.
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/27581845

http://stackoverflow.com/comment/43736847
comment on: http://stackoverflow.com/q/27627728
type: QuestionComment
has text: I will start writing the parser to convert to JSON.
type: Comment
score: 0

http://stackoverflow.com/a/27611197
has comment: http://stackoverflow.com/comment/43645514
has comment: http://stackoverflow.com/comment/43644885
has comment: http://stackoverflow.com/comment/43645548
has body: Here's a solution that uses the activate callback and assumes that the other tab collections will be siblings of the activated tab collection $(function () { $(".tabs").tabs({ collapsible: true, show: { effect: "blind", duration: 800 }, active: false, activate:function(evt,ui){ var $currTabs = ui.newTab.closest('.tabs'); $currTabs.siblings().tabs("option", { active: false } ); } }); }); DEMO This callback doesn't fire until after the effect seems to have completed so the timing may not be what you want for the closing of the other tabs but it is start. Updated: uses beforeActivate callback to collapse other tabs and only animates content opening when all tabs in collection were previously closed var inactiveOpts = { active: false, show: { effect: 'blind' } } var $tabs = $(".tabs").each(function () { var currTab = this, tabsOpts = { collapsible: true, beforeActivate: function (evt, ui) { $tabs.not(this).tabs("option", inactiveOpts) }, activate: function (evt, ui) { $(currTab).tabs('option', { show: false }); } } $.extend(tabsOpts, inactiveOpts); $(this).tabs(tabsOpts); }); DEMO 2
type: Answer
has comment: http://stackoverflow.com/comment/43645480
score: 1
has comment: http://stackoverflow.com/comment/43645571
downvote count: 0
answers question: http://stackoverflow.com/q/27609687
upvote count: 1
has comment: http://stackoverflow.com/comment/43645578

http://stackoverflow.com/comment/43413984
comment on: http://stackoverflow.com/q/27486389
score: 0
has text: This question appears to be off-topic because it is about a fundamental misunderstanding of asynchronicity.
type: QuestionComment
type: Comment

http://stackoverflow.com/a/27638124
type: Answer
has body: Handling keyboard keys is still tricky, with incompatibilities between browsers, specifications defining methods that browsers don’t support, etc. In this case, however, the solution seems to be simple. If your code works on other relevant browsers, you can handle Firefox by using the key property of the event. Its value is the string Tab for the tab key. :focus { background: yellow } /* Just to show where the focus is */ &lt;input onkeypress="console.log(event.key);return event.charCode == 8 || event.charCode == 9 || event.charCode == 37 || event.charCode == 39 || event.charCode == 46 || event.charCode &gt;= 48 &amp;&amp; event.charCode &lt;= 57 || event.key == 'Tab'" &gt; &lt;input&gt;
has comment: http://stackoverflow.com/comment/43695219
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27637597
downvote count: 0

http://stackoverflow.com/a/27516259
has comment: http://stackoverflow.com/comment/43491604
has comment: http://stackoverflow.com/comment/43463317
accepted answer of: http://stackoverflow.com/q/27516153
has comment: http://stackoverflow.com/comment/43463167
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43487826
has body: Use .contains or .indexOf with Object.keys(userscores). var userscores = JSON.parse(jsonString); if ((Object.keys(userscores)).contains('easy')) { var data = userscores.easy; } JSFiddle here using .indexOf.
type: Answer
score: 1
answers question: http://stackoverflow.com/q/27516153
upvote count: 1

http://stackoverflow.com/q/27535897
favorite count: 0
tagged with: livesearch
has title: filter in a json and response with another json
has comment: http://stackoverflow.com/comment/43500547
has body: I need to filter a JSON like this: { "suggestions":[ "futebol brasileiro", "futebol americano", "futebol", "musica", "musicas", "musica inedita de raul", "politica entre dilma e aecio", "politica", "politica macroeconomica" ] } When I type "pol" in a input field, I need to get this JSON: { "suggestions":[ "politica entre dilma e aecio", "politica", "politica macroeconomica" ] } How can I do that using pure Javascript? I did that in JQuery: var url = "/busca/suggests/?q="+query; $.getJSON(url, function (data) { for(var i=0; i &lt; data.length; i++) { people[i] = accent_fold(data[i]); } }); //Case insensitive search for our people array var results = $.grep(people, function(item){ return item.search(RegExp(query, "i")) != -1; });
score: 1
upvote count: 1
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43500279
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
has answer: http://stackoverflow.com/a/27536184
tagged with: filter
accepted answer: http://stackoverflow.com/a/27536184
answer count: 1
downvote count: 0
tagged with: jquery

http://stackoverflow.com/q/27568122
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43561560
score: 0
has title: Changing .show() to a variable to save with local Storage
has body: I have a level based game. So when the player hits the top of the level it will .show() The next level's button. I need it to save that with HTML localStorage, but first things first I need to convert it to a string/array type so I can store it easily. I've tried this method right here: $(document).ready(function() { var levelsSaved = 1; $('#button2').hide(); $('#button1').click(function() { levelsSaved = [1, 2]; }); if (levelsSaved == 2) { $('#button2').show(); } }); However, when you click Level one button nothing happens, I don't get any errors or console messages. So I honestly do not know what's going on. Here is a link to my jsFiddle: http://jsfiddle.net/1dvjqf15/1/
answer count: 1
has comment: http://stackoverflow.com/comment/43569021
favorite count: 0
has answer: http://stackoverflow.com/a/27569082
has comment: http://stackoverflow.com/comment/43563046
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/43561413
has comment: http://stackoverflow.com/comment/43561447
has comment: http://stackoverflow.com/comment/43561759
has comment: http://stackoverflow.com/comment/43561536
downvote count: 1

http://stackoverflow.com/a/27583367
has body: The problem maybe somewhere else.I created this fiddle to show you that the function executes fine. See it work Code: Hello World! Oeps...
has comment: http://stackoverflow.com/comment/43591201
answers question: http://stackoverflow.com/q/27583251
has comment: http://stackoverflow.com/comment/43591498
type: Answer
has comment: http://stackoverflow.com/comment/43591530
has comment: http://stackoverflow.com/comment/43591219
score: 0

http://stackoverflow.com/comment/43399142
type: QuestionComment
has text: [Wrapping a set of DOM elements using JavaScript](http://stackoverflow.com/questions/3337587/wrapping-a-set-of-dom-elements-using-javascript)
comment on: http://stackoverflow.com/q/27483025
score: 0
type: Comment

http://stackoverflow.com/comment/43428263
comment on: http://stackoverflow.com/q/27498558
has text: *Is there a simple solution using the latest jquery and javascript..* : Yes. It is called ScrollSpy: http://getbootstrap.com/javascript/#scrollspy
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/q/27509232
has body: I have a object that I create two instances of: var generalGraph = new graph(generalFunnel) generalGraph.draw("#conversion"); var invoicingGraph = new graph(invoicingFunnel) invoicingGraph.draw("#invoicing") Here is the object (note that this is highly simplified to make it easier to understand) the comments are the console-outputs. graph = function(funnel){ this.funnel = funnel.conversions mySelf = this this.draw = function(selector){ console.log(mySelf.funnel) //generalGraph ["Användare", "Påbörjat Onboarding", "Skapat oganisation", "Skapat användare", "Kom tillbaka", "Köpt"] //invoicingGraph ["Användare", "Påbörjat Onboarding", "Skapat oganisation", "Kom tillbaka", "Köpt"] nv.addGraph(function() { console.log(mySelf.funnel) //generalGraph ["Användare", "Påbörjat Onboarding", "Skapat oganisation", "Kom tillbaka", "Köpt"] //invoicingGraph ["Användare", "Påbörjat Onboarding", "Skapat oganisation", "Kom tillbaka", "Köpt"] }); } } For some reason, when I do generalGraph.draw, it uses the funnel from invoicingFunnel. Why? And how can I stop it from happening?
type: AnsweredQuestion
tagged with: oop
linked to: http://stackoverflow.com/q/2846283
linked to: http://stackoverflow.com/q/1335851
type: Question
linked to: http://stackoverflow.com/q/1470488
has answer: http://stackoverflow.com/a/27509306
tagged with: javascript
has comment: http://stackoverflow.com/comment/43448553
score: 0
has title: How come self gets updated inside object?
answer count: 1
accepted answer: http://stackoverflow.com/a/27509306

http://stackoverflow.com/a/27568061
downvote count: 0
type: Answer
has body: Look at the error message that is returned when you call the API with a key: http://maps.googleapis.com/maps/api/geocode/json?&amp;address=New%20York,NY&amp;sensor=false&amp;key=my_api_key { "error_message" : "Requests to this API must be over SSL.", "results" : [], "status" : "REQUEST_DENIED" } You need to use the https: protocol. https://maps.googleapis.com/maps/api/geocode/json?&amp;address=New%20York,NY&amp;sensor=false&amp;key=my_api_key { "error_message" : "The provided API key is invalid.", "results" : [], "status" : "REQUEST_DENIED" }
score: 6
upvote count: 6
answers question: http://stackoverflow.com/q/27561744
has comment: http://stackoverflow.com/comment/43588751

http://stackoverflow.com/a/27627287
accepted answer of: http://stackoverflow.com/q/27627153
type: Answer
has comment: http://stackoverflow.com/comment/43675382
answers question: http://stackoverflow.com/q/27627153
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/43675439
has body: you want either an id or the string? You can do this: $("td").click(function() { if($(this).hasClass("parcelIDCell")){ var ID = $(this).find("a").attr("id"); alert("Id is: " + ID); }else{ var String = $(this).text(); alert("Text is: " + String); } }); It checks to see if the td being clicked has the class parcelIDCell, if it does it will find the a tag inside it and pull the id. If the class does not exist, it will just grab the text instead. Fiddle below: FIDDLE
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43675819

d3.js
tags question: http://stackoverflow.com/q/27489041
tags question: http://stackoverflow.com/q/27556976
tags question: http://stackoverflow.com/q/27616818
tags question: http://stackoverflow.com/q/27560826
tags question: http://stackoverflow.com/q/27546809
tags question: http://stackoverflow.com/q/27573398
tags question: http://stackoverflow.com/q/27506780
tags question: http://stackoverflow.com/q/27518293
tags question: http://stackoverflow.com/q/27587646
tags question: http://stackoverflow.com/q/27510944
tags question: http://stackoverflow.com/q/27586646
tags question: http://stackoverflow.com/q/27492541
tags question: http://stackoverflow.com/q/27504985
tags question: http://stackoverflow.com/q/27566369
tags question: http://stackoverflow.com/q/27595100
tags question: http://stackoverflow.com/q/27553793
tags question: http://stackoverflow.com/q/27563400
tags question: http://stackoverflow.com/q/27574743
tags question: http://stackoverflow.com/q/27492432
tags question: http://stackoverflow.com/q/27596115
tags question: http://stackoverflow.com/q/27608644
tags question: http://stackoverflow.com/q/27610649
tags question: http://stackoverflow.com/q/27564001
tags question: http://stackoverflow.com/q/27491958
tags question: http://stackoverflow.com/q/27624668
tags question: http://stackoverflow.com/q/27484961
tags question: http://stackoverflow.com/q/27524069
tags question: http://stackoverflow.com/q/27505312
tags question: http://stackoverflow.com/q/27552367
tags question: http://stackoverflow.com/q/27596908
tags question: http://stackoverflow.com/q/27506002
tags question: http://stackoverflow.com/q/27546830
tags question: http://stackoverflow.com/q/27595711
tags question: http://stackoverflow.com/q/27554559
tags question: http://stackoverflow.com/q/27475465
type: Tag
tags question: http://stackoverflow.com/q/27596178
tags question: http://stackoverflow.com/q/27567677
tags question: http://stackoverflow.com/q/27628315
tags question: http://stackoverflow.com/q/27569194
tags question: http://stackoverflow.com/q/27560731
tags question: http://stackoverflow.com/q/27522009
tags question: http://stackoverflow.com/q/27499864
tags question: http://stackoverflow.com/q/27542242
tags question: http://stackoverflow.com/q/27549681
tags question: http://stackoverflow.com/q/27627937
tags question: http://stackoverflow.com/q/27587453
tags question: http://stackoverflow.com/q/27543124
tags question: http://stackoverflow.com/q/27560030
tags question: http://stackoverflow.com/q/27623446
tags question: http://stackoverflow.com/q/27533032
tags question: http://stackoverflow.com/q/27533178
tags question: http://stackoverflow.com/q/27500617
tags question: http://stackoverflow.com/q/27504555
tags question: http://stackoverflow.com/q/27514394
tags question: http://stackoverflow.com/q/27600142
tags question: http://stackoverflow.com/q/27537970
tags question: http://stackoverflow.com/q/27601693
tags question: http://stackoverflow.com/q/27511153
tags question: http://stackoverflow.com/q/27545034
tags question: http://stackoverflow.com/q/27497436
tags question: http://stackoverflow.com/q/27558560
tag name: d3.js
tags question: http://stackoverflow.com/q/27503972
tags question: http://stackoverflow.com/q/27553034
tags question: http://stackoverflow.com/q/27614539
tags question: http://stackoverflow.com/q/27581216
tags question: http://stackoverflow.com/q/27591495
tags question: http://stackoverflow.com/q/27542512
tags question: http://stackoverflow.com/q/27478201
tags question: http://stackoverflow.com/q/27616439
tags question: http://stackoverflow.com/q/27615351
tags question: http://stackoverflow.com/q/27562916
tags question: http://stackoverflow.com/q/27563382
tags question: http://stackoverflow.com/q/27486772
tags question: http://stackoverflow.com/q/27529581
tags question: http://stackoverflow.com/q/27489498
tags question: http://stackoverflow.com/q/27618393
tags question: http://stackoverflow.com/q/27549655
tags question: http://stackoverflow.com/q/27605755

http://stackoverflow.com/q/27623490
has body: Question : how to set default value to the angular ui-select drop down values are fetched from object and object wont be having default value. and ui-select should set the default value in Frontend. eg: drop down values are as follows 1 -all fruits 2 -apple 3 -banana 4 -water melon value from 2 to 4 are derived from object sent from server.but Frontend need to set default value ie 1 - all fruits Referring to the below example set via ui-select2 how to migrate this in ui-select? All fruits {{f.name}} {{$select.selected.name}} http://plnkr.co/edit/a3KlK8dKH3wwiiksDSn2?p=preview https://github.com/angular-ui/ui-select Link :angular-ui/ui-select
has answer: http://stackoverflow.com/a/33239612
type: Question
has answer: http://stackoverflow.com/a/35942862
upvote count: 5
has comment: http://stackoverflow.com/comment/43674660
tagged with: javascript
has answer: http://stackoverflow.com/a/27623909
tagged with: ui-select
has title: how to set a default value for angular ui-select
answer count: 3
downvote count: 0
tagged with: ui-select2
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
score: 5
has comment: http://stackoverflow.com/comment/43667547

http://stackoverflow.com/comment/43407351
score: 0
type: QuestionComment
type: Comment
has text: @mason ok....thanks for all of you
comment on: http://stackoverflow.com/q/27487611

http://stackoverflow.com/a/27480904
has comment: http://stackoverflow.com/comment/43395777
has comment: http://stackoverflow.com/comment/43394857
has comment: http://stackoverflow.com/comment/43395858
type: Answer
has body: Do it with PHP code. Inside your loop add this check in each tag. &lt;?php echo ($wpjobus_resume_skills[$i][1]=='YOUR_VALUE')?'checked':'';?&gt; For example &lt;?php for ($i = 0; $i &lt; (count($wpjobus_resume_skills)); $i++) { ?&gt; &lt;input style="width:50%; float: none" type='checkbox' class="checkedClass&lt;?php echo $i; ?&gt;" id='wpjobus_resume_skills[&lt;?php echo $i; ?&gt;][1]' name='wpjobus_resume_skills[&lt;?php echo $i; ?&gt;][1]' value='80%' class='slider_value' &lt;?php echo ($wpjobus_resume_skills[$i][1]=='80%')?'checked':'';?&gt; &gt; .
accepted answer of: http://stackoverflow.com/q/27480627
has comment: http://stackoverflow.com/comment/43394988
answers question: http://stackoverflow.com/q/27480627
has comment: http://stackoverflow.com/comment/43395551
score: 0
type: AcceptedAnswer

http://stackoverflow.com/q/27620586
score: 9
has title: A sphere with texture in Three.js
upvote count: 9
tagged with: javascript
has comment: http://stackoverflow.com/comment/43669838
has answer: http://stackoverflow.com/a/27624795
answer count: 1
downvote count: 0
favorite count: 0
type: UnansweredQuestion
tagged with: three.js
has body: I'm new to Three.js so I ask a basic question. I can't load texture on sphere. It's in function createEarthMaterial. My image with texture is called 'map2.png'. I tryed almost everything. My code comes form "Three.js Essentials" book and it doesn't work. Can U give any good solution? Thanks in advance. Here's code: // global variables var renderer; var scene; var camera; var control; var stats; var cameraControl; /** * Initializes the scene, camera and objects. Called when the window is * loaded by using window.onload (see below) */ function init() { // create a scene, that will hold all our elements such as objects, cameras and lights. scene = new THREE.Scene(); // create a camera, which defines where we're looking at. camera = new THREE.PerspectiveCamera(45, window.innerWidth / window.innerHeight, 0.1, 1000); // create a render, sets the background color and the size renderer = new THREE.WebGLRenderer(); renderer.setClearColor(0xcccccc, 1.0); renderer.setSize(window.innerWidth, window.innerHeight); renderer.shadowMapEnabled = true; var sphereGeometry = new THREE.SphereGeometry(15, 30, 30); var sphereMaterial = createEarthMaterial(); var earthMesh = new THREE.Mesh(sphereGeometry, sphereMaterial); earthMesh.name = 'earth'; scene.add(earthMesh); // position and point the camera to the center of the scene camera.position.x = 35; camera.position.y = 36; camera.position.z = 33; camera.lookAt(scene.position); // add controls cameraControl = new THREE.OrbitControls(camera); // setup the control object for the control gui control = new function () { this.rotationSpeed = 0.005; this.opacity = 0.6; }; // add extras // add the output of the renderer to the html element document.body.appendChild(renderer.domElement); // call the render function, after the first render, interval is determined // by requestAnimationFrame render(); } function createEarthMaterial() { // 4096 is the maximum width for maps var earthTexture = THREE.ImageUtils.loadTexture("map2.png"); var earthMateria…
type: Question

http://stackoverflow.com/q/27483775
type: AnsweredQuestion
score: 1
upvote count: 1
has title: Format numbers with jquery numberformatter and format them back
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27485386
accepted answer: http://stackoverflow.com/a/27485386
has body: I format numbers of an input field with jquery numberformatter, that works, but I have to format them back in order to do some calculations on the numbers, but that doesn't work. How can I convert the formatted numbers back so that I can use the calculate function? Here is the JS for the number formatting: $("[id$='abzug']").keyup(function(){ $(this).parseNumber({format:"#,###", locale:"ch"}); $(this).formatNumber({format:"#,###", locale:"ch"}); val(); }); Here the HTML: &lt;input class="form-control" id="kunst_abzug" type="text"&gt; &lt;input class="form-control" id="theater_abzug" type="text"&gt; And here the function to calculate the total: function id(id){return document.getElementById(id);} function val(){ val_totalEingespart = parseInt(id("totalEingespart").value) || 0; val1 = parseInt(id("kunst_abzug").value) || 0; val2 = parseInt(id("theater_abzug").value) || 0; var total_abgezogen = val_totalEingespart - val1 - val2; var total_abgezogenCHF = total_abgezogen.toLocaleString('de-CH'); id("totalSum2").innerHTML = total_abgezogenCHF + ' CHF'; } I also created a js fiddle: http://jsfiddle.net/Lffpg4xp/2/
downvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0

http://stackoverflow.com/q/27488626
answer count: 1
tagged with: javascript
score: 7
favorite count: 0
has title: Setting filename of pdf from javascript print method in Internet Explorer not working
tagged with: http://stackoverflow.com/tag/pdf
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/41186406
upvote count: 7
type: Question
has body: var docprint = window.open("", "", "toolbar=0,location=0,menubar=0,scrollbars=1"); docprint.document.open(); docprint.document.write(" Title here "); docprint.document.write(" body content here "); docprint.document.close(); docprint.focus(); docprint.print(); This is my javascript code for opening a new window and automatically opening the print dialog. When the user selects the option to print to Adobe PDF from the print dialog, a menu comes up with the option to define the pdf filename. In Firefox and Chrome, the pdf filename is set as the title of the page, which is fine. However, in Internet Explorer, the pdf filename is set as the parent window's url basename. How can I set the pdf filename programatically in Internet Explorer?
tagged with: internet-explorer
tagged with: filenames
linked to: http://stackoverflow.com/q/35048218
accepted answer: http://stackoverflow.com/a/41186406
tagged with: printing
downvote count: 0

http://stackoverflow.com/comment/43585145
type: QuestionComment
has text: I know, like many other users of SO. What have you tried? What is the problem?
comment on: http://stackoverflow.com/q/27580389
score: 4
type: Comment

http://stackoverflow.com/comment/43593435
score: 1
has text: You would need to deal with all possibilities of things like `eval("de" + "lete document");`, if you replace `eval` you would need to prohibit `new function` evaluation ... its a zero sum game you can't win.
comment on: http://stackoverflow.com/a/27584213
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27548282
accepted answer of: http://stackoverflow.com/q/27532017
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/27532017
has body: I manage to get the values inside a input field so i can now send it with a form and submit button. Maybe it's not a good locking solution, but it works. I made an iframe that shows a .php page and made a input field like this &lt;input value="&lt;?php include "count.php"; ?&gt;"&gt; And then i made a script placed in parent .html page like this function boahaga() { var myphp = window.frames["invoice"].document.getElementById ( "myidbo" ).value, result = document.getElementById('fakturanr_from'), myResult; { myResult = myphp; result.value = (myResult); } } And inside the body tag i run script onload. &lt;body onload="boahaga()"&gt; Now the input on the parent .html page is filled correct with the .php page input value.
score: 0

http://stackoverflow.com/a/27555616
upvote count: 1
has body: Try something like this $(function panelTitle() { $("#st-panelTitle").html(panelTitleArray[0]); var i = 1; $('.arrowNext').click(function(){ $("#st-panelTitle").html(panelTitleArray[i++]); console.log("clicked") }); });
downvote count: 0
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/43539251
answers question: http://stackoverflow.com/q/27555537

http://stackoverflow.com/comment/43392824
comment on: http://stackoverflow.com/q/27479602
has text: @JAL I'm logging locations in locate() but I can't read it because my console gets filled with GET requests and then crashes each time findLocations() is ran. I also can't debug setting breakpoints because whenever I do that it works correctly. Do you have any suggestions on how I should debug this?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43511762
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27510843
type: AnswerComment
has text: Yes in remove_image.php.

http://stackoverflow.com/comment/43409894
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27488811
has text: @Mohamed-Yousef It have this class when I click on second tabpanel

http://stackoverflow.com/q/27633492
tagged with: angularjs
type: UnansweredQuestion
tagged with: firebase
has title: Update Multiple records in my firebase with angular JS
downvote count: 1
type: Question
upvote count: 0
answer count: 1
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/27637665
has body: update all the records in my firebase. i'm trying to create a reset button for all the ratings in my app but my firebase doesn't get updated is there a way to update/set all records. i have no problem updating individual records but all data ... e.g ` $scope.books.rating = 0 $scope.books.$save like an equivalent to UPDATE mytable SET new_column = new value updating all rows in sql.
tagged with: angularfire
favorite count: 0

http://stackoverflow.com/q/27499544
tagged with: angularjs-ng-repeat
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has title: how to update filter function in ng-repeat
upvote count: 1
downvote count: 1
type: Question
has body: there was so much problem, when i click one of a tab near often all then could be update by the "filter: func". and my angularjs is here $scope.shops =[{..,near:ture,often:flase},{..,near:false,often:true}]; $scope.click = function(e) {..} then can't put it
tagged with: javascript
has answer: http://stackoverflow.com/a/27500885
score: 0
tagged with: filter
answer count: 1

http://stackoverflow.com/comment/43387803
has text: I assume he wants to use it to add an additional item to the list (hence the plus sign), so I made it make the list itself editable. Otherwise, as it is, it would just let you edit the content of the list item containing the + sign. OP can deal with the logistics of which item to select and creating a function that adds additional list items. This is just a proof of concept.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27476605
type: Comment

http://stackoverflow.com/q/27614072
tagged with: twitter
has comment: http://stackoverflow.com/comment/43650166
has comment: http://stackoverflow.com/comment/43650630
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27614275
has comment: http://stackoverflow.com/comment/43650746
has comment: http://stackoverflow.com/comment/43650657
has title: How to avoid ENTER key behavior in Twitter Bootstrap Modal component
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
tagged with: twitter-bootstrap
upvote count: 1
has answer: http://stackoverflow.com/a/27614431
accepted answer: http://stackoverflow.com/a/27614431
has comment: http://stackoverflow.com/comment/43650735
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27614275
has comment: http://stackoverflow.com/comment/43650469
has body: I have this HTML for a Twitter Bootstrap Modal: &lt;div class="modal fade " id="addNorma" tabindex="-1" role="dialog" aria-labelledby="addNorma" aria-hidden="true"&gt; &lt;div class="modal-dialog modal-lg"&gt; &lt;div class="modal-content"&gt; &lt;div class="modal-header"&gt; &lt;button type="button" class="close" data-dismiss="modal"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;span class="sr-only"&gt;{{ 'boton.cerrar'|trans({}, 'AppBundle') }}&lt;/span&gt;&lt;/button&gt; &lt;h4 class="modal-title" id="myModalLabel"&gt;{{ 'modal.normas.titulo'|trans({}, 'AppBundle') }}&lt;/h4&gt; &lt;/div&gt; &lt;div class="modal-body"&gt; &lt;form id="buscadorNorma" method="POST"&gt; ... &lt;div class="row"&gt; &lt;div class="col-md-12"&gt; &lt;button type="button" class="btn btn-default pull-right" disabled="disabled" id="btnBuscarNorma"&gt;&lt;i class="fa fa-binoculars"&gt;&lt;/i&gt; {{ 'boton.buscar'|trans({}, 'AppBundle') }}&lt;/button&gt; &lt;/div&gt; &lt;/div&gt; &lt;/form&gt; &lt;table class="table table-hover table-condensed" id="resultadoNorma" style="display: none"&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;&lt;input type="checkbox" id="toggleCheckboxNormaModal" name="toggleCheckboxNormaModal" /&gt;&lt;/th&gt; &lt;th&gt;{{ 'columnas.normas.no'|trans({}, 'AppBundle') }}&lt;/th&gt; &lt;th&gt;{{ 'columnas.normas.norma'|trans({}, 'AppBundle') }}&lt;/th&gt; &lt;th&gt;{{ 'columnas.normas.anno'|trans({}, 'AppBundle') }}&lt;/th&gt; &lt;th&gt;{{ 'columnas.normas.comite'|trans({}, 'AppBundle') }}&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody id="resultadoNormaBody"&gt;&lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt; &lt;div class="modal-footer"&gt; &lt;button type="button" class="btn btn-danger" data-dismiss="modal"&gt;{{ 'boton.regresar'|trans({}, 'AppBundle') }}&lt;/button&gt; &lt;button type="submit" class="btn btn-primary" id="btnAplicarNorma" disabled&gt;&lt;i class="fa fa-save"&gt;&lt;/i&gt; {{ 'boton.aplicar'|trans({}, 'AppBundle') }}&lt;/button&gt; &lt;/div&gt; &l…
score: 1
has comment: http://stackoverflow.com/comment/43650378

http://stackoverflow.com/q/27624507
type: AnsweredQuestion
score: 3
type: Question
answer count: 1
tagged with: javascript
tagged with: floating-accuracy
favorite count: 0
upvote count: 3
linked to: http://stackoverflow.com/q/11695618
has comment: http://stackoverflow.com/comment/43669658
has answer: http://stackoverflow.com/a/27624757
has body: From the discussion here and here we see that toFixed() can be used to help maintain precision when working with binary floats. For various reasons, I do not want to use a third party library. However, for any fraction that can be expressed as a finite decimal within 64 bits, I would like to maintain maximum precision in the most generic way possible. Assuming I use toFixed(), when do I need to use it? And is there a single "best" argument that I can pass to it to achieve the above goal? For example, consider JavaScript's ability to represent the fraction 1/10 as a finite decimal after different operations: 10/100 = 0.1 0.09 + 0.01 = 0.09999999999999999 1.1 - 1 = 0.10000000000000009 The first requires no correction step while the last two do. Furthermore passing toFixed() a value of 15 works in this case (ex: Number((0.09 + 0.01).toFixed(15))): 10/100 = 0.1 0.09 + 0.01 = 0.1 1.1 - 1 = 0.1 but passing 16 does not: 10/100 = 0.1 0.09 + 0.01 = 0.1 1.1 - 1 = 0.1000000000000001 Try JSFIDDLE. Will 15 as the argument for toFixed() always achieve the above objective? More importantly, when do I have to call toFixed()? In addition to add, subtract, multiply and divide, my math routines use Math.pow(), Math.exp() and Math.log().
downvote count: 0
accepted answer: http://stackoverflow.com/a/27624757
linked to: http://stackoverflow.com/q/1458633
tagged with: double
has title: JavaScript - after what operations is toFixed() required and what argument should be passed?
tagged with: floating-point

http://stackoverflow.com/a/27543403
has body: It has something to do with canvas and the height/width style. You're better of using the attributes for this. Change your js to this: $(document).ready(function () { var body = $('body'), height = 200, width = 200; # You can calculate height and width here. DONT USE % or em for a canvas!!!. body.css({ 'position': 'relative', 'top': '70px' }).append(' '); $('#simple_sketch').sketch(); }) http://jsfiddle.net/g3sTL/230/
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/27542951
answers question: http://stackoverflow.com/q/27542951
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/68398290
type: Comment
has text: To be completely clear, `window.jQuery` is a special phrase, it doesn't have to match anything in your code: http://stackoverflow.com/questions/1014203/best-way-to-use-googles-hosted-jquery-but-fall-back-to-my-hosted-library-on-go. Each library has it's own `CdnFallbackExression`. You have to look them up.
type: AnswerComment
comment on: http://stackoverflow.com/a/27508614
score: 0

http://stackoverflow.com/q/27626106
type: Question
type: AnsweredQuestion
score: 3
tagged with: jquery-ui
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27692650
has title: Two way binding breaks in Ember when using a jquery ui dialog
answer count: 2
downvote count: 0
has body: Here are my routes: ExtractCreator.Router.map(function () { this.route('filter', { path: '/' }, function () { this.route('geog_levels'); }); }); Here's my view which creates the jquery ui popup: ExtractCreator.FilterGeogLevelsView = Ember.View.extend({ didInsertElement : function(){ var controller = this.controller; $('#filter-dialog').dialog({ modal:true, stack: false, title: "Geogography Levels Filter", close: function(e,ui) { controller.transitionToRoute('filter'); }, }).dialog("moveToTop"); } }); And the template: {{#each geog_level_group in model}} &lt;h3&gt;{{geog_level_group.label}}&lt;/h3&gt; {{#each geog_level_filter in geog_level_group.geog_level_filters}} &lt;div {{bind-attr class="geog_level_filter.disabled?:disabled"}}&gt; &lt;label&gt;{{geog_level_filter.label}} - {{geog_level_filter.id}}&lt;/label&gt; {{input type="text" value=geog_level_filter.label }} &lt;/div&gt; {{/each}} {{/each}} I'm binding the inputs to my model in the template, but whenever I type anything in the input field it doesn't update anywhere else on the page, nor does it show as updated in my (chrome) ember inspector's view of the model. If I change the value manually from the ember inspector, then it updates inside the popup correctly. If I take it out of the popup (or just remove the popup code), then everything binds correctly and the label will update when I change the input value. How do I get correct binding behavior to work from inside the dialog?
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27630276
tagged with: ember.js
has comment: http://stackoverflow.com/comment/43674857
has answer: http://stackoverflow.com/a/27692650
possible better answer: http://stackoverflow.com/a/27630276
upvote count: 3

http://stackoverflow.com/a/27622059
has body: rowList = rowList.sort(function(a, b) { return a.id.localeCompare(b.id); });
has comment: http://stackoverflow.com/comment/43664726
has comment: http://stackoverflow.com/comment/43664691
type: Answer
upvote count: 2
has comment: http://stackoverflow.com/comment/43664767
downvote count: 2
has comment: http://stackoverflow.com/comment/43664624
has comment: http://stackoverflow.com/comment/43664657
has comment: http://stackoverflow.com/comment/43664712
score: 0
answers question: http://stackoverflow.com/q/27622015

http://stackoverflow.com/q/27529773
has body: I have a collection below var Collection = Backbone.Collection.extend({ model: Model, url: 'messages', defaults :{ subject: 'this is subject', message: 'This is message' } }); Now what I want is when the ajax request to message is failed the I want to my app to use defaults data but my current app does not use that. Below is the way I am using it. var collection = new Collection(); collection.fetch().then(function () { new SomeView({ collection: collection }); }, function (status, error) { new SomeView({ collection: collection }); }); What I am doing in above code is if fetch is successful or failed still I am calling the same view and passing the same collection. Now when it is failed then collection should have defaults contents. But it does not have them unfortunately. The main purpose of doing this way is I want my application to work even if there is not server available should be able to work with static data present in default attribute in collection. Is it possible if yes then how can I make it work?
has answer: http://stackoverflow.com/a/27534957
type: Question
upvote count: 2
tagged with: javascript
tagged with: jquery
answer count: 1
favorite count: 0
tagged with: backbone.js
type: UnansweredQuestion
has title: How to use defaults attribute when ajax request to the server is failed
score: 2
downvote count: 0

http://stackoverflow.com/comment/43512422
comment on: http://stackoverflow.com/a/27539076
type: AnswerComment
has text: Yeas and then I have a file called `WebAppInterface.java` In hear i have many functions that i call from my javascript like `Android.showCategories()` Is this where im going to have to call my barcode scan function, and not in the `MainActivity` Which makes sense but then some of the default functions are not defined. such as `startActivityForResult(intent, 0);` and a constant `RESULT_OK` Any advice for this?
score: 0
type: Comment

http://stackoverflow.com/comment/43390196
type: Comment
has text: `this` is set by how a function is called. So, unless you replace this by using something like `.bind()` it is set by how it's called and since `baz` is method of `bar`, when you call `baz` as `bar.baz()`, `this` will be `bar`. Generally, nesting methods that are all meant to operate on the same parent object like this is way more trouble than it's worth because you have to constantly reset `this`. You can hack it to work, but it is not how the language was designed to work.
type: QuestionComment
comment on: http://stackoverflow.com/q/27478248
score: 0

http://stackoverflow.com/comment/43568530
comment on: http://stackoverflow.com/q/27571576
type: Comment
type: QuestionComment
has text: If by better you more more elegant, definitely the first one.
score: 0

http://stackoverflow.com/q/27596639
has body: A lot of people use plugins like Adblock to avoid banners on websites. If you can detect that plugin, you can easily display an image or text of your preference. What's a good approach to achieve that requirement with jQuery?
downvote count: 0
tagged with: javascript
tagged with: jquery
answer count: 1
has answer: http://stackoverflow.com/a/27596640
favorite count: 0
tagged with: adsense
upvote count: 1
type: AnsweredQuestion
has title: How to detect if something is blocking Adsense with jQuery?
score: 1
accepted answer: http://stackoverflow.com/a/27596640
type: Question

http://stackoverflow.com/q/27552620
has comment: http://stackoverflow.com/comment/43531528
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27553574
has title: Some problems in IE11
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43532048
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43532066
has comment: http://stackoverflow.com/comment/43531556
type: Question
has answer: http://stackoverflow.com/a/27553574
tagged with: internet-explorer
has comment: http://stackoverflow.com/comment/43531988
has comment: http://stackoverflow.com/comment/43535123
has body: The problem is that I have created a dynamic navigation... You click on a a-tag which has a function that displays some buttons. I have assigned the function to the a-tag with an addEventListener. It works in all the browsers, but IE... When I click the tag, buttons are not becoming visible. And no error appears. P.S.: I'm spanish btw, I'm sorry about my english :3 /* Javascript */ window.onload = function() { var boton_menu = document.getElementById("boton_menu"); /* Compatibilidad con navegadores web */ if(boton_menu.addEventListener){ boton_menu.addEventListener("click", menu_usuario, false); } else { if(boton_menu.attachEvent){ boton_menu.attachEvent("onclick", menu_usuario); } } } /* Despliega el menú del usuario*/ function menu_usuario() { var boton_menu = document.getElementById("boton_menu"); var perfil = document.getElementById("perfil"); var ajustes = document.getElementById("ajustes"); var desconectar = document.getElementById("desconectar"); if(boton_menu.className == ""){ boton_menu.className = "active"; perfil.className = "active"; ajustes.className = "active"; desconectar.className = "active"; } else { boton_menu.className = ""; perfil.className = ""; ajustes.className = ""; desconectar.className = ""; } }
score: 0

http://stackoverflow.com/q/27572943
has comment: http://stackoverflow.com/comment/64337176
has answer: http://stackoverflow.com/a/27575123
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/70402255
downvote count: 0
accepted answer: http://stackoverflow.com/a/27575123
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/66156567
tagged with: rest
has comment: http://stackoverflow.com/comment/70403225
score: 9
type: Question
tagged with: loopbackjs
has body: I'm using Loopback from Strongloop as a REST framework and ORM. I want to use TypeScript for my business logic. However, Loopback requires JavaScript with a specific shape to support their framework. For example: module.exports = function(Person){ Person.greet = function(msg, cb) { cb(null, 'Greetings... ' + msg); } Person.remoteMethod( 'greet', { accepts: {arg: 'msg', type: 'string'}, returns: {arg: 'greeting', type: 'string'} } ); }; What is the TypeScript code that will generate the above JavaScript code?
tagged with: strongloop
has comment: http://stackoverflow.com/comment/64337407
answer count: 1
tagged with: typescript
upvote count: 9
has comment: http://stackoverflow.com/comment/64337780
has title: How to use TypeScript with Loopback
has comment: http://stackoverflow.com/comment/64343118

http://stackoverflow.com/a/27566426
has comment: http://stackoverflow.com/comment/43558127
has comment: http://stackoverflow.com/comment/43557786
has body: It seems that you might need a javascript confirm box. You can find a simple tutorial here http://www.w3schools.com/js/js_popup.asp and here is the demo http://www.w3schools.com/js/tryit.asp?filename=tryjs_confirm I hope this will help you
score: 0
has comment: http://stackoverflow.com/comment/43557728
has comment: http://stackoverflow.com/comment/43557915
has comment: http://stackoverflow.com/comment/43558459
type: Answer
answers question: http://stackoverflow.com/q/27566252

http://stackoverflow.com/q/27519190
tagged with: jquery
has body: I can get pages to load properly with ajax/animations when links are simple like "about.php" or contact.php", but smoothState is having trouble when I am trying to use it from search results / product pages. For example from "search.php?clearSearch=true&amp;searchPhrase=blue" to "product/27/Product-Blue.html" it looks like it tries to load for a short while (cursor style changes) and then after a second or so gives up and reloads the page with the new url.
favorite count: 0
tagged with: ajax
upvote count: 2
type: UnansweredQuestion
score: 2
answer count: 0
type: Question
tagged with: javascript
has title: smoothState.js and dynamic urls?
downvote count: 0

http://stackoverflow.com/comment/43437825
type: Comment
type: QuestionComment
has text: `<a href="#popup-1?a=<?php echo $new ?>"> Click Me `
score: 0
comment on: http://stackoverflow.com/q/27503827

http://stackoverflow.com/q/27504207
has comment: http://stackoverflow.com/comment/43449249
duplicate of: http://stackoverflow.com/q/8729319
type: Question
has title: Submit a form using Javascript with input named submit
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43438431
tagged with: javascript
has body: I have a HTML form where one of the inputs is called named submit I also have a nicely formatted HTML element inside the form which is supposed to submit the form on click. I noticed that form.submit is overridden by the input field which is named submit so I can't call form.submit() anymore. I've searched for an answer, the general response is to rename the input. However I cannot do that. submit most appear as a parameter with a value in the request body. Example code: search Keep in mind that my constraints are the following: the element which the users clicks to submit the form is contains other formatted elements submit is a required parameter in the request body the request method must be POST cannot make any modifications to the back-end PS: this is my first question on stack overflow, love this site.
score: 4
tagged with: forms
accepted answer: http://stackoverflow.com/a/27504420
tagged with: post
answer count: 3
favorite count: 0
has answer: http://stackoverflow.com/a/27504420
has comment: http://stackoverflow.com/comment/43448945
linked to: http://stackoverflow.com/q/8729319
possible better answer: http://stackoverflow.com/a/27504352
has answer: http://stackoverflow.com/a/27504352
tagged with: http://stackoverflow.com/tag/html
upvote count: 4
downvote count: 0
has answer: http://stackoverflow.com/a/27505544

http://stackoverflow.com/comment/43402925
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27482779
score: 0
has text: It is stored in my local machine C drive

http://stackoverflow.com/q/27485878
accepted answer: http://stackoverflow.com/a/27486043
answer count: 2
has answer: http://stackoverflow.com/a/27486126
has title: Is `-moz-transform: scale(2)` equivalent to CSS `zoom: 2`?
has body: Is -moz-transform: scale(2) equivalent to CSS zoom: 2? I tried -moz-transform but unlike zoom it cuts the top portions off my webpage. function zoomOneX() { document.body.style.zoom = 1.2; if (navigator.userAgent.indexOf("Firefox") != -1) { $('body').css('-moz-transform', 'scale(1.2,1.2)'); } }
downvote count: 0
favorite count: 0
type: AnsweredQuestion
score: 3
upvote count: 3
type: Question
has answer: http://stackoverflow.com/a/27486043
tagged with: firefox
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27486126

http://stackoverflow.com/q/27546587
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: How do I hide the tooltip after I click the dropdown menu? Here is the script This is the html link link
favorite count: 0
has answer: http://stackoverflow.com/a/27547219
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/43519540
has title: Tooltip onclick to hide
has comment: http://stackoverflow.com/comment/43519576
downvote count: 1
type: Question

http://stackoverflow.com/q/27486452
has title: JavaScript split string around emails
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43404702
upvote count: 3
has answer: http://stackoverflow.com/a/27489801
has comment: http://stackoverflow.com/comment/43405117
downvote count: 3
possible better answer: http://stackoverflow.com/a/27486487
has comment: http://stackoverflow.com/comment/43404682
type: Question
has answer: http://stackoverflow.com/a/27486487
accepted answer: http://stackoverflow.com/a/27486698
tagged with: javascript
linked to: http://stackoverflow.com/q/46155
score: 0
answer count: 3
tagged with: email
has comment: http://stackoverflow.com/comment/43404993
favorite count: 0
has body: So I have this list of emails: john.doe@doe.com john.doe@doe.com john.doe@doe.com john.doe@doe.com john.doe@doe.com john.doe@doe.com john.doe@doe.com john.doe@doe.com It comes through as a string, sometimes with a return character at the end of each line, sometimes it doesn't. All I want to be able to do is pull out each email from the string using regex. So I've got this regex exp from here: function validateEmail(email) { var re = /^(([^&lt;&gt;()[\]\\.,;:\s@\"]+(\.[^&lt;&gt;()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; return re.test(email); } How do I get it to match many email addresses and return me each individual email? I do not want to split on a return character, I can't always garauntee that it will be that character that will split the list up. These emails are pasted in from the users clipboard. If it were that easy, I wouldn't have asked ;)
has answer: http://stackoverflow.com/a/27486698
has comment: http://stackoverflow.com/comment/43405131
tagged with: regex

http://stackoverflow.com/comment/43495855
comment on: http://stackoverflow.com/q/27533682
has text: Only 3 of them for each that div with the class "myPageItem". If I had 10, for instance, I wanted to show 4 myPageItem div's, 3 with 3 itemToBeRepeated and 1 with only one itemToBeRepeated.
type: QuestionComment
type: Comment
score: 0

http://stackoverflow.com/a/27622375
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43668410
accepted answer of: http://stackoverflow.com/q/27622186
type: Answer
has body: To expand the first accordion: $(".accordion:first").accordion('option', 'active', 0);
has comment: http://stackoverflow.com/comment/43668393
has comment: http://stackoverflow.com/comment/43668488
answers question: http://stackoverflow.com/q/27622186
has comment: http://stackoverflow.com/comment/43668659
has comment: http://stackoverflow.com/comment/43668872
score: 0
has comment: http://stackoverflow.com/comment/43668464

http://stackoverflow.com/comment/43684015
type: QuestionComment
comment on: http://stackoverflow.com/q/27631785
score: 0
type: Comment
has text: @ Kelsadita - you should to fill data into id="one" only. not alert.

http://stackoverflow.com/comment/71723621
has text: This is a neat hack but if you're copying too many files over you'll run out of memory.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/35177460
score: 2

http://stackoverflow.com/a/27554408
accepted answer of: http://stackoverflow.com/q/27554059
score: 1
has body: The reason why your fade happens before all images are loaded is because the .fadeOut() happens before all .load() callbacks are finished. Also which version of jQuery are you using? .load() for the onload-event was deprecated in version 1.8. You should use .on('load', handler) instead. I would use Promises to code this. Checkout https://github.com/kriskowal/q and https://github.com/gre/qimage And the code would look something like Q.all([Qimage(img1Url),Qimage(img2Url),Qimage(img3Url)]).spread(function(img1,img2,img3){ $('#imageContainer').append(img1); $('#imageContainer').append(img2); $('#imageContainer').append(img3); $('.loader').fadeOut(); },function(error){ console.error(error); });
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27554059
type: Answer
upvote count: 1

http://stackoverflow.com/q/27606198
linked to: http://stackoverflow.com/q/6836740
has title: In Django, how would I display a site abbreviation in an admin form rather than the full site domain?
tagged with: forms
type: Question
tagged with: django-admin
has answer: http://stackoverflow.com/a/27626506
tagged with: javascript
upvote count: 1
answer count: 1
favorite count: 0
type: UnansweredQuestion
tagged with: django
tagged with: python
has body: So we are using Django's sites contrib app, and a particular page in the admin is going to be pretty packed, so we're saving space any way we can. Our site profiles each have an abbreviation associated with it, which would tighten things up a lot, so we want to use those instead of the full names in the admin form. Not sure what the best way of doing this is. I saw this post, and it looked like it might be along the lines of what I'm after, but I really don't want to have to create an entirely new form. Seems like overkill just to make a single field display differently. Any ideas on what the best way to do this is? Presently, I'm thinking about a javascript solution -- send over a map with the abbreviations keyed to the site ids and do some replacing, but that seems a little hacky.
downvote count: 0
score: 1

http://stackoverflow.com/comment/43470746
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27520418
has text: @AlokSwain how do i mark your answer as the correct answer?
score: 0

http://stackoverflow.com/comment/43416191
type: Comment
type: QuestionComment
has text: Hi, to be honest all I've tried has been on Codepen so I don't have anything saved. I can't help thinking this is such a simple problem (clearly, I'm simpler!) which is why I can't find an easy answer.
comment on: http://stackoverflow.com/q/27492271
score: 0

http://stackoverflow.com/comment/43445518
type: QuestionComment
comment on: http://stackoverflow.com/q/27506310
has text: In fact, I do the same thing. I removed the line ".replace (/ \\ / g," \\ ")" but it changes nothing. I have an error sending me "An error occurred" because of my job: submitFailed function (error) { alert ('An error occurred.'); resetRealPersonCaptcha (); $ ("# submitArea") empty () html (contentSubmit)..; } If I put everything on one line, it works
score: 0
type: Comment

http://stackoverflow.com/a/27557362
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27556976
answers question: http://stackoverflow.com/q/27556976
type: Answer
has body: You simply need to provide a range that behaves accordingly: scale.range([100,0]); Note that you could also reverse the domain in this case with the same effect.
score: 2
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/q/27547192
tagged with: google-maps-api-3
score: 0
has comment: http://stackoverflow.com/comment/43520793
type: UnansweredQuestion
has body: With the code below, I display a journey betwen two points. Now I try to use direction result object and direction leg to get information like steps, legs or distance in a variable, but I have no idea to how use this method... var directionsDisplay; var directionsService = new google.maps.DirectionsService(); var map; var haight = new google.maps.LatLng(44.912198, -0.605530); var oceanBeach = new google.maps.LatLng(44.893356, -0.739138); function initialize() { directionsDisplay = new google.maps.DirectionsRenderer(); var mapOptions = { zoom: 14, center: haight } map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); directionsDisplay.setMap(map); calcRoute() } calcRoute() function calcRoute() { var request = { origin: haight, destination: oceanBeach, // Note that Javascript allows us to access the constant // using square brackets and a string value as its // "property." travelMode: google.maps.TravelMode.DRIVING }; directionsService.route(request, function (response, status) { if (status == google.maps.DirectionsStatus.OK) { directionsDisplay.setDirections(response); } }); } google.maps.event.addDomListener(window, 'load', initialize); Thanks
upvote count: 1
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27556758
has title: How to use direction route object to get data
has comment: http://stackoverflow.com/comment/43523464
answer count: 1
tagged with: javascript
favorite count: 0

http://stackoverflow.com/comment/43629796
score: 1
has text: Because you already took the 32 bottles down? Your fiddle is working for me too, so you probably didn't scroll your console up or something like that. EDIT: Yeah, FF console is stupid. Use Chrome.
type: QuestionComment
comment on: http://stackoverflow.com/q/27603724
type: Comment

http://stackoverflow.com/comment/43403000
type: Comment
has text: echo would show the results, so it Data variable in js will have th same value.. @foobar
comment on: http://stackoverflow.com/a/27476206
score: 0
type: AnswerComment

http://stackoverflow.com/q/27613143
tagged with: javascript
has title: c3js, keep x axis tick values and remove points
has answer: http://stackoverflow.com/a/27613830
linked to: http://stackoverflow.com/q/27469937
favorite count: 0
tagged with: c3.js
score: 6
upvote count: 6
accepted answer: http://stackoverflow.com/a/27613830
type: AnsweredQuestion
has body: I have this chart, with an x axis that loads close to a thousand timeseries points. These points are unattractive. I could hide the x axis, but I want the dates to appear underneath, minus the tick points. Is there a way to remove tick points while leaving the times. (Please ignore numbers on x axis I know they're wrong). Preferably, I would like this to be a category line chart and avoid timeseries entirely. Code, with removed data for simplicity - var chart = c3.generate({ padding: { right: 30 }, data: { x: 'x', columns: [ ['x',1324252800,1324339200], ['OECD Crude Oil Price',102.91,105.05] ], type: 'line', onclick: function (d, element) { console.log("onclick", d, element); }, onmouseover: function (d) { console.log("onmouseover", d); }, onmouseout: function (d) { console.log("onmouseout", d); }, order: null }, point: { show: false }, axis: { x: { //show:false, //I don't want this, I want to see the dates type: 'timeseries', tick: { culling: { max: 3 }, multiline: false } }, y: { tick: { format: function (d) { return "$ " + d ; } } } }, }); Thanks in advance
type: Question
answer count: 1
downvote count: 0

highcharts
tags question: http://stackoverflow.com/q/27625791
tags question: http://stackoverflow.com/q/27510810
tags question: http://stackoverflow.com/q/27605459
tags question: http://stackoverflow.com/q/27521359
tags question: http://stackoverflow.com/q/27516494
tags question: http://stackoverflow.com/q/27613875
tags question: http://stackoverflow.com/q/27624779
tags question: http://stackoverflow.com/q/27524069
tags question: http://stackoverflow.com/q/27572026
tags question: http://stackoverflow.com/q/27550626
tags question: http://stackoverflow.com/q/27634331
tags question: http://stackoverflow.com/q/27524851
tags question: http://stackoverflow.com/q/27582007
tags question: http://stackoverflow.com/q/27536082
tags question: http://stackoverflow.com/q/27592557
tags question: http://stackoverflow.com/q/27525516
tags question: http://stackoverflow.com/q/27478077
tags question: http://stackoverflow.com/q/27552631
tags question: http://stackoverflow.com/q/27528944
tags question: http://stackoverflow.com/q/27545781
tags question: http://stackoverflow.com/q/27533379
tags question: http://stackoverflow.com/q/27497707
tags question: http://stackoverflow.com/q/27605630
tags question: http://stackoverflow.com/q/27554345
tags question: http://stackoverflow.com/q/27562172
tags question: http://stackoverflow.com/q/27493907
tags question: http://stackoverflow.com/q/27549939
tags question: http://stackoverflow.com/q/27542928
tags question: http://stackoverflow.com/q/27602457
tags question: http://stackoverflow.com/q/27573133
tags question: http://stackoverflow.com/q/27553209
tags question: http://stackoverflow.com/q/27553505
tags question: http://stackoverflow.com/q/27639769
tags question: http://stackoverflow.com/q/27492476
tags question: http://stackoverflow.com/q/27544218
tags question: http://stackoverflow.com/q/27499167
tags question: http://stackoverflow.com/q/27639162
tags question: http://stackoverflow.com/q/27523100
tags question: http://stackoverflow.com/q/27494135
tags question: http://stackoverflow.com/q/27571715
tags question: http://stackoverflow.com/q/27567703
tags question: http://stackoverflow.com/q/27577573
tags question: http://stackoverflow.com/q/27567209
tags question: http://stackoverflow.com/q/27493578
tags question: http://stackoverflow.com/q/27534800
type: Tag
tags question: http://stackoverflow.com/q/27581018
tags question: http://stackoverflow.com/q/27583394
tag name: highcharts
tags question: http://stackoverflow.com/q/27556672
tags question: http://stackoverflow.com/q/27499174
tags question: http://stackoverflow.com/q/27606961
tags question: http://stackoverflow.com/q/27518708

http://stackoverflow.com/a/27628119
answers question: http://stackoverflow.com/q/27622041
has body: You can use the toArray method on click event for your save button. var sortedImageIds = $(".selector").sortable("toArray"); You can then use that array and send it to a controller action, where the items will be in the order from the sortable. JqueryUI API doc
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/43684341

http://stackoverflow.com/comment/43464424
score: 0
has text: Hm, that *is* odd. What 3 sockets is the `halt` event emitted to, have you logged them? Are they really the closed sockets of user1 and user2?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27516921

http://stackoverflow.com/q/27524566
tagged with: runtime-error
downvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/27525073
favorite count: 0
upvote count: 2
tagged with: properties
tagged with: logging
score: 2
type: AnsweredQuestion
has title: How to clone a javascript Error into a standard object
tagged with: clone
accepted answer: http://stackoverflow.com/a/27525073
type: Question
has body: Specifically, I'd like to convert a Javascript error to an object whose properties can be listed, and hence console.logged. try { throw new Error('418 : Blue Teapot of Death'); } catch (error) { for (var k in arg) { console.log('Key found: ' + k); } // Outputs nothing } EDIT: Using @YeahBoy solution, there is the final solution I adopted, using lodash pick function : var copy_with_enumerable_properties = function (obj) { var props = Object.getOwnPropertyNames(obj); // Include non-enumerable properties return _.pick(obj, props); }; try { throw new Error('418 : Blue Teapot of Death'); } catch (error) { var error_obj = copy_with_enumerable_properties(error); error_obj.stack = error_obj.stack.split('\n'); console.log(JSON.stringify(error_obj, null, 2)); }
tagged with: javascript

http://stackoverflow.com/a/27579379
answers question: http://stackoverflow.com/q/27520053
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27520053
has comment: http://stackoverflow.com/comment/43585494
has comment: http://stackoverflow.com/comment/43584824
type: Answer
has comment: http://stackoverflow.com/comment/43584061
has comment: http://stackoverflow.com/comment/43583400
upvote count: 2
score: 1
has comment: http://stackoverflow.com/comment/43592092
downvote count: 1
has body: Well I haven't figured out why the syntax I was trying wasn't working, but this syntax does work: $('#randomajax').html("&lt;%= render 'randajax' %&gt;");

http://stackoverflow.com/q/27548048
possible better answer: http://stackoverflow.com/a/27548593
downvote count: 0
has answer: http://stackoverflow.com/a/27548593
tagged with: javascript
has comment: http://stackoverflow.com/comment/43540118
has comment: http://stackoverflow.com/comment/43540034
has answer: http://stackoverflow.com/a/27556562
has comment: http://stackoverflow.com/comment/43540238
tagged with: validation
has body: hi guys i have a bit of an issue i cant seem to tackle i need to validate the below code to make sure before a user updates each row from the table that's displayed. the data has not been deleted so its not empty or doesn't just contain white-spaces how can i validate this using JavaScript to make sure the user hasn't deleted the data or hasn't just put white spaces in i will need to do this for about 20 results in the table so using a function would be awesome so no matter how many results are displayed each row is validated and can be update individually $result2 = mysqli_query($con,"SELECT * FROM tbl_staffmembers"); while($row2 = mysqli_fetch_array($result2)) { echo "&lt;tr&gt;&lt;td&gt;&lt;input type='text' value=' " . $row2['staffmember_firstname'] . " '&gt;&lt;/td&gt;&lt;td&gt;&lt;input type='submit' value='Update'&gt;&lt;/td&gt;&lt;/tr&gt;"; } thanks for your help in advance i know how to create function so far everything i have tried will only allow me to validate the first row that's displayed i need to be able to validate and submit each row buy its self like a shopping cart updating the quantity 1 buy 1 just to be clear i have created the below i need to validate each row separately to make sure there is no white spaces or its not empty http://jsfiddle.net/o7adxn7c/
has comment: http://stackoverflow.com/comment/43540489
has title: validate input boxes dynamically for whitespaces or if empty
favorite count: 0
upvote count: 2
accepted answer: http://stackoverflow.com/a/27556562
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43540007
has comment: http://stackoverflow.com/comment/43540233
has comment: http://stackoverflow.com/comment/43530629
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/43539961
has comment: http://stackoverflow.com/comment/43539070

http://stackoverflow.com/comment/43706666
score: 0
type: AnswerComment
type: Comment
has text: you mean to say hub and node concept?
comment on: http://stackoverflow.com/a/27642870

http://stackoverflow.com/a/27635415
score: 0
type: Answer
has body: Try this, var newString='1000'+obj1.messages[2].substring(4,obj1.messages[2].length);
answers question: http://stackoverflow.com/q/27635271

http://stackoverflow.com/q/27595596
has body: I have a Firebase database with News items, in which we will always be displaying 10 articles at a time in our front page. We want to have these articles sorted by time, so all we have been doing is pushing into our firebase ref like so: myDataRef.child("News/").push(json); What we want to do now is have functionality in which if a user clicks the next button, the 10 subsequent articles are loaded from the database. I thought about doing this by increasing a variable called page which correctly holds the current page number. The issue arises when it comes to the query itself. Since is seems that snapshot.val() is always null. myDataRef.child("News").startAt(page*10).endAt(page*10+10).once('value',function(snapshot){ console.log(snapshot.val()) }); even if I change the query to be a hard coded: myDataRef.child("News").startAt(0).endAt(10).once('value',function(snapshot){ console.log(snapshot.val()) }); It still logs a null. I am sure the "News" db has at least 50 entries in it. So I am confident the mistakes are at the query. Any help is appreciated!
has comment: http://stackoverflow.com/comment/43674624
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
has title: Beginner Firebase in JS: Getting the subsequent k items
favorite count: 0
linked to: http://stackoverflow.com/q/16628362
has comment: http://stackoverflow.com/comment/43615630
upvote count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27595714
tagged with: firebase
score: 2

http://stackoverflow.com/a/27487694
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27487518
answers question: http://stackoverflow.com/q/27487518
score: 2
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: You could create a helper function thats checks if an array contains an item with a matching property value, something like this: function checkForMatch(array, propertyToMatch, valueToMatch){ for(var i = 0; i &lt; array.length; i++){ if(array[i][propertyToMatch] == valueToMatch) return true; } return false; } which you can then use like so: arrayOfResults.forEach(function (entry) { if (!checkForMatch(array, "id", entry.id)) { array.push(entry); } });

forms
tags question: http://stackoverflow.com/q/27486177
tags question: http://stackoverflow.com/q/27546104
tags question: http://stackoverflow.com/q/27631362
tags question: http://stackoverflow.com/q/27572544
tags question: http://stackoverflow.com/q/27594456
type: Tag
tags question: http://stackoverflow.com/q/27589961
tags question: http://stackoverflow.com/q/27500237
tags question: http://stackoverflow.com/q/27490663
tags question: http://stackoverflow.com/q/27623676
tags question: http://stackoverflow.com/q/27548130
tags question: http://stackoverflow.com/q/27606198
tags question: http://stackoverflow.com/q/27614347
tags question: http://stackoverflow.com/q/27621653
tags question: http://stackoverflow.com/q/27538494
tags question: http://stackoverflow.com/q/27501084
tags question: http://stackoverflow.com/q/27482073
tags question: http://stackoverflow.com/q/27610165
tags question: http://stackoverflow.com/q/27567816
tags question: http://stackoverflow.com/q/27623241
tags question: http://stackoverflow.com/q/27493732
tags question: http://stackoverflow.com/q/27492376
tags question: http://stackoverflow.com/q/27492271
tags question: http://stackoverflow.com/q/27515472
tags question: http://stackoverflow.com/q/27594960
tags question: http://stackoverflow.com/q/27504207
tags question: http://stackoverflow.com/q/27513401
tags question: http://stackoverflow.com/q/27532880
tags question: http://stackoverflow.com/q/27509633
tags question: http://stackoverflow.com/q/27529472
tags question: http://stackoverflow.com/q/27490053
tags question: http://stackoverflow.com/q/27559939
tags question: http://stackoverflow.com/q/27600506
tags question: http://stackoverflow.com/q/27571040
tags question: http://stackoverflow.com/q/27475960
tags question: http://stackoverflow.com/q/27624044
tags question: http://stackoverflow.com/q/27563856
tags question: http://stackoverflow.com/q/27479496
tags question: http://stackoverflow.com/q/27578544
tags question: http://stackoverflow.com/q/27507791
tags question: http://stackoverflow.com/q/27529615
tags question: http://stackoverflow.com/q/27581667
tags question: http://stackoverflow.com/q/27506564
tags question: http://stackoverflow.com/q/27548993
tags question: http://stackoverflow.com/q/27554520
tags question: http://stackoverflow.com/q/27585117
tags question: http://stackoverflow.com/q/27554993
tags question: http://stackoverflow.com/q/27493539
tag name: forms
tags question: http://stackoverflow.com/q/27501582
tags question: http://stackoverflow.com/q/27624971
tags question: http://stackoverflow.com/q/27589912
tags question: http://stackoverflow.com/q/27483307
tags question: http://stackoverflow.com/q/27516077
tags question: http://stackoverflow.com/q/27638972
tags question: http://stackoverflow.com/q/27609212
tags question: http://stackoverflow.com/q/27489496
tags question: http://stackoverflow.com/q/27573164
tags question: http://stackoverflow.com/q/27521708
tags question: http://stackoverflow.com/q/27496645
tags question: http://stackoverflow.com/q/27619303
tags question: http://stackoverflow.com/q/27476919
tags question: http://stackoverflow.com/q/27497347
tags question: http://stackoverflow.com/q/27624201
tags question: http://stackoverflow.com/q/27633108
tags question: http://stackoverflow.com/q/27563755
tags question: http://stackoverflow.com/q/27516971
tags question: http://stackoverflow.com/q/27494063
tags question: http://stackoverflow.com/q/27526411
tags question: http://stackoverflow.com/q/27514097
tags question: http://stackoverflow.com/q/27493824

http://stackoverflow.com/a/27492389
upvote count: 1
answers question: http://stackoverflow.com/q/27492320
downvote count: 0
has body: You can do it like this: $('input.playerCheckbox').on('change', function(event) { $(this).closest("li").css('backgroundColor', 'rgba(255,102,51,0.15)'); }); It might also be worth adding that this will not remove the background colour when the checkbox is deselected. Therefore I would just use a class that you can remove and apply as appropriate.
type: Answer
has comment: http://stackoverflow.com/comment/43492483
score: 1

http://stackoverflow.com/q/27597775
has comment: http://stackoverflow.com/comment/43619100
has comment: http://stackoverflow.com/comment/43722627
possible better answer: http://stackoverflow.com/a/27597872
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/27597872
tagged with: arrays
tagged with: javascript
has answer: http://stackoverflow.com/a/27597798
favorite count: 0
score: 0
has title: Remove an object from an array
upvote count: 1
tagged with: arrayobject
linked to: http://stackoverflow.com/q/208105
downvote count: 1
accepted answer: http://stackoverflow.com/a/27597798
has body: What is the way to remove an property named "itemType"from the below given object ? { "id": 19, "cost": 10, "items": 10, "numbers": 10, "status": false, "hours": 10, "itemType": { "id": 16, "name": "PC 350", "description": "PC 350" }, "typeid": 12 } So that the final array should look like { "id": 19, "cost": 10, "items": 10, "numbers": 10, "status": false, "hours": 10, "typeid": 12 }
type: AnsweredQuestion

http://stackoverflow.com/q/27558464
type: Question
tagged with: internet-explorer
has comment: http://stackoverflow.com/comment/43543314
has comment: http://stackoverflow.com/comment/43543254
tagged with: internet-explorer-11
tagged with: javascript
has body: I am not sure why the getSelection method is not returning me the selected text. What I have is a reference to an iframe object where I call its' contentwindow property and then use that to find another iframe inside that iframe. var iFramed = i.contentWindow.frameElement when I do a console.log(iFramed) I get the iframe and see that it is correct, but when I do console.log(iFramed.contentWindow.getSelection()) and console.log(iFramed.contentDocument.getSelection()) the selection object I get back is empty, and I know that there are selected text. Any insight as to why? This is a special case that I am doing for IE11. Here is whatconsole.log(iFramed) looks like here is what the selection object look like Update I focused the iframe and is now able to get the entire body in the selection object, but I am still not able to get the selected text
score: 0
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/1471759
has title: getSelection does not return selected text - ie11
answer count: 0
type: UnansweredQuestion
tagged with: iframe

http://stackoverflow.com/q/27489391
favorite count: 0
tagged with: angularjs
has title: angular json related functions against native js
upvote count: 1
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
type: Question
has answer: http://stackoverflow.com/a/27489562
answer count: 1
downvote count: 0
tagged with: javascript
score: 1
accepted answer: http://stackoverflow.com/a/27489562
has body: angular.toJson( obj, pretty ); angular.fromJson( json ); vs JSON.stringify( obj ) JSON.parse( json ) I used to use native ones, but started to use angular ones for consistency. Any other reasons to use those?

http://stackoverflow.com/a/27535231
has comment: http://stackoverflow.com/comment/43499085
score: 0
has comment: http://stackoverflow.com/comment/43499169
has comment: http://stackoverflow.com/comment/43498998
type: Answer
answers question: http://stackoverflow.com/q/27535140
has comment: http://stackoverflow.com/comment/43499129
has body: You should use your count variable, because: When you you do store[1] = data.toString();, for example, you get an array [undefined, 1] with length = 2. And you want it to be 1.
has comment: http://stackoverflow.com/comment/43498911

http://stackoverflow.com/comment/51404213
type: Comment
comment on: http://stackoverflow.com/a/29624948
score: 0
type: AnswerComment
has text: @Katana24 You just saved me a lot of time, thanks a lot!

http://stackoverflow.com/comment/43497261
has text: This is more complicated than just detecting when a user leaves a page - you also need to detect when a user closes their browser. For the first case, you can use [iron:router's `onStop` hook for your route](https://github.com/EventedMind/iron-router/blob/devel/Guide.md#available-hook-methods). For the second case, you can use the [mizzao:user-status](https://atmospherejs.com/mizzao/user-status) package.
comment on: http://stackoverflow.com/q/27533942
type: QuestionComment
type: Comment
score: 2

http://stackoverflow.com/q/27517779
duplicate of: http://stackoverflow.com/q/2664045
accepted answer: http://stackoverflow.com/a/27517811
downvote count: 0
has body: I'm so defeated I'm prepared to suffer any abuse to find out why I can't do something as simple as get the onload function to tell me the body font size is 20pt. I've read till my eyes bleed, and everyone but me seems able to make the script below work. But my #@!/%#! code vomits an alert box with the following:(I used two lines to be sure it wasn't a case problem) [ ] [undefined] Actually, my goal was to use scritp that executed in the head section, or onload, to read the screen width, and set the body font size by formula. [Next try will be to leave the body tag out of the code, and have the script document.write() in a body tag with style specs that sets the body font size. This below was supposed to just be a warm up exercise.] Any and all help is appreciated. Test Text The following s is as far as I got with the help of comments below. These both return font size. getComputedStyle(document.body).fontSize getComputedStyle(document.body).getPropertyValue('font-size') But they throw errors when used to set font size getComputedStyle(document.body).fontSize = "30pt"; getComputedStyle(document.body).setProperty("fontSize", "25pt", "important") ; On the other hand, these both set new font size document.body.style.fontSize = "200%"; document.getElementsByTagName("body")[0].style.fontSize = "400%"; But they both return a string of lenght 0 when asked for font size. document.body.style.fontSize document.getElementsByTagName("body")[0].style.fontSize Here's an onload function to confirm it with: onload=function(){ var msg = "onload:\n"; /* these both return font size.*/ msg += "1. [ " + getComputedStyle(document.body).fontSize + "]\n"; msg += "2. [ " + getComputedStyle(document.body).getPropertyValue('font-size') + "]\n"; /* these both return a string of lenght 0.*/ msg += "3. [ " + document.body.style.fontSize + "]\n"; msg += "4. [ " + document.getElementsByTagName("body")[0].style.fontSize + "]\n"; /*these both throw errors*/ try { getComputedStyle(document.body).fontS…
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27517821
has answer: http://stackoverflow.com/a/27517821
type: Question
score: 2
type: AnsweredQuestion
has title: element.style.fontSize does not return size
favorite count: 0
upvote count: 2
answer count: 2
has answer: http://stackoverflow.com/a/27517811
linked to: http://stackoverflow.com/q/2664045

http://stackoverflow.com/q/27625935
has comment: http://stackoverflow.com/comment/43674493
has answer: http://stackoverflow.com/a/27649858
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/43674526
tagged with: phantomjs
has comment: http://stackoverflow.com/comment/43672986
tagged with: javascript
type: UnansweredQuestion
upvote count: 4
score: 3
has body: I'm trying to get casperjs working with the following situation: A web page loads, then within that page, it ajax loads data items along with a 'read more' button which in turn loads some more data items. I need the script to recursively check if the 'read more' button exists (as there are many data items to load), if so, click it, else continue with the rest of the script and output the full page as a jpeg. I've tried by writing the code below, but it doesn't loop as I had hoped. It just clicks the button once, then outputs the image, even though more data loads, and the button still exists for clicking again. var casper = require('casper').create({ verbose : true, logLevel : 'debug', pageSettings : { "userAgent" : 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.10 (KHTML, like Gecko) Chrome/23.0.1262.0 Safari/537.10', "loadImages" : false, "webSecurityEnabled" : false, "ignoreSslErrors" : true }, }); var urls = { login : 'http://www.website.com/login', details : 'http://www.website.com/details', }; casper.start(urls.login, function() { //login stuff }); //the function I'm trying to recursively loop before moving on to saving the capture image function checkMore() { //check to see if the 'read more' button exists if (casper.exists('a.read-more')) { //click the button to load more items casper.click('a.read-more'); //wait for the items to load, then run the check again casper.wait(3000, function() { casper.run(checkMore); }); } } casper.thenOpen(urls.details, function() { //wait for the page along with ajax items to load shortly after this.wait(3000, function() { this.run(checkMore); }); }); casper.then(function() { //output the result this.capture('output.jpg'); }); casper.run();
favorite count: 0
has title: How can I make casperjs repeat a loop until a certain condition is met?
type: Question
has comment: http://stackoverflow.com/comment/43672897
tagged with: casperjs

http://stackoverflow.com/a/27495758
has body: $('.slot_totals').html() will always return the html of the first element in the collection represented by the selector. This is basically true for almost all jQuery getters since only one value can be returned You could use eq() to define the matching indexed element. var $slotTotal = $('.slot_totals').eq($i).html().split(" "); Reference: eq() Docs
upvote count: 3
score: 3
answers question: http://stackoverflow.com/q/27495689
downvote count: 0
type: Answer

http://stackoverflow.com/comment/43993036
type: QuestionComment
type: Comment
has text: I am using this one: https://github.com/devdoc/SublimeLinter-jslint
score: 0
comment on: http://stackoverflow.com/q/27598430

http://stackoverflow.com/a/27562078
has body: The core library doesn't give you any support for numbers that don't fit into the native number type, so you'll probably want to use a third party library to help you with large decimals. For example, https://mikemcl.github.io/decimal.js/ new Decimal('1e+30').toFixed() // "1000000000000000000000000000000"
type: Answer
has comment: http://stackoverflow.com/comment/43550135
upvote count: 6
downvote count: 1
answers question: http://stackoverflow.com/q/27561913
score: 5
has comment: http://stackoverflow.com/comment/43549926
has comment: http://stackoverflow.com/comment/43568615
has comment: http://stackoverflow.com/comment/43551833

http://stackoverflow.com/q/27622594
tagged with: http://stackoverflow.com/tag/html
tagged with: php
type: AnsweredQuestion
tagged with: mysql
has comment: http://stackoverflow.com/comment/43666144
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/27622777
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/43665698
tagged with: google-maps
upvote count: 0
has body: I'm really wondering how I can open a page with the information I got below with a link to google maps. The code below fetch the location to an user, and puts it inside of a table. So I thought it would be neat to be able to click on the location in the table and have it to open in google maps. I'm not sure how to manipulate the information from PHP to work as an HTML link (?). &lt;td&gt;&lt;?php echo $row_User['location']; ?&gt;&lt;/td&gt; (https://www.google.com/maps/place/ ---Location name --- ) - Link to google maps. Thanks!
answer count: 1
has title: How do I open Google Maps with fetched information from DataBase with PHP/HTML (?)
favorite count: 0
has answer: http://stackoverflow.com/a/27622777

http://stackoverflow.com/comment/43485315
type: AnswerComment
comment on: http://stackoverflow.com/a/27527362
type: Comment
has text: Please check this out - http://jsfiddle.net/b2fLye17/18/. So much options to set sorting )
score: 0

http://stackoverflow.com/comment/43440181
type: Comment
comment on: http://stackoverflow.com/a/27504641
has text: @firstChild glad to hear, added to my answer
score: 0
type: AnswerComment

http://stackoverflow.com/q/27534981
has answer: http://stackoverflow.com/a/27535424
has body: Trying to translate some Javascript regex solutions to extract URLs in R. IT seems like grep should be able to handle this, but I am unsure of translating from javascript to R. The documentation here is a bit fuzzy from R. Here are the regular expressions I am trying to use to extract URLs: http URL: (https?)://(www.)?[^\s]+ bitly URL: [^https?:\/\/](bitly\.com|bit.ly)[^\s]+ www URL: \bwww.[^\s]+ Can anyone help in translating this to R?
duplicate of: http://stackoverflow.com/q/27532393
has comment: http://stackoverflow.com/comment/43499310
type: Question
tagged with: javascript
score: 0
linked to: http://stackoverflow.com/q/27532393
answer count: 1
tagged with: http://stackoverflow.com/tag/r
has title: Use JavaScript Regex in R
type: UnansweredQuestion
tagged with: regex

http://stackoverflow.com/comment/43658125
has text: i wanted to access the data from the database from the modal by passing the student id to the modal
comment on: http://stackoverflow.com/a/27617907
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27544024
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/43521318
has answer: http://stackoverflow.com/a/27544360
has title: jQuery Mobile how to set text to multiple input value
has comment: http://stackoverflow.com/comment/43551332
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43514915
has comment: http://stackoverflow.com/comment/43515031
type: Question
has answer: http://stackoverflow.com/a/27544139
answer count: 2
has body: jQM code for(var key in sessionStorage) { var item = sessionStorage.getItem(key); var viewItem = $.parseJSON(item); var titleR = viewItem.title; $(".showTitleR").val(titleR); } html code &lt;div role="main" class="ui-content"&gt; &lt;div&gt; &lt;input class="showTitleR" type="text" value="one and last value" /&gt; &lt;/div&gt; &lt;/div&gt; The problem is that I can set only one and last value. What I want is the list of all keys like this: &lt;div role="main" class="ui-content"&gt; &lt;div&gt; &lt;input class="showTitleR" type="text" value="first" /&gt; &lt;input class="showTitleR" type="text" value="..." /&gt; &lt;input class="showTitleR" type="text" value="last" /&gt; &lt;/div&gt; &lt;/div&gt; How can I solve it? Any help will be appreciated.

http://stackoverflow.com/q/27516964
answer count: 3
possible better answer: http://stackoverflow.com/a/27517015
linked to: http://stackoverflow.com/q/6116474
favorite count: 0
has body: Problem I know how to find out if a string contains a substring like this where you are looking for one word: var s = "define foo"; alert(s.indexOf("define") &gt; -1); But how could I check for multiple different words/substrings using an array? Example not working code that makes sense in my mind but doesn't work: query = "Define what is grape juice and how to drink it?" var terms = ["define", "what is", "how to"]; alert(query.indexOf(terms) &gt; -1); Thanks~!
accepted answer: http://stackoverflow.com/a/27517116
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has title: How to check if string has a matching substring by array
has answer: http://stackoverflow.com/a/27517116
tagged with: arrays
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: string
has answer: http://stackoverflow.com/a/27517015
has answer: http://stackoverflow.com/a/27517006

http://stackoverflow.com/q/27584750
answer count: 1
has title: To-do list html page using local storage
has comment: http://stackoverflow.com/comment/43594057
tagged with: dom
upvote count: 0
has body: I need to write a page that asks the user to enter a task, and the color that he wants the task to be having ... tried some codes but i'll show you my last try, the problem is that the color of all tasks gets updated with the new value OR it does't apply the given color at all. HTML5 Canvas Example ADD A TASK TO YOUR TO DO LIST: Task: Color:
tagged with: javascript
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/43594108
tagged with: http://stackoverflow.com/tag/html
score: -2
favorite count: 0
downvote count: 2
has answer: http://stackoverflow.com/a/27584895
tagged with: local-storage

jsp
tags question: http://stackoverflow.com/q/27610356
tags question: http://stackoverflow.com/q/27627108
tags question: http://stackoverflow.com/q/27504891
tags question: http://stackoverflow.com/q/27538144
tags question: http://stackoverflow.com/q/27561568
tags question: http://stackoverflow.com/q/27582965
tags question: http://stackoverflow.com/q/27516503
tags question: http://stackoverflow.com/q/27570306
tags question: http://stackoverflow.com/q/27572574
tags question: http://stackoverflow.com/q/27500315
tags question: http://stackoverflow.com/q/27621181
tags question: http://stackoverflow.com/q/27524364
tags question: http://stackoverflow.com/q/27533420
tags question: http://stackoverflow.com/q/27567914
tags question: http://stackoverflow.com/q/27553335
tags question: http://stackoverflow.com/q/27604353
type: Tag
tags question: http://stackoverflow.com/q/27596697
tags question: http://stackoverflow.com/q/27583628
tags question: http://stackoverflow.com/q/27550580
tags question: http://stackoverflow.com/q/27513766
tags question: http://stackoverflow.com/q/27614816
tags question: http://stackoverflow.com/q/27506815
tag name: jsp
tags question: http://stackoverflow.com/q/27564809
tags question: http://stackoverflow.com/q/27588659
tags question: http://stackoverflow.com/q/27631611
tags question: http://stackoverflow.com/q/27496052
tags question: http://stackoverflow.com/q/27519571
tags question: http://stackoverflow.com/q/27524769
tags question: http://stackoverflow.com/q/27513626

http://stackoverflow.com/a/41458246
answers question: http://stackoverflow.com/q/27506111
score: 0
type: Answer
has body: Thank you everyone, this is what I used though, function myfunction(x,x2){ var date1 = new Date(x); var MyDateString; MyDateString = date1.getFullYear()+ '/' + ('0' + (date1.getMonth()+1)).slice(-2) + '/' + ('0' + date1.getDate()).slice(-2); x2.value= MyDateString; } x, being the datepicker value and x2 being the datepicker object

http://stackoverflow.com/a/27558851
has body: I was able to solve the issue using css file: the .html file is: the .js file is: // Create a new object based of the HTMLElement prototype var fonixDiv = Object.create(HTMLElement.prototype); // Set up the element. fonixDiv.createdCallback = function() { // Create a Shadow Root var shadow = this.createShadowRoot(); shadow.innerHTML = ' click '; shadow.addEventListener('click', function(e) { console.log('1: '+this.host.dataset.disabled); this.host.dataset.disabled='true'; // set Attribute to the custom element }); shadow.children.d.addEventListener('click', function(e) { this.textContent = "you clicked me :("; shadow.children[1].textContent="Shadow DOM content changed"; this.disabled=true; alert("All: button, text and host should be change"); }); }; // Register the new element. var Xfonix =document.registerElement('fonix-div', {prototype: fonixDiv}); var thehost = document.querySelector('#host1'); thehost.appendChild(new Xfonix()); the .css file is: body {background: #F7F7F7;} fonix-div { display: inline-block; width: 200px; height: 200px; float: left; margin: 0.5em; border-radius: 3px; background: #FFF; box-shadow: 0 1px 3px rgba(0,0,0,0.25); font-family: Helvetica, arial, sans-serif; -webkit-font-smoothing: antialiased; } fonix-div:hover, fonix-div[data-disabled='true']:hover {background: red;} fonix-div:Active {background: green;} fonix-div[data-disabled='true'] {background: green;} fonix-div::shadow p{color: blue;} the output can be seen here:
answers question: http://stackoverflow.com/q/27548081
accepted answer of: http://stackoverflow.com/q/27548081
type: AcceptedAnswer
score: 0
type: Answer

http://stackoverflow.com/comment/43402829
has text: Maybe your divs are overlapping. Post css here.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27484468

http://stackoverflow.com/q/27630975
tagged with: javascript
duplicate of: http://stackoverflow.com/q/12788079
score: 0
linked to: http://stackoverflow.com/q/12788079
tagged with: ember.js
has comment: http://stackoverflow.com/comment/43682441
tagged with: ruby
accepted answer: http://stackoverflow.com/a/27631176
has answer: http://stackoverflow.com/a/27632041
tagged with: ruby-on-rails
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27632041
has comment: http://stackoverflow.com/comment/43702670
type: Question
answer count: 2
has body: I need help in displaying the output of a rails helper method inside the script tags in the application.html.erb layout file. I put the following code just before the closing html tag: &lt;script&gt; App.ready = function() { App.initApp(jQuery.parseJSON("&lt;%= current_user_json %&gt;")); } &lt;/script&gt; This current_user_json is a helper method that is in the application controller file. The output the above code produces in the browser(view page source) is: &lt;script&gt; App.ready = function() { App.initApp(jQuery.parseJSON("{&amp;quot;id&amp;quot;:3,&amp;quot;email&amp;quot;:&amp;quot;user5@user.com&amp;quot;,&amp;quot;username&amp;quot;:null}")); } &lt;/script&gt; The proper output should be: &lt;script&gt; App.ready = function() { App.initApp(jQuery.parseJSON('{"id":3,"email":"user5@user.com","username":null}')) } &lt;/script&gt; If someone could help me out, I will really be relieved of this problem I am trying to resolve for the past couple of days.
tagged with: ruby-on-rails-4
has answer: http://stackoverflow.com/a/27631176
has title: Ruby on Rails Embed Ruby Code in Javascript inside Application Erb File

http://stackoverflow.com/comment/43476656
type: Comment
type: QuestionComment
has text: That example is not a JSON array. That is just simply an array. When your JSON parser is done parsing JSON, it is just an array.
score: 2
comment on: http://stackoverflow.com/q/27523736

http://stackoverflow.com/comment/43575433
comment on: http://stackoverflow.com/a/27574943
has text: but doSearch uses the query as input. Is this exactly what you are referring to ?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/43477815
type: Comment
has text: @symcbean I've already tried to disable `mod_deflate` using `apache_setenv('no-gzip', '1')`, without success.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27503616

http://stackoverflow.com/comment/43514371
has text: This regex matches too much. It will match something like `~123` or `!337`
comment on: http://stackoverflow.com/a/27543400
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/59141884
type: Comment
comment on: http://stackoverflow.com/a/33374807
has text: This is almost what I want. Any way to strip off the paths / flatten? (that is, while using a wildcard / globbing)
type: AnswerComment
score: 0

http://stackoverflow.com/q/27527084
type: Question
accepted answer: http://stackoverflow.com/a/27527616
has comment: http://stackoverflow.com/comment/43483503
has title: Error: origin_mismatch
has body: When I try to access to my project in google map engine form my server its make "Error: origin_mismatch" I made the origin of JavaScript http://myserver.com and the request details appear in the error is the same origin. What is the problem? Reqest Details immediate=false response_type=token scope=https://www.googleapis.com/auth/mapsengine redirect_uri=postmessage proxy=oauth2relay424201031 state=730496938|0.115543733 origin=http://myserver.com include_granted_scopes=true client_id=720390775172-erkkro00391rvru1stipgch25jkrnqke.apps.googleusercontent.com authuser=0
tagged with: javascript
tagged with: google-maps-api-3
tagged with: google-maps
answer count: 1
has comment: http://stackoverflow.com/comment/43483052
favorite count: 0
has answer: http://stackoverflow.com/a/27527616
type: AnsweredQuestion
upvote count: 2
has comment: http://stackoverflow.com/comment/43483539
score: 1
tagged with: oauth-2.0
downvote count: 1

http://stackoverflow.com/comment/43648154
type: QuestionComment
comment on: http://stackoverflow.com/q/27612965
score: 0
has text: I've never heard of that causing problems in anything other than old versions of IE. I doubt it's the problem in FF and Safari.
type: Comment

http://stackoverflow.com/q/27545766
tagged with: jquery
tagged with: google-chrome-extension
has body: I am developing a chrome extension and my requirement is to detect the default search engine of Chrome web browser. I have searched a lot over web but did not get any api to detect so. I have also searched web to do so with Javascript/Jquery but not luck so far. Please suggest me some way so that i can detect default search engine for Chrome browsers.
downvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion
score: 7
tagged with: google-chrome-devtools
has answer: http://stackoverflow.com/a/27550817
has title: How to detect Chrome default Search engine
upvote count: 7
tagged with: google-chrome
type: Question
tagged with: javascript

http://stackoverflow.com/comment/43641593
score: 0
type: Comment
has text: I think the difference between your fiddle and his code is the inclusion of the full semantic.js and semantic.css files. I created a fiddle with just the dropdown.js file (like his sample code) and it didn't work so well. I created one with the full libraries included and it worked...[like so](http://jsfiddle.net/onxn7a0m/1/)
type: QuestionComment
comment on: http://stackoverflow.com/q/27609356

http://stackoverflow.com/comment/43727743
type: AnswerComment
comment on: http://stackoverflow.com/a/27638007
type: Comment
score: 0
has text: @Oussama ELGOIMRI.. I have looked up at your code. I see you have in two places a 'return false'. That will stop the action and will not return an answer to ajax making it unable to call the Success or the Done action. Try to print 'echo true' instead of return false just to test if it will call the ajax. I am sorry I delayed the answer. I am a little busy once I find some free time I will try the code myself if you don't come up with a solution

http://stackoverflow.com/a/27583604
downvote count: 0
upvote count: 2
has body: To call them successively is quite easy, you don't need to wait for multiple async things but only for the previous one each. You'd do function getJason() { return $.getJSON(rgUrl1); } function combineJason(json1) { //code to combine } function divideArray() { //code to divide stuff } function doOtherStuff() { //code to do some other stuff } getJason().then(combineJason).then(divideArray).then(doOtherStuff); which would be very similar to doOtherStuff(divideArray(combineJason(getJason()))); only that it takes care to defer the computation (as a callback) if one result is asynchronous (in here, the $.getJSON in getJason).
type: Answer
answers question: http://stackoverflow.com/q/27583345
score: 2

http://stackoverflow.com/comment/43535119
comment on: http://stackoverflow.com/a/27535443
score: 0
type: AnswerComment
has text: Thanks @Chris Franklin do I include e.touches under the init function still?
type: Comment

http://stackoverflow.com/q/27547784
has comment: http://stackoverflow.com/comment/43522462
has comment: http://stackoverflow.com/comment/43524819
has comment: http://stackoverflow.com/comment/43531081
has answer: http://stackoverflow.com/a/27549392
type: UnansweredQuestion
tagged with: requirejs
type: Question
score: 0
has title: Storing and loading variables in different Require.js modules
has body: Im working on a backbone.js and require.js app. I have an app-constants.js file. It stores a number of static variable but also stores country iso codes: define(function (require) { 'use strict'; var AppConstants = { SESSION_TIMEOUT_DURATION: 300, COUNTRY_ISO_CODES: [], getCountryIsoCodes: function () { return this.COUNTRY_ISO_CODES; }, setCountryIsoCodes: function (countries) { this.COUNTRY_ISO_CODES = countries; } }; return AppConstants; }); The country iso codes is dependent on the language of the browser so it's loaded after the app starts. So after the language of browser is got, I then load country codes with: appConstants.setCountryIsoCodes(lookUpDataCountries); If i call getCountryIsoCodes() straight after setCountryIsoCodes(), I see the country codes are set in the appConstants file: console.log('appConstants.getCountryIsoCodes() are '); console.log(appConstants.getCountryIsoCodes()); Output is: appConstants.getCountryIsoCodes() are ["CA", "MX", "GT", etc etc However, if I load the app-constants in another module, e.g. some model, and print out country codes again, I get an empty array. How do I store the country codes in app-constants.js file and load them into different modules?
answer count: 1
tagged with: javascript
tagged with: backbone.js

event-handling
tag name: event-handling
tags question: http://stackoverflow.com/q/27569963
tags question: http://stackoverflow.com/q/27616356
tags question: http://stackoverflow.com/q/27516720
tags question: http://stackoverflow.com/q/27523227
tags question: http://stackoverflow.com/q/27638556
tags question: http://stackoverflow.com/q/27514214
tags question: http://stackoverflow.com/q/27610751
type: Tag
tags question: http://stackoverflow.com/q/27543243

http://stackoverflow.com/comment/43475617
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27523296
score: 0
has text: I don't have the answer for you, but the issue has been raised on the [github page](https://github.com/masayuki0812/c3/issues/798)

http://stackoverflow.com/comment/43401335
score: 0
type: AnswerComment
has text: @SamuelFerigyu add the `http://` protocol also you don't have a closing of `doc ready` block and change the stack order of your scripts as suggested by adeneo.
type: Comment
comment on: http://stackoverflow.com/a/27484600

http://stackoverflow.com/comment/43587491
comment on: http://stackoverflow.com/a/27581599
score: 0
type: AnswerComment
has text: `SNOW.top += 2; SNOW.left += 5;` are probably not the intended code.
type: Comment

http://stackoverflow.com/comment/43445769
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27507750
score: 0
has text: If you're using jQuery, why aren't you using either `.toggle()` or `.hide()` and `.show()` instead of `.css('display', 'block')`?

http://stackoverflow.com/q/27618899
downvote count: 0
answer count: 1
tagged with: callback
favorite count: 0
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/34624634
score: 1
has title: Where does a callback function in javascript get its arguments from?
has body: I am able to run a code like this myObject.save(function(error, data){ if(error){ console.log(error); } else { console.log(data); } }); What i don't understand is where the anonymous function get the arguments error and data from?
upvote count: 1
has comment: http://stackoverflow.com/comment/43658732
type: Question
accepted answer: http://stackoverflow.com/a/27618944
tagged with: javascript
has answer: http://stackoverflow.com/a/27618944
has comment: http://stackoverflow.com/comment/137948072

http://stackoverflow.com/a/27507840
has body: Instead of hardcoding color combinations, you can generate them on the fly var usedColors = [] function randomDigit( max ){ return Math.floor( Math.random() * max ) } function getNewColor(){ var max = 255 var r = randomDigit( max ) var g = randomDigit( max ) var b = randomDigit( max ) if ( !colorUsed( r, g, b ) ) return storeColor( r, g, b ) else return getNewColor() } function storeColor( r, g, b ){ usedColors[ r + "," + g + "," + b ] = true return [ r, g, b ] } function colorUsed(r,g,b){ return usedColors[ r + "," + g + "," + b ] } var newColor = getNewColor() Or if you prefer to have them predefined function shuffle(o){ for(var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x); return o; }; var colors = [ "rgb(199, 179, 78)", "rgb(127, 195, 133)", "rgb(102, 169, 162)", "rgb(132, 122, 224)" ] function getColors(boxCount){ var colorArr = [] var fullIterations = Math.floor( boxCount / colors.length ) var lastIteration = boxCount - fullIterations * colors.length for(var x = 0; x &lt; fullIterations; x++){ for(var i = 0; i &lt; colors.length; i++){ var color = colors[ i ]; colorArr.push(color); } colors = shuffle( colors ) } for(var x = 0; x &lt; lastIteration; x++){ var color = colors[ x ]; colorArr.push(color); } colors = shuffle( colors ) return colorArr } var newColors = getColors(20)
has comment: http://stackoverflow.com/comment/43446195
type: Answer
score: 0
answers question: http://stackoverflow.com/q/27507547

http://stackoverflow.com/q/27505333
has comment: http://stackoverflow.com/comment/43449061
has comment: http://stackoverflow.com/comment/43441074
tagged with: validation
answer count: 0
has comment: http://stackoverflow.com/comment/43444356
tagged with: jquery
has title: Django and Parsley.js - works only for email field
has comment: http://stackoverflow.com/comment/43444469
type: Question
tagged with: django
has comment: http://stackoverflow.com/comment/43444029
has comment: http://stackoverflow.com/comment/43442935
has comment: http://stackoverflow.com/comment/43440966
has comment: http://stackoverflow.com/comment/43446992
score: 0
has comment: http://stackoverflow.com/comment/43444621
tagged with: parsley.js
has comment: http://stackoverflow.com/comment/43442851
has comment: http://stackoverflow.com/comment/43457319
has comment: http://stackoverflow.com/comment/43443408
tagged with: javascript
type: UnansweredQuestion
has body: I need to validate a Django form on the client side, so I decided to use Parsley. But... Validation works only for email. I am not able to validate other fields such as login or password. Here is some of my code related to this problem. template: ... form: from parsley.decorators import parsleyfy @parsleyfy class RegisterForm(forms.Form): username = forms.CharField(label="Login:",min_length=3,max_length=30,required=True) email = forms.EmailField(label="Email:") password1 = forms.CharField(label="Hasło:",widget=forms.PasswordInput()) password2 = forms.CharField(label="Powtórz hasło:",widget=forms.PasswordInput()) phone = forms.CharField(label="Telefon:",max_length=20,required=False) log_on = forms.BooleanField(label="Logowanie po rejestracji:",required=False) Rendered: <labelr="id_username">Login: Email: https://i.sstatic.net/l04w3.png Can anyone help?

http://stackoverflow.com/comment/43441096
comment on: http://stackoverflow.com/q/27505507
type: QuestionComment
type: Comment
score: 1
has text: What are you trying to achieve? Why not just make the `A` and `B` private variables within the `Bar` constructor, and why don't you just call Foo directly with those variables?

http://stackoverflow.com/comment/43466576
comment on: http://stackoverflow.com/q/27518183
has text: @JosephtheDreamer guess so, with my current setup it will probably be worthless to write a script that would dynamically change the IDs of the radios and labels, preserving their unique name, like "foo-1", "bar-1". Things I've seen and wrote only change it dynamically to "foo-1", "foo-1" in one form and "foo-2", "foo-2" in the other.
score: 0
type: QuestionComment
type: Comment

webbrowser-control
type: Tag
tags question: http://stackoverflow.com/q/27552667
tag name: webbrowser-control
tags question: http://stackoverflow.com/q/27515048

http://stackoverflow.com/comment/43512990
comment on: http://stackoverflow.com/q/27543015
has text: Change the permissions of ../etc/passwd to make it inaccessible?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43510560
comment on: http://stackoverflow.com/a/27530001
score: 0
type: AnswerComment
has text: thanks topheman .. any suggestions on how to get this working. m still stuck
type: Comment

http://stackoverflow.com/q/27613529
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/43649620
has answer: http://stackoverflow.com/a/27613714
tagged with: javascript
has title: How to prevent a number from using number1"E"number2
has body: I need help because if I try to write a number that has a whole bunch of zeroes, it will come out as num1Enum2. ie: for a googol it would write "1E100". I want it to actually write the number, rather than the shortened form. How would I do this? Note: I want it to still be an integer rather than a string.
score: 0
has comment: http://stackoverflow.com/comment/43649378
tagged with: integer
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27613638
has comment: http://stackoverflow.com/comment/43649660

http://stackoverflow.com/a/27625029
upvote count: 8
score: 8
type: Answer
has body: Straight from API: You want to use the method navigateLineEnd(). So in your case: editor.focus(); // To focus the ace editor var n = editor.getSession().getValue().split("\n").length - 2; editor.gotoLine(n); editor.navigateLineEnd() // Navigate to end of line
downvote count: 0
answers question: http://stackoverflow.com/q/27625028

http://stackoverflow.com/comment/43428403
comment on: http://stackoverflow.com/q/27498526
score: 0
type: QuestionComment
type: Comment
has text: sorry i don't know about that. I'll read that post first. thanks

http://stackoverflow.com/a/27574447
has body: Add brackets around rel, like so: $('[rel]').each(function() { if ($(this).attr('rel') == slideName) { console.log(this); } });
score: 1
has comment: http://stackoverflow.com/comment/43634426
accepted answer of: http://stackoverflow.com/q/27574421
upvote count: 1
answers question: http://stackoverflow.com/q/27574421
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/43647866
type: Comment
has text: If this is the jQuery plugin you are using (http://jqueryvalidation.org/validate), try looking into the `onfocusout` event (http://jqueryvalidation.org/validate#onfocusout). So, basically, you can run all your checks `onblur` instead of most of them `onkeyup` and only one `onblur`.
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/27612695

http://stackoverflow.com/q/27588971
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/27597086
has body: Can one please help me to know why we exactly need JavaScriptExecutor for Webdriver? I have seen few examples using JavascriptExecutor to mouse hover, to click on any elements which can also be done normally with Webdriver. And there are cases which i have seen is when the element is disabled, using JavascriptExecutor clicking on that element. Why we need to perform any operations on disabled elements (to user on FrontEnd).
has comment: http://stackoverflow.com/comment/47762052
tagged with: selenium-webdriver
type: AnsweredQuestion
upvote count: 1
downvote count: 1
type: Question
has title: Why we need javaScript executor for webdriver?
has answer: http://stackoverflow.com/a/27597086
tagged with: javascript
score: 0

http://stackoverflow.com/a/27492178
has comment: http://stackoverflow.com/comment/43416697
has comment: http://stackoverflow.com/comment/43416146
type: AcceptedAnswer
downvote count: 0
has body: The last case (computing cathetus A given cathetus B and hypotenuse) is sort of ok but the formula is wrong. Given that hyp² = a² + b² you know that a = sqrt(hyp² - b²) and instead you're computing the opposite (sqrt(b² - hyp²)) this will result in NaN because you'll be taking the square root of a negative number. Another error is also present in the other similar case (it doesn't gives a NaN but the result is wrong because you're adding the square of hypotenuse and the square of cathetus.
type: Answer
accepted answer of: http://stackoverflow.com/q/27491963
has comment: http://stackoverflow.com/comment/43416653
answers question: http://stackoverflow.com/q/27491963
upvote count: 1
score: 1

http://stackoverflow.com/comment/43579323
score: 2
has text: I'm upvoting this, because you technically did what he asked. The question was just not very well described.
comment on: http://stackoverflow.com/a/27577061
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/43864927
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27557860
has text: modelChanged should be called whenever using the 'set' method to set the model property, but not when setting a property of the model. The changed method doesn't require a component.
score: 0

http://stackoverflow.com/comment/110536881
has text: **even Google has that error itself** - open console and play the video here: https://developers.google.com/youtube/iframe_api_reference
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27573017
score: 12

http://stackoverflow.com/q/27523099
accepted answer: http://stackoverflow.com/a/27523257
tagged with: dom
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27523257
score: 0
answer count: 1
has body: I am printing Google plus share count of google website. My coding: $dom = new DOMDocument(); $html = strtolower(file_get_contents("https://plusone.google.com/u/0/_/+1/fastbutton?count=true&url=http://google.com")); libxml_use_internal_errors(true); $dom->loadHTML($html); libxml_clear_errors(); echo $dom->getElementById('aggregateCount')->nodeValue; I am getting this output: Notice: Trying to get property of non-object in C:\xampp\htdocs\start\test.php on line 7 When i pass this html directly, it's work. $html = " node value ";
has comment: http://stackoverflow.com/comment/43475291
has comment: http://stackoverflow.com/comment/43475191
tagged with: php
type: AnsweredQuestion
has title: DOM not printing nodeValue of an id
has comment: http://stackoverflow.com/comment/43475119

object-literal
tag name: object-literal
type: Tag
tags question: http://stackoverflow.com/q/27478248

http://stackoverflow.com/q/27617143
has answer: http://stackoverflow.com/a/28319669
has comment: http://stackoverflow.com/comment/43655610
linked to: http://stackoverflow.com/q/19059580
type: Question
has body: I am beginner in JavaScript and I am trying to use [rtlcss library][1] to convert css files from ltr to rtl. I am using this code but it displays 2 errors: Uncaught SyntaxError: Illegal return statement Uncaught ReferenceError: require is not defined My code convert css to rtl Convert I believe i am doing something wrong, it's not library problem.. so anyone can help? [1]: https://github.com/MohammadYounes/rtlcss
answer count: 2
has title: can't convert css to rtl using javascript library
has comment: http://stackoverflow.com/comment/43655553
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/43655935
has comment: http://stackoverflow.com/comment/43655724
score: 2
has comment: http://stackoverflow.com/comment/43655947
has comment: http://stackoverflow.com/comment/43655824
tagged with: rtlcss
upvote count: 2
has comment: http://stackoverflow.com/comment/43655770
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/79407357

http://stackoverflow.com/comment/43459281
has text: .red { background: } ?
score: 0
comment on: http://stackoverflow.com/q/27514390
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27587437
upvote count: 2
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/43599307
has comment: http://stackoverflow.com/comment/43599619
tagged with: azure
has answer: http://stackoverflow.com/a/27587635
linked to: http://stackoverflow.com/q/22484501
has title: Azure mobile service - get row(s) based on matching string/substring value
has comment: http://stackoverflow.com/comment/43599472
score: 2
accepted answer: http://stackoverflow.com/a/27587757
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27587635
type: Question
has answer: http://stackoverflow.com/a/27587757
tagged with: azure-mobile-services
has body: I am trying to read results from JavaScript azure mobile service and I want to return items with a specific values. I am using getTable(‘’).where.(‘’).read(‘’) to check if one of the returned json value match a specific pattern as shown in this post: Here is my client side script: function getSP() { var spUser = client.getTable("User").where(function (contains) { return this.extraname.indexOf(contains) &gt; 0; }, "Eyad").read().done(function (results) { alert(JSON.stringify(results)); }, function (err) { alert("Error: " + err); });} And the request URL generated from client: https://XYZ.azure-mobile.net/tables/User?$filter=(indexof(extraname,'Eyad') gt 0) But the code above return an empty [] object form the service, while performing the same operation without the where() check clearly returns my intended value: What am I doing wrong? How can I return the row(s) where the returned "extraname" contains the substring "Eyad"? NOTE: I also have a custom read script on the service side, and you can see the "extraname" value is hardcoded for testing purposes: function read(query, user, request) { request.execute({ success: function(results) { var now = new Date(); results.forEach(function(item) { console.log(item.userjsondata); item.extraname = "Eyad"; }); request.respond(); //Writes the response } }); }
has comment: http://stackoverflow.com/comment/77887251

http://stackoverflow.com/comment/43654412
comment on: http://stackoverflow.com/q/27616070
has text: what are you expecting to do with response? If you want to parse it to html for example you would do it in the done callback...right where your logging works
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43553839
type: Comment
type: QuestionComment
has text: you search **DELETE** Statement http://dev.mysql.com/doc/refman/5.0/en/delete.html
score: 0
comment on: http://stackoverflow.com/q/27564262

http://stackoverflow.com/comment/43446498
has text: I agree, the duplicate I suggested doesn't work with cross tab communication which is specifically what the OP was asking for. This should be reopened.
type: Comment
score: 1
comment on: http://stackoverflow.com/q/27502755
type: QuestionComment

http://stackoverflow.com/q/27486211
tagged with: javascript
score: 0
has title: Setting up variable to return function value or false
has comment: http://stackoverflow.com/comment/43404401
has comment: http://stackoverflow.com/comment/43404293
has answer: http://stackoverflow.com/a/27486315
has answer: http://stackoverflow.com/a/27486298
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27486298
possible better answer: http://stackoverflow.com/a/27486315
has body: I wasn't sure how to properly word the title for this question but jumping right into it, Using the the ? : operator I setup a JavaScript variable and an if statement like so: var test = callsAFunction ? test : false; if I do this, will test equal whatever the function returns here? Or will it be undefined since it's "Technically" not set yet? What I'm trying to do is set a variable to either what data it gets back and is run through a function, or set it to Boolean false so it will process through my Boolean check as an error. I figured this approach was best but I'm running into issues determining how to go about this. Below are my code snippets: var hash = self.getHashFromMasterRecords(d[0]); if(hash === false){ done("Can't find master record hash", self.requestData, self); } Obviously it needs to turn false as a Boolean in order to pass as an error. I want to do this without having to call the function more than 1 time for this sequence. So if I do var hash = self.getHashFromMasterRecords(d[0]) ? hash : flase; would hash return the value? Or undefined? Thank you ahead of time, if I need to post more info let me know.
type: Question
answer count: 2

http://stackoverflow.com/comment/43501202
comment on: http://stackoverflow.com/q/27536190
type: Comment
type: QuestionComment
has text: are `terms.day`,`terms.medium`, etc. all the same length? ie, is there a reason to loop through each array individually?
score: 0

http://stackoverflow.com/comment/43485242
score: 0
has text: I have edited the question adding ko.applyBindings(viewModel) at the end of knockout
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27528091

http://stackoverflow.com/a/27533293
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27533148
has body: Start by creating a file just for your code. At the end of the file, you would "expose" parts of the code to a consumer. For example: In your case you could wrap your code like so: module.exports.set = function(app) { app.post('/', function(req, res) { /* the post code goes here */ }); }; You could consume it with app.js like so on app.js: require('./sendgrid').set(app); This would effectively set your route(s) for sendgrid.
accepted answer of: http://stackoverflow.com/q/27533148
has comment: http://stackoverflow.com/comment/43495973
has comment: http://stackoverflow.com/comment/43495802
upvote count: 1
type: AcceptedAnswer
downvote count: 1

http://stackoverflow.com/comment/51528498
type: AnswerComment
has text: You pipe the write stream to `res.attachment('filename.ext')` instead of `res`.
type: Comment
comment on: http://stackoverflow.com/a/31222542
score: 0

http://stackoverflow.com/comment/43494357
score: 0
type: Comment
type: QuestionComment
has text: Yes, it's that simple. Thanks!
comment on: http://stackoverflow.com/q/27532922

http://stackoverflow.com/a/69887680
score: 0
type: Answer
has body: People like to say to use .val(), but as you noticed, it doesn't like to set by text, but by using the index, instead. So you should do a find to get that, then set by it. But even that is only part of the story. You should first deselect all other options, and set the attribute of the option you want as selected using the index that you find. Btw, I hate the $('#myDropDownListID') syntax because it is useless in SharePoint because it auto-generates GUIDs and puts them after the IDs, forcing you to have to grab it with $('[id*=myDropDownListID]'), with the * indicating that it contains that value, so that is how I will set this up, except I'll leave out the * because it's unnecessary in this case. But this syntax is also very useful if you want to use $ instead of * to say it starts with that value, and you can use title or name instead of id, so it is incredibly versatile, and I wish more people used it. $(document).ready(function() { var yourText = "My Custom Value 2"; // Remove all 'selected' attributes from all options $('select[id="myDropDownListID"] option').removeAttr('selected'); // Get the index for the value you want to set var idx = $('select[id="myDropDownListID"] option').filter(function() { return $(this).html() == yourText; }).val(); // Set the dropdown value by index and set it as selected by text var dropdownBox = $('select[id="myDropDownListID"]'); dropdownBox.val(idx); dropdownBox.find('option[value="' + yourValue + '"]').attr('selected','selected'); // note that .val() doesn't do this dropdownBox.click(); // may be useful and necessary for certain engines to cache the value appropriately console.log(dropdownBox.html()); // should show you that the selected option is My Custom Value 2 console.log(dropdownBox.val()); // should give you the index 2 }); My Custom Value 1 My Custom Value 2 My Custom Value 3
answers question: http://stackoverflow.com/q/27492245

http://stackoverflow.com/q/27556180
score: 0
has comment: http://stackoverflow.com/comment/43539022
tagged with: http://stackoverflow.com/tag/html
has body: I try to do the following: When I click on a specific DIV a CSS class is added/removed from another DIV. Take a look here for a live example (and click on "click me"): http://jsfiddle.net/fyehLqsc/ $(document).ready(function() { $(".mejs-play").click(function () { $(".spin-l").toggleClass("animated"); $(".spin-r").toggleClass("animated"); }); }); It is working as it should, but when I do the same thing on my WordPress site, it's not working. Take a look here: link removed What I want to achieve: If someone clicks on the play button which has the class "mejs-play" the class "animated" shall be added to "spin-l" and "spin-r". Can anyone please tell me why it's working on JSFiddle but not on my site?
answer count: 1
has comment: http://stackoverflow.com/comment/43538958
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27556488
accepted answer: http://stackoverflow.com/a/27556488
tagged with: wordpress
type: Question
has comment: http://stackoverflow.com/comment/43538818
tagged with: javascript
tagged with: jquery
has title: toggle CSS class on click using jQuery does not work

http://stackoverflow.com/comment/43553559
type: Comment
comment on: http://stackoverflow.com/a/27551015
has text: in this example i am populating the backbone.view, I am defining all these functions inside the render function.
score: 0
type: AnswerComment

http://stackoverflow.com/q/27630508
has title: Idiomatic way to recover from stream onError
has body: Disclaimer: it is the continuation for the previous Safe update for 2 dependent streams question What is the idiomatic way to handle errors in RxJS (or any other RX implementation) that allows the stream to not terminate? Relevant code is function convert(unit, value) { var request = {}; request[unit] = value; var conversion = $.ajax({ method: 'POST', url: './convert.php', data: request, dataType: 'json' }).promise(); return Rx.Observable.fromPromise(conversion).takeUntil(inInput.merge(cmInput)); } var cmElement = document.getElementById('cm'), inElement = document.getElementById('in'); var cmInput = Rx.Observable.fromEvent(cmElement, 'input').map(targetValue), inInput = Rx.Observable.fromEvent(inElement, 'input').map(targetValue); var inches = cmInput .flatMap(convert.bind(null, 'cm')) .startWith(0); var centimeters = inInput .flatMap(convert.bind(null, 'in')) .startWith(0); So as you can see we use the stream of input field changes and pass it through the convert function that converts it into another unit and passes the result further. If the error during $.ajax() call occurs then it's propagated up and the whole inches or cetimeters stream stops (it actually is expected). But how would I implement it to not do so? So that I could handle error gracefully, like show error message and try again when new data arrives? My current idea is to introduce a composite type like Haskell's Data.Either and stream it instead of scalar doubles. Thoughts? UPD: Yes, I've read Handling Exceptions in Reactive Extensions without stopping sequence but I still hope there are better ways.
has answer: http://stackoverflow.com/a/27639892
has answer: http://stackoverflow.com/a/27708609
accepted answer: http://stackoverflow.com/a/27708609
tagged with: reactive-programming
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43826125
downvote count: 0
linked to: http://stackoverflow.com/q/13310557
type: Question
answer count: 2
score: 10
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27639892
upvote count: 10
tagged with: rxjs
favorite count: 0
tagged with: reactive-extensions-js
linked to: http://stackoverflow.com/q/27596693

http://stackoverflow.com/comment/43460387
type: QuestionComment
has text: Exactly. I'd like to remove the outer circle.
score: 0
comment on: http://stackoverflow.com/q/27497436
type: Comment

http://stackoverflow.com/q/27530118
has answer: http://stackoverflow.com/a/27530198
tagged with: node.js
type: AnsweredQuestion
score: 3
duplicate of: http://stackoverflow.com/q/23667086
upvote count: 3
has title: Node.js function returning null before data can be returned / implementing a callback
accepted answer: http://stackoverflow.com/a/27530198
has body: Very new to Node.JS/Socket.io, sort of scratching my head at implementing a callback correctly. Familiar with JS/jQuery but never quite grasped creating my own callbacks beyond jQuery's implementations. Any who, I have a class with constructor, prototype methods etc. which works fine dealing with static data, however when I make a call out to a server via a TCP socket (using a wrapper module, of course) my function returns null before getting the actual data: server.prototype.getStatus = function(){ var results = ""; this.conn.sendCommand('status', function(err, response){ if(err){console.error(err);return;} results = response['data']; /*Callback here - I'm trying to return the response message to the browser.*/ }); return results; }; This function works with static data (e.g. results = 'test'), however, because I have to connect to the server to get the message I need to implement a callback function (I'm assuming...) - I know what I have here is incorrect to begin with. For my 'server' code the following is being used: socket.on('get status', function(){ io.emit('status', server.getStatus()); }); This method also fires fine via a submit button currently. Naturally my static .html page grabs this fine: socket.on('status', function(msg){ alert(msg); $('#status').append(msg); }); Because my function isn't correct I'm being returned null - I can see the response['data'] being returned through my console if I log the response, of course. Sort of clueless how I can make getStatus() return the response['data'] without blocking anything - but, basically I'm trying to return the response from sendCommand to the browser. I'm having difficulty The third party module I'm using can be found here : https://github.com/dy-dx/node-rcon/blob/master/node-rcon.js
tagged with: socket.io
type: Question
tagged with: javascript
answer count: 1
downvote count: 0
favorite count: 0
linked to: http://stackoverflow.com/q/14220321
has comment: http://stackoverflow.com/comment/43490648
has comment: http://stackoverflow.com/comment/43488900
linked to: http://stackoverflow.com/q/23667086

http://stackoverflow.com/q/27525457
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/27525747
tagged with: jquery
score: 4
has comment: http://stackoverflow.com/comment/43479563
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27530576
favorite count: 0
has answer: http://stackoverflow.com/a/27525926
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27530576
has title: Adding class to div user has just scrolled to
type: Question
upvote count: 4
has body: I would like to add a class to a div that the user has scrolled to, but for some reason no matter what I write the div doesn't open. I am using location.hash == "" to check whether or not a certain string is in the url which is fine and then scrolling to that div. Once it has scrolled to that div I want to remove the hide class and add the show class (which will show the div) but I can't get it to work. It's probably really simple but I can't achieve the right effect. Here is my code: if(window.location.hash == 'data-sheets') { $.scrollTo('.Data-Sheets', 0, { offset:-1 } , { easing:'elasout' }); $(".Data-Sheets .expand2").removeClass("hide"); $(".Data-Sheets .expand2").addClass("show"); }
has comment: http://stackoverflow.com/comment/43479402
possible better answer: http://stackoverflow.com/a/27525747

http://stackoverflow.com/q/27484643
has title: Parse string to retrieve parameters
has comment: http://stackoverflow.com/comment/43401401
has comment: http://stackoverflow.com/comment/43401505
linked to: http://stackoverflow.com/q/901115
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43401444
accepted answer: http://stackoverflow.com/a/27484867
type: Question
possible better answer: http://stackoverflow.com/a/27484721
type: AnsweredQuestion
has body: I have following string: "paramFoo={12}, paramBar={1}, paramFooBar={2713}" Now, I need to get the values for these 3 params. Is there any way to do that in JavaScript/jQuery and/or AngularJS? I can only think of: Search for 'paramFoo={' and remove it from the string. Get position of first '}' Get value from chars 0 - (pos from 2.)-1 Remove chars 0 - (pos from 2.) from string [repeat 1-4 two more times] Im sure, there must be a cleaner way to do that. Thank you very much!
has answer: http://stackoverflow.com/a/27484721
favorite count: 0
has comment: http://stackoverflow.com/comment/43401537
score: -1
answer count: 2
downvote count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/27484867
has comment: http://stackoverflow.com/comment/43401519

http://stackoverflow.com/comment/43414343
type: Comment
has text: where do I put this? Does not work for me? The documentation says that there are events like "done" and "start". Why is "done" triggered, but "start" isn`t?
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27490710

http://stackoverflow.com/q/27493198
has comment: http://stackoverflow.com/comment/43418736
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has comment: http://stackoverflow.com/comment/43418854
tagged with: angularjs
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43418496
has body: I need to append a directive's template AFTER an input field. The original input field needs to remain - I can't just create a duplicate of it. My thought for this was to, in the controller, use jQuery to add a DIV after the input field, and add an attribute for the directive to the div. However, in practice, that doesn't work - the div is created and added, but the directive doesn't activate. The problem, I know, is that the jQuery-added div is not yet recognized by the angularjs controller - it appears AFTER angularjs runs over the controlled html. I know that part of the problem is that you're not supposed to use jQuery in the controller, but I honestly can't think of another way to do it. Is there some way to cause the angularjs controller to look at this new div? The original HTML looks like the following. &lt;input name="generatedString_1234567890"&gt; I run jquery over the page to add a controller to the body. The relevant code looks similar to this: jQuery('body').attr('ng-controller','MainCtrl'); angular.module('app',['DataTools']); angular.element(document).ready(function(){ angular.bootstrap(document, ['app']); }); Inside the angularjs, I run a resource to get a json string containing the relevant changes to the DOM, in terms of attributes that need to get added to the inputs and certain understood flags that require specific coding. The relevant task I'm trying to accomplish looks like this, where $(this) is the input field for the DOM. jQuery(document).find('input.FormField,select.FormField').each(function(){ // Inside a case statement based on certain flags var d = $('&lt;div/&gt;'); d.attr("ng-model", 'adors.'+label); // Relevant code that adds attributes to the div - including the required directives $(this).hide().after(d); } I am trying to create code that looks more like this (VERY GENERIC): &lt;input name="generatedString_1234567890" ng-hide="true" ng-model="input.uniqueKey"&gt; &lt;div special-input="time" ng-model="input.uniqueKey"&gt; &lt;sele…
has title: angularjs directive: not replace nor transclude
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43419465
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43418437

http://stackoverflow.com/q/27525460
has body: i have a problem, i have a menu retrieved from database i want to submit form to php page by post according to the selected item every time i click the a href link "Add" the value of the post is the only the first item in menu while($MenuItem=mysql_fetch_array($rc)) { ?> <a href="single-product.php?id=<?php echo $MenuItem['Item_ID']?>"> <img src="images/<?php echo $MenuItem['Item_Image']; ?>" alt="" /> <a href="single-product.php?id=<?php echo $MenuItem['Item_ID']?>"> <?php echo $MenuItem['Item_Name']?> <?php echo $MenuItem['Item_Price']?> <input type = "hidden" value="<?php echo $MenuItem['Item_ID']?>" name="CC" /> Add To Cart
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27525688
upvote count: 2
has title: submit a form according to the selected item
has comment: http://stackoverflow.com/comment/43479483
downvote count: 1
type: Question
score: 1
accepted answer: http://stackoverflow.com/a/27525688
tagged with: post
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43479571
favorite count: 0
has comment: http://stackoverflow.com/comment/43479522
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has comment: http://stackoverflow.com/comment/43479542

http://stackoverflow.com/q/27506409
tagged with: date
type: Question
has body: I am trying to add a way for users to click on the actual number in the date box using fullcalendar v2. It will be directing to a page outside of fullcalendar. I have tried a few different solutions and can't get anything to work. Help would be greatly appreciated. Have tried this method: dayClick: function(date, allDay, jsEvent, view) { if (allDay) { // Clicked on the entire day if ($(jsEvent.target).is('div.fc-day-number')) { // Clicked on the day number $('#calendar') window.location = "url"; } } } Have tried this method editing fullcalendar.js, adding onclick to the table element: numberCellHtml: function(row, col, date) { var classes; if (!this.dayNumbersVisible) { // if there are week numbers but not day numbers return '&lt;td/&gt;'; // will create an empty space above events :( } classes = this.dayGrid.getDayClasses(date); classes.unshift('fc-day-number'); return '' + '&lt;td onclick="url" class="' + classes.join(' ') + '" data-date="' + date.format() + '"&gt;' + date.date() + '&lt;/td&gt;'; }, Any other suggestions??
answer count: 1
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27506483
type: UnansweredQuestion
tagged with: calendar
has title: adding hyperlink to the date number in fullcalendar
tagged with: fullcalendar

http://stackoverflow.com/q/27569372
favorite count: 0
score: 6
tagged with: selectize.js
accepted answer: http://stackoverflow.com/a/29659108
upvote count: 6
has body: I need some help with selectize.js events - they dont work... Inicialize selectize.js: $("input[name='addTask[users]']").selectize({ valueField: 'email', labelField: 'name', //... more options like render... }); And setting event: $("input[name='addTask[users]']").selectize().on('type', function(){ alert(); }); If I typing in input nothing happens... EDIT: No errors in console, selector is good because plugin works perfectly. Only one event is working for me - "change". Here si documentation:https://github.com/brianreavis/selectize.js/blob/master/docs/events.md (Also I do not understand "params" - on what the needs are and what they do) Any hints, ideas? Examlple it pleases me... EDIT: OK I GOT IT!!! SO - SOLUTION: In initialization selectize.js: $("input[name='addTask[users]']").selectize({ valueField: 'email', labelField: 'name', onType : eventHandler('onType'), // &lt;----- this added //... more options like render... }); and BEFORE initialization: var eventHandler = function(name) { return function() { alert(name + ' ' + arguments['0']); // name of event + typed string }; }; And alert work if you start typing in input :)
type: AnsweredQuestion
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29659108
has title: Selectize.js events - wont work
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/43564048

loops
tags question: http://stackoverflow.com/q/27626759
tags question: http://stackoverflow.com/q/27585334
tags question: http://stackoverflow.com/q/27617096
tags question: http://stackoverflow.com/q/27479534
tags question: http://stackoverflow.com/q/27590848
tags question: http://stackoverflow.com/q/27594957
tags question: http://stackoverflow.com/q/27486864
tags question: http://stackoverflow.com/q/27511060
tags question: http://stackoverflow.com/q/27624992
tags question: http://stackoverflow.com/q/27610263
tags question: http://stackoverflow.com/q/27494089
type: Tag
tags question: http://stackoverflow.com/q/27513315
tags question: http://stackoverflow.com/q/27499719
tag name: loops
tags question: http://stackoverflow.com/q/27539973
tags question: http://stackoverflow.com/q/27625872

http://stackoverflow.com/a/27525016
downvote count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/43479445
score: -1
answers question: http://stackoverflow.com/q/27522776
has body: Both are correct. You could also use the parameterized constructors. E.G:- var d = new Date(1993, 6, 28, 14, 39, 7); console.log(d.toString()); // prints Wed Jul 28 1993 14:39:07 GMT-0600 (PDT) console.log(d.toDateString()); // prints Wed Jul 28 1993
type: Answer
has comment: http://stackoverflow.com/comment/43579902

http://stackoverflow.com/q/27527160
has answer: http://stackoverflow.com/a/29839458
has answer: http://stackoverflow.com/a/27569937
answer count: 4
type: AnsweredQuestion
downvote count: 0
score: 6
has answer: http://stackoverflow.com/a/27527362
type: Question
upvote count: 6
tagged with: javascript
tagged with: sorting
accepted answer: http://stackoverflow.com/a/27560502
has body: Using jquery-datatables. Example: http://jsfiddle.net/b2fLye17/17/ $('#example').DataTable({ filter:false, columnDefs: [ { targets: [1],//when sorting age column orderData: [1,2] //sort by age then by salary } ] }); When you click the age column, The table sort by age ascending then by salary ascending. What would be my options to make it sort by age ascending then by salary descending ? Thanks ! -------------------------- Edit 1 --------------------- Clarification : When the age column is sorted ascending it should sort by age ascending then by salary descending. When the age column is sorted descending it should sort by age descending then by salary ascending -------------------------- Edit 2 --------------------- A picture of the desired result
tagged with: datatables
possible better answer: http://stackoverflow.com/a/27527362
has answer: http://stackoverflow.com/a/27560502
favorite count: 0
has title: jquery-datatables multi-column sort direction

http://stackoverflow.com/comment/43574381
comment on: http://stackoverflow.com/q/27574394
score: 1
type: Comment
type: QuestionComment
has text: What is `console.log(data)` outputting? Maybe you're just not accessing correctly?

http://stackoverflow.com/a/28076420
has body: The reason is actually simple: Each call to rdfstore.Store.insert creates a SPARQL INSERT statement. And each separate SPARQL statement has its own set of unique blank nodes. That said, the only solution for our problem is to collect the triples to add in an array and finally add them all in one go. var triples = []; [...] store.insert(store.rdf.createGraph(triples), graph, function(success, cnt) { if(success) console.log(cnt + ' triples successfully added.'); }); I hope this helps.
answers question: http://stackoverflow.com/q/27501056
upvote count: 1
has comment: http://stackoverflow.com/comment/44547032
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/a/27688381
has body: SOLUTION: For everyone interested: turned out the solution was moving all files that use DoJo beneath the jQuery UI files, so that jQuery UI is fully loaded before any DoJo stuff loads. Moved them all in the footer in that order (jQuery, then jQuery UI and then alle DoJo related files). Still wondering though why this has been an issue in WP 4.1, while it worked perfectly without the fix in WP 4.0.
accepted answer of: http://stackoverflow.com/q/27622120
type: AcceptedAnswer
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27622120

http://stackoverflow.com/a/27561585
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27556648
answers question: http://stackoverflow.com/q/27556648
type: Answer
has body: You need to load the API from https and additionally you need to set: // Create a platform object to communicate with the HERE REST APIs var platform = new H.service.Platform({ useCIT: true, app_id: app_id, app_code: app_code, useHTTPS: true }); The Trick is useHTTPS: true, as in described in the Documentation at: HERE Developers Guide
upvote count: 20
score: 20

http://stackoverflow.com/q/27488366
answer count: 1
tagged with: css
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43408344
downvote count: 1
score: -1
has answer: http://stackoverflow.com/a/27488414
has body: I have image back ground with the following css code, which works perfect. body { background: url('/images/back.jpg') no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } I have the following link on the page &lt;ul class='doIt'&gt; &lt;li class='nav'&gt;&lt;/li&gt; &lt;li class='nav'&gt;&lt;/li&gt; &lt;li class='nav'&gt;&lt;/li&gt; &lt;/ul&gt; What I need is when I hover on the Element I want the following css take place on the full page. #back { position: fixed; background-color: black; height: 100%; width: 100%; margin: 0; padding:0; opacity: 0; display: none; z-index: 89; } In short when the hover on the li element cover up the body image with this opacity Id. I have tried as follows, but not working at all. $('.nav').hover(function(){ $('#back').show(); $('#back').animate({opacity: '0.5' }, 1000); }, function() { $('#back').stop().animate({ opacity: 0 }, 500); $('#back').hide(1); }); Some one help Please!
type: Question
has comment: http://stackoverflow.com/comment/43408404
upvote count: 0
has title: Issue with to change background when hovering on li element
has comment: http://stackoverflow.com/comment/43408626
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43408614

http://stackoverflow.com/comment/43472402
comment on: http://stackoverflow.com/q/27521454
type: Comment
type: QuestionComment
score: 0
has text: what is the result you are sending back to the ajax function from the php file?

http://stackoverflow.com/comment/43445910
score: 2
has text: You dont need to have the `ng-controller` on your span tag if you're going to using the directive that calls that controller too. (See Bens answer below)
comment on: http://stackoverflow.com/q/27507651
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43518426
type: QuestionComment
type: Comment
score: 0
has text: are you using <asp:button or you are writing the bere HTML markup?
comment on: http://stackoverflow.com/q/27545418

http://stackoverflow.com/a/27640353
has body: Get the width and height of the div using JavaScript and then set the canvas height and width with these values. For instance: var canvas = document.getElementsByTagName('canvas')[0]; var divHeight = document.getElementById('yourDiv').clientHeight; var divWidth = document.getElementById('yourDiv').clientWidth; canvas.height = divHeight; canvas.width = divWidth; You could add this to a resize event handler so when the div height/width scales it invokes the above code.
downvote count: 0
score: 4
type: Answer
has comment: http://stackoverflow.com/comment/139678467
answers question: http://stackoverflow.com/q/27640268
upvote count: 4
has comment: http://stackoverflow.com/comment/43699600

http://stackoverflow.com/a/27581905
answers question: http://stackoverflow.com/q/27581731
upvote count: 0
has body: All modern browsers support LocalStorage, use it instead. To save data use var myVar = localStorage.setItem('myVar', 'myValue'); To get data: var myVar = localstorage.getItem('myVar'); // will get 'myValue' To check compatibility for old versions use: if(typeof(Storage)!=='undefined') { // you code here } else { // Oops, no Local Storage } Have fun!
type: Answer
downvote count: 1
score: -1

http://stackoverflow.com/a/27588734
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43602884
has comment: http://stackoverflow.com/comment/43602195
has body: its regex counterpart in php will be : preg_replace( '/R/', 'your replacement string', $text ); $text = the value of 'text' in your javascript code. However, for simple text replace, regular expressions are expensive. If your problem can't be solved using simple string functions then only use regex.
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/27588291

http://stackoverflow.com/q/27512656
has answer: http://stackoverflow.com/a/27512778
type: UnansweredQuestion
upvote count: 1
downvote count: 1
has title: jQuery Cycle plugin count not right to work
tagged with: jquery-cycle
tagged with: javascript
type: Question
score: 0
answer count: 1
tagged with: jquery
favorite count: 0
has body: See my DEMO I have 4 divs under form. JS: $('.webform-component-radios div').cycle({ fx: 'fade', timeout: 0, prev: '#prev', next: '#next', pager: '#nav', after: onAfter }); function onAfter(curr, next, opts) { var slide; slide = opts.currSlide + 1; var caption1 = (slide) + '&amp;nbsp;/&amp;nbsp;' + opts.slideCount; $('#caption').html(caption1); } My slide is work. But count is 1 / 3. It is false. As should be 1/4. Whats my problem? How can I fix it?

http://stackoverflow.com/q/27587785
score: 0
tagged with: browserify
answer count: 1
accepted answer: http://stackoverflow.com/a/27587966
has body: I've recently started using Browserify and I was wondering if that I'm doing is polluting the global scope. I have a main.js: var Person = require('./Animate/Animate.js'); var me = new Person('John'); me.sayHello(); Which is the start point of my project and it has a dependency on another file(Animate/Animate.js): var $ = require('jquery'); function Person(name) { this.name = name; } Person.prototype.sayHello = function() { $('body').html(':3'); alert('Hello! My name is ' + this.name + ', nice to meet you, sir. New version please.'); } module.exports = Person; in Animate.js I first declare my "class" and then add a method to it.At the very end of the script I export it to a module. By not wrapping my code in Animate.js with a function like: module.exports = function() { // My Person "class" will be here } Or like: (function() { // Paste Animate.js content as it is now here... })() Does it mean I've polluted the global scope or because I'm using browserify it will automatically when creating the bundle.js file will ensure that I don't pollute the global scope?
type: AnsweredQuestion
has title: Polluting the global scope with Browserify
has answer: http://stackoverflow.com/a/27587966
type: Question
tagged with: javascript

http://stackoverflow.com/comment/43472849
type: Comment
comment on: http://stackoverflow.com/q/27521708
score: 0
type: QuestionComment
has text: This is plain old vanilla javascript... no jQuery to be seen...

http://stackoverflow.com/comment/57590380
score: 0
type: Comment
has text: That is the first two bytes of the jpeg file 0xff then 0xd8 https://i.sstatic.net/X1OVR.png
type: AnswerComment
comment on: http://stackoverflow.com/a/27638728

http://stackoverflow.com/q/27572425
tagged with: javascript
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/27572559
answer count: 1
type: UnansweredQuestion
has title: Javascript loop to compare values in textboxes
tagged with: php
score: 0
type: Question
has body: for starters, I'm NOT working with arrays with that being said, I need your help...I created a webform in PHP that retrieves values from a mysql table and displays them with its own mysqli_fetch_array command, in that loop it generates a textbox for each record...so far so good. The created textbox (input element) is so that the user can type in the sequential number of how to reorder the records...example Original Order of Records 1 Alpha 2 Bravo 3 Charlie 4 Delta 5 Echo and user needs it to be in this order User input sequential 2 Alpha 5 Bravo 1 Charlie 4 Delta 3 Echo the new order of the records will be saved on a temporary table in the database before insertion on the main table, kinnda like a preview for the new order, something like this: New Order of Records 1 Charlie 2 Aplha 3 Echo 4 Delta 5 Bravo Now what I need is a function that helps me display a message if the user duplicates a sequential unique, if they type in number 1 in 2 or more records, when I hit the button for the preview I need it to loop through all the input boxes and check their values, compare it with the other inputs and determine if there are duplicates or not....if there're no duplicates, continue with PHP code.....if there are duplicates, display an error so the user seeks for the duplicate and change it (inputs left in blank will not be considered for the insertion in the preview table) I already have this: &lt;script&gt; function check(){ const t='texto'; //var conta=1; var contar=&lt;?php echo $contar; ?&gt;; //while (conta&lt;=contar) for(var conta=1;conta&lt;contar;conta++) { alert(conta); var contas=conta+1; if (document.forms['OrderPreview'][t+conta].value!=document.forms['OrderPreview'][t+contas].value) { alert('All Good'); return false; } else { alert('Something bad'); return true; } //conta++; contas=conta+1; if (contas&gt;contar){alert('End');return;} } }; &lt;/script&gt; Which only works with first and second inputs....currently I have 62, but this number is random for ever…

http://stackoverflow.com/comment/43421054
comment on: http://stackoverflow.com/q/27494513
score: 0
type: Comment
type: QuestionComment
has text: What is your question?

http://stackoverflow.com/comment/43492400
score: 2
comment on: http://stackoverflow.com/q/27531392
has text: Your last statement is incorrect. Element `array1[2]` is updated, at least when I ran your fiddle.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27548840
accepted answer of: http://stackoverflow.com/q/27547388
has comment: http://stackoverflow.com/comment/43524974
downvote count: 0
answers question: http://stackoverflow.com/q/27547388
score: 1
upvote count: 1
type: AcceptedAnswer
has body: Haha, trying to get this to work on JSFiddle was more difficult. Since they load javascript seperately from html. Anyways this should work. DEMO //function that happens when loaded function loaded() { b.innerHTML = 'Call Back Worked'; }; //gets elements and sets them to variables var b = document.getElementById('callback') var a = document.getElementById("myframe"); //listens to load event a.addEventListener("load", loaded());
has comment: http://stackoverflow.com/comment/43524920
type: Answer
has comment: http://stackoverflow.com/comment/43527934

http://stackoverflow.com/q/27598874
has body: In the following code I am extracting the innerHTML text of the html element. if(a.tagName){ if("option"==a.tagName.toLowerCase()) return a.text.replace(/\u00A0/g," "); if("select-one"==a.type||"select-multiple"==a.type) return this.getSelectBoxText(a,!1); } if(this._isIE()||this.isSafariLike()&amp;&amp;!this._isChrome()) return a.innerText||a.textContent||""; var b=a.innerHTML; return!b||-1==b.indexOf("\x3cbr")&amp;&amp;-1==b.indexOf("\x3cBR")?a.textContent:document.createElement? (b=document.createElement(a.tagName),b.innerHTML=a.innerHTML.replace(/&lt;br[\/]*&gt;/ig," "),b.textContent):a.textContent }; above code return the correct innerHTML text for all HTML element. There is an issue when any HTML element contain text with special character code e.g. &lt;a id="oopID1" href="..."&gt;OOP &amp;ndash; Java&lt;/a&gt; [in page is show "OOP - Java"]. then it does not return the actual rendered text (mean "OOP - Java"). How could I get the actual value which is getting displayed in the page. Thanks in advance. [NOTE : I don't want to use jQuery.]
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43621220
accepted answer: http://stackoverflow.com/a/27598923
favorite count: 0
type: Question
answer count: 2
upvote count: 1
has title: Issue While Getting innerHTML Text Using JavaScript
has comment: http://stackoverflow.com/comment/43620897
has answer: http://stackoverflow.com/a/27598921
linked to: http://stackoverflow.com/q/24427621
downvote count: 0
tagged with: javascript
score: 1
possible better answer: http://stackoverflow.com/a/27598921
has answer: http://stackoverflow.com/a/27598923

http://stackoverflow.com/a/27618756
answers question: http://stackoverflow.com/q/27618664
has body: put style="clear:both" after header main div (#undefined-sticky-wrapper)
downvote count: 0
type: Answer
upvote count: 2
score: 2

http://stackoverflow.com/comment/44339263
comment on: http://stackoverflow.com/q/27585831
type: QuestionComment
type: Comment
has text: I think the bigger issue is that you're loading 10,000 rows - nobody is going to view that much content at one time. Why not load 500 at a time with ajax as the user scrolls? It'd help make it look faster, even if it isn't necessarily.
score: 2

http://stackoverflow.com/comment/43500815
score: 1
has text: No, that is not possible. You might be able to use [`Object.observe`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/observe) once it becomes more widely available. But since it's ES7, that will probably still take a while.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27536206

http://stackoverflow.com/q/27606717
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has title: How to make a then function work?
tagged with: javascript
has answer: http://stackoverflow.com/a/27607034
answer count: 3
possible better answer: http://stackoverflow.com/a/27606931
downvote count: 0
has answer: http://stackoverflow.com/a/27606931
favorite count: 0
tagged with: angularjs
has body: I'm trying to create a delete service with angular. Here is my controller : app.controller('VoirMessagesController', function($scope, $rootScope, $routeParams, $location,$translate, userService, dataRefreshServices){ $scope.messageToWatch = dataRefreshServices.getMessageToWatch(); this.DeleteAMessage = function(){ dataRefreshServices.SupprimerMessage($scope.messageToWatch).then(function(){ $location.path('/messages'); // The problem is here }); }; }); and the service called : $this.SupprimerMessage = function(message){ var retour = true; if(message != undefined) { $translate(['MESSAGES_MESSAGERIE_SUPPRIMER', 'BUTTON_CANCEL', 'MESSAGES_MESSAGERIE_MESSAGE_VALIDATION_SUPPRESSION_TEXTE', 'MESSAGES_MESSAGERIE_MESSAGE_VALIDATION_SUPPRESSION_TITRE']).then(function(translations) { var modalOptions = { closeButtonText: translations.BUTTON_CANCEL, actionButtonText: translations.MESSAGES_MESSAGERIE_SUPPRIMER, headerText: translations.MESSAGES_MESSAGERIE_MESSAGE_VALIDATION_SUPPRESSION_TITRE, bodyText: translations.MESSAGES_MESSAGERIE_MESSAGE_VALIDATION_SUPPRESSION_TEXTE }; // displaying the modal box modalYesNoService.showModal({}, modalOptions).then(function (result) { var index = _.indexOf(listeMessages, _.find(listeMessages, function (_message) { return _message._id == message._id; })); $this.SupprimerMessageFromServer(message).then(function(promise){ listeMessages[index]._id = 0; }); }); }); } return retour; }; I get the error : undefined is not a function at DeleteAMessage I understand that my function doesn't return any promise but I don't know how I could make this work, I just want my redirection with $location.path done only if the user has clicked on yes in my modal windows. I wanted to add a "then" to wait the answer of the user before doing the redirection. It looks like I should create a promise but can't figure how I can "create" a promise. When I use $http.get I understand what's in the promise but here I can't (before no data is expected, I just want to know whe…
accepted answer: http://stackoverflow.com/a/27607034
has answer: http://stackoverflow.com/a/27607004

http://stackoverflow.com/q/27502394
has comment: http://stackoverflow.com/comment/43435402
downvote count: 2
has comment: http://stackoverflow.com/comment/43435436
has body: I am using TinyMCE as a HTML editor for a CMS. This has been working fine and the form submits the correct data as it should in Chrome. It also displays correctly in IE 11. If I submit the form with IE11 however, the browser doesn't POST the data from the form. Checking the source code, the hidden field doesn't get filled out with the new data entered into the textbox. I couldn't find any information on this, and it is happening on multiple computers. Does anyone know enough about TinyMCE to know what the issue could be? For those who don't know about it: TinyMCE, also known as the Tiny Moxiecode Content Editor, is a platform-independent web-based JavaScript/HTML WYSIWYG editor control, released as open source software under the LGPL by Moxiecode Systems AB. It has the ability to convert HTML textarea fields or other HTML elements to editor instances. It offers HTML formatting tools, like bold, italic, underline, both ordered and unordered lists, different types of alignments, in-line placement of images and videos, etc. It is highly useful for those who want to allow their users to edit HTML documents online. The different options can be configured at the time of integration with a project, which improves the flexibility of a project. It works by replacing the textarea field with an iframe which gives a number of HTML editing controls for the user, and places this data into a hidden text field which allows the data to be submitted.
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43435444
has comment: http://stackoverflow.com/comment/43435352
has answer: http://stackoverflow.com/a/27503082
has comment: http://stackoverflow.com/comment/43435557
upvote count: 4
answer count: 2
has comment: http://stackoverflow.com/comment/43435295
has comment: http://stackoverflow.com/comment/43436163
has comment: http://stackoverflow.com/comment/43434995
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/43435117
possible better answer: http://stackoverflow.com/a/28482538
has title: TinyMCE Editor doesn't update the hidden field in IE11
accepted answer: http://stackoverflow.com/a/27503082
has answer: http://stackoverflow.com/a/28482538
has comment: http://stackoverflow.com/comment/43435330
score: 2

http://stackoverflow.com/comment/43411666
type: AnswerComment
type: Comment
score: 0
has text: Still not having any luck. I think martinezjc makes a good point, when he says, "what makes you believe there's a conflict? did you check the javascript console on your browser?" I checked the Javascript console and get: Uncaught SyntaxError: Unexpected token - index.html:33 Uncaught ReferenceError: jQuery_1_7_1 is not defined index.html:33 (anonymous function)
comment on: http://stackoverflow.com/a/27488590

http://stackoverflow.com/comment/43584186
type: Comment
has text: And that list of word shall be hardcoded to the extension? No possibility to query a server for matches?
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27579781

http://stackoverflow.com/q/27597975
has answer: http://stackoverflow.com/a/27598059
accepted answer: http://stackoverflow.com/a/27598211
has answer: http://stackoverflow.com/a/27598731
has comment: http://stackoverflow.com/comment/43619845
has title: Target last li in row?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43619427
has comment: http://stackoverflow.com/comment/43619743
has comment: http://stackoverflow.com/comment/43619670
answer count: 12
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27598108
favorite count: 0
score: 13
tagged with: html-lists
type: Question
has comment: http://stackoverflow.com/comment/43619430
has comment: http://stackoverflow.com/comment/43619489
has comment: http://stackoverflow.com/comment/43619481
linked to: http://stackoverflow.com/q/27539128
tagged with: css
upvote count: 13
has answer: http://stackoverflow.com/a/27598403
has comment: http://stackoverflow.com/comment/43633999
has answer: http://stackoverflow.com/a/27598211
possible better answer: http://stackoverflow.com/a/27598083
has answer: http://stackoverflow.com/a/27598083
has body: I have a simple list with list items that don't have any special classes. item item item item item item etc.. It looks like this on the front end: I want to be able to target the last li in each row (the ones highlighted in green). However, I am not sure how since these li's don't have any classes and depending on the user's screen, it can be a different li that ends up last in a row. Is there a way to target the last li in a row? Edit: I think there was some confusion. All of the li items are in ONE ul.
has comment: http://stackoverflow.com/comment/43653029
has comment: http://stackoverflow.com/comment/43652856
has comment: http://stackoverflow.com/comment/43621684
has comment: http://stackoverflow.com/comment/43629831
has answer: http://stackoverflow.com/a/58740543
has comment: http://stackoverflow.com/comment/43619612
has answer: http://stackoverflow.com/a/27598304
has answer: http://stackoverflow.com/a/27598158
has answer: http://stackoverflow.com/a/27598664
has answer: http://stackoverflow.com/a/27598262
has answer: http://stackoverflow.com/a/27601523

http://stackoverflow.com/comment/43482965
score: 0
has text: If you want to get same effect you have to say, `var start = document.getElementById("map-txt").value.split(",");` and then `parseInt` each value if necessary
comment on: http://stackoverflow.com/a/27526958
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27616849
type: Answer
upvote count: 1
has body: If you want to scale image size according to parent element's width, use this trick: http://www.mademyday.de/css-height-equals-width-with-pure-css.html This way the image will scale proportionally to the width of parent element. Regarding image position, it is difficult to understand what you are trying to achieve with top right corner when the window is big, but as you scale down the page, the large image gets smaller as it begins to shift of the bottom left corner. You can not get the top value to change depending on parent element's width, however you can use the same padding trick to position the image. Quick example below. The padding-bottom value depends on width of the parent element. #outer { position: absolute; bottom: 0; right: 0; padding-bottom: 50%; border: 1px dashed red; } #inner { width: 30px; height: 30px; border: 1px dashed blue; } &lt;/style&gt; &lt;div id="outer"&gt; &lt;div id="inner"&gt;&lt;/div&gt; &lt;/div&gt;
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/27616489

http://stackoverflow.com/a/27516169
downvote count: 0
has body: Wow answer was so easy i just found out and yet many experienced developers here voted my previous thread to close :D Single line and works perfect Regex.Unescape(string);
score: 4
type: Answer
upvote count: 4
answers question: http://stackoverflow.com/q/27516029

http://stackoverflow.com/q/27597790
type: UnansweredQuestion
has title: Ember Not Initializing Store Properly: Cannot read property 'find' of undefined
type: Question
tagged with: ember-data
answer count: 1
has body: All my versions: Ember: 1.9.0 Handlebars: 2.0.0 jQuery: 2.1.3 Ember Data: 1.0.0-beta.12 All I'm trying to do is make a simple Ember Data store.find() call and everything seems to be going horribly wrong. It gets even weirder too. If I wrap this.store.find(...) in a get() call and instead say this.get('store').find(...) I get a completely different error. Here's the error I'm getting with just this.store.find(...): Error while processing route: budget Cannot read property 'find' of undefined TypeError: Cannot read property 'find' of undefined at Application.BudgetRoute.Ember.Route.extend.model (http://localhost/javascript/app/routes/budget.route.js:9:24) at EmberObject.extend.deserialize (http://localhost/javascript/bower_components/ember/ember.js:24849:21) at applyHook (http://localhost/javascript/bower_components/ember/ember.js:47575:30) at Object.HandlerInfo.runSharedModelHook (http://localhost/javascript/bower_components/ember/ember.js:45596:22) at Object.subclass.getModel (http://localhost/javascript/bower_components/ember/ember.js:45822:21) at __exports__.bind (http://localhost/javascript/bower_components/ember/ember.js:47449:19) at tryCatch (http://localhost/javascript/bower_components/ember/ember.js:47898:16) at invokeCallback (http://localhost/javascript/bower_components/ember/ember.js:47910:17) at publish (http://localhost/javascript/bower_components/ember/ember.js:47881:11) at http://localhost/javascript/bower_components/ember/ember.js:29453:9 this.store is undefined here. Here's the error I'm getting with this.get('store').find(...): Error while processing route: budget Assertion Failed: Budget has no method `find`. Error: Assertion Failed: Budget has no method `find`. at new Error (native) at Error.EmberError (http://localhost/javascript/bower_components/ember/ember.js:13740:23) at Object.Ember.assert (http://localhost/javascript/bower_components/ember/ember.js:3902:15) at Object.EmberObject.extend.store.computed.find (http://localhost/javascript/bower_c…
tagged with: javascript
has answer: http://stackoverflow.com/a/27605515
score: 0
tagged with: ember.js

http://stackoverflow.com/a/27492864
has body: Wrap all into document.ready() &lt;script&gt; $(document).ready(function(){ $('.btn').click(function(){ $('.btn').removeClass('active'); $(this).addClass('active'); }); }): &lt;/script&gt;
has comment: http://stackoverflow.com/comment/43419040
score: 1
has comment: http://stackoverflow.com/comment/43419076
has comment: http://stackoverflow.com/comment/43418574
answers question: http://stackoverflow.com/q/27492813
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27492813
has comment: http://stackoverflow.com/comment/43417299
has comment: http://stackoverflow.com/comment/43418848
type: Answer
downvote count: 0

http://stackoverflow.com/a/33197811
score: 0
type: Answer
has body: There are a few things missing in your code. Adding this: currentSlide.fadeOut(500).removeClass('active-slide'); nextSlide.fadeIn(500).addClass('active-slide'); below your if statement in your click event handler for arrow-next will do the trick. See this fiddle: https://jsfiddle.net/6nbo8htt/
answers question: http://stackoverflow.com/q/27535046
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27535046

http://stackoverflow.com/a/27530998
has comment: http://stackoverflow.com/comment/43635612
accepted answer of: http://stackoverflow.com/q/27513414
has body: This is mostly the WebDriver issue rather than anything else. Support of Shadow DOM is very limited in WebDriver. (more). But as a work around this, you could use pollUntil to grab the element and then get any of its attributes or call any of its exposed methods. It would be similar to this, if you want to test value of the id attribute: return this.remote .get(require.toUrl('http://localhost:8500/test.html')) .then(pollUntil(function () { if (document.querySelector('custom-element-one').shadowRoot) { return document.querySelector('custom-element-one').shadowRoot.querySelector('custom-nested-element').id; } return null; }, [] , 20000)) .then(function (idValue) { assert.equal(idValue, 'someId'); });
answers question: http://stackoverflow.com/q/27513414
type: AcceptedAnswer
type: Answer
score: 0

http://stackoverflow.com/comment/43467726
score: 0
comment on: http://stackoverflow.com/q/27518708
type: Comment
type: QuestionComment
has text: `[Date.UTC(<?php echo join($data, ',') ?>), <?php echo $speed ?>]` or something like that ... been a while on PHP.

http://stackoverflow.com/a/27578707
has body: Try this: function CheckAll(){ $('input[type=checkbox]').each(function () { $(this).prop('checked', true); }); } function UnCheckAll(){ $('input[type=checkbox]').each(function () { $(this).prop('checked', false); }); } and remove anything you are passing as parameter. this should work try it and let me know for any further issue.
score: 0
has comment: http://stackoverflow.com/comment/43582168
answers question: http://stackoverflow.com/q/27578664
type: Answer

http://stackoverflow.com/a/27506386
accepted answer of: http://stackoverflow.com/q/27506181
upvote count: 1
has body: I suggest that you stick to only using this in functions that are actually methods of your object, and using function parameters the rest of the time. If you do so, your code becomes: ko.utils.extend(SingleSelectDropdownViewModel.prototype, (function () { var STRINGS = { All: l10n('All') }; //Public Functions var init = function (params) { this.selectedValue = params.selectedValue; this.title = ko.observable(); this.items = params.items; this.menuOpen = ko.observable(false); //would like to avoid using call and just use _setTitle() _setTitle(this); }, ... //Private Functions _setTitle = function (obj) { if (ko.unwrap(obj.selectedValue)){ var i = util.index(obj.items(),ko.unwrap(obj.selectedValue),'id'); i = i &gt; -1 ? i : 0; obj.title(obj.items()[i].text); } else { obj.title(obj.items()[0].text); } }, _hideMenu = function(obj){ obj.menuOpen(false); }, ... return { init: init }; })());
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27506181
score: 1

http://stackoverflow.com/q/27565825
possible better answer: http://stackoverflow.com/a/27565919
has comment: http://stackoverflow.com/comment/43556735
has comment: http://stackoverflow.com/comment/43556658
has comment: http://stackoverflow.com/comment/43557170
has answer: http://stackoverflow.com/a/27565919
type: AnsweredQuestion
tagged with: twitter-bootstrap-3
has answer: http://stackoverflow.com/a/27565977
type: Question
has body: Haven't seen a thing like this before... When comparing option values of two select boxes, it is sometimes giving the right result and sometimes giving the wrong one. <?php $array = array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30); foreach ($array as $value) { echo ' '.$value.' '; } ?> <?php $array = array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30); foreach ($array as $value) { echo ' '.$value.' '; } ?> Check function check(){ var i_qty = $('#p_in_qty').val(); var s_qty = $('#p_av_qty').val(); if(s_qty > i_qty){ alert("s_qty is greater than i_qty") ; }else{ alert("fine"); } } When I select "14" for the id p_in_qty and "8" for the id p_av_qty, it's giving the wrong result. This is occurring for some values in combination and for some it does not. This is a freakishly weird thing I have come across for the first time.!! What is going on here?
has comment: http://stackoverflow.com/comment/43557331
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27565977
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/43556764
tagged with: jquery
has comment: http://stackoverflow.com/comment/43557416
has title: Select Option Value comparing giving the wrong result
tagged with: html-select
has comment: http://stackoverflow.com/comment/43556852

http://stackoverflow.com/a/27853736
has body: If you don't want the original module to be modified for all modules which use it, then your plugin should not modify the original module. Instead, have the plugin return a modified copy of the original module instead. define("main", [], function() { return {opt: "A"}; }); define("plugin", ["main"], function(obj) { var decorator = {} for (var key in obj) { decorator[key] = obj[key];} decorator.opt = "B"; return decorator }); require(["main", "plugin"], function(obj, plugin) { console.log(plugin.opt); // should log B }); require(["main"], function(obj) { console.log(obj.opt); // should log A but logs B }); This will work without any complications if your original object is a simple struct-like object without any functions. If there are functions, or if your original object was constructed using the Module Pattern, then there is a strong possibility of subtle errors in the copy, depending on how the methods were defined. EDIT 2015-01-13: The OP clarified his question that he would like a way for his tests to be able to run both modified and unmodified original module without having to reload the page. In that case, I would recommend using require.undef to unload the main module and then reload it without having to reload the entire page.
score: 3
answers question: http://stackoverflow.com/q/27533392
has comment: http://stackoverflow.com/comment/44243043
has comment: http://stackoverflow.com/comment/44240383
has comment: http://stackoverflow.com/comment/44235753
upvote count: 3
type: Answer
downvote count: 0

http://stackoverflow.com/a/27570860
type: Answer
has body: By order: ng-click="createAsset({{asset.assetTypeList}});" You don't need to use {{}} in your directives: ng-click="createAsset(asset.assetTypeList);" But you don't even need to pass it, because your select model always available as $scope.asset.assetTypeList Also you have wrong initialization: $scope.assetTypeList = $scope.assetTypeListOptions[0]; You use ng-model="asset.assetTypeList", so you should initialize: $scope.asset.assetTypeList = $scope.assetTypeListOptions[0]; Be sure that $scope.asset initialized before. Or otherwise, use ng-model="assetTypeList".
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/27570726
has comment: http://stackoverflow.com/comment/43567614
accepted answer of: http://stackoverflow.com/q/27570726
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/27482307
has body: The better solution is to use something Modernizr to detection .Modernizr is an open source, MIT-licensed JavaScript library that detects support for many HTML5 &amp; CSS3 features. If there isnt support, it returns false if (Modernizr.canvas) { // logic } else { // your message }
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/43397650
answers question: http://stackoverflow.com/q/27482185
downvote count: 0
has comment: http://stackoverflow.com/comment/43397307
type: Answer

http://stackoverflow.com/comment/43397357
type: Comment
comment on: http://stackoverflow.com/q/27481779
type: QuestionComment
has text: @ben if i'm doing like this in totaldw getting html of textbox control from the cell.
score: 0

http://stackoverflow.com/comment/43481685
comment on: http://stackoverflow.com/q/27526446
type: Comment
type: QuestionComment
score: 0
has text: Do you have a fiddle? Also, you might want to escape the dot: `value.match(/^\-?[0-9]{0,4}(\.[0-9]{1,4})?/g);`

http://stackoverflow.com/a/27614180
accepted answer of: http://stackoverflow.com/q/27563193
type: Answer
answers question: http://stackoverflow.com/q/27563193
downvote count: 0
score: 1
has body: The problem is that author used fixed background attachment, without it the script is more complex. If I get it right you want to control the position by clicking the buttons. I created a snippet that will give you a good starting point: JSnippet As you can see things are more complex there but it does not uses fixed background and allows you to easily update the "loading" to any point you want, I have not tested it but it should work on most of the browsers and even older once. You can set all you need using attributes: data-loader-size -> sets the size. data-back-image -> sets the back image. data-front-image -> sets the front image. data-update-to -> For the controls set the percentage you want. The CSS: div.loader { position:relative; background-repeat:no-repeat; background-attachment: scroll; background-clip:content-box; background-position:0 0; margin:0; padding:0; } div.loader .loaded { position:absolute; top:0; left:0; background-repeat:no-repeat; background-attachment: scroll; background-clip:content-box; background-position:0 0; margin:0; padding:0; } div.loader .position { position:absolute; left:0; border-top:1px dashed black; width: 100%; text-align:center; margin:0; padding:0; min-height: 40px; } div.loader .position div { font-family: 'Concert One'; background:#2f574b; width: 25%; margin:0; padding:5px; margin: 0 auto; text-align:center; border-radius: 0 0 4px 4px; border-bottom: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; color:white; } The HTML: 0% Set 0% Set 25% Set 50% Set 100% The jQuery: $(function() { var loader_class = ".loader", control_class= ".set-loader"; var oLoader = { interval : 10, timer : null, upPerc : 0, upHeight : 0, curHeight : 0, step : 1, diff_bg : 0, diff_top : 0, size : $(loader_class).data("loader-size").split(" "), heightInt : 0, bimage : $(loader_class).data("back-image"), fimage : $(loader_class).data("front-image"), loader : $(loader_class).children('.loaded').eq(0), position : $(loader_c…
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43975779

http://stackoverflow.com/comment/43433849
has text: Take a look at the provided solution. Leveraging $compile and adding the directive dynamically works fine. Hope that is what you need.
type: AnswerComment
comment on: http://stackoverflow.com/a/27483261
score: 0
type: Comment

http://stackoverflow.com/q/27524804
has comment: http://stackoverflow.com/comment/43478259
type: Question
has body: I'm trying to get a form to clear after it is submitted, but none of the methods I've found are working. html &lt;div id ="newcomment"&gt; &lt;%= form_for([@thing, @good_comment], remote: true) do |f| %&gt; &lt;br&gt; &lt;%= f.text_area :text, :placeholder =&gt; "leave a comment...", class: "newcommentform" %&gt; &lt;div id="btn"&gt;&lt;%= f.submit "Post", class: "btn btn-small", id: "postacomment" %&gt;&lt;/div&gt; &lt;% end %&gt; &lt;/div&gt; javascript &lt;script type="text/javascript"&gt; $("#postacomment").click(function () { $('.newcommentform').clearForm(); }); &lt;/script&gt; Clicking on the submit button doesn't do anything, and in the web console I'm getting the following error: TypeError: $(...).clearForm is not a function I tried the other common methods as well. $("#newcommentform')[0].reset(); returns the error TypeError: $(...)[0] is undefined and $("#newcommentform.frm").trigger("reset"); doesn't return an error but doesn't do anything else either. What am I missing?
has answer: http://stackoverflow.com/a/27524972
tagged with: javascript
has answer: http://stackoverflow.com/a/27524859
tagged with: jquery
has comment: http://stackoverflow.com/comment/43478237
tagged with: ajax
score: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/27524859
has answer: http://stackoverflow.com/a/27524909
tagged with: reset
has comment: http://stackoverflow.com/comment/43478256
has title: Javascript: form won't clear when submitted
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27524909

http://stackoverflow.com/comment/43436452
type: Comment
comment on: http://stackoverflow.com/a/27503098
has text: I like your approach. But any reason not to prefer `document.querySelectorAll` over `document.getElementsByTagName`?
score: 0
type: AnswerComment

http://stackoverflow.com/q/27525101
favorite count: 0
answer count: 0
type: UnansweredQuestion
score: 1
has body: Why and how React.addons.cloneWithProps does chaining of event handlers? // All props were transferred from &lt;Element /&gt; to its child. // Event handlers from &lt;Element /&gt; will chain with event handlers from its child. var Case2 = React.createClass({ render: function () { var child = React.Children.only(this.props.children); return React.addons.cloneWithProps(child, this.props); } }); // All props were transferred from &lt;Element /&gt; to its child. // Event handlers from &lt;Element /&gt; will override event handlers from its child. var Case3 = React.createClass({ render: function () { var child = React.Children.only(this.props.children); return React.addons.cloneWithProps(child, _.omit(this.props, 'children')); } }); Here is the official documentation of the React.addons.cloneWithProps. It says nothing about this behavior. Here is the fiddle.
upvote count: 1
has title: React.addons.cloneWithProps chaining of event handlers
type: Question
tagged with: javascript
tagged with: reactjs
downvote count: 0

http://stackoverflow.com/a/27552347
answers question: http://stackoverflow.com/q/27552200
has body: Probably the easiest way would be to use Page Methods Of course you should consider the impact of making a request each second. If you have a lot of clients and the value updates rarely (say once every 30 seconds or less) you may consider using some push based technology like SignalR to be notified when the value changes instead of polling constantly. With 1 second interval it seems like using SignalR would make sense.
upvote count: 1
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/comment/43513233
comment on: http://stackoverflow.com/a/27542461
type: AnswerComment
has text: Well, your code is a bit strange. Your query runs exactly once at the extension reload - so it binds to a single tab. And I'm not quite sure what you're trying to achieve. I guess auth works by some kind of a session cookie - and if changing user-agent requires re-authentication, that would naturally invalidate the cookie for all tabs.
score: 0
type: Comment

http://stackoverflow.com/comment/117963521
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27559816
has text: This is great, I had to add the following `width_so_far += letter_width;` below the line that currently calculates the `width_so_far` to make it work, but otherwise, perfect, thanks!

http://stackoverflow.com/a/27639062
answers question: http://stackoverflow.com/q/27636167
type: AcceptedAnswer
downvote count: 0
upvote count: 8
type: Answer
has body: FastBoot means all the client-side logic used to take the JSON (or whatever) from the API will be also run on-server so that upon first load, the client will have an already-rendered page rather than a delay for the rendering to take place on the client. Then the data and rendering will be passed off to the client. It’s a modified version of the client running alongside the API server, consuming the same API as the browser client, used to improve snappiness on the client end. It would also serve proper sites to non-JavaScript clients like some web crawlers, curl, etc. It might sound like a hassle to maintain two clients, but their aim is to make it near-painless for most applications. You can listen to Tom Dale and Yehuda Katz on a recent podcast explaining it in more detail if you like.
accepted answer of: http://stackoverflow.com/q/27636167
score: 8

http://stackoverflow.com/q/27577141
has comment: http://stackoverflow.com/comment/43579500
score: 1
has answer: http://stackoverflow.com/a/27577356
favorite count: 0
accepted answer: http://stackoverflow.com/a/27577232
has title: How to find the index value of an object based on finding a property of an object within that object
upvote count: 1
has comment: http://stackoverflow.com/comment/43579519
tagged with: object
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/27577232
has body: Currently I am looping over this object to find the property:value pair I seek var obj = [ {thespecial:"cheese", taco:"none"}, {thespecial:"lettuce", taco:"double"}, {thespecial:"mustard", taco:"melty"} ] $.each(obj, function(i,v){ if(obj[i].thespecial == "lettuce") { //do some stuff.. } }); which works, however I have a case where I want to remove from the main obj the entire object that contains a match. That said, the index of the main object isn't in the same place. So I need to detect the index of the object that contains the match. Then remove it. Is there a way to detect from the main object the index of the match? I know if I were working with a simpler object or a simple array I could simply do indexOf, but I am not sure how to do that in this case.
tagged with: arrays
possible better answer: http://stackoverflow.com/a/27577202
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27577202
has comment: http://stackoverflow.com/comment/43579522
answer count: 3
downvote count: 0

http://stackoverflow.com/q/27579832
accepted answer: http://stackoverflow.com/a/27579953
type: Question
answer count: 2
tagged with: javascript
has body: I have two forms on the same page and I want to show only one form when the page loads and other form should only be visible when a link is clicked. I have tried many methods but failed every single time. I don´t know much about JS or jquery and any help would be appreciated. Here is my fiddle: http://jsfiddle.net/c73bjypu/1/ $(function () { $('#slide_btn_1').on('click', function(){ if($('#form_cont_one').css('form_content_one') == '0px') { $('#form_cont_one').animate({'form_cont_one': '-105%'}); $('#form_cont_two').animate({'form_cont_one': '0px'}); } else { $('#form_cont_one').animate({'form_cont_one': '0px'}); $('#form_cont_two').animate({'form_cont_one': '105%'}); }; }); });
tagged with: jquery
upvote count: 1
tagged with: slider
possible better answer: http://stackoverflow.com/a/27579920
has answer: http://stackoverflow.com/a/27579920
favorite count: 0
downvote count: 0
type: AnsweredQuestion
score: 1
has title: Javascript Sliding Divs Issue
has answer: http://stackoverflow.com/a/27579953

http://stackoverflow.com/a/27603262
type: Answer
has body: Modify the onclick function to this checkbox.onclick = (function(dataType) { return function () { console.log(dataType); }; }(dataTypeId1)) read on Javascript Closures to understand more
score: 1
has comment: http://stackoverflow.com/comment/43628838
upvote count: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27603143
answers question: http://stackoverflow.com/q/27603143

http://stackoverflow.com/comment/43633046
has text: @lolka_bolka in the "network" tab, i can see that both CSS are loaded, but the styling isn't applying.
comment on: http://stackoverflow.com/q/27605234
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27542414
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27538144
has body: I think you should have a look to this eclipse plugin https://github.com/angelozerr/angularjs-eclipse and most specifically this one https://github.com/angelozerr/tern.java I use it for angularjs and JS autocompletion. You can add autocompletion on jQuery and other common libraries. To install and use it, look https://github.com/angelozerr/tern.java/wiki.
has comment: http://stackoverflow.com/comment/44328797
has comment: http://stackoverflow.com/comment/43543811
has comment: http://stackoverflow.com/comment/44275524
type: AcceptedAnswer
downvote count: 0
score: 2
type: Answer
answers question: http://stackoverflow.com/q/27538144

http://stackoverflow.com/q/27603891
has body: Question 1 What does options.left = options.left || _KSM.drawOption.left means? I know _KSM.drawOption is referring to the object (also a function), but how does the || operator work here? Does it mean if _KMS.drawOption.left is undefinded, assign options.left to options.left? Question 2 Why the author didn't use this keyword in this case? I assume it's because in this demo he didn't create an instance, because he just do the calling once. Rigtht? (I've seen a lots of this in jquery plugin that's why I'm consufed when the author call the function name instead of this within a function)
has answer: http://stackoverflow.com/a/27604218
answer count: 2
downvote count: 4
has comment: http://stackoverflow.com/comment/43629991
linked to: http://stackoverflow.com/q/1378619
favorite count: 0
duplicate of: http://stackoverflow.com/q/1378619
type: UnansweredQuestion
score: -3
upvote count: 1
has title: use of OR in javascript object in my case confusion
has comment: http://stackoverflow.com/comment/43630005
has comment: http://stackoverflow.com/comment/43630023
type: Question
has comment: http://stackoverflow.com/comment/43630153
has answer: http://stackoverflow.com/a/27604273
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43630200

http://stackoverflow.com/comment/43484837
score: 0
type: AnswerComment
has text: @Mathletics sometimes you need to do things in series. Have you ever tried to cook a meal in parallel? You fry the egg AFTER you crack it open. You use an oven AFTER you preheat it. Etc. Don't invite me to your next dinner party. :)
type: Comment
comment on: http://stackoverflow.com/a/27512436

http://stackoverflow.com/q/27601338
answer count: 1
tagged with: jquery
has body: I'm trying to insert a slideshow on my app. Instead of the slideshow working as it should, I just get images stacked next to each other. HTML: rel="stylesheet"> Slide {{$index}} {{slide.text}} carousel.js controller: angular.module('financeApp').controller('CarouselDemoCtrl', function ($scope) { $scope.myInterval = 5000; var slides = $scope.slides = []; $scope.addSlide = function() { var newWidth = 600 + slides.length + 1; slides.push({ image: 'http://placekitten.com/' + newWidth + '/300', text: ['More','Extra','Lots of','Surplus'][slides.length % 4] + ' ' + ['Cats', 'Kittys', 'Felines', 'Cutes'][slides.length % 4] }); }; for (var i=0; i<4; i++) { $scope.addSlide(); } });
has answer: http://stackoverflow.com/a/27601637
tagged with: angularjs
type: UnansweredQuestion
tagged with: carousel
has comment: http://stackoverflow.com/comment/43625330
has comment: http://stackoverflow.com/comment/43625462
type: Question
has title: AngularJS Carousel not working
tagged with: javascript
has comment: http://stackoverflow.com/comment/43625466
score: 0

http://stackoverflow.com/comment/43548644
type: Comment
comment on: http://stackoverflow.com/q/27560770
has text: i cannot add image guys.. pls can you send your mail id. i will send you the screen shot
score: 0
type: QuestionComment

http://stackoverflow.com/comment/43469058
comment on: http://stackoverflow.com/q/27519665
score: 0
type: Comment
type: QuestionComment
has text: Have you checked the Inspector to see if there are any loading errors?

http://stackoverflow.com/q/27624103
has comment: http://stackoverflow.com/comment/43669097
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/43678446
type: Question
has comment: http://stackoverflow.com/comment/43670515
has comment: http://stackoverflow.com/comment/43673211
tagged with: jquery-mobile
answer count: 1
has answer: http://stackoverflow.com/a/27634293
tagged with: javascript
has title: Populate Google Maps Markers from JSON
tagged with: jquery
tagged with: google-maps-api-3
score: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/27634293
upvote count: 2
downvote count: 2
has body: I'm a jQuery Mobile beginner and I'm trying to read data from JSON file and populate the information (such as coordinates) in a Google Maps marker. This code works fine but no marker is populated. Anyone could assist me to spot the JSON issue? $(document).on("pageinit", "#agents", function () { var defaultLatLng = new google.maps.LatLng(-25.975769, 32.582499); // Default if (navigator.geolocation) { function success(pos) { // Location found, show map with these coordinates drawMap(new google.maps.LatLng(pos.coords.latitude, pos.coords.longitude)); } function fail(error) { drawMap(defaultLatLng); // Failed to find location, show default map } // Find the users current position. Cache the location for 5 minutes, timeout after 6 seconds navigator.geolocation.getCurrentPosition(success, fail, { maximumAge: 500000, enableHighAccuracy: true, timeout: 6000 }); } else { drawMap(defaultLatLng); // No geolocation support, show default map } function drawMap(latlng) { var myOptions = { zoom: 10, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("map-canvas"), myOptions); //READ FROM JSON $.getJSON('data/agents.json', function (data) { $.each(data.markers, function (i, marker) { var marker = new google.maps.Marker({ position: Marker.LatLng(marker.latitude, marker.longitude), map: map, title: Marker.title(marker.latitude, marker.longitude), }); }).click(function () { $('#map-canvas').gmap('openInfoWindow', { 'address': marker.address }, this); }); }); JSON { "markers": [{ "latitude": -25.975769, "longitude": 32.582499, "title": "ACME Company", "address": "my address 1" }, { "latitude": -25.977743, "longitude": 32.579959, "title": "XPTO Company", "address": "my address 2" }] }
type: AnsweredQuestion

http://stackoverflow.com/a/27629777
type: Answer
downvote count: 0
has body: Missing the hash tag on the selector inside the .on() $(document).ready(function(){ $('#insert_calendar_eda_form').on('submit', '#calendar_eda_add_form', function(event){ alert ('clicked add event'); event.preventDefault(); somefunction(); }); }); Here's a fiddle showing it working http://jsfiddle.net/ja3kaa4b/ - are you seeing any console errors in the browser?
score: 1
answers question: http://stackoverflow.com/q/27629638
has comment: http://stackoverflow.com/comment/43680159
upvote count: 1
has comment: http://stackoverflow.com/comment/43680153
has comment: http://stackoverflow.com/comment/43680224

http://stackoverflow.com/q/27532447
tagged with: css
score: 2
downvote count: 0
has answer: http://stackoverflow.com/a/27532873
type: Question
has body: I'm creating an app to monitor nodes on a cluster and this is an example of the visual state. Each small box in the grid represents a node and currently, when hovering over one node, the rest in that respective rack (grid) fadeout. Here is the link via photobucket since I can't insert images due to my minimal reputation: visual state In Chrome and Firefox, hovering in and out a single node will instantly fadein/out the rest of the nodes in the rack, but in IE 11 it has a noticeable lag. I know that IE's javascript engine is slower than Chrome and Firefox, but I'm throwing this out there to see if the SO community can pick apart my code and suggest better ways of doing this as I am not the greatest front end programmer. Thank you and here is snippets of my code: from the django template (each node has id="matrix-box-<node #>"): visual state {% for row in v.22 %} {% if v.23 == "ca" %} {% if forloop.counter0|divisibleby:4 %} {% endif %} {% elif v.23 == "cs" %} {% if forloop.counter0|divisibleby:8 %} {% endif %} {% endif %} {% for elem in row %} {% if elem.1 == "#49E20E" %} {% elif elem.1 == "#0000CD" %} {% elif elem.1 == "yellow" %} {% elif elem.1 == "#E3170D" %} {% elif elem.1 == "brown" %} {% elif elem.1 == "orange" %} {% elif elem.1 == "black" %} {% elif elem.1 == "#cccccf" %} {% endif %} {% endfor %} ... other code from css code: .node { width: 4px; height: 4px; float: left; border: 1px solid #B0B0B0; background: #cccccf; margin: 0 !important; cursor: pointer; filter: alpha(opacity=100); opacity: 1; } .faded .node-faded { width: 4px; height: 4px; filter: alpha(opacity=50); opacity: .5; } .active { width: 4px; height: 4px; float: left; border: 1px solid black; background: #cccccf; margin: 0 !important; cursor: pointer; filter: alpha(opacity=100); opacity: 1; } from js code: var node = null; var node_id = null; var rack = null; var nodes = null; $(document).ready(function(){ $('[id^=matrix-box]').on({ mouseenter: function(){ node = $(this); rack = node.parent().paren…
tagged with: javascript
tagged with: jquery
upvote count: 2
answer count: 1
has title: jquery addClass and removeClass slow in IE 11
favorite count: 0
tagged with: frontend
type: UnansweredQuestion

http://stackoverflow.com/comment/43665430
has text: Have updated the code and descripition of it. Generally i use the jquery sortable ui, and i do not know how to save the sequence back to ms sql server after pressing save button.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27622041
score: 0

datetimepicker
type: Tag
tag name: datetimepicker
tags question: http://stackoverflow.com/q/27584892

http://stackoverflow.com/q/27587074
type: AnsweredQuestion
score: 3
has title: How to add Days in a islamic or HijriDate?
has comment: http://stackoverflow.com/comment/43598478
type: Question
has body: I have two text boxes.One is for taking StartDate from a islamic calender,so i am using jQuery Calendars Datepicker. The ExpireDate textbox will automatically 60days from StartDate.so i am writing the logic in Onclose event of datepicker. $(document).ready(function () { ShowCalender(); }); function ShowCalender() { var calendar = $.calendars.instance('islamic'); $('[id$=TxtOrderDate]').calendarsPicker({ calendar: calendar, onClose: function (dates) { var expiryDate = new Date(dates); var x = 60; expiryDate.setDate(expiryDate.getDate() + x); document.getElementById('&lt;%=TxtExpirationDate.ClientID%&gt;').value = expiryDate; }, showTrigger: '&lt;img src="../../../_layouts/15/1033/Saudia/Images/calender.png" alt="Popup" class="trigger img"&gt;' }); } but here the ExpireDate fill with Date Sun Apr 24 03:00:00 UTC+0300 1436,which is a gregorian date. expiredate mustbe the islamic Date. How to add specific number of Days in FromDate? Please help.
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: datepicker
answer count: 1
upvote count: 4
tagged with: asp.net
has answer: http://stackoverflow.com/a/27613999
accepted answer: http://stackoverflow.com/a/27613999
downvote count: 1
has comment: http://stackoverflow.com/comment/43598431

http://stackoverflow.com/comment/44480634
score: 0
type: Comment
has text: Thanks @jfriend00 - The files are already uploaded and on the server by the time this button is pressed. So all that this button is sending as form information is a few checkboxes. I kept the delay to 3000ms just incase anyway. Side question - I noticed that unless I use `session_write_close()` on the server side PHP script, this ajax does not redirect event after the timeout. In other words its waiting for some end response from the server. Do you know why?
comment on: http://stackoverflow.com/a/27559675
type: AnswerComment

http://stackoverflow.com/comment/43609451
type: Comment
has text: thank you, shall try this tomorrow and let you know how it goes :)
comment on: http://stackoverflow.com/a/27569137
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43618446
type: AnswerComment
type: Comment
has text: What is problem? I am not getting what you are trying to say " I need to get only length of the object list " ?
score: 0
comment on: http://stackoverflow.com/a/27597018

http://stackoverflow.com/q/27553749
type: Question
score: 0
accepted answer: http://stackoverflow.com/a/27553774
answer count: 1
tagged with: ios
tagged with: javascript
has body: I have the player, that should loop sound automaticly endless times6 while not stopping. Here is his initial (cofeescript): @audio = $("&lt;audio&gt;&lt;source src='#{@getAudioUrl()}' type='audio/mpeg' /&gt;&lt;/audio&gt;").appendTo(@vb) @audio.on("ended", =&gt; @audio.currentTime=0; @audio.play()) @audio = @audio.get(0) It correctly work in all desktop browsers, but when this player is emedded via iframe to the page and opened by th any mobile browser - it stopped after 2-10 loops. What can be the matter?
has title: Loop on mobile devices
tagged with: android
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
tagged with: audio
has answer: http://stackoverflow.com/a/27553774

http://stackoverflow.com/a/27581480
downvote count: 0
has comment: http://stackoverflow.com/comment/43591877
has comment: http://stackoverflow.com/comment/43591462
has comment: http://stackoverflow.com/comment/43719401
has comment: http://stackoverflow.com/comment/82189987
answers question: http://stackoverflow.com/q/27581215
has body: try to rake assets:precompile manually in dev maybe theres an error that mruby considers as a reason to not push :D
upvote count: 2
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/43590697
has comment: http://stackoverflow.com/comment/43589325
has comment: http://stackoverflow.com/comment/43590296
has comment: http://stackoverflow.com/comment/43589800

http://stackoverflow.com/comment/43660735
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27619696
has text: It's because the spaces are non-breaking not normal whitespace.

http://stackoverflow.com/q/27487101
tagged with: javascript
has answer: http://stackoverflow.com/a/27487297
has body: I would like to build a directive which emulates radio button behaviour, this seems fairly trivial if you control the radio buttons externally, but I want to do it so that the radio buttons control themselves. This means they become self-contained bits of code. Angular Directives are not my strong point, but here is what I have come up with so far: HTML: Template: {{ label }} And the JS: .directive("testRadiobutton", function() { return { restrict: "AE", scope: { label: "@label", name: "@name", value: "@value", checked: "=checked" }, templateUrl: "../../test_components/test-radiobutton/test-radiobutton.html", controller: function ($scope) { $scope.toggleChecked = function () { $('test-radiobutton[name='+$scope.name+']').attr("checked", "false"); $('test-radiobutton[name='+$scope.name+'][value='+$scope.value+']').each(function (index) { $(this).attr("checked", "true"); }); }; }, link: function(scope, element, attributes){ } }; }); The problem is that the other radio buttons aren't deselecting when you select a new one with the same name, the jQuery is looping through the elements correctly and finds the other elements (tested using .each()) but doesn't toggle their values. Obviously I'm not doing this how Angular intends so how would I do this? EDIT - to reflect using a service (still not working) New controller within directive uses my new radio button service. controller: function ($scope, RadioButtonService) { $scope.toggleChecked = function () { RadioButtonService.selectRadio($scope.name, $scope.value); }; }, And my service: angular.module("test_components.testRadiobutton.service", []) .factory("RadioButtonService", function () { return { deselectAllRadios: function (radio_name) { $('test-radiobutton[name='+radio_name+']').each(function (index) { console.log("deselecting"); angular.element($(this)).scope().checked = false; }); }, selectRadio: function (radio_name, radio_value) { this.deselectAllRadios(radio_name); $('test-radiobutton[name='+radio_name+'][value='+…
answer count: 2
has comment: http://stackoverflow.com/comment/43406191
downvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27545615
tagged with: angularjs
has comment: http://stackoverflow.com/comment/43405910
has comment: http://stackoverflow.com/comment/43405882
type: AnsweredQuestion
score: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/27545615
has comment: http://stackoverflow.com/comment/43405886
has comment: http://stackoverflow.com/comment/43405913
type: Question
tagged with: angularjs-directive
has title: AngularJS Directives emulate radio button
possible better answer: http://stackoverflow.com/a/27487297

http://stackoverflow.com/a/27518210
has comment: http://stackoverflow.com/comment/43485225
has body: Edit: the OP totally changed his question after my answer. Please look at the edit history before assuming I was off topic If you are tempted to use the same ID for multiple items, you need to use a class. You can target classes within specific parent nodes. For example, in jQuery: var elem = $('.parentClass .childClass'); This would target only items of .childClass that are children of .parentClass. You could select other instances of .childClass with different parent elements by changing the parent element in the CSS selector. var eleme = $('.otherParentClass .childClass');
score: 0
has comment: http://stackoverflow.com/comment/43472580
type: Answer
has comment: http://stackoverflow.com/comment/43485908
downvote count: 1
has comment: http://stackoverflow.com/comment/43485750
answers question: http://stackoverflow.com/q/27518183
upvote count: 1

http://stackoverflow.com/q/27561456
has comment: http://stackoverflow.com/comment/43548903
has answer: http://stackoverflow.com/a/27561614
has comment: http://stackoverflow.com/comment/43551543
score: 0
has comment: http://stackoverflow.com/comment/43548836
has body: I need to create table head.How can i write using document.write. I try <thread> tag but it's not working?
answer count: 1
tagged with: javascript
type: UnansweredQuestion
has title: Create table head using JavaScript
has comment: http://stackoverflow.com/comment/43548769
type: Question

http://stackoverflow.com/comment/43559481
has text: It's not related your problem, but you have an unwanted output befor anything, if you see your source code: `AN=> http://www.disciplinexgames.com/beta/index` And you are define your `<styles>` out of the ` `. So there are a lot of invalid things in your HTML. Just FYI.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27567127
score: 0

http://stackoverflow.com/a/27489931
type: AcceptedAnswer
downvote count: 0
has body: Drag is supposed to pass d — the datum bound to the element being dragged – into your handler function .on("drag", function(d,i) { ... }. In your case d is undefined, which is why setting d.x complains that it can't read property 'x' of undefined. The reason d is undefined is because no datum is bound to the image. The way data gets bound to elements is either: Using d3 selection's .data() method to bind and then append the enter()'ing to elements — rather than just svg.appending them as you do. Or, If you don't want to do #1, then you need to explicitly bind a datum to the element you created, using the .datum() method. Doing one of those 2 raises the question of what d is supposed to be. Well... it should be an object with properties x and y, since the drag handler wants to modify those props. x and y should probably be initialized to xpos and ypos, i.e. the initial position. Once x and y are part of a datum, you should switch to setting the image's x and y positions based on them, rather than hardcoded to xpos, ypos. Putting it all together, if you picked option #2, then it looks like this: svg.append("svg:image") .datum({ x: xpos, //-starting 'x' position y: ypos //-starting 'y' position }) .attr("xlink:href", origImage) //-original image .attr("x", function (d) { return d.x; }) .attr("y", function (d) { return d.y; }) .attr("width",iconWidth) //-icon width .attr("height",iconHeight) //-icon height .call(button_drag)
has comment: http://stackoverflow.com/comment/43413556
answers question: http://stackoverflow.com/q/27489041
has comment: http://stackoverflow.com/comment/43413668
type: Answer
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27489041

http://stackoverflow.com/q/27478953
downvote count: 0
has answer: http://stackoverflow.com/a/41734288
tagged with: bootstrap-typeahead
upvote count: 28
type: Question
has comment: http://stackoverflow.com/comment/43391452
possible better answer: http://stackoverflow.com/a/41734288
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43391833
has answer: http://stackoverflow.com/a/76505452
has comment: http://stackoverflow.com/comment/43391357
has title: TypeError: $(...).typeahead is not a function
favorite count: 0
score: 28
has body: This is very basic code. Still I am facing a problem. I think I am missing something, as mentioned on bootstrap site "Plugins can be included individually (though some have required dependencies), or all at once. Both bootstrap.js and bootstrap.min.js contain all plugins in a single file." So I included boostrap.js and still getting that error, what are the other dependencies? Below is the code. Member Regards Aadam
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/34919778
accepted answer: http://stackoverflow.com/a/34919778
answer count: 4
has answer: http://stackoverflow.com/a/54883674
has comment: http://stackoverflow.com/comment/43391397
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43391565

http://stackoverflow.com/a/27603581
upvote count: 1
has body: please, take a look on this question/answer: How to replace a html content with jsf reRender or ajax load, and rebind the new DOM with AngularJS? It's show how to "rebind" angularjs after a jquery change, and how to call a angularjs function from jQuery. But, to be short, you can call a angularjs function from scope with a code like this (identifying your controller by an id): $('#idFromMyController').scope().myFunction();
answers question: http://stackoverflow.com/q/27587352
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/q/27487199
tagged with: django
tagged with: python
has answer: http://stackoverflow.com/a/27487405
has body: I am trying to do some coding, further manipulations, blah blah and finally get json object and return a Jsonp(json object wrapped in javascript function) I managed to create till json object which is js_on = {"name": "xxx","job":"unemployed", "remarks": "enjoying_life"}. I am stuck at doing JSONP part. The tutorials I read are pretty confusing and demands many lines of coding. Is it really that complicated or is there any simpler way to do that? my code for JSONP starts with the following. callback = request.GET.get('callback') if callback: ...... ...... return(HttpResponse(...,content_type ='application/javascript')) On server side I am using Python and Django framework. Thanks.
has title: JSONP Response with Django
score: 2
tagged with: http://stackoverflow.com/tag/json
type: Question
tagged with: jsonp
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/43408124
linked to: http://stackoverflow.com/q/2067472
answer count: 1
favorite count: 0
upvote count: 2
type: UnansweredQuestion

http://stackoverflow.com/comment/43488339
comment on: http://stackoverflow.com/q/27515207
type: QuestionComment
type: Comment
score: 0
has text: That's what I originally thought, but using 'event.stopPropagation()' made and makes no difference. I tried using 'this' before but, being Javascript, that obviously didn't work. Not seeing my error, I thought that I needed to specify with the actual selector and what you see is the result. So, thank you for clearing up selector scope. It still doesn't want to work for some reason, but thanks for your help.

http://stackoverflow.com/comment/43408077
type: Comment
has text: But i want to return my view also like return view(MysdrListCollection.OrderBy(a => a.DueDate));
comment on: http://stackoverflow.com/a/27488233
type: AnswerComment
score: 0

http://stackoverflow.com/a/27492471
has comment: http://stackoverflow.com/comment/43416574
score: 5
upvote count: 5
has body: The $scope in your filter code won't be the same as the $scope from your JSON object (I'm assuming; you didn't post all your code). You should update your filter to take an argument, specifically the list of countries used to match against value passed to the filter. app.filter('fetchname', function() { return function(input, countries) { angular.forEach(countries, function(value, key) { if (key === input) { return value; } }); }); You could use it in your HTML like this (given that countries is populated for the current scope):
downvote count: 0
answers question: http://stackoverflow.com/q/27492287
type: Answer

http://stackoverflow.com/q/27492245
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/74239507
has answer: http://stackoverflow.com/a/27492379
accepted answer: http://stackoverflow.com/a/27492350
linked to: http://stackoverflow.com/q/3744289
type: Question
upvote count: 4
possible better answer: http://stackoverflow.com/a/27492323
has answer: http://stackoverflow.com/a/27492323
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27492350
has answer: http://stackoverflow.com/a/69887680
has title: JQuery set dropdown list box selected option - not by value, but by display text
has body: This has probably been answered, but I am unable to find the answered question anywhere... Assuming we have the following HTML... Dropdown Test Please select a value... My Custom Value 1 My Custom Value 2 My Custom Value 3 What would the JQuery command look like to set 'My Custom value 2' to be the currently selected option in the dropdown list box, assuming I do not know the index 'value' value, and can only identify the item by the text 'My Custom Value 2'?
favorite count: 0
has comment: http://stackoverflow.com/comment/43416119
linked to: http://stackoverflow.com/q/17856523
answer count: 5
downvote count: 2
has comment: http://stackoverflow.com/comment/43416105
has comment: http://stackoverflow.com/comment/123539403

tizen
tags question: http://stackoverflow.com/q/27564609
tags question: http://stackoverflow.com/q/27633756
type: Tag
tag name: tizen

http://stackoverflow.com/q/27499948
tagged with: javascript
has answer: http://stackoverflow.com/a/27500003
has comment: http://stackoverflow.com/comment/43430455
linked to: http://stackoverflow.com/q/20508412
has answer: http://stackoverflow.com/a/27501312
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/43430458
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/27500003
has answer: http://stackoverflow.com/a/27500173
possible better answer: http://stackoverflow.com/a/27500088
tagged with: http://stackoverflow.com/tag/html
has title: Why my angular code turns to comment?
linked to: http://stackoverflow.com/q/20165390
has answer: http://stackoverflow.com/a/27500088
answer count: 4
score: 2
type: AnsweredQuestion
upvote count: 2
type: Question
has body: I use angularjs. My html to be comment after render. Why? Before render code: {{date}} After render:

http://stackoverflow.com/q/27518989
has comment: http://stackoverflow.com/comment/43467702
downvote count: 1
tagged with: ng-class
accepted answer: http://stackoverflow.com/a/27519052
type: Question
upvote count: 4
has title: Angularjs ng-class
tagged with: javascript
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/45464445
has answer: http://stackoverflow.com/a/27519052
tagged with: angularjs
has body: ng-class is not working with multiple condition. Apply a class when both conditions are true Here open and active class should apply when childActive is equal to header and list items is not empty &lt;li ng-class="{'open':list.items.length&amp;&amp;childActive==header, 'active':list.items.length&amp;&amp;childActive==header}" ng-repeat="list in listEntities"&gt;
type: AnsweredQuestion
score: 3

http://stackoverflow.com/q/27486274
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43404508
tagged with: asp.net
score: -1
downvote count: 2
upvote count: 1
accepted answer: http://stackoverflow.com/a/27486331
has comment: http://stackoverflow.com/comment/43404403
has comment: http://stackoverflow.com/comment/43404715
type: AnsweredQuestion
has title: Why $.ajax() call back function are never called?
has comment: http://stackoverflow.com/comment/43405037
possible better answer: http://stackoverflow.com/a/27486339
type: Question
has answer: http://stackoverflow.com/a/27486339
answer count: 2
has body: I have a web application which has many buttons that call a code-behind page to execute some functions in SQL, then returns a message to the user.. All buttons work as expected. Except for the one I am about to describe. Note that I have copied the same javascript code from another button click event. Here is what happens when I click the button: a) click event is triggered. b) any code before the $.ajax() function works fine c) code behind function is called, and works as expected d) return value from code behind is fine. e) success/error functions in $.ajax() are not triggered. Why?? What is it that I am doing wrong here? I have the following HTML: &lt;div class='button approve' req_id='123' user_id='ahmad' reason='something'&gt; Approve &lt;/div&gt; And the following javascript: $(document).on('click', '.button.approve', function () { var req_id = $(this).attr('req_id'); var reason = $(this).attr('reason'); var user_id = $(this).attr('reason'); alert('Before ajax'); //this is triggered normally. $.ajax({ type: "POST", url: "getData.aspx/approve", data: "{req_id:'" + req_id + "', reason:'" + reason + "',user_id:'" + user_id + "'}", contentType: "application/json; charset=utf-8", dataType: "json", succss: function (data) { alert('success'); //this never gets called }, error: function (a, b, c) { alert('error'); //this never gets called } }); }); and the following ASPX code behind: &lt;WebMethod()&gt; Public Shared Function approve(ByVal req_id As String, ByVal user_id As String, ByVal reason As String) As String Dim reply As String = "-received data is " &amp; req_id &amp; user_id &amp; reason Return reply 'in debug mode, the value of reply as valid End Function
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/43404572
tagged with: ajax
has answer: http://stackoverflow.com/a/27486331

http://stackoverflow.com/comment/43426137
has text: why is it tagged with jQuery?
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27497329

http://stackoverflow.com/a/43442360
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27533969
has body: In your JavaScript right below the variable stickyNavTop, put this: jQuery("nav").wrap('&lt;div class="nav-placeholder"&gt;&lt;/div&gt;'); jQuery(".nav-placeholder").height(jQuery("nav").outerHeight And in your CSS add this: .sticky {position: fixed; top: 0;} Hopefully, that should fix it.

http://stackoverflow.com/q/27533405
type: UnansweredQuestion
tagged with: yii2
type: Question
has title: Can't show success message after saving data from yii2 ActiveForm (in modal)
tagged with: modal-dialog
answer count: 1
tagged with: javascript
has body: On main page I've got a button which call bootstrap modal with activeform. On submit this form adds new row in my db. But I dont look a success message neither in this modal nor on the main page. Instead I get to page mysite.ru/category/create with white screen and text of dialog message on it ("Dialog contents here..."). How not to redirect user on other page? Just close modal and/or redirect on main page and show here flashmessage about successful adding row. my button in views/site/index.php: <?= Html::button( 'create', ['value' => Url::to(['category/create']), 'id' => 'modalButton' ]) ?> <?php Modal::begin([ 'id' => 'modal' ]); echo " "; Modal::end(); ?> my controller SiteController has: public function actionIndex() { return $this->render('index'); } CategoryController has public function actionCreate() { $model = new Category; if ($model->load(Yii::$app->request->post()) && Yii::$app->request->isAjax) { $model->refresh(); Yii::$app->response->format = 'json'; return ActiveForm::validate($model); } elseif ($model->load(Yii::$app->request->post()) && $model->save()) { Yii::$app->session->setFlash('contactFormSubmitted'); //$model->refresh(); $this->refresh(); Dialog::begin([ 'clientOptions' => [ 'modal' => true, ], ]); echo 'Dialog contents here...'; Dialog::end(); //$this->redirect('category/create'); } else { return $this->renderAjax('create', [ 'model' => $model, ]); } views/category/create.php: <?php use yii\helpers\Html; /* @var $this yii\web\View */ /* @var $model app\models\Category */ $this->title = 'Create Category'; $this->params['breadcrumbs'][] = ['label' => 'Categories', 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; ?> <?= Html::encode($this->title) ?> <?= $this->render('_form', [ 'model' => $model, ]) ?> and views/category/_form.php <?php use yii\helpers\Html; use yii\widgets\ActiveForm; use yii\jui\Dialog; /* @var $this yii\web\View */ /* @var $model app\models\Category */ /* @var $form yii\widgets\ActiveForm */ ?> <?php $thi…
has answer: http://stackoverflow.com/a/44825631
score: 0
tagged with: active-form

http://stackoverflow.com/q/27600643
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43624149
type: Question
answer count: 2
has body: I have this Google map code and having markers sidebar. Now I want to add active class to button of selected marker. I am not good with google coding so I hope you will guide me in my code. JSFiddle: http://goo.gl/cHIrmj JS Code: var mapOpts = { mapTypeId: google.maps.MapTypeId.ROADMAP, scaleControl: true, scrollwheel: false } var map = new google.maps.Map(document.getElementById("map"), mapOpts); // We set zoom and center later by fitBounds() /** * makeMarker() ver 0.2 * creates Marker and InfoWindow on a Map() named 'map' * creates sidebar row in a DIV 'sidebar' * saves marker to markerArray and markerBounds * @param options object for Marker, InfoWindow and SidebarItem * @author Esa 2009 */ var infoWindow = new google.maps.InfoWindow(); var markerBounds = new google.maps.LatLngBounds(); var markerArray = []; function makeMarker(options) { var pushPin = new google.maps.Marker({ map: map }); pushPin.setOptions(options); google.maps.event.addListener(pushPin, "click", function () { infoWindow.setOptions(options); infoWindow.open(map, pushPin); if (this.sidebarButton) this.sidebarButton.button.focus(); }); var idleIcon = pushPin.getIcon(); if (options.sidebarItem) { pushPin.sidebarButton = new SidebarItem(pushPin, options); pushPin.sidebarButton.addIn("sidebar"); } markerBounds.extend(options.position); markerArray.push(pushPin); return pushPin; } google.maps.event.addListener(map, "click", function () { infoWindow.close(); }); /** * Creates an sidebar item * @constructor * @author Esa 2009 * @param marker * @param options object Supported properties: sidebarItem, sidebarItemClassName, sidebarItemWidth, */ function SidebarItem(marker, opts) { var tag = opts.sidebarItemType || "button"; var row = document.createElement(tag); row.innerHTML = opts.sidebarItem; row.className = opts.sidebarItemClassName || "sidebar_item"; row.style.display = "block"; row.style.width = opts.sidebarItemWidth || "120px"; row.onclick = function () { google.maps.event.trigger(marker, 'click');…
tagged with: google-maps
tagged with: javascript
tagged with: jquery
tagged with: google-maps-api-3
score: 0
has title: How to add class to button of selected marker
has answer: http://stackoverflow.com/a/27601156
accepted answer: http://stackoverflow.com/a/27601156
possible better answer: http://stackoverflow.com/a/27600981
has answer: http://stackoverflow.com/a/27600981

http://stackoverflow.com/comment/44184083
has text: What does'nt work for you?If it is openOPC that doesnt work, you are probably lacking some some of the libraries like pythoncom. Install pywin32 and you can get going with openOPC.
comment on: http://stackoverflow.com/a/27585979
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/43505609
comment on: http://stackoverflow.com/a/27514478
has text: Considering you need to examine the return to recur, creating an observable, as you see above, is as RxJS as it can get. You can still compose off of this observable, just like any other observable. FWIW, it's literally created the same way in any of the operator methods you might use create observables internally.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/43678211
type: Comment
score: 0
type: AnswerComment
has text: Yes I generate the key. And this is executed in the client side. But I want to have a link, for a download, poiting a variable with the key (private). This is part of a project that I'm still trying to develop, that's why I want to be able to save the private key, offering it via download.
comment on: http://stackoverflow.com/a/27625290

http://stackoverflow.com/comment/43472580
type: AnswerComment
comment on: http://stackoverflow.com/a/27518210
has text: Misses the point of the question. Id attributes are being used to associate the label with its control.
score: 0
type: Comment

http://stackoverflow.com/a/27486921
type: Answer
has comment: http://stackoverflow.com/comment/43410780
score: 2
upvote count: 2
has body: Basically for me it's working fine when changing the value manually by keyboard. Please notice that the "change"-Event on input-fields is only triggered when losing focus. If you are changing the value by jQuery for example (which I guess you are), then you should manually trigger the change event by adding a .trigger('change'); at the end. A similar question can be found here: jQuery - Detect value change on hidden input field.
has comment: http://stackoverflow.com/comment/43472208
answers question: http://stackoverflow.com/q/27486699
downvote count: 0
has comment: http://stackoverflow.com/comment/43514081

http://stackoverflow.com/comment/43392230
type: Comment
has text: I think you must make the promise cancelable *first*, not last.
comment on: http://stackoverflow.com/q/27479419
score: 0
type: QuestionComment

http://stackoverflow.com/comment/43569234
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27571818
has text: how are you updating the text file ? manually or via script? how are you calling it ? standard href ? can you add js to the html?

http://stackoverflow.com/q/27571549
answer count: 2
has title: Javascript Regex patterns to pickup URLs
accepted answer: http://stackoverflow.com/a/27571713
tagged with: regex
has body: To start off I know this is bad practice. I know there are libraries out there that are supposed to help with this; however, this is the task to which I was assigned and changing this whole thing to work with a library will be much more work than we can take on right now (since we are on a tight time frame). In our web app we have fields that people usually type URLs into. We have been assigned a task to 'linkify' anything that looks like a URL. Currently the people who wrote our app seemed to have used a regex to determine if a string of text is a URL. I am basing my regex off that (I am no regex guru, not even a novice). The 'search' regex looks like so function DoesTextContainLinks(linktText) { //replace all urls with links! var linkifyValue = /((ftp|https?):\/\/)?(www\.)?([a-zA-Z0-9\-]{1,}\.){1,}[a-zA-Z0-9]{1,4}(:[0-9]{1,5})?(\/[a-zA-Z0-9\-\_\.\?\&\#]{1,})*(\/)?$/.test(linktText); return linkifyValue; } Using this regex and https://regex101.com/ I have come up with two regexes that work most of the time. function WrapLinkTextInAnchorTag(linkText) { //capture links that only have www and add http to the begining of them (regex ignores entries that have http, https, and ftp in them. They are handled by the next regexes) linkText = linkText.replace(/(^(?:(?!http).)*^(?:(?!ftp).)(www\.)?([a-zA-Z0-9\-]{1,}\.){1,}[a-zA-Z0-9]{1,4}(:[0-9]{1,5})?(\/[a-zA-Z0-9\-\_\.\?\&\#]{1,})*(\/)?$)/gim, "$1"); //capture links that have https and http on them and fix those too. No need to prepend http here linkText = linkText.replace(/(((https|http|ftp?):\/\/)?(www\.)?([a-zA-Z0-9\-]{1,}\.){1,}[a-zA-Z0-9]{1,4}(:[0-9]{1,5})?(\/[a-zA-Z0-9\-\_\.\?\&\#]{1,})*(\/)?$)/gim, "$1"); return linkText; } The problem here is that some complex URLs seem to not work. I can't understand exactly why they don't work. regex101 is pretty bad ass in that it tells you what each part is doing; however, my trouble is combining these keywords in the regex to get them to do what I want. I have two scenarios to a…
has answer: http://stackoverflow.com/a/27571667
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27571713
possible better answer: http://stackoverflow.com/a/27571667
tagged with: javascript
type: Question
score: 0

http://stackoverflow.com/comment/43490768
has text: Add a `$('#map-txt').trigger('change')` whenever you updated its value via AJAX. The `change` doesn't get triggered when there is no user interaction with it.
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/27531081

http://stackoverflow.com/a/27632025
has body: After a lot of work i have done this Now i can Login with Facebook Using React.js Connect I have use in this tutorial backbone.js I think it is useful for someone Thank you
answers question: http://stackoverflow.com/q/27616087
type: AcceptedAnswer
type: Answer
score: 5
upvote count: 5
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27616087

http://stackoverflow.com/comment/43663454
has text: do you want to animate only at the start. i.e at the first click.. or on each click it should animate to new position
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27621415

http://stackoverflow.com/comment/43621786
comment on: http://stackoverflow.com/a/27598237
type: Comment
has text: Hi Vivek, I tried this but got an error "The name 'Response' does not exist in the current context"
type: AnswerComment
score: 0

http://stackoverflow.com/comment/43510623
has text: No, and I'm not the only one who says so: from Dr. Axel Rauschmayer's [blog](http://www.2ality.com/2012/12/arrays.html): `array indices in JavaScript are actually strings. Naturally, engines perform optimizations under the hood so that, internally, that is not true. But it is how the spec defines them` and `Pretend array indices are numbers. That’s what usually happens under the hood and the general direction in which ECMAScript is moving.` Effectively the ECMAScript 262 spec just ensures to the user *unambiguous* array-references regardless of getting/setting `'9'` or `9` up to 32bit Unsigned
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27538227
type: AnswerComment

http://stackoverflow.com/comment/43486972
type: Comment
score: 2
has text: `visibility` may be a better property to play with, as it doesn't mess up layouts.
type: AnswerComment
comment on: http://stackoverflow.com/a/27529180

http://stackoverflow.com/q/27587676
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/43599744
has comment: http://stackoverflow.com/comment/50341763
tagged with: file-upload
has title: Is it possible to show a progressbar in a normal file upload, without ajax?
type: UnansweredQuestion
has body: Is it possible to show a progressbar in a normal file upload, without ajax? For example I have a form : &lt;form action='fileupload.php' method='POST'&gt; &lt;input type='file' name='file1' /&gt; &lt;input type='submit' value='Upload'&gt; &lt;/form&gt; And I select a file and click upload. Is it possible to display a progressbar, until the file is completely uploaded and redirects the page? Because non-AJAX upload is good for my situation and I don't want to use an entire complex plugin just for a progressbar. EDIT : I understand this question has not had a conclusive answer so far, but it is definitely not a duplicate of the question marked. Explanation for those who can't understand: The progress of a file upload should be known at two places- The Server, while receiving the file packets. The Client Browser, while receiving the acknowledgement from the server for respective packets (Internet Protocols?). Currently almost all the algorithms for progress-bars are based on explicitly sending AJAX data parallel to the file upload between javascript on client and PHP on server. My question is if there is any way to know the progress of file upload without the parallel communication, since the browser must already know the packets received in at the server...
tagged with: php
has comment: http://stackoverflow.com/comment/43599868
has comment: http://stackoverflow.com/comment/43599747
linked to: http://stackoverflow.com/q/849237
linked to: http://stackoverflow.com/q/26674575
has comment: http://stackoverflow.com/comment/110186356
has comment: http://stackoverflow.com/comment/43601580
upvote count: 5
duplicate of: http://stackoverflow.com/q/849237
has answer: http://stackoverflow.com/a/27588555
type: Question
has comment: http://stackoverflow.com/comment/50335988
score: 5
linked to: http://stackoverflow.com/q/374644
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/27533745
has body: You have quite a few issues with your code here, let's go over them. 1.) Never create a javascript array like this new Array("silver", "#BAF3C3", "#c3baf3", "red"). It's overly verbose and provides no benefit. Use array literal syntax, like this: ["silver", "#BAF3C3", "#c3baf3", "red"] 2.) The functionality is pretty trivial with a single added variable: function randomTextAndIconColor(){ var color = bgcolorlist[Math.floor(Math.random()*bgcolorlist.length)]; document.querySelector('.monobg').style.backgroundColor = color; document.querySelector('body').style.color = color; }
score: 0
answers question: http://stackoverflow.com/q/27533532
type: Answer

http://stackoverflow.com/a/27596328
has comment: http://stackoverflow.com/comment/43638092
has body: Seems like you would have to modify the source of the foundation library you're working with. In the Foundation.lib.tooltip it sets up an event listener for mouseenter and mouseleave. You would want to delete and only have listeners to touchstart (for mobile / touchscreen devices) &amp; a mouseclick (which I'm assuming is what MSPointerDown does). reference: https://github.com/zurb/foundation/blob/master/js/foundation/foundation.tooltip.js#L62 I think you could also clear the logic on lines 86 - 92 that only follows the tooltip if the user has hovered over the tooltip for a certain duration https://github.com/zurb/foundation/blob/master/js/foundation/foundation.tooltip.js#L86-L92
upvote count: 2
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/43640875
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27569553
answers question: http://stackoverflow.com/q/27569553

http://stackoverflow.com/a/38483714
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/27492561
downvote count: 0
score: 1
has body: after registering script and css, on your htlm section add this script &lt;script type="text/javascript"&gt; window.onbeforeunload = renderLoading; function renderLoading() { Pace.stop(); //Pace.start(); Pace.bar.render(); }

http://stackoverflow.com/comment/43479082
type: Comment
type: QuestionComment
score: 0
has text: Good question, needs good answer.
comment on: http://stackoverflow.com/q/27525273

http://stackoverflow.com/comment/43504008
type: AnswerComment
has text: Yes, that is my point. That 'magic' is what makes the differences between an object and an array (in javascript terms). In other words, when `.length` or `new array(4294967300)` Stops working. However nitpicky, there is a difference, or what am I missing? Also, what would array.push return after we overflow 32bit unsigned?
comment on: http://stackoverflow.com/a/27537686
type: Comment
score: 0

http://stackoverflow.com/comment/43674015
has text: Actually I was using the same CSS file for the video1 already there for this page. Can you help me to correct the positioning of the modal?
type: AnswerComment
comment on: http://stackoverflow.com/a/27611069
type: Comment
score: 0

http://stackoverflow.com/a/27622191
downvote count: 0
has comment: http://stackoverflow.com/comment/43665316
accepted answer of: http://stackoverflow.com/q/27622015
answers question: http://stackoverflow.com/q/27622015
has comment: http://stackoverflow.com/comment/43665291
has body: You have to sort the HTMLCollection var rowsList = document.getElementsByClassName("employee_grid_rows"); console.log(rowsList); var arr = Array.prototype.slice.call( rowsList ); rowsList = arr.sort(function(a, b) { //Comparing for strings instead of numbers return a.id.localeCompare(b.id); }); console.log(rowsList);
upvote count: 2
has comment: http://stackoverflow.com/comment/43664934
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43665293
type: Answer
has comment: http://stackoverflow.com/comment/43664871
has comment: http://stackoverflow.com/comment/43665328
score: 2
has comment: http://stackoverflow.com/comment/43665154

http://stackoverflow.com/comment/43568562
has text: http://jsfiddle.net/a6kne66b/3/ live version of what i am trying to create
score: 0
comment on: http://stackoverflow.com/q/27571270
type: QuestionComment
type: Comment

http://stackoverflow.com/a/27534868
downvote count: 0
has comment: http://stackoverflow.com/comment/43605178
has comment: http://stackoverflow.com/comment/43498411
type: Answer
accepted answer of: http://stackoverflow.com/q/27533379
has body: You were properly setting your xAxis categories. However, you were only ever setting one point. Highcharts is defaulting to that point going to index 0 (the "R"). Try setting the xAxis category index and use the {x, y} point format: series: [{ data: [{x:0, y:3570.5}], name: "R", id: 0 }, { data: [{x:1, y:3000}], name: "S", id: 1 }, { data: [{x:2, y:2500}], name: "T", id: 2 }] The x: values are the category index you want populated.
upvote count: 5
answers question: http://stackoverflow.com/q/27533379
score: 5
has comment: http://stackoverflow.com/comment/43628907
type: AcceptedAnswer

http://stackoverflow.com/comment/43628834
comment on: http://stackoverflow.com/a/27596884
score: 0
type: AnswerComment
type: Comment
has text: @user567797 you can read the command-line arguments, [here](https://github.com/ariya/phantomjs/blob/master/examples/arguments.js) is an example.

http://stackoverflow.com/q/27505909
downvote count: 0
has body: I am trying to make each section of my map to highlight when the user hovers over it. But for some reason it doesn't work. I have made a jsfiddle for explaining better the issue http://jsfiddle.net/5qcbvp7k/3/ HTML &lt;img border="0" id="image_maping" usemap="#Map" src="http://www.dlpconsult.com/jack/images/map.png" alt="map"&gt; &lt;map id="Map" name="Map"&gt; &lt;area class="mapping" id="1" shape="poly" coords="2,157"&gt; &lt;area class="mapping" id="2" shape="poly" coords="25,138" alt="map"&gt; &lt;area class="mapping" id="3" shape="poly" coords="3,157"&gt; &lt;area class="mapping" id="4" shape="poly" coords="1,156,21,139,46,135,57,135,74,134,90,132,101,121,126,118,141,118,156,116,169,116,174,135,185,148,189,166,180,185,177,200,187,219,201,227,196,236,190,238,153,225,130,224,120,243,55,212,2,182"&gt; &lt;area class="mapping" id="5" shape="poly" coords="176,116,192,112,218,101,240,96,255,97,274,104,291,111,301,117,319,135,338,158,351,181,360,196,344,201,332,199,324,199,320,206,313,207,310,213,287,213,246,200,234,202,219,209,197,215,180,219,172,117"&gt; &lt;area class="mapping" id="6" shape="poly" coords="297,110,309,108,317,96,323,85,342,95,360,115,384,130,405,138,405,153,396,167,379,178,367,193,360,198"&gt; &lt;area class="mapping" id="7" shape="poly" coords="325,82,337,67,351,61,372,55,391,43,413,28,450,16,483,3,508,4,525,24,546,44,547,57,547,72,454,89,441,102,429,115,414,130,410,140,406,152,325,86"&gt; &lt;/map&gt; &lt;div id="message"&gt;&lt;/div&gt; JS $('.mapping').mouseover(function() { var id = $(this).attr('id'); if (id == 4) { $(this).mapster({ fillColor: 'ff0000', fillOpacity: 0.3 }); $('#message').html('This is description for the first piece'); } if (id == 5) { $(this).mapster({ fillColor: 'ff0000', fillOpacity: 0.3 }); $('#message').html('This is description for the second piece'); } if (id == 6) { $(this).mapster({ fillColor: 'ff0000', fillOpacity: 0.3 }); $('#message').html('This is description for the 3rd piece'); } if (id == 7) { $(this).mapster(…
tagged with: javascript
score: 1
tagged with: jquery
has title: Highlighting map area issue with mapster
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 0
tagged with: imagemapster
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/43442987
type: Question

http://stackoverflow.com/a/27536780
accepted answer of: http://stackoverflow.com/q/27520445
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27520445
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/43505880
score: 2
has body: There is no global scope. You need to require XMLHttpRequest in foo.js.
has comment: http://stackoverflow.com/comment/43506948

http://stackoverflow.com/comment/43421236
has text: You're expecting there to be a "prototype" property of an instantiated object, but that's incorrect. *edit* yes and as @dandavis says, objects aren't functions and can't be used as constructors.
comment on: http://stackoverflow.com/q/27494663
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43594653
has text: This isn't my exact code - too lengthy to show here, but this ends up with the same result of a goofy character for the é $(document).ready(function(){ $("p").html("coméis"); var test = $("p").html(); alert(test); }); Both the tag and the alert have the goofy character and not the é I am not sure what "check the Content-Type HTTP header" means. Isn't that addressed in my original post? I also tried this: but it still does the same thing.
score: 0
comment on: http://stackoverflow.com/q/27584773
type: Comment
type: QuestionComment

redis
tags question: http://stackoverflow.com/q/27585856
tags question: http://stackoverflow.com/q/27513075
tags question: http://stackoverflow.com/q/27616576
type: Tag
tag name: redis

http://stackoverflow.com/comment/43396103
has text: Unfortunately it doesn't work. When I do it with the forloop, it never executes the if-condition. also the jQuery solution doesn't give an alert..
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27481354
type: AnswerComment

http://stackoverflow.com/a/27638403
type: Answer
downvote count: 0
score: 1
has body: $http.get('http://test.wilson34.com/test.php', {params: {name: 'peter'} }).success(function(data, status, headers, config) { console.log('Success' + data); }).error(function(data, status, headers, config) { console.log('Status : ' + status); }); Params is an object with key, value pairs. In this case it evaluates to ?name=peter
answers question: http://stackoverflow.com/q/27637974
accepted answer of: http://stackoverflow.com/q/27637974
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/43501269
has text: I think getters need to be involved too, so that accessing a property of one object returns the value of a property on some other object.
score: 1
comment on: http://stackoverflow.com/q/27536206
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27480141
type: AnsweredQuestion
downvote count: 0
type: Question
score: 3
has comment: http://stackoverflow.com/comment/43393350
upvote count: 3
answer count: 1
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/27480215
tagged with: xss
accepted answer: http://stackoverflow.com/a/27480215
tagged with: http://stackoverflow.com/tag/html
has body: I have an array of objects like this: var msg = [ { msg: 'text' }, { src: 'pic.jpg',id: 21,title: 'ABC' } ]; I'm trying to sanitize the values by iterating manually through the object at the server side, but the module would just return [ '[object Object]', '[object Object]' ] in the console. socket.on('message', function(msg){ if (io.sockets.adapter.rooms[socket.id][socket.id] == true) { var fun = []; for(var j in msg){ fun[j] = sanitizer.sanitize(msg[j]); }; console.log(fun); io.sockets.in(socket.room).emit('message',fun); } }); Can anyone show me how to properly sanitize the object?
tagged with: node.js
has title: how to sanitize an array of object in node? Iterating through it manually returns 'object Object'

http://stackoverflow.com/q/27484502
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: mocha.js
tagged with: sinon
has body: Let's say I have the following methods: Controller.prototype.refresh = function () { console.log('refreshing'); } Controller.prototype.delete = function (object) { var self = this; object.delete({id: object.id}, function () { self.refresh(); }); } now in my (mocha) test: beforeEach(function () { var controller = new Controller(); var proto = controller.__proto__; var object = {id: 1, delete: function (options, callback) { callback (); }; sinon.stub(proto, 'refresh', function {console.log('refreshing stub')}); controller.delete(object); }); it('doesnt work', function () { expect(object.delete.callCount).to.equal(1); expect(proto.refresh.callCount).to.equal(1); }); This, however, prints "refreshing" to the console. Is there a way to use sinon to stub a live prototype?
upvote count: 11
favorite count: 0
has answer: http://stackoverflow.com/a/30690969
tagged with: stubs
has comment: http://stackoverflow.com/comment/43587806
score: 11
has title: Stubbing a prototype method with sinon
type: AnsweredQuestion
tagged with: prototype
accepted answer: http://stackoverflow.com/a/30690969

http://stackoverflow.com/comment/43516454
type: Comment
type: QuestionComment
has text: So your JavaScript stops working without throwing any error? It would be very strange.
score: 0
comment on: http://stackoverflow.com/q/27544825

http://stackoverflow.com/a/27632961
type: Answer
has body: Why not use built-in Date.parse: var epochVal = Date.parse("Nov 21, 2014 12:00:00 AM") //=&gt; 1416546000000 OR: var dt = new Date( Date.parse("Nov 21, 2014 12:00:00 AM") ) //=&gt; Fri Nov 21 2014 00:00:00 GMT-0500 (EST)
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27632891
downvote count: 0

http://stackoverflow.com/a/27544985
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/27544784
answers question: http://stackoverflow.com/q/27544784
upvote count: 1
has comment: http://stackoverflow.com/comment/43520555
type: AcceptedAnswer
type: Answer
has body: This is really a matter of opinion, but there are a couple of (mostly) objective points to be made: If you do this... An object is created by the new operator and then just thrown away (provided the V8 optimizer doesn't figure out it can skip that). It's fairly misleading that the logger you get back is not an instance of the Logger class (logger instanceof Logger will be false). The ability to return an object from a constructor to override the one that new creates is largely for returning a previous instance created by the constructor that's equivalent to the one you asked for (largely for singletons or immutable objects, to avoid duplication). Using new Logger hides the fact that what you get back is actually a bunyan logger, which can throw off people maintaining the code. Whether you consider those "cons" or not is, again, a matter of opinion. An alternative would be for Logger to use a bunyan logger rather than directly returning it. This would also have the advantage of encapsulating it if you decided to swap bunyan out for something else in the future.

http://stackoverflow.com/a/27563860
score: 0
answers question: http://stackoverflow.com/q/27563755
type: Answer
has body: if( document.getElementById("ValidateUsename").innerHTML =="") { alert("box is empty") }
has comment: http://stackoverflow.com/comment/43553109

http://stackoverflow.com/a/27487704
answers question: http://stackoverflow.com/q/27487563
upvote count: 2
score: 2
has body: var suffix = 'example'; var string = ' directory name '; string.match(new RegExp('[0-9a-zA-Z]*\.' + suffix + '.txt')) or var suffixes = ["example", "document", "service"].join('|') string.match(new RegExp('[0-9a-zA-Z]*\.(' + suffixes + ').txt'))
accepted answer of: http://stackoverflow.com/q/27487563
has comment: http://stackoverflow.com/comment/43407499
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/43630782
type: AnswerComment
score: 0
type: Comment
has text: Thanks. I cannot post the code for many reasons (if I was allowed even, there would be so much to look at ). I am using setInterval that does clear itself when it is called and initiates itself when the function is complete. I actually have no stacking AJAX queries. It's smooth on that end. I like the ideas of showing only maybe 50 rows (potential is 1000 not 100) but I really don't know how because each row may have children or parents (think a table of rows that also reflect parent/children relationships, but may come from the AJAX req in any order). I will give it more thought
comment on: http://stackoverflow.com/a/27576414

http://stackoverflow.com/a/27517458
answers question: http://stackoverflow.com/q/27496168
type: Answer
has body: Here is sample code that searches for hotels in a selected city. Basically, the sample code makes calls to Google Maps APIs in two phases: one to search for a city (onPlaceChanged() was called), and another to search for hotels. In the latter search, you will call nearbySearch() on a Places object that has a bounds parameter from the city search and a types parameter with a value of 'lodging'.
upvote count: 1
score: 1
downvote count: 0

http://stackoverflow.com/q/27548409
has comment: http://stackoverflow.com/comment/43523019
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27548606
has title: Simple JavaScript DOM manipulation
tagged with: dom
downvote count: 0
has comment: http://stackoverflow.com/comment/43523238
tagged with: javascript
has answer: http://stackoverflow.com/a/27548628
favorite count: 0
has comment: http://stackoverflow.com/comment/43523295
answer count: 3
has body: Could anyone please tell me what is wrong with this code? I am trying to create a table from stratch and add ten rows and cells to it. Thanks in advance. Untitled
possible better answer: http://stackoverflow.com/a/27548574
has answer: http://stackoverflow.com/a/27548606
has answer: http://stackoverflow.com/a/27548574
score: 2
upvote count: 2

http://stackoverflow.com/q/27595957
accepted answer: http://stackoverflow.com/a/27596073
answer count: 1
tagged with: javascript
tagged with: callback
score: 0
has title: How to pass callback as variable to predefined callback
type: Question
type: AnsweredQuestion
has body: I have some code written in LiveScript (fork of Coffeescript) that will make a request using the request module, and then pass the statusCode of the response to a callback. url = 'http://www.google.ca' logCode = (statusCode) -&gt; console.log statusCode makeRequest = (url, callback) -&gt; request url, (err, response, body) -&gt; if body callback response.statusCode else console.log "No response" makeRequest url, logCode This works as expected, and the callback is triggered successfully and '200' is logged to the console. However, I would like to make my code as clean as possible, and pull out any nested callbacks. Therefore I define a function to act as my request callback and pass it in as the second argument to request. url = 'http://www.google.ca' requestCallback = (err, response, body) -&gt; if body callback response.statusCode else console.log "No response" logCode = (statusCode) -&gt; console.log statusCode makeRequest = (url, callback) -&gt; request url, requestCallback makeRequest url, logCode However, running this of course returns an error saying that callback is not defined. This of course makes perfect sense, as in the scope that requestCallback operates, there is no function named callback, and it cannot access the callback defined in makeRequest. From what I've read, I can declare requestCallback inside an anonymous function, which will allow it to have callback passed into it. I've tried this is every manner I could conceive of without fruition. Also, there seems to be the option of binding requestCallback to the scope of makeRequest, however I was unable to do this today as well despite my best efforts and wrangling. How can I allow requestCallback to be aware of the callback function passed to makeRequest?
tagged with: closures
has answer: http://stackoverflow.com/a/27596073

pace.js
tag name: pace.js
tags question: http://stackoverflow.com/q/27590625
type: Tag
tags question: http://stackoverflow.com/q/27488146
tags question: http://stackoverflow.com/q/27492561

http://stackoverflow.com/a/27594068
has comment: http://stackoverflow.com/comment/43612785
has comment: http://stackoverflow.com/comment/43612716
has body: JSON does support arrays as well as objects. Your code doesn't return the result to the source. In fact, you can't wait for $.ajax() to finish at all without using a setInterval to check it or the like. The best method is to access the JSON file once when the page loads and reference the source from there. Try: var dict = []; $.ajax({ url: 'https://dl.dropboxusercontent.com/u/100496307/source.json', method: 'GET', dataType: 'json', success: function(data) { $.each(data, function() { dict.push(this.toString()); }); return dict; } }); $('#tags').autocomplete({ source: dict }); $('#tags').keydown(function() { console.log(dict); }); &lt;head&gt; &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;script src="https://code.jquery.com/ui/1.11.2/jquery-ui.min.js"&gt;&lt;/script&gt; &lt;link rel="stylesheet" href="https://code.jquery.com/ui/1.11.2/themes/black-tie/jquery-ui.css" /&gt; &lt;/head&gt; &lt;body&gt; &lt;input type="text" id="tags" /&gt; &lt;/body&gt;
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/43612834
upvote count: 2
has comment: http://stackoverflow.com/comment/43612449
answers question: http://stackoverflow.com/q/27593994
score: 2
has comment: http://stackoverflow.com/comment/43612925
accepted answer of: http://stackoverflow.com/q/27593994

http://stackoverflow.com/q/27596395
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/27596905
answer count: 1
has title: How could I create a table dynamically?
has body: I have XML like this: I need to create tables for each object. like for object[0]: ---------------------------- a1 value | b1 value | c1 value| ---------------------------- a2 value | b2 value | c2 value| ---------------------------- a3 value | b3 value | c3 value| ---------------------------- and for object[1]: ---------------------------- a1 value | b1 value | c1 value| ---------------------------- a2 value | b2 value | c2 value| ---------------------------- But I don't know how to use XSLT to do this loop since each attribute has different name. Could you help me or show me a way to solve this? Should I use JavaScript to parse the attributes? expected HTML: a1 value b1 value c1 value a2 value b2 value c2 value a3 value b3 value c3 value The number of rows are depend on the number of attributes in object.
has answer: http://stackoverflow.com/a/27596905
tagged with: xslt
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43616573
has comment: http://stackoverflow.com/comment/43616634
type: Question
has comment: http://stackoverflow.com/comment/43617385
tagged with: xml-parsing

http://stackoverflow.com/comment/43476576
has text: alert this value :- document.form1.email.value
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27522649
type: AnswerComment

http://stackoverflow.com/q/27524974
has comment: http://stackoverflow.com/comment/43478571
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27525026
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27525038
has title: How to connect var javascript with text?
has body: How to connect var javascript with text ? var xxx = 5; $('html, body').animate({ scrollTop: ($("validate_focus"+xxx).offset().top - page_height_val/2)}, 'slow'); on code i want to connect var xxx with text validate_focus to validate_focus5 But not work , How can i do that ?
type: Question
answer count: 2

http://stackoverflow.com/q/27488946
has answer: http://stackoverflow.com/a/27489612
score: 1
has comment: http://stackoverflow.com/comment/43422069
upvote count: 1
tagged with: socket.io
type: Question
has body: I'm writing a program which makes use of socket.io. In this particular part, I'm sending a request and handle the answer. CLIENT SIDE: // .... socket.emit('opendrow', a.id); socket.on('opendrowresponse', function(msg) { console.log(msg); cell.innerHTML = msg; // .... SERVER SIDE HANDLE: // .... socket.on('opendrow',function(msg) { console.log(msg); connection2.query('SELECT * FROM testpreis WHERE id = '+msg, function(err,rows,fields) { if (err) throw err; io.to(socket.id).emit('opendrowresponse',rows) }); }); // .... The client side code is within a click function: var plusrow = document.getElementsByClassName('plusrow'); for (var i = 0;i&lt;plusrow.length;i++) { plusrow[i].addEventListener('click', collapse); } The collapse function basically extends a table, sends the request and inserts the response in the created table row. I get this response on the first click on "plusrow": Array [ Object ] which is the expected response. But then, if I click on another table row, I get two resultsets with the same content Array [ Object ] Array [ Object ] and for every consecutive click, I get an Array of objects more though only one Array is expected. The response is correct, so if I request eg. id 50, there are two responses for id 50, or three times for 50, depending on how many clicks I made before. I've checked server side console and did a console.log of the requested id: socket.on('opendrow',function(msg) { console.log(msg); and the response for this is as expected only one id, eg. 51 I don't think that the rest of the collapse function has something to do with it, but here it is: function collapse() { var table = document.getElementById('pricingtable'); var a = this; var aclassName = a.className.replace(' openchild',''); console.log(a.className); console.log(a.className.indexOf('openchild')); if (a.className.indexOf('openchild') &gt;= 0) { var childtodel = document.getElementById(a.id+'sub'); console.log(childtodel.rowIndex); table.deleteRow(childtodel.rowIndex); a.cl…
tagged with: javascript
answer count: 1
downvote count: 0
favorite count: 0
has title: socket.io gives two responses, but only one is excpected
type: UnansweredQuestion
tagged with: sockets
tagged with: node.js

http://stackoverflow.com/q/27515962
has comment: http://stackoverflow.com/comment/43462909
has comment: http://stackoverflow.com/comment/43462510
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/43462413
has comment: http://stackoverflow.com/comment/43462865
has comment: http://stackoverflow.com/comment/43462908
upvote count: 1
has comment: http://stackoverflow.com/comment/43463072
tagged with: http://stackoverflow.com/tag/html
has body: Relevant Javascript being run once every fifteen minutes to get the relevant image off the internet: document.getElementById('weatherbug').style.background = "url('http://tinyurl.com/jwltx5s') repeat scroll -1px -24px transparent"; Relevant HTML this is linked to: &lt;DIV ID='weatherbug'&gt;&lt;/DIV&gt; Other HTML I've used to try and keep this from using the cache: &lt;META HTTP-EQUIV="Cache-Control" CONTENT="no-cache"&gt; &lt;META HTTP-EQUIV="Pragma" CONTENT="no-cache"&gt; &lt;META HTTP-EQUIV="Expires" CONTENT="0"&gt; &lt;META HTTP-EQUIV="Pragma-directive: no-cache"&gt; &lt;META HTTP-EQUIV="Cache-directive: no-cache"&gt; Results: The image refreshes itself from the cache regardless, ignoring changes in the source image, which changes roughly once per hour. If there is not internet access, this results in a blank image (good behavior) unless there's a copy in cache, in which case an old image is shown (bad behavior). Also, if there is a copy in the cache, the newly updated image on the internet is not shown (bad behavior). Other tricks I have tried: I've attempted to alter my javascript to add a randomizing element on the back end of the address, to force the cache's contents to be invalidated with each invocation, but altering the address by adding a ?randomnumberherebasedofftheDateObject on the ass end of the address breaks both the original link to the image and the tinyurl version since neither end in a proper .gif suffix. How can I force the cache to NOT save this image, or at least to invalidate it after a decent time interval so a new download from the relevant server is required to display the information? Frankly I'm stumped. :( Aaron Nichols
has title: How do I get a div to grab it's background image from the internet instead of from the cache?
favorite count: 0
has answer: http://stackoverflow.com/a/27516858
accepted answer: http://stackoverflow.com/a/27516858
has comment: http://stackoverflow.com/comment/43464276
downvote count: 0
has comment: http://stackoverflow.com/comment/43464150
has comment: http://stackoverflow.com/comment/43462439
has comment: http://stackoverflow.com/comment/43462314
has comment: http://stackoverflow.com/comment/43464245
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/43462383
has comment: http://stackoverflow.com/comment/43462599
has comment: http://stackoverflow.com/comment/43462167
type: Question

http://stackoverflow.com/q/27550104
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/37247247
favorite count: 0
type: UnansweredQuestion
has body: Just started coding last thursday, bear with me here: my code for this question of the tutorial is returning a list of just the extension names from the directory and not a list of the files with the said extension, e.g. if i used a directory with 3 .js files and used js as my extension argument in the command line, then i would get 1. js 2. js 3. js as the output, here is the question from the tutorial and my code. THANK YOU! the question from learnyounode tutorial number 6: LEARN YOU THE NODE.JS FOR MUCH WIN! ───────────────────────────────────── MAKE IT MODULAR Exercise 6 of 13 This problem is the same as the previous but introduces the concept of modules. You will need to create two files to solve this. Create a program that prints a list of files in a given directory, filtered by the extension of the files. The first argument is the directory name and the second argument is the extension filter. Pr int the list of files (one file per line) to the console. You must use asynchronous I/O. You must write a module file to do most of the work. The module must export a single function that takes three arguments: the directory name, the filename extension string and a callback function, in that order. The filename extension argument must be the same as was passed to your program. i.e. don't turn it into a RegExp or prefix with "." or do anything else but pass it to your module where y ou can do what you need to make your filter work. The callback function must be called using the idiomatic node(err, data) convention. This convention stipulates that unless there's an error, the first argument passed to the callback will be null, a nd the second will be your data. In this case, the data will be your filtered list of files, as an Array. If you receive an error, e.g. from your call to fs.readdir(), the callback must be called wi th the error, and only the error, as the first argument. You must not print directly to the console from your module file, only from your original…
has answer: http://stackoverflow.com/a/31400699
has title: Issue with output list for learnyounode #6 MAKE IT MODULAR
tagged with: node.js
has comment: http://stackoverflow.com/comment/43528153
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/28240169
score: 0
answer count: 3

http://stackoverflow.com/comment/43420259
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27493768
has text: I'm not sure how you expect objects created by literals to have any advantages over those instantiated with `new`?

http://stackoverflow.com/a/27630490
has body: I suggest you to use string.match instead of string.split. \S.*?\."?(?=\s|$) DEMO &gt; var s = '"Hello friend. My name is Mud." Said Mud.' undefined &gt; s.match(/\S.*?\."?(?=\s|$)/g) [ '"Hello friend.', 'My name is Mud."', 'Said Mud.' ]
downvote count: 0
answers question: http://stackoverflow.com/q/27630408
type: Answer
has comment: http://stackoverflow.com/comment/117376167
upvote count: 6
score: 6

http://stackoverflow.com/q/27510009
answer count: 3
has answer: http://stackoverflow.com/a/27510391
has title: Search in array with %LIKE% like as SQL
has comment: http://stackoverflow.com/comment/43450654
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43450564
has answer: http://stackoverflow.com/a/27510267
has answer: http://stackoverflow.com/a/27592221
has body: Because SQLite is very slow, I select all of my needed records and store in an array. Now in my application I have a search section which user can search part of string on this array. my array structure is : [ { name : 'Black', family : 'Dragon', email : 'black.dragon@blahblahblah.com' } ] I have 3 input fields in my page which users can enter some characters and I should search in this array and return the index of matched values. for example if my user enter bla or lack or @blahblah, my program should return the index of this value. Is it possible? How should I work ?
type: Question
has comment: http://stackoverflow.com/comment/43450304
tagged with: arrays
tagged with: javascript
score: 0

http://stackoverflow.com/a/28960603
has body: What happens when you change your code like this: A changed JPEG to PNG, that worked for me. function getBase64Image(url) { alert(url); var canvas = document.getElementById('myCanvas'); var context = canvas.getContext('2d'); var img = new Image(); img.src = url; img.style.height ="181px"; img.style.width ="183px"; //img.crossOrigin ="Anonymous"; context.drawImage(img,0,0); var dataURL = canvas.toDataURL("image/png"); alert(dataURL); document.body.appendChild(img); var doc = new jsPDF('landscape'); doc.addImage(img,'PNG',0,0,50,50); doc.save('Saved.pdf'); } getBase64Image("http://localhost:64931/jspdf/download.png");
type: Answer
score: 2
downvote count: 0
upvote count: 2
answers question: http://stackoverflow.com/q/27540502

http://stackoverflow.com/comment/43656590
score: 0
type: Comment
has text: All data collect by user post form
type: QuestionComment
comment on: http://stackoverflow.com/q/27607588

http://stackoverflow.com/a/27503860
has comment: http://stackoverflow.com/comment/43438094
type: Answer
has comment: http://stackoverflow.com/comment/43438666
has comment: http://stackoverflow.com/comment/43438204
answers question: http://stackoverflow.com/q/27503585
has body: Try this, i hope it's working: Your Name CSS: [placeholder]:focus::-webkit-input-placeholder { transition: opacity 0.5s 0.5s ease; opacity: 0; } .example-two:focus::-webkit-input-placeholder { transition: text-indent 0.5s 0.5s ease; text-indent: -100%; opacity: 1; } body { } form { display: inline-block; margin-top: 20px; } label { display: block; text-align: left; font: bold 0.8em Sans-Serif; text-transform: uppercase; } .left-label { float: left; padding: 8px 5px 0 0; } input[type=text] { padding: 5px; text-indent: 0; } form div { margin: 20px; clear: both; text-align: left; } JSFiddle EDIT: Working on IE too: JSFiddle
has comment: http://stackoverflow.com/comment/43438528
has comment: http://stackoverflow.com/comment/43438340
score: 0

http://stackoverflow.com/comment/43436234
has text: possible duplicate of [How do I use jquery ui with requirejs](http://stackoverflow.com/questions/12113172/how-do-i-use-jquery-ui-with-requirejs)
comment on: http://stackoverflow.com/q/27499642
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27525249
type: Answer
answers question: http://stackoverflow.com/q/27512706
has body: I solved it with a small function added on loadComplete event. This function creates a new div for the left scrollbar and then it sycronices both scrollbars. loadComplete: function(){ var jqgridHeader = $(".ui-state-default.ui-jqgrid-hdiv"); // Add a new div with another div inside for the left scrollbar jqgridHeader.after( '&lt;div id="leftScroll" style="z-index:1000; position:absolute; height:150px; overflow:scroll; width:17px;"&gt;'+ '&lt;div id="leftScrollContent" style=" width:17px;"&gt;&lt;/div&gt;' + '&lt;/div&gt;' ); // Set to the new new div the sice of the jqgrid body $("#leftScrollContent").css("height",($("#sortrows").height())); var jqgridBody = $(".ui-jqgrid-bdiv"); // Syncronice both scrollbars jqgridBody.scroll(function () { $("#leftScroll").scrollTop(jqgridBody.scrollTop()); }); $("#leftScroll").scroll(function () { jqgridBody.scrollTop($("#leftScroll").scrollTop()); }); } *The left scrollbar overlaps the first grid column
score: 0
has comment: http://stackoverflow.com/comment/43493606

http://stackoverflow.com/comment/43490846
score: 0
type: Comment
has text: Thank very much, this works almost perfectly. I have only one little problem the following code: http://pastebin.com/AC9WxsGp executes two times.. Could you maybe give me a hint what's going on wrong?
type: AnswerComment
comment on: http://stackoverflow.com/a/27528153

http://stackoverflow.com/comment/43547687
type: Comment
has text: Do these links point to different pages?
comment on: http://stackoverflow.com/q/27560815
score: 0
type: QuestionComment

http://stackoverflow.com/comment/43422298
has text: That's right, but it still behaves like it should. The problem is in the switchTrack function, where I should add the active class to the current LI playing.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27495052
type: Comment

turbolinks
tags question: http://stackoverflow.com/q/27589914
tag name: turbolinks
type: Tag
tags question: http://stackoverflow.com/q/27515327

http://stackoverflow.com/comment/43574128
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27572640
has text: in my case this.request.body is actually text in json format "{ key":"value"}"

http://stackoverflow.com/comment/43634633
has text: do `1000 * (i+1)` so the delay will be 1000, then 2000, then 3000...
score: 2
comment on: http://stackoverflow.com/q/27606220
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27592169
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27594450
has title: img width 100% event
type: Question
tagged with: polymer
upvote count: 0
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/43613066
answer count: 1
favorite count: 0
has body: Click on the red square and see the console log output How can I get rid of this setTimeout 500 hack to get the correct 100% width of a image? Jsbin TO SOON cross-fade-all slide-from-right 1 Hello world
downvote count: 1
has answer: http://stackoverflow.com/a/27594450

http://stackoverflow.com/q/27548197
answer count: 1
tagged with: javascript
has body: I'm trying to show some images depending the course of a GPS, I'm using AngularJS and NodeJS to do this, the part I don't know if it's ok is the front end (angularjs), this is what i have so far: angular.module('item.detail') .controller('ItemDetailCtrl', function ($scope, Item, $stateParams) { angular.extend($scope, { center: { lat: -32.93257539162459, lng: -68.816867997665271, zoom: 18 }, markers: { m1: { lat: -32.93257539162459, lng: -68.816867997665271, focus: true, draggable: false, gpsIcon: {} } }, gpsIconDefault: {}, gpsIconN: { iconUrl: '../../assets/images/gpsIconN.png', shadowUrl: 'img/leaf-shadow.png', iconSize: [38, 95], shadowSize: [50, 64], iconAnchor: [22, 94], shadowAnchor: [4, 62] }, gpsIconNE: { iconUrl: '../../assets/images/gpsIconNE.png', shadowUrl: 'img/leaf-shadow.png', iconSize: [38, 95], shadowSize: [50, 64], iconAnchor: [22, 94], shadowAnchor: [4, 62] }, gpsIconE: { iconUrl: '../../assets/images/gpsIconE.png', shadowUrl: 'img/leaf-shadow.png', iconSize: [38, 95], shadowSize: [50, 64], iconAnchor: [22, 94], shadowAnchor: [4, 62] }, gpsIconSE: { iconUrl: '../../assets/images/gpsIconSE.png', shadowUrl: 'img/leaf-shadow.png', iconSize: [38, 95], shadowSize: [50, 64], iconAnchor: [22, 94], shadowAnchor: [4, 62] }, gpsIconS: { iconUrl: '../../assets/images/gpsIconS.png', shadowUrl: 'img/leaf-shadow.png', iconSize: [38, 95], shadowSize: [50, 64], iconAnchor: [22, 94], shadowAnchor: [4, 62] }, gpsIconSW: { iconUrl: '../../assets/images/gpsIconSW.png', shadowUrl: 'img/leaf-shadow.png', iconSize: [38, 95], shadowSize: [50, 64], iconAnchor: [22, 94], shadowAnchor: [4, 62] }, gpsIconW: { iconUrl: '../../assets/images/gpsIconW.png', shadowUrl: 'img/leaf-shadow.png', iconSize: [38, 95], shadowSize: [50, 64], iconAnchor: [22, 94], shadowAnchor: [4, 62] }, gpsIconNW: { iconUrl: '../../assets/images/gpsIconNW.png', shadowUrl: 'img/leaf-shadow.png', iconSize: [38, 95], shadowSize: [50, 64], iconAnchor: [22, 94], shadowAnchor: [4, 62] } }); Item.findById($stat…
score: 0
tagged with: angularjs
has title: Showing images depending a course gps app
has answer: http://stackoverflow.com/a/28796364
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28796364

http://stackoverflow.com/a/27538780
type: Answer
answers question: http://stackoverflow.com/q/27537963
has comment: http://stackoverflow.com/comment/43509253
score: 0
has body: This is the resulted error in FireFox: IndexSizeError: Index or size is negative or greater than the allowed amount , and you can find a solution for your issue here , also : To clarify as well. Applying Math.round on the variables used in .drawImage() fixed this issue for me. Seems Firefox didn't like a fractioned number. – Justin Beaudry
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43508717
accepted answer of: http://stackoverflow.com/q/27537963

http://stackoverflow.com/a/27589231
has comment: http://stackoverflow.com/comment/43602621
has body: I have found a solution for this : var rect = figure.getBoundingClientRect(), topSelected = (rect.top + (document.documentElement.scrollTop || document.body.scrollTo)) - window.pageYOffset; What it does is to check the value of document.documentElement.scrollTop. In Chrome this always returns 0. So if 0 is returned, document.body is given as element to the scrollTopfunction outside the parenthesis. TL;DR To get the offset correctly: Firefox --> document.documentElement Chrome --> document.body
answers question: http://stackoverflow.com/q/27588780
score: 0
has comment: http://stackoverflow.com/comment/43602592
type: Answer

http://stackoverflow.com/comment/53912723
has text: Thank you so much... also, make sure you have the latest version of the tablesorter. Older versions don't have the emptyTo property
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27615228
score: 2

http://stackoverflow.com/a/27556794
type: Answer
answers question: http://stackoverflow.com/q/27556759
upvote count: 1
score: 1
downvote count: 0
has body: Something like this should do the job: var a = document.getElementById('b'); var b = a.getElementsByClassName('3'); alert (b[0].className) SIDENOTE: Why does it make sense to use javascript over jQuery? CODE ops / sec document.getElementById('b'); 12,137,211 $('#b'); 350,557 Vanilla JS is way faster...

http://stackoverflow.com/comment/43636230
has text: Not sure where the code for image insertion will be put. Rest of the code is in jsfiddle in the link http://jsfiddle.net/HpdwR/1141/
comment on: http://stackoverflow.com/q/27606961
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27494283
has comment: http://stackoverflow.com/comment/43420414
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/6427576
accepted answer: http://stackoverflow.com/a/27495110
tagged with: regex
has answer: http://stackoverflow.com/a/27495069
answer count: 4
type: AnsweredQuestion
has body: In the following string... var str = 'Foobar is so "awesome." I &lt;span prop="nifty"&gt;"really"&lt;/span&gt; &lt;span prop="attr"&gt;think it is so&lt;/span&gt; &lt;span prop="nifty" prop="attr"&gt;"cool!"&lt;/span&gt;' ...how would I write a regular expression that matches the quotes (") around the words awesome, really, and cool, while NOT matching the quotes within the HTML tags? I'm using JavaScript's replace function to replace the quotes with &amp;#34; I'm hoping there's a regular expression that I can use such that... str.replace(/regex-magic/g, "&amp;#34;") ..gives me the output... Foobar is so `&amp;#34;`awesome.`&amp;#34;` I &lt;span prop="nifty"&gt;`&amp;#34;`really`&amp;#34;`&lt;/span&gt; &lt;span prop="attr"&gt;think it is so&lt;/span&gt; &lt;span prop="nifty" prop="attr"&gt;`&amp;#34;`cool!`&amp;#34;`&lt;/span&gt; Thanks much!!
has answer: http://stackoverflow.com/a/27494368
has comment: http://stackoverflow.com/comment/43420447
has answer: http://stackoverflow.com/a/27494334
upvote count: 1
has answer: http://stackoverflow.com/a/27495110
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/43420360
has comment: http://stackoverflow.com/comment/43420558
tagged with: javascript
has comment: http://stackoverflow.com/comment/43420351
linked to: http://stackoverflow.com/q/1732348
score: 0
has comment: http://stackoverflow.com/comment/43420373
has title: How do you match all quotes NOT contained with HTML tags?
possible better answer: http://stackoverflow.com/a/27494334
has comment: http://stackoverflow.com/comment/43420432

http://stackoverflow.com/comment/43620293
type: Comment
type: QuestionComment
has text: I wouldn't take that line you quoted as an indication that `for..in` order is guaranteed with arrays. (I'm not saying that it isn't, but that line isn't really saying that it is). Plus, there are [very good reasons](http://stackoverflow.com/questions/500504/why-is-using-for-in-with-array-iteration-such-a-bad-idea) to avoid using `for..in` with arrays, even if the ordering works out ok.
comment on: http://stackoverflow.com/q/27598340
score: 0

http://stackoverflow.com/a/27486981
answers question: http://stackoverflow.com/q/27486833
accepted answer of: http://stackoverflow.com/q/27486833
type: Answer
has body: You have defined sprite as a global variable. It will exist not only in that function, but is created on the window object. If you want to remove only the sprite you created in that function, you should make it a variable var sprite = JSONSPITE; // typo? This way, the scope of the sprite variable is just that function. EDIT: OP has changed their question, making the previous explanation seem obsolete If you want to create multiple sprites, and store them somewhere so you can access them before they are deleted, you might want to create an array of sprites. sprites = []; function onDocumentMouseUp( event ) { createsprite(clickedposition); } function createsprite(clickedposition) { sprites.push(JSONSPITE); // Adds the current sprite to the end of the array setTimeout(function(){ var firstSprite = sprites.shift(); // Takes the first sprite out of the array remove(firstSprite); }, 1000); }
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43406199
has comment: http://stackoverflow.com/comment/43406360
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/q/27491542
has comment: http://stackoverflow.com/comment/43414637
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/43415329
answer count: 1
has title: Checkding and de-registering document.ready() callbacks
has comment: http://stackoverflow.com/comment/43414666
tagged with: javascript
tagged with: jquery
has body: In JQuery, it is possible to register a document.ready() listener by doing? $( document ).ready(function() { alert("Document.ready.2") }); Is there anyway to deregister that callback? Is there anyway to check what callbacks are configured for the document.ready() event?
score: 0
has comment: http://stackoverflow.com/comment/43414713
favorite count: 0
has comment: http://stackoverflow.com/comment/43414804
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/27491926
has comment: http://stackoverflow.com/comment/43415119

http://stackoverflow.com/comment/43553787
comment on: http://stackoverflow.com/q/27564225
type: Comment
type: QuestionComment
has text: http://mdn.beonex.com/en/DOM/window.clearInterval.html
score: 1

http://stackoverflow.com/comment/43538170
has text: https://docs.angularjs.org/guide/di#dependency-annotation
type: Comment
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/27555957

http://stackoverflow.com/a/27583841
type: Answer
accepted answer of: http://stackoverflow.com/q/27583282
has body: Probably, the problem is that border is a shorthand property of border-width, border-style, border-color. And border-width is a shorthand of border-*-width, etc. Then, setting border sets border-bottom-* properties, but not border-bottom. Therefore, you get the empty string on Firefox. However, the following will work: getComputedStyle(element).borderBottomWidth
score: 3
downvote count: 0
type: AcceptedAnswer
upvote count: 3
answers question: http://stackoverflow.com/q/27583282

http://stackoverflow.com/comment/43477807
comment on: http://stackoverflow.com/q/27524505
has text: You can check this: http://api.jquery.com/jquery.getscript/ and this: http://stackoverflow.com/questions/24297829/execute-write-on-doc-it-isnt-possible-to-write-into-a-document-from-an-asynchr
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/43489516
comment on: http://stackoverflow.com/a/27530001
has text: There is an error l50 : data.forEach - check it : data is not an array but an object representing the line (you can't loop that way)
score: 0
type: AnswerComment
type: Comment

angular-strap
tag name: angular-strap
tags question: http://stackoverflow.com/q/27551255
type: Tag
tags question: http://stackoverflow.com/q/27509377
tags question: http://stackoverflow.com/q/27511913

http://stackoverflow.com/comment/43666477
has text: You might just want to do `val.lastname.substr(0,1).toUpperCase()` to make sure they are properly cased.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27622600

http://stackoverflow.com/comment/43403028
has text: @laserbeamer, yes I tried the forward slash, it doesn't work.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27485108
type: Comment

http://stackoverflow.com/q/27535428
accepted answer: http://stackoverflow.com/a/27535568
possible better answer: http://stackoverflow.com/a/27535489
has answer: http://stackoverflow.com/a/27535489
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27535518
has body: I'm doing the tutorials for functional programming on the nodeschool-homepage. I'm new to JS (came from Java) so I don't get some aspects of JS, for example: function say(word) { return function(anotherWord) { console.log(anotherWord); } } If I call: say("hi"); // it returns nothing say("hi", "hi"); // it returns nothing var said = say("hi"); // asignment said("hi"); // returns hi -- but why? said(); // returns undefined; Can someone explain to me how the "hi" in the outer function is passed in the inner function?
type: Question
has answer: http://stackoverflow.com/a/27535568
tagged with: javascript
score: 0
answer count: 3
tagged with: functional-programming
has title: JavaScript function that returns function with parameters

http://stackoverflow.com/comment/43512319
score: 0
type: Comment
has text: Thanks but now I have the problem that there is the described bug. When you hover over any other menu the content of the first sub-menu is still visible. (Well even on the first). To make it working you have to hover over some menus several times first. I updated my codepen.
type: AnswerComment
comment on: http://stackoverflow.com/a/27542241

http://stackoverflow.com/q/27612929
tagged with: search
type: Question
has body: Right so basically, I have a system that displays the users on my website. There's also an ajax search bar that allows me to type their a letter and it instantly brings me up names with that letter in it as I go. Right now my editing system is inline editing with html5 & ajax. I've come across a problem however that doesn't allow me to inline edit anything that shows up inside of the search, althought buttons and links work inside of it. There might be an error in the code or it's just the wrong approach at it. Here is my function for search.php on a home.php: Here is my ajax.php: <?php if(!empty($_POST)) { //database settings include "classes/forms/config.php"; foreach($_POST as $field_name => $val) { //clean post values $field_userid = strip_tags(trim($field_name)); $val = strip_tags(trim(mysql_real_escape_string($val))); //from the fieldname:user_id we need to get user_id $split_data = explode(':', $field_userid); $user_id = $split_data[1]; $field_name = $split_data[0]; if(!empty($user_id) && !empty($field_name) && !empty($val)) { //update the values mysql_query("UPDATE players SET $field_name = '$val' WHERE id = $user_id") or mysql_error(); echo "Updated"; } else { echo "Invalid Requests"; } } } else { echo "Invalid Requests"; } ?> Here is my inline editing function: and finally my search.php: <?php include_once('header.php'); ?> <?php include_once('classes/check.class.php'); ?> <?php include('classes/forms/connect-db.php'); ?> <?php include('classes/functions.php'); ?> <?php include("classes/forms/config.php"); ?> <?php echo " "; ?> <?php if(isset($_GET['s']) && $_GET['s'] != ''){ $s = $_GET['s']; $sql = "SELECT * FROM `players` WHERE user LIKE '%$s%'"; $result = mysql_query($sql); echo " "; echo " Username Rank Position DoP Tag AiT Service Stripes Notes "; while($row = mysql_fetch_array( $result )) { echo " "; echo ' ' . $row['user'] . ' '; echo ' '. member_rank($row['rank']) . ' '; echo ' ' . $row['position'] . ' '; echo ' ' . $row['date'] . ' '; echo ' ' . $…
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/43648019
answer count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: php
has comment: http://stackoverflow.com/comment/43648144
has title: Ajax inline editing via search bar
score: 1

gmail
type: Tag
tags question: http://stackoverflow.com/q/27631440
tags question: http://stackoverflow.com/q/27622032
tag name: gmail
tags question: http://stackoverflow.com/q/27630672

http://stackoverflow.com/comment/43639801
comment on: http://stackoverflow.com/q/27608459
has text: Are you setting the time zone?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27623684
accepted answer of: http://stackoverflow.com/q/27596247
answers question: http://stackoverflow.com/q/27596247
type: AcceptedAnswer
downvote count: 0
has body: Update: I was able to fix this by adding //= require bootstrap to my application.js file: //= require jquery //= require jquery_ujs //= require turbolinks //= require_tree . //= require bootstrap
upvote count: 8
type: Answer
score: 8

http://stackoverflow.com/comment/43777326
comment on: http://stackoverflow.com/q/27619632
type: Comment
score: 0
type: QuestionComment
has text: ServicesPerPage is the parameter name in the database this is bound to. Its in SQL. I don't see any "select from dbo.DRParameters " , name of the table containing the parameter. Or any sign of where it's bound in code. Even if it was bound using visual studio features, you'd think there would be some code generated.

http://stackoverflow.com/a/27561993
has comment: http://stackoverflow.com/comment/43550758
has comment: http://stackoverflow.com/comment/43550021
downvote count: 1
answers question: http://stackoverflow.com/q/27561913
upvote count: 3
has body: You can make use of new Array() and String.replace, but it will only be in the form of String function toNum(n) { var nStr = (n + ""); if(nStr.indexOf(".") &gt; -1) nStr = nStr.replace(".","").replace(/\d+$/, function(m){ return --m; }); return nStr.replace(/(\d+)e\+?(\d+)/, function(m, g1, g2){ return g1 + new Array(+g2).join("0") + "0"; }) } console.log(toNum(1e+30)); // "1000000000000000000000000000000" Now it's more robust as it doesn't fail even if a really huge number such as 12e100 which will be converted to 1.2e+101, is provided as the . is removed and the last set of digits decremented once. But still 100% accuracy can't be ensured but that is because of limitations of floatation maths in javascript.
type: Answer
has comment: http://stackoverflow.com/comment/43549961
score: 2
has comment: http://stackoverflow.com/comment/43549924

http://stackoverflow.com/q/27545113
upvote count: 3
has answer: http://stackoverflow.com/a/27545290
type: Question
has body: I have my web.config set apropriately and it works fine but only when the user does a httpPost it recognizes that it should redirect: &lt;system.web&gt; &lt;sessionState mode="InProc" timeout="5" /&gt; &lt;compilation debug="true" targetFramework="4.5.1" /&gt; &lt;httpRuntime targetFramework="4.5.1" /&gt; &lt;authentication mode="Forms"&gt; &lt;forms loginUrl="~/Login/Login"&gt;&lt;/forms&gt; &lt;/authentication&gt; I have this code set in my _Layout: var _redirectUrl = '@Url.Action("Logout", "Login")'; $(document).ajaxSuccess(function (event, request, settings, xhr, props, jqXHR) { if (jqXHR.status == 401) { window.location.href = _redirectUrl; } }); jqXHR.status returns undefined in my browser debuger, I also tried props.status and still get undefined. Any suggestions?
accepted answer: http://stackoverflow.com/a/27545290
tagged with: asp.net-mvc
downvote count: 0
tagged with: javascript
tagged with: ajax
answer count: 1
favorite count: 0
has title: How do I check if my MVC session expired, using ajax?
type: AnsweredQuestion
score: 3

http://stackoverflow.com/q/27617218
tagged with: ruby-on-rails
type: Question
tagged with: javascript
upvote count: 1
has title: Passing flash notice or alert via json to client side
favorite count: 0
has body: I am newbie to Rails and angularJs and i need to pass notice message with json data to my view this is my method create def create @cart= Panier.create(book_id: params[:book_id], title: params[:title], price: params[:price], quantity: params[:quantity],user_id: params[:user_id]) respond_to do |format| if @cart.save() format.json { render json: @cart, status: :created, location: @cart ,message: "added successfully to your cart" } else format.json {render json: @cart.errors, status: :unprocessable_entity, message: "can't be a dadded to your cart"} end end end so how can I display that messages in my web page?
tagged with: angularjs
type: UnansweredQuestion
answer count: 0
downvote count: 0
score: 1
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/a/27604602
downvote count: 0
score: 1
has body: This is due to the fact that you change the height. You don't need to set the height, making the body overflow: hidden should be enough. CSS: .locked { overflow-x: hidden; overflow-y: hidden; } Javascript: $("body").addClass("locked"); Try it: http://jsbin.com/tapagexope/1/edit?html,css,js,output (Click the body) Tested in FF 34 and Chrome 38. Note that you should position your overlay in a container that is position: fixed and left, top, bottom, right are all 0, covering the whole viewport. Within that box you can center your overlay element.
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/27604290

http://stackoverflow.com/q/27632186
has title: My php if condition is running no matter what. Trying to get user id Joomla 3
score: 2
has comment: http://stackoverflow.com/comment/43684810
type: Question
has comment: http://stackoverflow.com/comment/43684939
downvote count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/43684701
upvote count: 3
has comment: http://stackoverflow.com/comment/43684762
tagged with: joomla3.0
has comment: http://stackoverflow.com/comment/43684859
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43684741
tagged with: php
has body: So in Joomla 3 I am trying to get the user's logged in status and run some code accordingly. I am using JFactory's method getUser() and then checking if that user is a guest or logged in. When I use the code below the if statement will run no matter what. Can someone explain to me what is happening and maybe a better way of acheiving what I want? &lt;?php $user=JFactory::getUser(); $status=$user-&gt;guest; if($status == 1){ echo'&lt;script type="text/javascript"&gt; popup(); &lt;/script&gt;'; } ?&gt; I've tried it multiple different ways, even just using if(JFactory::getUser()->guest)... didn't work.

http://stackoverflow.com/q/27511913
favorite count: 0
has answer: http://stackoverflow.com/a/27512979
tagged with: angularjs
has body: My controller looks like this $scope.showSelectedComp = function($event, fuse_id, index) { var compTooltip = $tooltip($event.target, {title: 'My Title', contentTemplate:'views/compTooltip.html'}); } And my view looks like this 12 When I hover over the element I get TypeError: Cannot read property 'nodeName' of undefined at p (http://127.0.0.1:9000/bower_components/angular-strap/dist/angular-strap.min.js:9:25995) Am I doing something wrong?
type: AnsweredQuestion
tagged with: twitter-bootstrap
score: 1
has title: bs-tooltip TypeError: Cannot read property 'nodeName' of undefined
upvote count: 1
accepted answer: http://stackoverflow.com/a/27512979
type: Question
tagged with: angular-strap
tagged with: javascript
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/43460262
score: 0
type: AnswerComment
type: Comment
has text: @FelixKling, when the code works fine like it used to work, it returns all those values in JSON format like below example: `{"Value":null,"Status":2,"Message":"Greetings."}` My biggest question is what changed? It is the same code that has been working fine by returning values into JSON object but suddenly it stopped. devJunk, I see the alerts but the code example still doesn't make sense to me. I say this NOT in a bad way. I still don't see how your code is different from mine except the Message you added which now returns null. So, something other than that is wrong.
comment on: http://stackoverflow.com/a/27514735

http://stackoverflow.com/q/27497347
has comment: http://stackoverflow.com/comment/58239334
upvote count: 0
score: -2
has title: form fields not passing through when submit is done via javascript
tagged with: javascript
has body: I can't seem to figure out why this is happening. Any help would be appreciated. I have an html form with two fields. When I run the page and submit the form with a submit button, the field values pass through ok. But if I run the same page and submit with javascript as I show here, the receiving file shows null values for both x and y. Source File: X: Y: Target File (process_payment.php): <?php session_start(); print " "; print_r($_POST); print(" "); ?> Output I am getting: Array ( [x] => [y] => )
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/43426094
has comment: http://stackoverflow.com/comment/43426169
has comment: http://stackoverflow.com/comment/43466744
type: UnansweredQuestion
downvote count: 2
has comment: http://stackoverflow.com/comment/43505968
tagged with: php
has answer: http://stackoverflow.com/a/27497419
has answer: http://stackoverflow.com/a/27497377
tagged with: forms
type: Question
answer count: 2

http://stackoverflow.com/comment/43473783
type: Comment
type: QuestionComment
has text: Separate the repeated code to other function
score: 0
comment on: http://stackoverflow.com/q/27522334

http://stackoverflow.com/a/27492555
has comment: http://stackoverflow.com/comment/43522101
type: Answer
has comment: http://stackoverflow.com/comment/43453260
has comment: http://stackoverflow.com/comment/43416878
has comment: http://stackoverflow.com/comment/43477308
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43482999
has body: Yes, if you already did this in JavaScript you can use the code by creating a definition file for it and port it to TypeScript. An example might be like this: declare module Java { export enum ErrorCodeAuthority { item1, item2 } export function type(arg: "com.domain.ErrorCodeAuthority"): ErrorCodeAuthority; export function type(arg: string): any; } var JavaErrorCodeAuthority = Java.type("com.domain.ErrorCodeAuthority"); The enum and the first type function with the "com.domain.ErrorCodeAuthority" is optional but it gives you better typeinfo when passed in that particular string. Note the declare module part doesn't generate any code and you can add it to a .ts or .d.ts file. More info about creating a definition file can be found here: https://github.com/Microsoft/TypeScript/wiki/Writing%20Definition%20Files EDIT after the info from the comments I hope this code below will better suite your need. This has the downside that it isn't usable in a switch statement but in this case I think it is better to see the java enum as a module (or class was possible to). This might not be 100% correctly modelled but hopefully it gives you some extra idea's. Just a small side note, I find your case very interesting and challenging! declare module Java { interface ErrorCodeValue { toString(): string; value(): number; } module ErrorCodeAuthority { var ENTITY_NOT_FOUND: IErrorCodeAuthority; var HTTP_VERB_NOT_SUPPORTED: IErrorCodeAuthority; var BAD_REQUEST: IErrorCodeAuthority; } interface IErrorCodeAuthority { httpStatus: ErrorCodeValue; } export function type(arg: "com.domain.ErrorCodeAuthority"): typeof ErrorCodeAuthority; export function type(arg: string): any; } export class HttpResult { constructor(code: number, description: string) { } } export class HttpFailResult extends HttpResult { constructor(public errorCode: Java.IErrorCodeAuthority, public userParams? :any[]) { super(errorCode.httpStatus.value(), errorCode.toString()); } } var JavaErrorCodeAuthority = Java.type("com.dom…
has comment: http://stackoverflow.com/comment/43417094
has comment: http://stackoverflow.com/comment/43500211
has comment: http://stackoverflow.com/comment/43424282
answers question: http://stackoverflow.com/q/27492384
upvote count: 1

http://stackoverflow.com/a/27558610
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/46828977
accepted answer of: http://stackoverflow.com/q/27547032
has comment: http://stackoverflow.com/comment/43547276
answers question: http://stackoverflow.com/q/27547032
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43547176
has body: I was correct, the problem was audioStream element to garbage collected, I downloaded the code from github and modified this: var audio_context; var recorder; function startUserMedia(stream) { var input = audio_context.createMediaStreamSource(stream); into var audio_context; var recorder; var localStream; // line added by me function startUserMedia(stream) { localStream = stream; // line added by me var input = audio_context.createMediaStreamSource(stream); hence making sure that the stream is not garbage collected. P.S : things to note, 1 : MP3 encoding/decoding technology may be governed by MP3 patents in some countries. For commercial purposes, I would advice you to go for vorbis/ogg way( also I think the quality of mp3 after conversion from wav is bad). 2 : I found another problem of extra 50% of silence in the recordings, but the solution for that is already available online if i am correct. Edit: I have added a demo for this in github
has comment: http://stackoverflow.com/comment/43546778
type: Answer
has comment: http://stackoverflow.com/comment/43547201

http://stackoverflow.com/comment/43682348
score: 0
type: Comment
has text: Oh ok I see, I guess I need "curl.js" or something if I want to stick with Javascript. Thank you very much!
type: AnswerComment
comment on: http://stackoverflow.com/a/27630749

http://stackoverflow.com/comment/43572364
comment on: http://stackoverflow.com/a/27573406
type: AnswerComment
has text: Experts, is this such a horrible question to give me a -4 markdown? @Joeytjet50, I tried that and got an error. That's why I changed to \n. This forum is merciless AND GREAT at same time. WOW!!!
score: 0
type: Comment

http://stackoverflow.com/a/27587359
answers question: http://stackoverflow.com/q/27587338
type: Answer
score: 0
has body: There is some good jquery plugins for u, like this: http://ianlunn.co.uk/plugins/jquery-parallax/

http://stackoverflow.com/comment/43660138
type: Comment
comment on: http://stackoverflow.com/a/27619039
score: 1
type: AnswerComment
has text: @Steven You're using `getTime` where it should be `setTime`.

http://stackoverflow.com/q/27493013
answer count: 2
tagged with: arrays
accepted answer: http://stackoverflow.com/a/27493087
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43417665
has comment: http://stackoverflow.com/comment/43417697
possible better answer: http://stackoverflow.com/a/27493099
has answer: http://stackoverflow.com/a/27493099
has answer: http://stackoverflow.com/a/27493087
has title: JavaScript Array Fill
type: AnsweredQuestion
has body: I have a question regarding the next code, how can I fill the 'events' array dynamically, with a for / while ? ( I can't fill it manually due to the fact that there are a lot of datas ) Thank you &lt;script&gt; $(document).ready(function() { $('#calendar').fullCalendar({ header: { left: 'prev,next today', center: 'title', right: 'month,basicWeek' }, defaultDate: '2014-12-15', editable: true, eventLimit: true, // allow "more" link when too many events events: [ { title: 'Test', start: '2014-12-17' } ] }); }); &lt;/script&gt;
score: 0
type: Question

http://stackoverflow.com/q/27579941
has answer: http://stackoverflow.com/a/27579963
score: -1
has title: Passing Multiple Variables to PHP page Using Javascript $.post
tagged with: post
answer count: 2
downvote count: 1
has comment: http://stackoverflow.com/comment/43584397
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/27579963
tagged with: php
type: AnsweredQuestion
upvote count: 0
has answer: http://stackoverflow.com/a/27580030
accepted answer: http://stackoverflow.com/a/27580030
has body: I am trying to pass multiple variables to a php page using JavaScript. Currently the JavaScript code posts a variable 'page' to fetch_pages.php. I would like to post another variable 'currentpage' to it as well. The javaScript code is as follows: &lt;script type="text/javascript"&gt; $(document).ready(function() { var track_click = 0; //track user click on "load more" button, righ now it is 0 click var total_pages = &lt;? php echo $total_pages; ?&gt; ; $('#results').load("/include/fetch_pages.php", { 'page': track_click }, function() { track_click++; }); //initial data to load $(".load_more").click(function(e) { //user clicks on button $(this).hide(); //hide load more button on click $('.animation_image').show(); //show loading image if (track_click &lt;= total_pages) //make sure user clicks are still less than total pages { //post page number and load returned data into result element $.post('/include/fetch_pages.php', { 'page': track_click }, function(data) { $(".load_more").show(); //bring back load more button $("#results").append(data); //append data received from server //hide loading image $('.animation_image').hide(); //hide loading image once data is received track_click++; //user click increment on load button }).fail(function(xhr, ajaxOptions, thrownError) { alert(thrownError); //alert any HTTP error $(".load_more").show(); //bring back load more button $('.animation_image').hide(); //hide loading image once data is received }); if (track_click &gt;= total_pages - 1) { //reached end of the page yet? disable load button $(".load_more").attr("disabled", "disabled"); } } }); }); I assume I will need to add another variable to the JavaScript code like: var currentpage = 'index.php' and then post it with the 'page' variable but I am new to Javascript and am unsure how to do it. fetch_pages.php currently shows: $page_number = filter_var($_POST["page"], FILTER_SANITIZE_NUMBER_INT, FILTER_FLAG_STRIP_HIGH); and I also assume i will have to add variable to it like:…
has comment: http://stackoverflow.com/comment/43584450
type: Question
tagged with: javascript

http://stackoverflow.com/comment/43392577
has text: It will be better not to parse it.
comment on: http://stackoverflow.com/a/27479679
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/27533288
type: Answer
downvote count: 0
score: 1
has body: The reason why the callback in the sort is not being called is because your query selector returns an empty array (therefore you have nothing to sort on). Use the following instead : dojo.query(".element.dojoDndItem", "elements_container").sort( Note that initially your selector was ".element .dojoDndItem" which means "find all nodes with class dojoDndItem that are children of nodes with class element". Here, both classes are in the same nodes, so you need to remove the space and make the selector be ".element.dojoDndItem".
answers question: http://stackoverflow.com/q/27529727
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27529727
type: AcceptedAnswer

http://stackoverflow.com/comment/43459505
has text: Here's a pastebin of the share page, with header and footer included: http://pastebin.com/x4ejsgL8 Thanks for taking the time to help me out today...
type: Comment
comment on: http://stackoverflow.com/a/27513959
score: 0
type: AnswerComment

reactjs-flux
tags question: http://stackoverflow.com/q/27604431
tags question: http://stackoverflow.com/q/27591956
type: Tag
tags question: http://stackoverflow.com/q/27574093
tag name: reactjs-flux

http://stackoverflow.com/q/27514759
tagged with: jquery
upvote count: 3
answer count: 3
has answer: http://stackoverflow.com/a/27514801
accepted answer: http://stackoverflow.com/a/27514801
possible better answer: http://stackoverflow.com/a/27514795
tagged with: http://stackoverflow.com/tag/html
has title: naming and placing divs
downvote count: 1
tagged with: css
has answer: http://stackoverflow.com/a/27514825
favorite count: 0
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27514795
has body: Im asking this question more as a way to simplify my code. I feel this is possible, but not sure how to achieve it. I want these divs to be next to each other with the same JS function, but i've only been able to achieve this by giving certain divs unique names, while feeling that might be unnecessary. http://jsfiddle.net/uvb1u8y1/6/ CSS: #grid { width:1024px; position:absolute; background-color: #7f82a3; } .tile { position:relative; display: block; float:left; margin-left:10px; margin-top:10px; border:2px solid #fff; -moz-box-shadow:5px 5px 5px rgba(0, 0, 0, 0.5); -webkit-box-shadow:5px 5px 5px rgba(0, 0, 0, 0.5); box-shadow:5px 5px 5px rgba(0, 0, 0, 0.5); } .slider { margin: 0px auto; } .contenthover { padding: 22px 20px 10px 20px; } .contenthover, .contenthover h4, contenthover a { color: #fff; font-size:16px; } .contenthover h4, .contenthover p { margin: 0 0 10px 0; line-height: 1.1em; padding: 0; } .contenthover h4 { text-align:center; } .contenthover a.mybutton { display: block; text-align:center; padding: 5px 10px; margin-top: 15px; background: #0b94e5; color: #fff; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } .contenthover a.mybutton:hover { background: #005588; } HTML: Lorem ipsum dolor Lorem ipsum Lorem ipsum dolor Lorem ipsum Lorem ipsum dolor Lorem ipsum JS: $('#slidercell01').contenthover({ effect: 'slide', slide_speed: 300, overlay_background: '#000', overlay_opacity: 0.8 }); $('#slidercell02').contenthover({ effect: 'slide', slide_speed: 300, overlay_background: '#000', overlay_opacity: 0.8 }); $('#slidercell03').contenthover({ effect: 'slide', slide_speed: 300, overlay_background: '#000', overlay_opacity: 0.8 });
type: Question
tagged with: javascript

http://stackoverflow.com/q/27597310
has title: kendo ui Q3 grid export to excel built in not working?
has body: Hi every one I'm using my web app kendo ui grid export to excel built in, its not saving any record, I mentioned it like toolbar: ["excel"], excel: { allPages: true }, //and toolbar: ["excel"], excel: { fileName: "Kendo UI Grid Export.xlsx", proxyURL: "http://demos.telerik.com/kendo-ui/service/export", filterable: true }, I'm just confused about proxy url? what it means ?
type: Question
tagged with: kendo-grid
score: 1
tagged with: javascript
upvote count: 1
has answer: http://stackoverflow.com/a/28451521
answer count: 1
favorite count: 0
tagged with: kendo-ui
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
downvote count: 0

http://stackoverflow.com/comment/43419219
score: 0
type: Comment
has text: I have all these in my main project and would probably be included in the JSFiddle project, but still no luck. I think its an IE bug - typically.
type: AnswerComment
comment on: http://stackoverflow.com/a/27492940

http://stackoverflow.com/comment/43445287
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27507547
has text: Do you wish to refill the array with the exact same colors as before? Or entirely new random colors? (And if the latter, can they overlap with colors you've used before?)

http://stackoverflow.com/q/27564840
has answer: http://stackoverflow.com/a/27567491
has title: using angular.copy to extend a service
has answer: http://stackoverflow.com/a/27568975
answer count: 4
favorite count: 0
accepted answer: http://stackoverflow.com/a/27569393
tagged with: angularjs
has answer: http://stackoverflow.com/a/27567388
tagged with: angular-services
has comment: http://stackoverflow.com/comment/44558749
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44589486
type: Question
upvote count: 4
has answer: http://stackoverflow.com/a/27569393
downvote count: 0
tagged with: javascript
score: 4
linked to: http://stackoverflow.com/q/15666048
possible better answer: http://stackoverflow.com/a/27567491
has body: I have made baseService in angular as following. app.service('baseService', ['$http', function($http) { 'use strict'; this.service = ""; this.load = function(){ // implement load } }]); Now i want other services to extend this service as the implementation of load method will be same for all the services. My derived service will look as follow. app.service('jobsService', ['baseService', function( baseService ){ 'use strict'; angular.copy(baseService, this); this.service = 'jobs'; }]); Here I am using angular.copy(baseService, this); to extend the baseService. Is this a right approach to inherit a service?

http://stackoverflow.com/comment/43640176
score: 6
has text: @AlecosPapadopoulos wow that's awesome. If anything, it makes me wish even **more** that the language were actually called "JamoScript" :)
comment on: http://stackoverflow.com/a/27606200
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/43655351
type: Comment
type: QuestionComment
has text: It seems the code you gave posted is not enough to reproduce the problem. Making a JsFiddle reproducing the problem would be great. Also, which browser are you using?
score: 1
comment on: http://stackoverflow.com/q/27616592

http://stackoverflow.com/q/27480629
has answer: http://stackoverflow.com/a/27483416
accepted answer: http://stackoverflow.com/a/27483416
has comment: http://stackoverflow.com/comment/43394333
has comment: http://stackoverflow.com/comment/43395006
has body: I want to select cells in a time table by clicking and dragging, while limiting the selection only happens on the row (say row A) where the selection starts - do nothing if the cursor moves out of row A, and once it's back to row A, select the cells between the first cell and current cell (inclusive). Currently the general selection works (I have created a jsfiddle here), but I cannot limit the selection on the row where the selection starts, I realized the reason is I cannot get the row and column index in the event handlers, but cannot figure out why: var isMouseDown = false; var row = -1; // row to start a selection $("#our_table td") .mousedown(function () { isMouseDown = true; row = $(this).parent().index(); // doesn't work!!! return false; // prevent text selection }) I found an example from here where the row/col index can be retrieved in hover event, but when I put the script into mine, even the selection doesn't work :( I'm new to this JavaScript stuff, any help would be appreciated.
has title: Select cells on a row
type: AnsweredQuestion
tagged with: timetable
has comment: http://stackoverflow.com/comment/43424467
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/27480736
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/43424561
has answer: http://stackoverflow.com/a/27480736

http://stackoverflow.com/a/27560337
answers question: http://stackoverflow.com/q/27560199
score: 0
type: AcceptedAnswer
has body: try this http://jsfiddle.net/31roa5hz/2/ $(document).ready(function(){ $('html').addClass('fuelux'); $('#chkSucursal').on('checked.fu.checkbox', function (evt, item) { $("#rifEmpresa").hide('slow'); $("#rifSucursal").show('slow'); }); $('#chkSucursal').on('unchecked.fu.checkbox', function (evt, item) { $("#rifEmpresa").show('slow'); $("#rifSucursal").hide('slow'); }); $('#chkRif').on('checked.fu.checkbox', function () { $("#rifEmpresa").show('slow'); }); $('#chkRif').on('unchecked.fu.checkbox', function () { $("#rifEmpresa").hide('slow'); }); }); I think the control you're using doesn't have any property as checked, i tried to know if that element is checked or not using .is(':checked') it returns undefined. so i think the updated code is better for you as the UI control you're using has its own custom events which can be captured.
type: Answer
accepted answer of: http://stackoverflow.com/q/27560199

http://stackoverflow.com/q/27600010
has comment: http://stackoverflow.com/comment/43623357
score: 4
has comment: http://stackoverflow.com/comment/43623431
has answer: http://stackoverflow.com/a/27650884
type: Question
type: AnsweredQuestion
tagged with: javascript
has comment: http://stackoverflow.com/comment/43623556
upvote count: 4
has comment: http://stackoverflow.com/comment/43623620
answer count: 3
accepted answer: http://stackoverflow.com/a/27650884
downvote count: 0
has title: get node element by model property angularjs
possible better answer: http://stackoverflow.com/a/32978437
favorite count: 0
has answer: http://stackoverflow.com/a/32978437
has comment: http://stackoverflow.com/comment/43796055
tagged with: angularjs
has answer: http://stackoverflow.com/a/27636116
has comment: http://stackoverflow.com/comment/43623315
has body: There is a way to get the input that binding a model's property. I want to do this to blur the search input after I send the form, and I want to do this dynamically for later changes in html source. Example: var app = angular.module("MyApp", []); app.controller('ctrl', function($scope) { $scope.term = 'test'; $scope.submit = function(){ document.querySelector('#search').blur(); // I want replace document.querySelector('#search') with something like 'getElementByProp($scope.term)' }; }); JS Bin

http://stackoverflow.com/comment/43523141
has text: create a directive which binds the event to element
type: Comment
comment on: http://stackoverflow.com/q/27547156
score: 0
type: QuestionComment

http://stackoverflow.com/a/28881689
score: 0
answers question: http://stackoverflow.com/q/27615020
type: Answer
has body: I added this config for main app. It overwrites template mapping for ngnewroute .config (function ($componentLoaderProvider) { $componentLoaderProvider.setTemplateMapping(function (name) { return 'components/' + name + '/' + name + '.html'; }); })

http://stackoverflow.com/comment/43401541
has text: @AdrianSalazar, I've tried using momentjs from the cdn link you posted but the problem still exists
comment on: http://stackoverflow.com/q/27484534
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27613018
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/27612932
has comment: http://stackoverflow.com/comment/43648361
answers question: http://stackoverflow.com/q/27612932
type: AcceptedAnswer
has body: Your problem is with your CSS. You have #success span as position: absolute. Remove this and it will show up in the correct location.

http://stackoverflow.com/q/27565613
type: AnsweredQuestion
score: -1
has comment: http://stackoverflow.com/comment/43556321
type: Question
has comment: http://stackoverflow.com/comment/43556987
has answer: http://stackoverflow.com/a/27566019
answer count: 2
upvote count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/43556207
downvote count: 2
tagged with: regex
accepted answer: http://stackoverflow.com/a/27565844
has title: Unescaping multiple values in javascript
has body: Here is the code to escape special characters: function escapeRegExp(string){ return string.replace(/([.*+?^${}()|\[\]\/\\])/g, "\\$1"); } How can I unescape the special characters to get the original strings? I am getting confused with use of / and //.
possible better answer: http://stackoverflow.com/a/27566019
has answer: http://stackoverflow.com/a/27565844

http://stackoverflow.com/q/27578042
answer count: 2
possible better answer: http://stackoverflow.com/a/27578123
has comment: http://stackoverflow.com/comment/43580962
has answer: http://stackoverflow.com/a/27578123
favorite count: 0
has comment: http://stackoverflow.com/comment/43581105
has body: I'm trying to create menu with border (see http://multijuice.org/), and I need to move border on hover from active element to hovered. How I can do this? Maybe, anybody know some tutorials? UPD: Done! See this js file for answer. Thanks all!
has comment: http://stackoverflow.com/comment/43581053
has comment: http://stackoverflow.com/comment/43581212
has comment: http://stackoverflow.com/comment/43581207
has title: css: animate border on hover
tagged with: css
accepted answer: http://stackoverflow.com/a/27578371
downvote count: 2
upvote count: 1
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43581457
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/27578371

http://stackoverflow.com/q/27605721
linked to: http://stackoverflow.com/q/3102819
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27605760
tagged with: http://stackoverflow.com/tag/xml
has body: Okay i cannot solve this problem for 2 days straight.. This examlpe here: http://www.w3schools.com/ajax/tryit.asp?filename=tryajax_xml2 works just fine on the w3schools site. But when i copy and paste the code in notepad++. It doesn't work. I have the XML file downloaded. Than i was reading that AJAX doesn't support work with local files. I don't get this?? I have an assingment for school to work with a local XML file. How can i work with local XML file and AJAX when AJAX doesn't support working with local files. And the only response that i get from the teaching assistant is that i should use firefox... But No.. it doesn't work on : Chrome, Internet Explorer, Mozila, Opera.. basicaly nothing... I know that something similar has been asked here but i just can't make it work. If anyone got any idea how can i modify this given code to work localy, i would be thankful.. THANKS in advance.. Get CD info
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/43633595
has title: Ajax not working when i read a local file
type: Question
has answer: http://stackoverflow.com/a/27605788
tagged with: javascript
answer count: 2
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: ajax

http://stackoverflow.com/comment/43511174
score: 0
type: Comment
type: QuestionComment
has text: This question is not a duplicate of the linked questions, since it is addressing the general case of "autovivification for JavaScript", whereas the linked questions are seeking specific solutions for unique cases.
comment on: http://stackoverflow.com/q/27527618

http://stackoverflow.com/a/27574552
downvote count: 0
type: Answer
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/27574423
has body: The issue is the use of parseInt let's assume left is 10 (sw is 0.2) when you add 0.2 to 10 the result is 10.2 on the next run left again will be 10(and nothing happens), because parseInt returns an integer. When you subtract 0.2 from 10 the result will be 9.8, on the next run left will be 9(also not the desired result). Use parseFloat instead of parseInt(when you want to work with floats) or set sw to an integer, e.g. 1
answers question: http://stackoverflow.com/q/27574423
type: AcceptedAnswer

http://stackoverflow.com/a/27579984
has comment: http://stackoverflow.com/comment/43621222
upvote count: 1
has comment: http://stackoverflow.com/comment/43610273
answers question: http://stackoverflow.com/q/27569963
score: 1
has body: No, there's no way to set priority this way. Attach the listener within another listener (prior to toHtml): function toHtmlHandler( evt ) { console.log( 'toHtml event', evt ); } CKEDITOR.replace( 'editor1', { on: { pluginsLoaded: function () { this.on( 'toHtml', toHtmlHandler, null, null, 1 ); } } } );
accepted answer of: http://stackoverflow.com/q/27569963
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/43428447
has text: thanks you a lot ekad. I do like you said, it's run very good!
type: Comment
comment on: http://stackoverflow.com/a/27498644
score: 0
type: AnswerComment

marker
tags question: http://stackoverflow.com/q/27620934
tag name: marker
tags question: http://stackoverflow.com/q/27539380
tags question: http://stackoverflow.com/q/27501825
type: Tag

http://stackoverflow.com/comment/43580605
score: 0
type: Comment
type: QuestionComment
has text: is that all your css?
comment on: http://stackoverflow.com/q/27576368

http://stackoverflow.com/comment/43415464
has text: field is a different separate object, it's not part of theForm. You call it like you were calling it before. By just type.
comment on: http://stackoverflow.com/a/27490448
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/27508793
type: AcceptedAnswer
has body: It doesn't callback for every tab. chrome.tabs.query({}, function(tabs){ //tabs is an array and you can call array functions on it just like normal array if(tabs.length == 0){ //do whatever } })
type: Answer
has comment: http://stackoverflow.com/comment/43449745
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27508625
accepted answer of: http://stackoverflow.com/q/27508625
upvote count: 1

http://stackoverflow.com/a/27527691
downvote count: 0
type: Answer
score: 10
has body: You used bad "" change this: To:
answers question: http://stackoverflow.com/q/27527676
accepted answer of: http://stackoverflow.com/q/27527676
upvote count: 10
type: AcceptedAnswer

http://stackoverflow.com/comment/43500127
type: Comment
comment on: http://stackoverflow.com/a/27535416
score: 0
type: AnswerComment
has text: and this is what you can use to send a message to his friends: https://developers.facebook.com/docs/sharing/reference/send-dialog/ - but of course you can´t control it, you are not allowed to send ANY message, the user decides what to send. everything else would be pure spam.

http://stackoverflow.com/comment/43392100
comment on: http://stackoverflow.com/a/27479096
type: AnswerComment
has text: Hi, thanks for the response.. My problem is how can i navigate to the **child node** then bind the child node to the current directive so i can change the property of that child node
score: 0
type: Comment

http://stackoverflow.com/a/27525192
upvote count: 4
accepted answer of: http://stackoverflow.com/q/27525139
downvote count: 0
answers question: http://stackoverflow.com/q/27525139
score: 4
has body: You can use: var m = (ref.match(/[?&amp;](ref[^&amp;]+)/) || ['', ''])[1]; RegEx Demo This regex firs matches: ? or &amp; followed by literal text ref= followed by [^&amp;]+ and groups ref[^&amp;]+ in group #1.
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/43473893
type: QuestionComment
comment on: http://stackoverflow.com/q/27522394
score: 0
type: Comment
has text: Can you create an preview of your code running on something like [JSFiddle](http://jsfiddle.net/)? If we can tinker with the code, it will help us help you.

http://stackoverflow.com/a/27612567
has comment: http://stackoverflow.com/comment/43647699
score: 0
has comment: http://stackoverflow.com/comment/43647433
type: Answer
has body: this in your code is not referring to the elements that match your #gallery-wrap li selector. Instead, use .each() and then use $(this) in the enclosure: $('#gallery-wrap li').each(function() { if(!$(this).hasClass('visible')) { $(this).hide(); } else { $(this).show(); } }); p/s: It helps to create a minimal, reduced example of your code. Linking to external sites is strongly discouraged because they are susceptible to link rot, which means they will lose relevance to future users who come across this question/issue.
answers question: http://stackoverflow.com/q/27612546

http://stackoverflow.com/comment/43674960
score: 1
has text: `.load` brings a page into `#upright` so you are trying to pull a page named `tesdiv.jsp?par=9` into `#upright` which isn't valid. I guess I have no idea what you end goal is, so I can't really help but I can tell you this is not proper usage of `.load()`
comment on: http://stackoverflow.com/q/27627108
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27495232
type: AnsweredQuestion
downvote count: 0
tagged with: knockout.js
type: Question
score: 3
linked to: http://stackoverflow.com/q/1255948
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27504238
has title: Select2 selected tag as object instead of 'id' in Knockout
upvote count: 3
has body: So i have a select2 tag input working fine, displaying the tags correctly, and storing the selected id into the selectedProducts observableArray. However, my HTTPPost is expecting an array of objects, and not an array of integers. I've been looking to see how I can have the select2 save as an object (i.e. {id: 1, text: "abc"}) instead of just an array of integers. My binding is below: &lt;div class="col-sm-10"&gt; &lt;input type="hidden" id="tags" class="select2 form-control" multiple="multiple" data-bind="value: selectedProducts, select2: {tags: ko.toJS($parent.availableProducts), placeholder: 'select products'}" /&gt; &lt;pre data-bind="text: ko.toJSON(products, null, 2)"&gt;&lt;/pre&gt; &lt;/div&gt; var newItem = function (newitem) { var self = this; self.id = ko.observable(); self.selectedProducts = ko.observableArray(); self.products = ko.computed(function () { return self.selectedProducts().split(','); }, self); } var viewModel = function (data) { var self = this; self.newitem= ko.observable(new newItem()); self.availableProducts = ko.observableArray([]); $.ajax({ type: "GET", url: '/GetAllProducts', dataType: 'json', contentType: "application/json; charset=utf-8", async: false, success: function (data) { ko.mapping.fromJS(data, {}, self.availableProducts); }, error: function (err) { alert(err.status + " : " + err.statusText); } }); } ko.bindingHandlers.select2 = { init: function (element, valueAccessor, allBindingsAccessor) { var obj = valueAccessor(), allBindings = allBindingsAccessor(), lookupKey = allBindings.lookupKey; setTimeout(function () { $(element).select2(obj); }, 0); if (lookupKey) { var value = ko.utils.unwrapObservable(allBindings.value); $(element).select2('data', ko.utils.arrayFirst(obj.data.results, function (item) { return item[lookupKey] === value; })); } ko.utils.domNodeDisposal.addDisposeCallback(element, function () { $(element).select2('destroy'); }); }, update: function (element) { $(element).trigger('change'); } }
answer count: 1
has answer: http://stackoverflow.com/a/27504238
favorite count: 0
tagged with: jquery-select2
tagged with: asp.net-mvc-4

http://stackoverflow.com/q/27561548
has body: I have data on a website which looks like this [{"id":213877,"pic":"https://graph.facebook.com/ariel.barack/picture?type=square","url":"https://angel.co/ariel-barack","name":"Ariel Barack","type":"User"},{"id":109396,"pic":"https://d1qb2nb5cznatu.cloudfront.net/users/109396-medium_jpg?1405528556","url":"https://angel.co/mattbarackman","name":"Matt Barackman","type":"User"},{"id":881384,"pic":null,"url":"https://angel.co/austin-barack","name":"Austin Barack","type":"User"},{"id":245752,"pic":null,"url":"https://angel.co/drgoddess","name":"Dr. Goddess","type":"User"}] I have a html file with javascript code as follows: function httpGet(url) { var xmlHttp = null; xmlHttp = new XMLHttpRequest(); xmlHttp.open( "GET", url, false ); xmlHttp.send( null ); var data = xmlHttp.responseText; data = (JSON.parse(data)); I need to access the "name" attribute from the URL database and form a string concat of all the name attributes. Could you please help me out what to be done next?
type: Question
score: 0
has answer: http://stackoverflow.com/a/27561760
has answer: http://stackoverflow.com/a/27561602
tagged with: api
has answer: http://stackoverflow.com/a/27562309
has answer: http://stackoverflow.com/a/27561647
answer count: 4
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43548865
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
has comment: http://stackoverflow.com/comment/43548912
has title: Javascript data input Json

http://stackoverflow.com/a/27637832
has body: You cannot, that's the compromise. The html5 mode only works if angular is loaded, which is why it will not work if the page is reloaded or if paths are bookmarked. Stick with the #, people are starting to get used to seeing them
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27637765

http://stackoverflow.com/comment/43554877
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27563865
has text: @Hacketo if interested in the WebWorker solution, check out the [webworker-threads](https://www.npmjs.com/package/webworker-threads).

http://stackoverflow.com/q/27515767
type: Question
tagged with: ruby-on-rails
tagged with: heroku
has comment: http://stackoverflow.com/comment/43461868
score: 0
answer count: 0
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43462058
has comment: http://stackoverflow.com/comment/43462137
has body: I've just pushed my app to heroku, and those JS calls made with in the view, are not working, giving me several errors like: Uncaught TypeError: Cannot read property 'registerHelper' of undefined (index):456 Uncaught ReferenceError: drawStaticPin is not defined application-d6ce5af7abb100d97c6fb3d389a27fba.js:4 Uncaught TypeError: undefined is not a function (index):346 Uncaught TypeError: undefined is not a function I've tried to put defer="defer", but they still wont work. It's like if the tags are rendering before the assets/js path. EDIT My js is loaded in application.js file: //= require jquery //= require jquery_ujs //= require jquery.lockfixed //= require jquery.base64 //= require jquery.browser.mobile //= require helpers/masonry_helper //= require_directory ./utils //= require_directory ./helpers //= require tabs //= require pining //= require list //= require handlebars //= require jquery.cookiesdirective //= require albums //= require landing //= require bxslider //= require landing/waypoints //= require landing/animate-waypoints //= require handlebars-truncate-helper //= require masonry.pkgd.min //= require spots And I have several calls in views as: &lt;script type="text/javascript" defer="defer"&gt; $(function() { &lt;% photo.pins.limit(1).each do |pin| %&gt; drawPin(&lt;%= pin.to_json.html_safe %&gt;); &lt;% end %&gt; }); &lt;/script&gt; How can I resolve this? Thanks!
has title: Undefined js functions when pushing to heroku, working fine on local

http://stackoverflow.com/comment/43415394
score: 3
has text: why don'y you use json_encode?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27491934

http://stackoverflow.com/comment/43396892
comment on: http://stackoverflow.com/a/27481305
type: AnswerComment
has text: I have updated the fiddle and the code.Check the annotation property in the option object.You can set styles for annotations there.
score: 0
type: Comment

http://stackoverflow.com/q/27477814
type: Question
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/27478466
tagged with: css
has title: Why are my dc-js axes showing up so thick and brush filter appearing opaque black?
upvote count: 2
has body: I'm having trouble with axes on some dc-js plots. The axis lines are overly-thick and brush-filters are appearing as black boxes. For example, the lower portion of the attached figure is drawn with only the following commands: lower_bar_chart .height(100) .dimension(week_dim) // a basic time-rounded-to-the-week dimension .group(count_by_week_group) // counts of some events by week .centerBar(true) .x(d3.time.scale().domain([new Date(2010, 01, 01), new Date(2015, 01, 01)])) .round(d3.time.week.round) .alwaysUseRounding(true) .xUnits(d3.time.weeks); This is nearly identical to the Nasdaq dc-js example, but the rendering looks awful (not to mention the opaque black time brush selections). Any idea what might be going on? I figured it was a style issue, but I'm already including dc.css.
accepted answer: http://stackoverflow.com/a/27478466
score: 2
type: AnsweredQuestion
tagged with: dc.js

http://stackoverflow.com/q/27585620
has body: I have a side scrolling game, so instead of moving the character, you have the character centered and everything else movies past him. The character sprite is added directly to the stage, but the background image + a tree sprite is added to a container and the container is added to the stage. I want to do a hit test between the character and the tree. The problem is that the tree x and y coordinates do not change because it's attached to the container, so they never overlap with the character's coordinates, thus no collision. How do you do a hit test between a stage object and a container object? Or am I doing it wrong and I should add the tree as a stage object and move it separately to the container?
tagged with: canvas
tagged with: javascript
has comment: http://stackoverflow.com/comment/43616979
tagged with: createjs
tagged with: hittest
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43596315
score: 0
tagged with: collision-detection
has title: CreateJS hittest between a stage object and a container child?
type: Question

http://stackoverflow.com/q/27611042
has title: Node.js mysql error cannot read property of undefined?
has body: I have a program that inserts SMDR data into a database as it comes in. Here is my code: var net = require('net'), mysql = require('mysql'), PORT = 1752, HOST = '192.168.10.2', pool = mysql.createPool({ host: 'localhost', port: 3307, user: 'root', password: 'root', database: 'mydb' }); function connectionListener(conn) { console.log('Listening for incoming calls...'); } function logCall(phonenumber, operator) { pool.getConnection(function(err, connection) { if (!err) { // If no error exists var opquery = connection.query('SELECT OperatorID FROM tblOperators WHERE Phone_Login = ' + operator, function(err, rows) { if (err) { console.error(err); connection.release(); return; } var query = connection.query('INSERT INTO incoming_calls(phone_number, OperatorID) VALUES("' + phonenumber + '", "' + rows[0].OperatorID + '") ON DUPLICATE KEY UPDATE OperatorID=OperatorID, date_created=NOW()', function(err, rows) { if (err) { console.error(err); } connection.release(); }); }); } else { console.error(err); } }); } function processdata(data) { var phonedata = data.toString().match(/([0-9]?)([0-9]{10})/), operdata = data.toString().match(/([*])([0-9]{4})/); if (phonedata !== null &amp;&amp; operdata !== null) { var phonenumber = phonedata[2], oper = operdata[2]; oper = oper.replace('*', ''); phonenumber = phonenumber.slice(0,3)+"-"+phonenumber.slice(3,6)+"-"+phonenumber.slice(6); logCall(phonenumber, oper); } } logCall('999-999-9999', '1203'); var conn = net.createConnection(PORT, HOST, connectionListener); conn.on('data', processdata); conn.setEncoding('utf8'); And here is the error that I get, when OperatorID clearly does exist within the table: c:\xampp\htdocs&gt;node listener Listening for incoming calls... c:\xampp\htdocs\node_modules\mysql\lib\protocol\Parser.js:82 throw err; ^ TypeError: Cannot read property 'OperatorID' of undefined at Query._callback (c:\xampp\htdocs\listener.js:27:48) at Query.Sequence.end (c:\xampp\htdocs\node_modules\mysql\lib\protocol\sequences\Sequenc…
tagged with: node.js
has comment: http://stackoverflow.com/comment/43649376
has comment: http://stackoverflow.com/comment/43644600
tagged with: mysql
upvote count: 1
downvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/43644817
has answer: http://stackoverflow.com/a/39198965
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/43645131
favorite count: 0
has comment: http://stackoverflow.com/comment/43644832
type: UnansweredQuestion

http://stackoverflow.com/comment/43668142
comment on: http://stackoverflow.com/q/27623747
score: 1
type: Comment
has text: The variable `valid` should be declared with `var`.
type: QuestionComment

http://stackoverflow.com/comment/43692451
comment on: http://stackoverflow.com/a/27629296
type: Comment
score: 0
has text: @question Yes no problem. Instead of one clearRect you will have to do 4. Clear only the area around the new pic. Lets say your new image is in coordinates (100,100,300,300) you will have to do: clearRect(0,0,100,600), clearRect(300,0,400,600), clearRect(100,0,300,100), clearRect(100,300,300,600)
type: AnswerComment

http://stackoverflow.com/comment/43546440
comment on: http://stackoverflow.com/q/27559511
score: 0
type: Comment
type: QuestionComment
has text: `In other topic` You should consider to store all the `cases` in array or other data structure your code look like spaguetti code. and its hard to read.

http://stackoverflow.com/comment/43694681
type: Comment
type: QuestionComment
has text: Which JQM version are you using?
comment on: http://stackoverflow.com/q/27637564
score: 0

http://stackoverflow.com/comment/43693434
type: Comment
type: QuestionComment
has text: It seems that it's returning HTML because `the session does not exist`. That is, I'm not logged in.
comment on: http://stackoverflow.com/q/27635723
score: 0

http://stackoverflow.com/comment/43490616
type: QuestionComment
comment on: http://stackoverflow.com/q/27530488
score: 0
has text: Maybe you can find some useful information in [this answer](http://stackoverflow.com/questions/9948284/how-persistent-is-localstorage)
type: Comment

http://stackoverflow.com/comment/43668399
type: Comment
type: QuestionComment
score: 2
has text: The app probably uses URL routing or URL re-writing. The actual files may not be publicly visible at all. Generally you cannot see the source scripts on a server.
comment on: http://stackoverflow.com/q/27623946

database
tags question: http://stackoverflow.com/q/27552553
tags question: http://stackoverflow.com/q/27625533
type: Tag
tags question: http://stackoverflow.com/q/27494387
tags question: http://stackoverflow.com/q/27638556
tag name: database
tags question: http://stackoverflow.com/q/27550580
tags question: http://stackoverflow.com/q/27580173
tags question: http://stackoverflow.com/q/27540075

http://stackoverflow.com/q/27476283
has comment: http://stackoverflow.com/comment/43386803
accepted answer: http://stackoverflow.com/a/27476498
tagged with: javascript
score: 27
has comment: http://stackoverflow.com/comment/60308126
upvote count: 28
has answer: http://stackoverflow.com/a/27477672
has comment: http://stackoverflow.com/comment/43392060
has comment: http://stackoverflow.com/comment/43386820
possible better answer: http://stackoverflow.com/a/27476573
has answer: http://stackoverflow.com/a/27476573
favorite count: 0
has comment: http://stackoverflow.com/comment/43386842
has comment: http://stackoverflow.com/comment/43386832
answer count: 4
type: AnsweredQuestion
has body: I'm making a landing page where a phrase is constantly changing with select words. For instance, Design better websites made for clients. will switch the first or last word to become Develop better websites made for clients. However, since "Develop" is a larger word than "Design", the rest of the text ends up getting pushed around without smoothly transitioning. Keep in mind, this is a multi-line sentence, and it is centered. var first = ['Create','Design','Develop']; var second = ['you','clients','artists','us']; var i = 0; var j = 0; var maxfirst = first.length - 1; var maxsecond = second.length - 1; function delay() { $('#intro').velocity("transi1ion.slideUpIn", 1250); setInterval(firstwordchange, 400); setInterval(secondwordchange, 500); } function firstwordchange() { if (i < maxfirst) i++; else i = 0; $('#firstword').velocity("transition.slideUpOut", 300); setTimeout(function () { $('#firstword').text(first[i]); }, 200); $('#firstword').velocity("transition.slideUpIn", 300); } function secondwordchange() { if (j < maxsecond) j++; else j = 0; $('#secondword').velocity("transition.slideUpOut", 300); setTimeout(function () { $('#secondword').text(second[j]); }, 200); $('#secondword').velocity("transition.slideUpIn", 300); } setTimeout(delay, 700); Create better websites made for you. How can I make the inner, non-changing text transition smoothly? (actual website here)
has title: Smoothly changing text with JavaScript
has comment: http://stackoverflow.com/comment/43386883
downvote count: 1
has comment: http://stackoverflow.com/comment/43386871
has answer: http://stackoverflow.com/a/27476498
has comment: http://stackoverflow.com/comment/60308270
type: Question
has comment: http://stackoverflow.com/comment/43386855
has answer: http://stackoverflow.com/a/27477072
has comment: http://stackoverflow.com/comment/43386786
has comment: http://stackoverflow.com/comment/43387079
has comment: http://stackoverflow.com/comment/43386857
has comment: http://stackoverflow.com/comment/43386959

http://stackoverflow.com/comment/43452977
has text: What functionality are you looking to mock out for the cache? From the documentation I read it seems like you have to configure the cache and since there would be no configuration on your test it should not do anything, correct?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27511118

pivot-table
tag name: pivot-table
tags question: http://stackoverflow.com/q/27513252
type: Tag

http://stackoverflow.com/comment/43476781
type: Comment
has text: Have you been able to apply my answer?
score: 0
comment on: http://stackoverflow.com/q/27522450
type: QuestionComment

http://stackoverflow.com/comment/43532571
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27524670
has text: Does not seem to be possible, only residue color and label are mentioned in the docs

http://stackoverflow.com/a/27541475
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/27541303
answers question: http://stackoverflow.com/q/27541303
upvote count: 1
type: AcceptedAnswer
has body: You can do a little string addition by doing the following: var result = ""; var date = new Date(); var hours = date.getHours(); var minutes = date.getMinutes(); var amORpm = hours &gt; 12 ? "P.M" : "A.M"; if(hours &gt; 12) hours -= 12; result = hours + ":" + minutes + " " + amORpm; console.log(result); // Will get you your desired format
type: Answer

http://stackoverflow.com/q/27555777
has comment: http://stackoverflow.com/comment/43537771
tagged with: async.js
score: 0
has body: I have a (perhaps trivial) question. I am using Node.js package async, and particularly the async.each method (https://github.com/caolan/async#forEach). Consider the following code: var arrayOne=[]; async.forEach(arrayTwo, function (item, callback){ arrayOne.push(item); // push into arrayOne callback(); // the iterator has completed }, function(err) { // do something with arrayOne }); Is arrayOne.push(item) safe?
has title: Node.js async forEach: thread-safe?
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/27555998
tagged with: asynchronous
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43537869
tagged with: multithreading
accepted answer: http://stackoverflow.com/a/27555998
has comment: http://stackoverflow.com/comment/43538071
type: Question

http://stackoverflow.com/comment/43607237
comment on: http://stackoverflow.com/a/27591337
type: AnswerComment
type: Comment
has text: Specific to your question, TypeScript is a superset of Javascript. So there is nothing typescript specific you will need to use the $http service. You do want to make sure you have the angular.d.ts type definitions in your project so that you can use the ng.IHttpService interface in the injection. With TS you should define your controller and services as classes. I will try to update my original answer with examples if I get to a computer.
score: 2

http://stackoverflow.com/comment/43647820
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27612818
has text: are you trying to just make it so that the main window doesnt scroll if the user scrolls something within the dialog?
score: 0

http://stackoverflow.com/a/27620094
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27618197
upvote count: 1
type: Answer
has body: Two things: replace is deprecated so, I don't recommend you to use it replace copy the attributes to the children, and that is your problem. The second directive generates this: And it seems that dir-rect2 and viz-settings is breaking the svg in some way... if you remove this attributes with the same code... svg seems to work:

http://stackoverflow.com/q/27484468
score: 0
has answer: http://stackoverflow.com/a/27484600
answer count: 2
has body: The following is my code. I am trying to scroll from once the submit button is clicked to new-products . However , the below script doesn't seem to work. Also css of my new-products class for test purposes is : #new-products { height: 2000px; } Am I doing something wrong ? EDIT: Console shows -> index.html:7 GET file://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css net::ERR_FILE_NOT_FOUND index.html:9 GET file://cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js net::ERR_FILE_NOT_FOUND index.html:22 GET file://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js net::ERR_FILE_NOT_FOUND index.html:23 GET file://cdnjs.cloudflare.com/ajax/libs/jquery-scrollTo/1.4.11/jquery.scrollTo.min.js net::ERR_FILE_NOT_FOUND index.html:24 GET file://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js net::ERR_FILE_NOT_FOUND index.html:26 Uncaught ReferenceError: $ is not defined UPD 1: Adding http: before links helped eliminate console errors. But the div still doesn't scroll .
tagged with: scrollto
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43402829
has answer: http://stackoverflow.com/a/27484490
tagged with: css
has title: scrollTo plugin doesn't seem to identify div
type: UnansweredQuestion
type: Question

http://stackoverflow.com/a/27573589
has comment: http://stackoverflow.com/comment/112840532
has comment: http://stackoverflow.com/comment/73612215
downvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/65903316
has comment: http://stackoverflow.com/comment/66847237
score: 131
has body: The current lib.d.ts doesn't have promises in it defined so you need a extra definition file for it that is why you are getting compilation errors. You could for example use (like @elclanrs says) use the es6-promise package with the definition file from DefinitelyTyped: es6-promise definition You can then use it like this: var p = new Promise&lt;string&gt;((resolve, reject) =&gt; { resolve('a string'); }); edit You can use it without a definition when targeting ES6 (with the TypeScript compiler) - Note you still require the Promise to exists in the runtime ofcourse (so it won't work in old browsers :)) Add/Edit the following to your tsconfig.json : "compilerOptions": { "target": "ES6" } edit 2 When TypeScript 2.0 will come out things will change a bit (though above still works) but definition files can be installed directly with npm like below: npm install --save @types/es6-promise - source edit3 Updating answer with more info for using the types. Create a package.json file with only { } as the content (if you don't have a package.json already. Call npm install --save @types/es6-promise and tsc --init. The first npm install command will change your package.json to include the es6-promise as a dependency. tsc --init will create a tsconfig.json file for you. You can now use the promise in your typescript file var x: Promise&lt;any&gt;;. Execute tsc -p . to compile your project. You should have no errors.
type: Answer
has comment: http://stackoverflow.com/comment/69547827
has comment: http://stackoverflow.com/comment/56472266
has comment: http://stackoverflow.com/comment/43573576
has comment: http://stackoverflow.com/comment/66841166
accepted answer of: http://stackoverflow.com/q/27573365
upvote count: 133
has comment: http://stackoverflow.com/comment/70022069
answers question: http://stackoverflow.com/q/27573365
has comment: http://stackoverflow.com/comment/66876368
has comment: http://stackoverflow.com/comment/55917252
has comment: http://stackoverflow.com/comment/67188336
has comment: http://stackoverflow.com/comment/66870237

http://stackoverflow.com/comment/43418726
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27493231
has text: This is identical to an answer *already linked in his question*. Please re-read it and click his links. I'm not claiming my answer does anything but explain how to use a NodeList. Notice the `if` at the start of my answer, I don't think I need to explain what a condition is to a programmer.

http://stackoverflow.com/comment/43694921
score: 0
has text: Sp If you can answer and confirm my 2 questions, thanks!
type: Comment
comment on: http://stackoverflow.com/a/27638046
type: AnswerComment

http://stackoverflow.com/q/27589093
has comment: http://stackoverflow.com/comment/43602329
tagged with: while-loop
has comment: http://stackoverflow.com/comment/43602513
has comment: http://stackoverflow.com/comment/43602356
tagged with: asynchronous
has title: Javascript calling function from inside same function
favorite count: 0
accepted answer: http://stackoverflow.com/a/27589273
upvote count: 1
possible better answer: http://stackoverflow.com/a/27604713
has body: I have a function that does several DDBB calls, so it is asynchronous. I need to call the function and check a data value (winner) in the JSON object it returns. If it is true i need to call the function again until winner == false. I can't use while because it is not asynchronous, how can i do this? someFunction(function(result) { // if result.winner == true repeat })
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27604713
score: 1
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: callback
has answer: http://stackoverflow.com/a/27589273

http://stackoverflow.com/q/27516172
has answer: http://stackoverflow.com/a/27516298
type: AnsweredQuestion
score: 3
upvote count: 3
has title: Backbone change event not fired for select field selected by jQuery
has body: I have a button that when clicked sets the value of a select field and also have a change event for the select field. The 'change select[name=location_id]' event works when selecting normally via mouse/keyboard but clicking the button, which uses jQuery to change the select field value, doesn't fire off the 'change select[name=location_id]' event. How do I get the 'change select[name=location_id]' to fire when changing the field via jQuery? SubscriptionsModule.Views.SubscriptionEditView = Backbone.Marionette.LayoutView.extend({ template: "subscriptions/edit", events: { 'click #home-delivery-select': 'selectHomeDeliverySite', 'change select[name=location_id]': 'updateLocation' }, selectHomeDeliverySite: function() { this.$el.find('select[name=location_id]').val(this.model.get('hd_location_id')); }, updateLocation: function(e) { //update location code }, updateOrderSize: function(e) { SubscriptionsModule.eventManager.trigger('updateOrderSize', $(e.currentTarget).data('price')); } });
type: Question
accepted answer: http://stackoverflow.com/a/27516298
has answer: http://stackoverflow.com/a/28376568
downvote count: 0
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/27517789
answer count: 3
has answer: http://stackoverflow.com/a/27517789
favorite count: 0
tagged with: backbone.js

http://stackoverflow.com/a/27503446
score: -1
upvote count: 0
answers question: http://stackoverflow.com/q/27501266
type: Answer
has body: It seems like some of ECMA5 functionalities are not working in IE9. I have been porting AngularJS apps in IE8 to test its compatibility, and you can also try the following tips which helped me out : ES5 Shim and ES5 Sham (needed for Object.Create polyfill) JSON3 polyfill for JSON handling Use Angular 1.2.x, which works seamlessly till IE8 Use jQuery 1.x.x Always include jQuery before AngularJS, as Angular has own jQueryLite which it tends to use, which may cause an error in old browsers Hope it helps!
downvote count: 1

http://stackoverflow.com/a/27521277
has comment: http://stackoverflow.com/comment/43472425
has comment: http://stackoverflow.com/comment/43543281
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43472461
accepted answer of: http://stackoverflow.com/q/27521049
has comment: http://stackoverflow.com/comment/43472864
answers question: http://stackoverflow.com/q/27521049
type: Answer
has comment: http://stackoverflow.com/comment/43472345
has body: Probably what you need is sce since I guess your iframe is not accepted as a trusted HTML. So, after including sce into your controller like app.controller("MainController", ['$scope', '$http','$sce', function($scope, $http, $sce){ , you would do $scope.maps = $sce.trustAsHtml(mapsdata); See this question/answer also. Also, for other HTML data that you are sure are 'safe' to display, you can use this filter: app.filter('unsafe', function($sce) { return function(val) { return $sce.trustAsHtml(val); }; }); You can use it with ng-bind-html="yourHTMLdataVariable | unsafe"

http://stackoverflow.com/comment/43588837
has text: Yes, thats almost all what I wanted in functionality but I have to know if I can make a rule or a trigger that makes the code happen, I mean instead of me creating the Event, when other user creates an Event with specific parameters I mean like an specific Title, it triggers the code, you know what I mean?
comment on: http://stackoverflow.com/a/27555249
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/27500266
has title: How to override a Bootstrap plugin definition
has answer: http://stackoverflow.com/a/27512020
has body: I want to make some adjustments (actually, fixes) to the Bootstrap 3 Button plugin, but I can't wait for the whole submit code/pull request/approval process. I also don't want to make any edits directly to the bootstrap.js file. I thought I could add another file called bootstrap-override.js which loads after bootstrap.js and contained another copy of the Buttons plugin code with my customizations, but this isn't working. The code from the original Buttons plugin fires. What is the correct pattern for replacing an already defined plugin like this: /* ======================================================================== * Bootstrap: button.js v3.3.0 * http://getbootstrap.com/javascript/#buttons * ======================================================================== * Copyright 2011-2014 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * ======================================================================== */ +function ($) { 'use strict'; // BUTTON PUBLIC CLASS DEFINITION // ============================== var Button = function (element, options) { this.$element = $(element) this.options = $.extend({}, Button.DEFAULTS, options) this.isLoading = false } Button.VERSION = '3.3.0' Button.DEFAULTS = { loadingText: 'loading...' } Button.prototype.setState = function (state) { var d = 'disabled' var $el = this.$element var val = $el.is('input') ? 'val' : 'html' var data = $el.data() state = state + 'Text' if (data.resetText == null) $el.data('resetText', $el[val]()) // push to event loop to allow forms to submit setTimeout($.proxy(function () { $el[val](data[state] == null ? this.options[state] : data[state]) if (state == 'loadingText') { this.isLoading = true $el.addClass(d).attr(d, d) } else if (this.isLoading) { this.isLoading = false $el.removeClass(d).removeAttr(d) } }, this), 0) } Button.prototype.toggle = function () { var changed = true var $parent = this.$element.closest('[data-toggle="buttons"]') if ($parent.length)…
has comment: http://stackoverflow.com/comment/43431138
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43431039
has comment: http://stackoverflow.com/comment/43431241
has comment: http://stackoverflow.com/comment/43433072
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/45403289
score: 0
accepted answer: http://stackoverflow.com/a/27512020
tagged with: twitter-bootstrap

http://stackoverflow.com/a/27575006
has comment: http://stackoverflow.com/comment/43575722
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/43575646
upvote count: 2
has comment: http://stackoverflow.com/comment/43575735
has comment: http://stackoverflow.com/comment/43575926
has comment: http://stackoverflow.com/comment/43575811
has comment: http://stackoverflow.com/comment/43575649
has body: The proper way it to move it to simple JS script &lt;script type="text/javascript"&gt; var form = document.querySelector('#tfnewsearch'), query = form.querySelector('[name="q"]'); form.addEventListener('submit', function(){ doSearch(query.value); }); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/43575686
answers question: http://stackoverflow.com/q/27574934
downvote count: 0

http://stackoverflow.com/q/27521473
has title: Javascript: Is there a way to specify infinite input parameters for Parse.Promise.when?
upvote count: 1
tagged with: .when
type: Question
type: AnsweredQuestion
tagged with: javascript
answer count: 1
downvote count: 0
accepted answer: http://stackoverflow.com/a/27525689
has comment: http://stackoverflow.com/comment/43479961
favorite count: 0
tagged with: promise
tagged with: parse-platform
has body: Looking at the documentation for Parse.Promise.when (https://www.parse.com/docs/js/symbols/Parse.Promise.html#.when), currently, there are two ways of specifying it. The first is with comma separated input parameters for "when" and followed by comma separated inputs for the function in "then" Parse.Promise.when(p1, p2, p3).then(function(r1, r2, r3) { console.log(r1); // prints 1 console.log(r2); // prints 2 console.log(r3); // prints 3 }); and the Second is with an array input for "when" followed by comma separated inputs for the function in "then." var promises = [p1, p2, p3]; Parse.Promise.when(promises).then(function(r1, r2, r3) { console.log(r1); // prints 1 console.log(r2); // prints 2 console.log(r3); // prints 3 }); My question is: For the function inside "then," is there a easy way to specify an infinite amount of inputs without actually having to put in an infinite amount of inputs? In other words, is there a way to reproduce this in a simple way? var promises = [p1, p2, p3]; Parse.Promise.when(promises).then(function(r1, r2, r3,.............∞) { console.log(r1); // prints 1 console.log(r2); // prints 2 console.log(r3); // prints 3 . . . . . ∞ }); I tried using the "arguments" variable but it does not work in this case. It seems I have to put in one by one the parameters r1,r2,r3...∞. Does anyone know a way around this? Please help
has answer: http://stackoverflow.com/a/27525689
score: 1

http://stackoverflow.com/q/27573805
has comment: http://stackoverflow.com/comment/43573075
tagged with: javascript
score: -1
upvote count: 0
has comment: http://stackoverflow.com/comment/53504932
answer count: 1
tagged with: bootstrap-modal
favorite count: 0
type: UnansweredQuestion
has title: Checkbox Javascript function not working in Bootstrap Modal
has answer: http://stackoverflow.com/a/27573886
tagged with: twitter-bootstrap-3
downvote count: 1
has comment: http://stackoverflow.com/comment/43573235
type: Question
has body: I'm using Bootstrap and have a textfield and a checkbox inside a modal. I'm using javascript to enable the textfield when the checkbox is checked, but when inside the modal it doesn't seem to work. Modal: JS: $(document).getElementById('foodBox').onchange = function() { document.getElementById('food').disabled = !this.checked; document.getElementById('food').value = ""; }; Why doesn't the function work when the checkbox is inside the modal?

http://stackoverflow.com/q/27498666
upvote count: 1
type: Question
tagged with: javascript
tagged with: jquery
downvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/27498701
favorite count: 0
tagged with: angularjs
has body: I have a login form as follows. login Controller is called when the login button is clicked and it is working fine. I need the same function to be called on the "Enter" key press after entering the Username and Password. Log in Controller var mysession = ''; function loginController($scope, $http, $cookieStore, $location) { $scope.sess_id = mysession; var token = $cookieStore.get('token'); var conId = $cookieStore.get('Cont_Id'); var exId = $cookieStore.get('ex_Id'); $scope.log_me = function() { $scope.login_me = []; var login_un = $scope.uservals; var login_pwd = $scope.passvals; var logs_me = "http://www.vb.com/login.html?username=" + login_un + "&password=" + login_pwd; $http.get(logs_me) .success(function(response) { $cookieStore.put('token', response.token); $cookieStore.put('ex_Id', response.ExId); $cookieStore.put('Cont_Id', response.contactId); $cookieStore.put('email', response.email); $cookieStore.put('name', response.name); mysession = response.ss_id; if (response.status == "failure") { $('.login_error').show(); $('.login_error').html('Invalid username or password'); $('.login_error').delay(4000).fadeOut(); $('.loading').hide(); } else { $('.page-signin').hide(); $('.signin-header').hide(); $location.path('/dashboard'); } }); } }
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43429493
linked to: http://stackoverflow.com/q/15417125
has comment: http://stackoverflow.com/comment/43428531
has title: Submit form while key press in Angular JS
score: 1

http://stackoverflow.com/comment/43458735
type: QuestionComment
score: 0
has text: I think it would be easiest if you could share a link to the site in question, since, as you mentioned yourself, you don't know what part of the code or which file is generating that behaviour.
comment on: http://stackoverflow.com/q/27514109
type: Comment

http://stackoverflow.com/a/27634608
type: Answer
upvote count: 2
answers question: http://stackoverflow.com/q/27634430
has body: Lets look at your code> You have a function foo that is current just displaying the sum of a and b. It isn't 1. storing it anywhere 2. Returning it . Functions need to be called to perform certain tasks and return something. console.log() only displays it on the console rather than returning it to whatever called the function. function foo(a) { console.log( a + b ); } What you should do either calculate the mathematics whats done in foo(), or store it in a variable and return it. function foo(a){ c = a + b; console.log(c); //If you want to display it in the console in the first place. return c; }
score: 2
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27634430

http://stackoverflow.com/comment/43695667
score: 0
has text: I need to do it because my costumers pay me per user. But with the same user details they can use for two or more peoples (and its happening), another reason is that they can give the user details to my competition to get ideas or copy from me... I want to prevent them to do all of this... The costumers are big organizations so I cant use IP thanks @Alex K.
comment on: http://stackoverflow.com/q/27637980
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27489585
has answer: http://stackoverflow.com/a/27489891
type: Question
upvote count: 6
possible better answer: http://stackoverflow.com/a/27489891
has title: How to send a 1 dimensional integer array from QML to C++?
tagged with: c++
has body: So I have a signal: QML: signal qmlSendWorkflowIdsArraySignal(variant workflowIdsArray) JS: sendToCppWorkflowIdsArray(arrayOfWorkflowIds); C++: QObject::connect(qmlMainContentItemObject, SIGNAL(qmlSendWorkflowIdsArraySignal(QVariant)), &amp;myController, SLOT(qmlToCppWorkflowIdsArraySlot(QVariant))); C++ slot: void qmlToCppWorkflowIdsArraySlot(QVariant workflowIdsArray) { qDebug() &lt;&lt; " +++++++++++++++ Cpp Array slot has been called: "&lt;&lt;workflowIdsArray; } Output: +++++++++++++++ Cpp Array slot has been called: QVariant(QVariantList, (QVariant(QString, "2") , QVariant(QString, "3") , QVariant(QString, "4") ) ) How do I read this QVariantList inside QVariant, ie, lets say I want to read this first element of the array, that is QVariant(QString, “2”), then the other and the other. This looks very complicated like this. All I need is to pass an array of integers from QML to C++, so I can read this array. I dont want to use QVariant or a QVariantList, unless I have to as I see no other way to do it. Does anyone have any suggestions?
answer count: 2
has answer: http://stackoverflow.com/a/27499228
linked to: http://stackoverflow.com/q/26098663
tagged with: qt
tagged with: qml
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27499228
tagged with: arrays
downvote count: 0
tagged with: javascript
score: 6
favorite count: 0

http://stackoverflow.com/q/27532017
has title: PHP counter to input field
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43493296
tagged with: ajax
answer count: 3
has comment: http://stackoverflow.com/comment/43492629
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27532085
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/43492532
accepted answer: http://stackoverflow.com/a/27548282
possible better answer: http://stackoverflow.com/a/27532037
tagged with: php
has comment: http://stackoverflow.com/comment/43493182
has answer: http://stackoverflow.com/a/27532037
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27548282
has body: Hi i use this PHP script http://www.stevedawson.com/scripts/text-counter.php And to make it appear on my html page i use this ajax script. &lt;script&gt; $.ajax({ type:'GET', url:'http://www.solariserat.se/count.php', data:'', success: function(data){ $('#container').html(data); } }); &lt;/script&gt; Together with this html code &lt;div id="container"&gt; &lt;?php include "count.php"; ?&gt; &lt;/div&gt; And it works perfect and it displays the counted numbers inside the div. But i want it to be displayed as value inside a input tag Is this possible, and how do i do it? I know this is wrong but you get my point what i want to do =) &lt;input value="count.php"&gt;

http://stackoverflow.com/comment/43435759
type: Comment
comment on: http://stackoverflow.com/a/27502148
type: AnswerComment
score: 0
has text: then what is the problem.

http://stackoverflow.com/comment/43470918
type: Comment
type: QuestionComment
has text: One option is also [PDFReactor](http://www.pdfreactor.com/).
comment on: http://stackoverflow.com/q/27520760
score: 0

http://stackoverflow.com/q/27623747
has title: Check boolean jquery
has comment: http://stackoverflow.com/comment/43668084
has comment: http://stackoverflow.com/comment/43668074
has comment: http://stackoverflow.com/comment/43668070
has body: I create a forms with html/css and i validate my forms with javascript/jquery. If valid equal false, validate is work. But if i want check if valid equal true, i have no error but my function is not execute. here my form Login : error and here my validate function $("#envoyer").click(function(){ valid = true; //LOGIN VALIDATE if($("#login").val() == ""){ $("#login").next(".error-message").fadeIn().text("Please enter your login"); valid = false; } else if (!$("#login").val().match(/^[a-z][a-zA-Z0-9 ._-]+$/gim)){ $("#login").next(".error-message").fadeIn().text("Please enter a valid login"); valid = false; } else{ $("#login").next(".error-message").fadeOut(); } if(valid == true){ console.log(valid); (".success-message").fadeIn().text("The form is sent with success"); } return valid }); When i send my form and there is no error, i see with console.log() valid equal "true" but my div "sucess-message" not appear. i add "$" but i have a same problem thanks
type: UnansweredQuestion
downvote count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/43668142
has comment: http://stackoverflow.com/comment/43668062
has answer: http://stackoverflow.com/a/27623766
has comment: http://stackoverflow.com/comment/43668330
score: -1
type: Question
tagged with: validation
has comment: http://stackoverflow.com/comment/43668127
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/43543259
type: QuestionComment
comment on: http://stackoverflow.com/q/27558131
score: 0
has text: If you look at dev tools and monitor the request, what do you see in the request and response?
type: Comment

http://stackoverflow.com/comment/43548774
comment on: http://stackoverflow.com/q/27560499
score: 0
type: Comment
has text: can only be one element with that ID in the page. ID's must be unique by definition, so that might be your problem. `$("#Details0").hide()` should work when there is only one of that ID. otherwise use class instead of ID
type: QuestionComment

http://stackoverflow.com/comment/43391162
type: Comment
type: QuestionComment
has text: What is the problem that is happening? What have you tried?
comment on: http://stackoverflow.com/q/27478414
score: 0

http://stackoverflow.com/comment/43467828
type: AnswerComment
type: Comment
has text: Thank you! Still trying to wrap my head around promises, hasn't clicked for me but this code helps make sense of everything a bit more.
comment on: http://stackoverflow.com/a/27518763
score: 0

chess
tags question: http://stackoverflow.com/q/27571837
type: Tag
tag name: chess
tags question: http://stackoverflow.com/q/27532099

http://stackoverflow.com/comment/43418437
type: Comment
type: QuestionComment
has text: why can't the input be replaced? depends in a view is usually a bad sign...
score: 0
comment on: http://stackoverflow.com/q/27493198

http://stackoverflow.com/a/27536599
downvote count: 0
type: Answer
has body: Added an alert attribute to your controller definition: app.controller('MainCtrl', function($scope) { var that = this; $scope.showTest = true; $scope.alert = function(msg) { alert(msg); }; }); I think the issue is that the ng-click directive will automatically interpret whatever you put inside in the scope of the controller object. So if the controller doesn't have an alert attribute, nothing happens.
has comment: http://stackoverflow.com/comment/43501601
score: 5
answers question: http://stackoverflow.com/q/27536484
has comment: http://stackoverflow.com/comment/43501584
upvote count: 5

http://stackoverflow.com/q/27632936
has body: Consider this example from http://baconjs.github.io/ var up = $('#up').asEventStream('click'); var down = $('#down').asEventStream('click'); var counter = // map up to 1, down to -1 up.map(1).merge(down.map(-1)) // accumulate sum .scan(0, function(x,y) { return x + y }); // assign observable value to jQuery property text counter.assign($('#counter'), 'text'); What if I have one more button for resetting counter and an event stream from this button clicks. How do I switch counter stream based on reset clicks stream to reset counter? I know that I have to use .flatMapLatest method, but referring this example I dont know how to do it.
answer count: 2
tagged with: javascript
tagged with: reactive-streams
upvote count: 3
favorite count: 0
tagged with: reactive-programming
possible better answer: http://stackoverflow.com/a/27637021
has answer: http://stackoverflow.com/a/27641930
accepted answer: http://stackoverflow.com/a/27641930
has answer: http://stackoverflow.com/a/27637021
type: AnsweredQuestion
score: 3
downvote count: 0
tagged with: bacon.js
has title: How to switch streams based on some EventStream changes in Bacon
type: Question

http://stackoverflow.com/q/27539645
type: AnsweredQuestion
has title: How to embed the videos into website without their own site details?
score: 1
type: Question
has answer: http://stackoverflow.com/a/27541489
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: I'm creating one website for e-learning and i need to embed the videos into the site. If I'll embed it works good but the videos contains that own site details like that site name (Youtube) and the control buttons of their site at the right corner.. I want to hide that source site details using HTML or Javascript. Could anyone help me to do this? Thanks in advance, Sandra
favorite count: 0
accepted answer: http://stackoverflow.com/a/27541489
upvote count: 2
downvote count: 1

http://stackoverflow.com/comment/43543187
score: 1
has text: i am using firefox 34 in windows 7, the problem i am getting is, after sometime, the light signalling audio capture disappears and i noticed in that code that ```stream``` reference is not stored anywhere, so this might get garbage collected in firefox hence leading the problem
comment on: http://stackoverflow.com/q/27547032
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27596530
answers question: http://stackoverflow.com/q/27596187
upvote count: 1
score: 1
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/43623062
has body: Without scope: {}, all of your directives are sharing the same scope which means sharing the same scope.abilities, so your last directive strength initializes scope.abilityes = [] and only push 'strength' in. With scope: {}, every time superhero is loaded with an isolated scope and isolated scope.abilities, so it always keeps the initialization with three elements in. You can console.log(scope.$id) in directive to check the difference.
has comment: http://stackoverflow.com/comment/43616935

http://stackoverflow.com/comment/43570710
type: QuestionComment
has text: A coworker found something waiting on a JavaScript timeout (rather than angular $timeout), which was holding up Protractor. I think the question is still valid, though; in a complicated application, is there any way to track down the cause of Angular instability?
comment on: http://stackoverflow.com/q/27559112
score: 0
type: Comment

http://stackoverflow.com/comment/43664921
score: 0
comment on: http://stackoverflow.com/a/27620980
type: Comment
has text: Thank you mr @Alnitak its help me so much :)
type: AnswerComment

http://stackoverflow.com/q/27524002
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27602652
accepted answer: http://stackoverflow.com/a/27602652
downvote count: 0
type: Question
tagged with: javascript
tagged with: ckeditor
score: 4
has body: I am using CKEditor(4.1) in my project.I would like to retain the cursor position in editor after user reloading the page. CKEditor provides var bookmark = editor.selection.createBookmarks(); to store the cursor position.However, if i use var data = editor.getData() returns the following content &lt;p&gt;one&lt;/p&gt; &lt;p&gt;two&lt;span style="display:none"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;three&lt;/p&gt; instead of the following &lt;p&gt;one&lt;/p&gt; &lt;p&gt;two&lt;span data-cke-bookmakrs="1" style="display:none"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;three&lt;/p&gt; In config.js, I did the following thing config.extraAllowedContent = "span[data-cke-bookmark]" What am i missing here? Thanks in advance for your answers and suggestions...
has title: Retain cursor position after reloading the page in CKEditor
answer count: 1
favorite count: 0
upvote count: 4

http://stackoverflow.com/q/27527897
tagged with: .net
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/43491608
has answer: http://stackoverflow.com/a/27544039
has title: Calling COM methods from unreferenced assemblies
type: UnansweredQuestion
has body: I'm migrating an install script from js to vb.net and I'm facing the following problem. I'm having issues as JS is late-binded so I need to research the datatype returned by each method in order to make the strong typed counterpart in vb.net (or C# for the matter) In the original js install script, I'm getting to a point where I don't know how to port this 2 calls: var objWMIService = GetObject("winmgmts:\\\\.\\root\\cimv2"); var objAccount = objWMIService.Get("Win32_SID.SID='S-1-1-0'"); If I leave data type inference, I get COMType, so I can't call the Get method from the generated object. I think I could solve this by using IDispatch, but It's been like 10 years since I used IDispatch and I can't rememeber exactly how to do it. Also, after further research, I've seen that the internal COM is actually a SWBemServicesEX object, which I don't know what to reference in order to generate a COM interop system. I would appreciate it a lot, if anyone can provide any ideas or solutions to this issue. Current vb.NET code is just: Dim objWMIService = GetObject("winmgmts:\\.\root\cimv2") not sure how to be able to call the Get method from objWMIService, and how to determine what this method actually returns!
tagged with: vb.net
type: Question
tagged with: wmi
has comment: http://stackoverflow.com/comment/43484587
score: 0
tagged with: com

http://stackoverflow.com/a/27630473
type: Answer
answers question: http://stackoverflow.com/q/27629630
has body: You should create another &lt;div&gt; for content, set width for it and use float or position to stick it to the right, then you can put and center all your content or everything you want in this particular block
score: 0

http://stackoverflow.com/comment/125425097
type: AnswerComment
has text: 2022 here and this is the only that works, thanks!
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27581496

asynchronous
tags question: http://stackoverflow.com/q/27513550
tags question: http://stackoverflow.com/q/27504797
tags question: http://stackoverflow.com/q/27610325
tags question: http://stackoverflow.com/q/27570861
tags question: http://stackoverflow.com/q/27498433
tags question: http://stackoverflow.com/q/27505878
tags question: http://stackoverflow.com/q/27532989
tags question: http://stackoverflow.com/q/27521471
tags question: http://stackoverflow.com/q/27631681
tags question: http://stackoverflow.com/q/27487280
type: Tag
tags question: http://stackoverflow.com/q/27592270
tags question: http://stackoverflow.com/q/27494247
tag name: asynchronous
tags question: http://stackoverflow.com/q/27491841
tags question: http://stackoverflow.com/q/27501217
tags question: http://stackoverflow.com/q/27493217
tags question: http://stackoverflow.com/q/27520902
tags question: http://stackoverflow.com/q/27565774
tags question: http://stackoverflow.com/q/27567786
tags question: http://stackoverflow.com/q/27541223
tags question: http://stackoverflow.com/q/27539065
tags question: http://stackoverflow.com/q/27589093
tags question: http://stackoverflow.com/q/27512244
tags question: http://stackoverflow.com/q/27563263
tags question: http://stackoverflow.com/q/27512660
tags question: http://stackoverflow.com/q/27598906
tags question: http://stackoverflow.com/q/27525962
tags question: http://stackoverflow.com/q/27533703
tags question: http://stackoverflow.com/q/27632817
tags question: http://stackoverflow.com/q/27555777
tags question: http://stackoverflow.com/q/27616280
tags question: http://stackoverflow.com/q/27610322
tags question: http://stackoverflow.com/q/27543929
tags question: http://stackoverflow.com/q/27552609
tags question: http://stackoverflow.com/q/27581259
tags question: http://stackoverflow.com/q/27590541
tags question: http://stackoverflow.com/q/27538201
tags question: http://stackoverflow.com/q/27515226
tags question: http://stackoverflow.com/q/27583681
tags question: http://stackoverflow.com/q/27631123
tags question: http://stackoverflow.com/q/27524505
tags question: http://stackoverflow.com/q/27496303
tags question: http://stackoverflow.com/q/27558715
tags question: http://stackoverflow.com/q/27549357
tags question: http://stackoverflow.com/q/27614486

webpack
tags question: http://stackoverflow.com/q/27482725
tags question: http://stackoverflow.com/q/27602928
type: Tag
tags question: http://stackoverflow.com/q/27532246
tags question: http://stackoverflow.com/q/27626764
tag name: webpack
tags question: http://stackoverflow.com/q/27502608
tags question: http://stackoverflow.com/q/27639005
tags question: http://stackoverflow.com/q/27568390
tags question: http://stackoverflow.com/q/27592559

http://stackoverflow.com/comment/43467632
type: Comment
comment on: http://stackoverflow.com/a/27518915
score: 0
type: AnswerComment
has text: you mean when label is empty then hide it or image is not there then hide it? please clarify.

http://stackoverflow.com/q/27592606
has comment: http://stackoverflow.com/comment/43613882
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43613614
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/27593422
type: Question
tagged with: javascript
score: 0
tagged with: mongodb
answer count: 1
has comment: http://stackoverflow.com/comment/43609604
tagged with: jquery
has body: In my MongoDB i have a table named "Companies" its structure is like this : "companies": [ { "cityName": "Paris", "postalCode": "75002", "streetName": "7 rue des fourneaux", "name": "IB Consulting SA", "officeNumber": "", "createdAt": "2014-04-29T09:51:12.112Z", "updatedAt": "2014-04-29T09:51:12.112Z", "id": "65145648ddf514" }, ... ] I want to calculate the redundancies of "cityName" of all the companies in order to display it in a dxPieChart, i would like to use restangular, i m newbie with AngularJs, how can i do this please ?
favorite count: 0
tagged with: angularjs
has title: Calculate redundancies with restangular
tagged with: restangular
accepted answer: http://stackoverflow.com/a/27593422

http://stackoverflow.com/q/27636969
answer count: 2
upvote count: 1
favorite count: 0
type: UnansweredQuestion
tagged with: request
tagged with: ruby-on-rails
downvote count: 0
has title: check that requests come the web and not manual
score: 1
has answer: http://stackoverflow.com/a/27637298
type: Question
has answer: http://stackoverflow.com/a/27637092
tagged with: api
tagged with: javascript
has body: I have a simple autocomplete script in js that takes what the user type, send it to the server and the server checks for data that resembles it. working great. $(".name_autocomplete").autocomplete({ serviceUrl: '/names', onSelect: function (suggestion) { $(this).value = suggestion; } }); But since that server endpoint is public, I don't want users to abuse it and have it spit out everything by bruteforce Is there a way (in clientside or server side) to limit the requests for that url only from the website on that specific page and not from things like curl?

http://stackoverflow.com/comment/43575665
score: 0
has text: Thanks, I went for your second suggestion and it worked exactly as I wanted it to and helped me better understand how attributes work, much appreciated.
type: AnswerComment
comment on: http://stackoverflow.com/a/27574796
type: Comment

http://stackoverflow.com/a/27602329
answers question: http://stackoverflow.com/q/27602256
has comment: http://stackoverflow.com/comment/43628403
has comment: http://stackoverflow.com/comment/43629205
has body: var data = '{ "0": [ "The VehicleNumber field is required." ], "1": [ "The NumberSeats field is required." ], "2": [ "The VehicleCode field is required." ], "3": [ "The MaximumAllowed field is required." ], "4": [ "The City field is required." ], "5": [ "The State field is required." ], "6": [ "The Phone field is required." ], "7": [ "The Insurance field is required." ], "9": [ "The Address field is required." ] }'; data = JSON.parse(data); alert (data[0]); alert (data[1]); JS Fiddle
has comment: http://stackoverflow.com/comment/43651963
score: 0
has comment: http://stackoverflow.com/comment/43628433
type: Answer
has comment: http://stackoverflow.com/comment/43628681

http://stackoverflow.com/a/27595748
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27521233
score: 1
has body: userB doesn't reside directly on it's parent object, so it's not accessible via follows[0].userB You'll need to properly traverse the object structure. When you include an object from another data class via a Pointer, the object will actually reside within the attributes property of it's parent object, so you'll need to access it like so: follows[0].attributes.userB Cheers!
answers question: http://stackoverflow.com/q/27521233

http://stackoverflow.com/q/27573509
has title: node.js npm install error
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43572583
tagged with: node.js
type: Question
linked to: http://stackoverflow.com/q/17944345
answer count: 1
has body: I know this topic has come up many times, but none of those solves my problem. I am implementing a mean stack. That needs these dependencies. This is my package.json file that I am using. { "name": "name", "version": "0.0.1", "description": "Video streaming application", "author": "First Last", "contributors": [{ "name": "First Last", "email": "email@email.com" }], "scripts": { "start": "node bin/www.js"}, "main": "bin/www.js", "keywords":[ "webrtc", "keyword2", "streaming", "video" ], "dependencies": { "express": "~4.2.0", "body-parser": "~1.0.0", "mongoose": "~3.8.11", "socket.io": "~1.2.1", "angular": "~1.3.7", "node-uuid": "~1.4.0" }, "private": true, "license": "MIT" } This is the errors I am getting when using the: "npm install" command. 0 info it worked if it ends with ok 1 verbose cli [ 'C:\\Program Files (x86)\\nodejs\\\\node.exe', 1 verbose cli 'C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', 1 verbose cli 'install' ] 2 info using npm@1.4.28 3 info using node@v0.10.33 4 verbose node symlink C:\Program Files (x86)\nodejs\\node.exe 5 error install Couldn't read dependencies 6 error Failed to parse json 6 error Unexpected token } 7 error File: C:\Users\name\Desktop\htdocs\package.json 8 error Failed to parse package.json data. 8 error package.json must be actual JSON, not just JavaScript. 8 error 8 error This is not a bug in npm. 8 error Tell the package author to fix their package.json file. JSON.parse 9 error System Windows_NT 6.2.9200 10 error command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" 11 error cwd C:\Users\name\Desktop\htdocs 12 error node -v v0.10.33 13 error npm -v 1.4.28 14 error file C:\Users\name\Desktop\htdocs\package.json 15 error code EJSONPARSE 16 verbose exit [ 1, true ]
tagged with: javascript
has answer: http://stackoverflow.com/a/27574314
has comment: http://stackoverflow.com/comment/43572644
score: 0
tagged with: package.json
has comment: http://stackoverflow.com/comment/43572577
tagged with: npm
has comment: http://stackoverflow.com/comment/43572940

http://stackoverflow.com/a/27530668
type: Answer
answers question: http://stackoverflow.com/q/27530391
score: 0
has body: Just look to this line bellow $('#textarea').val($('#textarea').val()+'a'); Full page example

http://stackoverflow.com/q/27557768
answer count: 2
upvote count: 1
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/27557849
possible better answer: http://stackoverflow.com/a/27558268
type: AnsweredQuestion
downvote count: 0
score: 1
has title: angularjs. Display object property after http.get
has answer: http://stackoverflow.com/a/27557849
has body: I am new to Angular.js and i did the tutorial Shaping up with angularjs in codeschool.com so please forgive me if the problem i am trying to solve might be too easy to resolve. So, i am just trying to show a data i get from $http.get() which is JSON object into my document. index.html: League of legends About Contact Summoner Name {{region}} Get request from: {{summoner.data.name}} app.js (module-controller): var app = angular.module('LeagueOfLegends', []); app.controller('searchSummoner', ['$http', function($http) { var form = {}; this.data = {}; this.form = {}; this.status = { showSearch: true, showResult: false }; this.region = ['br', 'eune', 'euw', 'lan', 'las', 'na', 'oce', 'kr', 'tr']; this.search = function() { form = this.form; this.form = {}; // get data from the api rest $http.get(getApiUrl(form)).success(function(data){ this.data = data[form.name]; console.log(this.data); }); // hide form this.status.showSearch = false; this.status.showResult = true; }; }]); function getApiUrl(form) { var apiKey = 'fe9eb24f-5800-4f2a-b570-15328062b341'; return 'https://lan.api.pvp.net/api/lol/' + form.region + '/v1.4/summoner/by-name/' + form.name + '?api_key=fe9eb24f-5800-4f2a-b570-15328062b341' } after $http.get was successfully made, i make a log just to check if the data i retrieve is the one i need, but it does not show the object property in html
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27558268

http://stackoverflow.com/a/27607944
has body: I Found the answer on another question here change the update part with this: update: function (element, valueAccessor, allBindingsAccessor) { var value = ko.utils.unwrapObservable(valueAccessor()); $(element).slider(value.slice ? "values" : "value", value); $(element).slider("option", allBindingsAccessor().sliderOptions) } an upated example here
score: 0
accepted answer of: http://stackoverflow.com/q/27607789
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/27607789

http://stackoverflow.com/comment/43525489
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27544110
has text: Thanks, but I cannot touch the JS implementation. PHPSecLib was the only way I found to reproduce the exponent/modulus-based encryption with PHP. Do you know of a PHP alternative that would use Zero Padding?
type: Comment

http://stackoverflow.com/a/27635328
downvote count: 0
score: 6
has body: It is because of what is called Javascript Hoisting, this is how javascript sees your code: function foo() { var b; // javascript hoisted this variable on top console.log(b) // so here you see underfined b = 2; console.log(b); } Now because javascript hoised variable b on top of function, your global variable b was never used and hence statement immendiately after hoisted variable showed undefined. So if you remove new declaration (var keyword) from your function, you should still have access to global b variable. BTW, it is good practice to declare all your variables on top of function like: function foo() { var b = 2; console.log(b); } To know more on the topic, see this: http://www.adequatelygood.com/JavaScript-Scoping-and-Hoisting.html
accepted answer of: http://stackoverflow.com/q/27635283
answers question: http://stackoverflow.com/q/27635283
type: AcceptedAnswer
upvote count: 6
has comment: http://stackoverflow.com/comment/43690888
type: Answer

http://stackoverflow.com/comment/43432570
type: AnswerComment
has text: give also js fiddle link if possible.
type: Comment
comment on: http://stackoverflow.com/a/27500942
score: 0

http://stackoverflow.com/comment/43619231
type: Comment
comment on: http://stackoverflow.com/a/27597674
score: 0
type: AnswerComment
has text: I think @Makaze post was more on the spot but he deleted it.

http://stackoverflow.com/a/27635957
has comment: http://stackoverflow.com/comment/43723026
score: 0
has comment: http://stackoverflow.com/comment/43723180
has comment: http://stackoverflow.com/comment/43691412
has comment: http://stackoverflow.com/comment/43723110
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43722973
accepted answer of: http://stackoverflow.com/q/27634488
type: Answer
has comment: http://stackoverflow.com/comment/43891433
answers question: http://stackoverflow.com/q/27634488
has comment: http://stackoverflow.com/comment/43723265
has comment: http://stackoverflow.com/comment/43691189
has body: Since you can't modify the HTML to make it an accordion, you can use the show event for collapse and hide the already shown section. $(document).ready(function () { $('.collapse').on('show.bs.collapse', function () { $('.collapse.in').collapse('hide'); }) }) See fiddle
has comment: http://stackoverflow.com/comment/43891405
has comment: http://stackoverflow.com/comment/43723159

http://stackoverflow.com/q/27574867
has answer: http://stackoverflow.com/a/27575287
type: AnsweredQuestion
score: 4
downvote count: 1
type: Question
has body: I want to check the if the changed state of a multiselect is deselect or select. pseudo-code: $(document).on('change', '.mySelect', function (event) { if(event === 'selected'){ alert("You have selected this item."); } else { alert("You have deselected this item."); } }); Something like this doesn't work. How can i check weather the event was a "select" event or a "deselect" event? EDIT Here is a jsfiddle DEMO
upvote count: 5
has answer: http://stackoverflow.com/a/27575017
has comment: http://stackoverflow.com/comment/43575345
answer count: 2
tagged with: javascript
has title: Multiselect Detect Option Selected and Deselected On Change
tagged with: jquery
has comment: http://stackoverflow.com/comment/43575213
favorite count: 0
accepted answer: http://stackoverflow.com/a/27575017
possible better answer: http://stackoverflow.com/a/27575287
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/27615019
tagged with: jquery
has comment: http://stackoverflow.com/comment/43651891
has answer: http://stackoverflow.com/a/27615065
has title: Add two array values of same name using script
has body: I need to multiply two values of a and b and display in c. Also I need to display the addition value of c using script. Please check my code below: HTML: a b c <?php $select= "SELECT * from table where id=1"; $result = mysql_query($select); $row_count=1; while($row = mysql_fetch_assoc($result)) { ?> <input type="text" value="<?php echo $row['name_a']; ?>" name="name_a[]" class="name_a"> <input type="text" value="<?php echo $row['code_a']; ?>" name="code_a[]" class="code_a"> <?php $row_count++; } ?> SCRIPT: $(document).ready(function() { $('#table').on('keyup', '.name_a', cal) .on('keyup', '.code_a', cal) .on('keyup', '.id_a', cal); function cal() { var $row = $(this).closest('tr'), name_a = $row.find('.name_a').val(), code_a = $row.find('.code_a').val(), id_a = $row.find('.id_a').val(), id_a_calc = name_a * code_a; $row.find('.id_a').val(id_a_calc) } }); OUTPUT a b c 1 2 2 2 4 8 By the above script,I can multiply a and b and display in c.But how to add two values of 'c' and display in total text box.Need help
has answer: http://stackoverflow.com/a/27615463
answer count: 3
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has answer: http://stackoverflow.com/a/27615678
accepted answer: http://stackoverflow.com/a/27615678
tagged with: php
possible better answer: http://stackoverflow.com/a/27615065
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
tagged with: arrays
tagged with: javascript

http://stackoverflow.com/q/27492376
type: Question
has title: JavaScript and php Form submission with duplicates
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27509073
answer count: 1
tagged with: php
has body: I have a duplicate form "Directors / Members". Form works just fine, meaning it adds and removes members before submission. The problem is that first submission works fine, meaning that all the variables print back to the values and the form is displayed as many times as there were members entered by a "do loop". But after the second submission, form sends only the last entered member. Seems like there is a logical errors somewhere. Can someone help me? <?php $y=0; $clone =1; do{ ?> <div id="<?php echo "clonedSection$clone"; ?>" class="clonedSection" > <label id="<?php echo "member_label$clone"; ?>" > <?php echo "Director / Member $clone"; ?> First name:<input type="text" name="member_firstname" id="member_firstname" value="<?php echo $split_members[$y][0];?>"> <?php echo $member_errors[$y]["member_first_name"];?> Last name:<input type="text" name="member_lastname" id="member_lastname" value="<?php echo $split_members[$y][1];?>"> <?php echo $member_errors[$y]["member_last_name"];?> Street address:<input type="text" name="member_address" id="member_address" value="<?php echo $split_members[$y][2];?>"> <?php echo $member_errors[$y]["member_address"];?> City: <input type="text" name="member_city" id="member_city" value="<?php echo $split_members[$y][3];?>"> <?php echo $member_errors[$y]["member_city"];?> State: <?php //$states = listStates(statesList()); foreach($states as $value){ echo ' '.$value.' '; } echo ' '.$split_members[$y][4].' '; ?> <?php echo $member_errors[$y]["member_state"];?> ZIP code:<input type="text" name="member_zip" id="member_zip" value="<?php echo $split_members[$y][5];?>"> <?php echo $member_errors[$y]["member_zip"];?> <?php $y++; $clone++;}while($y < count($split_members)); ?>
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27509073
score: 0
tagged with: duplicates
tagged with: forms

http://stackoverflow.com/comment/43475187
has text: That is correct! I just find this out debugging and came here to write answer, but you were faster :)
comment on: http://stackoverflow.com/a/27523020
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27620918
has comment: http://stackoverflow.com/comment/43664202
has comment: http://stackoverflow.com/comment/43668412
has comment: http://stackoverflow.com/comment/43664483
has comment: http://stackoverflow.com/comment/43668730
downvote count: 0
has body: The content type header needs to be set to multipart/form-data. So the server knows what kind of data it is expecting. This will work in Internet Explorer ajax.setRequestHeader("Content-type", "multipart/form-data"); But adding this in Firefox or Chrome results in losing post data in PHP. Now the server knows that it can expect some complex form data including files and blobs.
answers question: http://stackoverflow.com/q/27620609
has comment: http://stackoverflow.com/comment/43665385
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/43667498
has comment: http://stackoverflow.com/comment/43665256
has comment: http://stackoverflow.com/comment/43666925
score: 1
has comment: http://stackoverflow.com/comment/43662778

http://stackoverflow.com/q/27476020
has answer: http://stackoverflow.com/a/27476769
type: Question
has comment: http://stackoverflow.com/comment/43386516
tagged with: asp.net-mvc
tagged with: javascript
has title: How to post DbGeography param to MVC?
has comment: http://stackoverflow.com/comment/43386815
answer count: 1
downvote count: 0
favorite count: 0
tagged with: ajax
type: UnansweredQuestion
tagged with: geospatial
tagged with: entity-framework
score: 1
has body: I am trying to expose an API that will allow users to post polygons to persist on the server. I am using ASP.NET MVC 5. How do I format the AJAX parameters correctly to post the request for DbGeography? This is what I am trying: $.ajax({ url: '/api/map', type: 'POST', data: { Title: 'My Title', MyGEOG: { WellKnownText: 'POLYGON ((30 10, 10 20, 20 40, 40 40, 30 10))' } } }); This is how my MVC action signature looks like: [HttpPost] [Route("map")] public JsonResult Post(MyShape newShape) {...} Also my MyShape class: public class MapShape { public string Title { get; set; } public System.Data.Entity.Spatial.DbGeography MyGEOG { get; set; } } When putting a breakpoint in the action, newShape.Title does show as My Title, but MyGEOG is null when the AJAX post happens. What is the correct format of the parameter to post correctly as a DbGeography type?
upvote count: 1

http://stackoverflow.com/comment/43400971
has text: @Mello, if the quiz is running only in your browser, then it would make more sense to store the data in your browser with Javascript. However, if you want the scores to be public and shared between players, then you'll have to use PHP, but note, that you won't be able to save the score if you're offline, and using PHP.
type: AnswerComment
comment on: http://stackoverflow.com/a/27481799
score: 0
type: Comment

http://stackoverflow.com/a/27558222
upvote count: 1
answers question: http://stackoverflow.com/q/27558049
score: 1
has body: change your function to function testFunction() { var first = document.getElementById("fname"); var last = document.getElementById("lname"); var textb = document.getElementById("textbox"); textb.value = first.value + " " + last.value; } jsfiddle demo
downvote count: 0
type: Answer

http://stackoverflow.com/q/27568990
has comment: http://stackoverflow.com/comment/43564215
tagged with: javascript
has body: I'm trying to use javascript interface along with google maps javascript library. I searched and i found a way almost all similar to this JavascriptInterface . This is my code : This is my interface : public class JavaScriptInterface { private Activity activity; public JavaScriptInterface(Activity activiy) { this.activity = activiy; } public void test(){ Toast.makeText(activity.getApplicationContext(), "Javascript interface test.", 0).show(); } } This is where i create all : myBrowser = (WebView) findViewById(R.id.mybrowser); myBrowser.setWebChromeClient(new WebChromeClient() { public void onGeolocationPermissionsShowPrompt(String origin, GeolocationPermissions.Callback callback) { callback.invoke(origin, true, false); } }); myBrowser.getSettings().setJavaScriptEnabled(true); String javascrips = null; // myBrowser.loadUrl("file:///android_asset/geolocation.html"); try { AssetManager am = getAssets(); InputStream input = am.open("geolocation.html"); int size; size = input.available(); byte[] buffer = new byte[size]; input.read(buffer); input.close(); javascrips = new String(buffer); } catch (IOException e) { e.printStackTrace(); } jsInterface = new JavaScriptInterface(this); myBrowser.addJavascriptInterface(jsInterface, "JSInterface"); myBrowser.loadDataWithBaseURL("file:///android_res/raw/", javascrips, "text/html", "UTF-8", null); When clicking on the button (the javascript input with the testAPI() function ) , nothing happens , The Toast doesn't not show up why ?
score: -1
has comment: http://stackoverflow.com/comment/43564126
downvote count: 1
answer count: 1
accepted answer: http://stackoverflow.com/a/27571426
favorite count: 0
tagged with: interface
tagged with: android
linked to: http://stackoverflow.com/q/8982570
has answer: http://stackoverflow.com/a/27571426
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/43563485
tagged with: webview
type: Question
has title: Android javascript interface in webview

http://stackoverflow.com/comment/43463018
type: QuestionComment
comment on: http://stackoverflow.com/q/27516308
has text: Don't use *eval*. To convert a String to Number, use `+(convertedDate.replace(/\//g,''))` or more semantically: `Number(convertedDate.replace(/\//g,''))`.
score: 0
type: Comment

http://stackoverflow.com/q/27503827
tagged with: javascript
has answer: http://stackoverflow.com/a/27504276
has body: This is my link Click Me and it has a corresponding div that will pop up and it's code looks like this. I'm the pop up Is there a method in which I could pass up a php value from the href to the div? I already tried this one. Click Me Is there any other way to get the value?
score: 0
has answer: http://stackoverflow.com/a/27504371
has comment: http://stackoverflow.com/comment/43437825
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27504300
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has answer: http://stackoverflow.com/a/27503932
answer count: 4
has title: Best way for getting a value through href
type: Question
has comment: http://stackoverflow.com/comment/43437784
has comment: http://stackoverflow.com/comment/43438039
has comment: http://stackoverflow.com/comment/43438281
tagged with: href
has comment: http://stackoverflow.com/comment/43438388
tagged with: hyperlink

http://stackoverflow.com/q/27520629
has comment: http://stackoverflow.com/comment/43470617
type: Question
upvote count: 0
score: -2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43470655
has body: I have a problem and I dont know what to search to find my solution. I want the case to only give me a success message when "myString" equals a certain value and when it doesnt, it gives a error message case "test" + myString: $("#placeholder").prepend("Cant test ",myString ,"&lt;br&gt;"); break; case "test" + (myString == " this"): $("#placeholder").prepend("Tested ",myString ,"&lt;br&gt;"); break;
answer count: 1
has answer: http://stackoverflow.com/a/27520677
favorite count: 0
has comment: http://stackoverflow.com/comment/43470635
downvote count: 2
has comment: http://stackoverflow.com/comment/43470667
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27520677
has title: jQuery case AND

http://stackoverflow.com/a/27561192
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27559593
has body: no need to give a so meany border property to hide just give a border:none this should work border:none !important;

http://stackoverflow.com/a/27479875
type: Answer
score: 2
has body: When you want to select only items that match a certain condition from an array, the method to use is .filter(): var cityCode1 = resellerList.filter(function (x) { return x.fCityCode === 1; }); This will produce an array of objects where fCityCode is 1.
upvote count: 3
has comment: http://stackoverflow.com/comment/43392946
downvote count: 1
answers question: http://stackoverflow.com/q/27479859
accepted answer of: http://stackoverflow.com/q/27479859
type: AcceptedAnswer

http://stackoverflow.com/a/27525169
accepted answer of: http://stackoverflow.com/q/27524851
score: 6
type: Answer
downvote count: 0
upvote count: 6
answers question: http://stackoverflow.com/q/27524851
has body: You can use setVisible function: $('#button').click(function () { if(sliced) chart.series[0].data[0].setVisible(true); else chart.series[0].data[0].setVisible(false); sliced=!sliced; }); http://jsfiddle.net/f3Lx6cxk/1/
type: AcceptedAnswer

http://stackoverflow.com/a/27623286
downvote count: 0
has comment: http://stackoverflow.com/comment/43667823
has comment: http://stackoverflow.com/comment/43667634
has comment: http://stackoverflow.com/comment/43667196
has comment: http://stackoverflow.com/comment/43667566
type: Answer
has comment: http://stackoverflow.com/comment/43667298
answers question: http://stackoverflow.com/q/27623217
upvote count: 2
has body: Note: The question was edited to add "that is a divisor of" long after this answer was posted, see below the fold for an update. What is the risk of precision loss... It's virtually guaranteed, depending on the integer and floating point number involved, because of the mismatch between what we use (fractional numbers in base 10) and what IEEE-754 floating point numbers actually are (fractional numbers in base 2, then represented in base 10 for our use). Just as we can't represent 10 / 3 precisely in base 10, there are various base 10 numbers that cannot be precisely stored in base 2. But to your specific question: It breaks at 3: 3 * 0.1 is 0.30000000000000004. You don't even need multiplication for it, though, addition is more than sufficient, the classic example being 0.1 + 0.2, which also results in 0.30000000000000004. Examples (JavaScript numbers are IEEE-754 double-precision floating point): snippet.log(0.1 + 0.2); // 0.30000000000000004 snippet.log(3 * 0.1); // Also 0.30000000000000004 &lt;!-- Script provides the `snippet` object, see http://meta.stackexchange.com/a/242144/134069 --&gt; &lt;script src="http://tjcrowder.github.io/simple-snippets-console/snippet.js"&gt;&lt;/script&gt; Re your addition of "that is a divisor of": I take it you mean where the fractional number relates to the original integer such that the result will be an integer with actual math. No, that's not safe either. :-) Because fractional values that would, in real math in base 10, result in an integer may not be precisely represented in IEEE-754's base 10, and so inaccuracies creep in. 0.00000000002, for example, demonstrates this problem: snippet.log(200000000000 * 0.00000000002); // 3.9999999999999996 &lt;!-- Script provides the `snippet` object, see http://meta.stackexchange.com/a/242144/134069 --&gt; &lt;script src="http://tjcrowder.github.io/simple-snippets-console/snippet.js"&gt;&lt;/script&gt; I don't know whether there's a larger value that would introduce the imprecision, but i…
score: 2
has comment: http://stackoverflow.com/comment/43667557
accepted answer of: http://stackoverflow.com/q/27623217
type: AcceptedAnswer

http://stackoverflow.com/q/27561913
score: 7
has answer: http://stackoverflow.com/a/27562078
has title: Number converted in 1e+30
downvote count: 0
tagged with: javascript
favorite count: 0
has body: How to convert 1e+30 to 1000000000000000000000000000000 I want number as it is entered by User do not convert like 1e+30. How can achieve this? Is there any way to display actual digits after parse it to float or int?
has answer: http://stackoverflow.com/a/27564060
type: UnansweredQuestion
answer count: 4
has comment: http://stackoverflow.com/comment/43549846
has answer: http://stackoverflow.com/a/27561993
has comment: http://stackoverflow.com/comment/43550019
upvote count: 7
has comment: http://stackoverflow.com/comment/43550059
type: Question
has answer: http://stackoverflow.com/a/79029646

http://stackoverflow.com/q/27607161
has comment: http://stackoverflow.com/comment/43637041
type: Question
tagged with: api
has title: Backbone design patterns similar to DAOs
downvote count: 0
tagged with: javascript
has body: Overall I'm happy with using Backbone.js for my company's frontend application. However I've noticed a lot of foundational problems that I wonder if anyone else encountered. The biggest issue is that the frontend team does not control the API that powers our application. The objects passed are fairly complex in structure. Nested arrays, sub objects, etc.... This of itself is expected. The API serves a different purpose than the frontend. What each considers an "object" are completely different things. In practice this leads to issues. Namely, one API endpoint may be broken into multiple frontend models. This is a common problem when dealing with APIs. It's typically addressed through Data Access Objects or a Data Access Layers that translate API objects into internal objects. Backbone by contrast expects models to be tightly coupled with the API endpoints. Sync operations on a model (i.e. save, fetch) immediately reach out to the API. Adding to the issues, I seriously believe that toJSON in Backbone does too much. It's used to reproduce the model in a format that can be consumed internally; defines how the model should get posted to an API; and used for equality checks between models for many internal operations. Any of the three could get broken out into their own method. Has anyone else dealt with this? What strategies did you use? Implement DAOs? Is there a fork of Backbone that accounts for these issues? [edit] A closer to real world case that I've encountered. When we query the API for results, there's about a hundred filters we can pass along with the request. The overall filter structure is pretty simple on that end an array of filter objects like so: { filterName: '', // '~', '=', '&lt;=', '&gt;=' operator: '', value: '' } For one particularly problematic filter, depending on the 'operator' we either allow the user to select a single option or we allow the user to construct a "sentence" from the available options. The former option renders as an HTML select,…
favorite count: 0
tagged with: dao
tagged with: backbone.js
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43638955
upvote count: 1
score: 1

http://stackoverflow.com/q/27639116
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27639461
type: Question
accepted answer: http://stackoverflow.com/a/27639461
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
upvote count: 2
tagged with: css
has title: smooth scroll to div on mouse scroll
has body: I've looked through a lot of smooth scrolling stuff and none of them do quite exactly what I want it to do. I would like to encapsulate a mouse scroll, and automatically smooth scroll to a specific div. So there the user is never between two divs, the screen is always filled with the next or previous div. Kind of like a hyperlink that jumps to an #anchor but instead of a click, its a mouse scroll, and instead of a jump, its a smooth scroll/transition. Simplest solution would be best. I don't want to involve jquery... Thanks!
score: 2

http://stackoverflow.com/a/27549743
answers question: http://stackoverflow.com/q/27549044
score: 0
has body: In first line of code "#id" you are passing the string. it's return the string also as you says. in second you pass object id that you have earlier in your code. This is maybe why you got the different result.
type: Answer

http://stackoverflow.com/a/27585144
has body: You may want to use OnCreateUser hook: http://docs.meteor.com/#/full/accounts_oncreateuser
answers question: http://stackoverflow.com/q/27585020
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/43595375
has comment: http://stackoverflow.com/comment/43595641
has comment: http://stackoverflow.com/comment/43595485
has comment: http://stackoverflow.com/comment/43594983
has comment: http://stackoverflow.com/comment/43594793

http://stackoverflow.com/comment/43607705
type: Comment
score: 0
has text: SOme OCR failed I suppose.
type: QuestionComment
comment on: http://stackoverflow.com/q/27591905

wijmo
type: Tag
tags question: http://stackoverflow.com/q/27500354
tag name: wijmo

http://stackoverflow.com/comment/43387198
comment on: http://stackoverflow.com/q/27476301
has text: Alright, I think we probably need a little more contextual code, such as the caller of `parentFunction` and perhaps the intended usage of the returned function.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43508998
has text: please try to do something first.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27540706
score: 3

http://stackoverflow.com/comment/43461929
type: AnswerComment
type: Comment
score: 1
has text: I would defer to the jQuery api: http://api.jquery.com/attribute-equals-selector/ The link above has a decent example. Searching "jQuery get element by attribute" will get you plenty of examples.
comment on: http://stackoverflow.com/a/27515788

http://stackoverflow.com/q/27499750
tagged with: google-maps-api-3
score: 0
answer count: 1
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27506639
has body: I made two maps on the same webpage which is suppose to show only one map at a time. (eg. if my location is A then show map1, if location is B then show map2. changing maps work fine. the only problem I have right now is the anchor only appears in one map. Please help. My Javascript My If.. Else Statement %If Request.QueryString("location") = "A" Then %> <%Else %> <%End If%>
has title: Map not showing anchor with if else
type: Question
tagged with: google-maps
tagged with: javascript

http://stackoverflow.com/a/27589246
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/27588533
answers question: http://stackoverflow.com/q/27588533
type: AcceptedAnswer
downvote count: 0
has body: You need to watch the class attribute and check if the cycle-slide-active class was added (DEMO): app.directive('slideBl', function ($compile) { return { restrict: "C", link: function ($scope, element, attrs ) { $scope.$watch(function() { return element.attr('class'); }, function(newClasses, oldClasses) { if (containsSlideClass(newClasses) &amp;&amp; (!containsSlideClass(oldClasses) || newClasses == oldClasses)) { console.log('Slide active'); } }); function containsSlideClass(classStr) { return classStr.split(' ').indexOf('cycle-slide-active') !== -1; } } }; });
has comment: http://stackoverflow.com/comment/43602661
type: Answer

http://stackoverflow.com/q/27486864
type: Question
has answer: http://stackoverflow.com/a/27486968
score: -2
answer count: 1
has comment: http://stackoverflow.com/comment/43405590
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: SetInterval loop breaking unexpectedly
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43405553
has comment: http://stackoverflow.com/comment/43405710
has body: I have a short piece of code here that I am using to detect when the user stops scrolling. When it fires the page will switch to the next page. It seems to work once, but when I try to use it again on the next page it breaks and doesn't trigger again. I found out that the timer seems to stop firing after you use it once. I have not managed to find anything related online, so any help would be appreciated. Thanks. The JQuery: var scroll = $(window).scroll(function(){ currentPos = $(window).scrollTop(); if(currentPos == 0){ nextPage(); } }) window.setInterval(function(){ scroll(); }, 500); The code used to switch pages: function nextPage(){ if(document.getElementById("homePage").style.top == "0px"){ count = 0; } document.getElementById(pages[count]).style.top = "-1100px"; count += 1; closeMenu(); }
has comment: http://stackoverflow.com/comment/43405554
has comment: http://stackoverflow.com/comment/43405630
type: UnansweredQuestion
downvote count: 3
upvote count: 1
has comment: http://stackoverflow.com/comment/43405662
tagged with: loops

http://stackoverflow.com/comment/43682514
comment on: http://stackoverflow.com/a/27526480
score: 3
has text: On top of what @richsilv mentioned, there's actually a bug in the packaged hammer:hammer 2.0.4_2 release (Nov 29th) that's causing even the non-JQuery syntax to give you this error. You can use the 2.0.4_1 release instead: `meteor add hammer:hammer@=2.0.4_1` and it will work (at least for non-JQuery)
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/43659024
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27618450
type: Comment
has text: Since the radio buttons are different forms then they will be selected separately. Nothing you can do about that.

http://stackoverflow.com/q/27566446
has comment: http://stackoverflow.com/comment/43557893
score: 0
has comment: http://stackoverflow.com/comment/43558105
tagged with: css
linked to: http://stackoverflow.com/q/27538279
has title: jquery plug in to add or remove class to a dom element
has body: It is possible to create a jquery plug-in that allows to add or remove a specific class to a dom element, and onComplete call another function. I´m doing this to avoid the usage of a delay explained here: css3 and jquery load page slider effect Something that I could use like this: myFunction('#domElement', addClass/removeClass, classToAddOrRemove, callBackFunctionOnComplete);
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43557753
has comment: http://stackoverflow.com/comment/43557769
type: Question
has answer: http://stackoverflow.com/a/27566565
has comment: http://stackoverflow.com/comment/43558048
has comment: http://stackoverflow.com/comment/43558021
tagged with: jquery-plugins
has comment: http://stackoverflow.com/comment/43558061
has comment: http://stackoverflow.com/comment/43557916
has comment: http://stackoverflow.com/comment/43557974
has comment: http://stackoverflow.com/comment/43557845
answer count: 1
tagged with: delay
tagged with: javascript
tagged with: jquery

separation-of-concerns
tags question: http://stackoverflow.com/q/27543145
type: Tag
tag name: separation-of-concerns

http://stackoverflow.com/comment/43645017
score: 0
type: QuestionComment
has text: empty array `Array ( )`
type: Comment
comment on: http://stackoverflow.com/q/27611277

http://stackoverflow.com/q/27586745
tagged with: javascript
answer count: 2
downvote count: 0
has title: Promises in Coffeescript. `unexpected comma` error when trying to pass multiple arguments to `then`?
favorite count: 0
has body: I'm trying to do some work with Promises in Coffeescript, however, I'm getting a syntax error that I can't figure out. It doesn't seem to accept that the then method takes two arguments. Example: slowTask = (num) -&gt; new Promise((resolve, reject) -&gt; if (num == 1) resolve(num) else reject(num) ) slowTask(1).then((data) -&gt; console.log("foo"), () -&gt; console.log("bar")) Seems like it should work, but I'm instead getting a failure: Error on line 9: unexpected , Admittedly, I'm only a few hours into coffeescript, so there may be a fundamental misunderstanding of its syntax, but as far as I can tell, it looks like the code should compile fine. What am I missing?
possible better answer: http://stackoverflow.com/a/27586834
has answer: http://stackoverflow.com/a/27586834
duplicate of: http://stackoverflow.com/q/7073510
type: AnsweredQuestion
score: 2
upvote count: 2
has answer: http://stackoverflow.com/a/27586799
linked to: http://stackoverflow.com/q/7073510
tagged with: coffeescript
type: Question
accepted answer: http://stackoverflow.com/a/27586799

http://stackoverflow.com/q/27572395
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/27572476
has body: I am having some trouble using a jquery listener on a submit button to get it to run a function on the form's data. I have this html form: Add New Patient First name: Last name: Email: Phone Number: And I'm using this jQuery listener in my CSS stylesheet: $('#patientcreatebutton').click( createpatient($('#form1')); ); Here's the javascript function it's calling. function createpatient(form) { console.log("Begin creating patient"); var currentUser = Parse.User.current(); var username= form.email.value; var email= form.email.value; var doctorIdentifier= currentUser.id; randkey = makeid(); var password= randkey; var doctorCode= randkey; var phoneNumberForPatient= form.phonenumber.value; var doctorsUserName= currentUser.username; Parse.Cloud.run("inviteUser", {"email": email, "password": password, "doctorCode": password, "phoneNumberForPatient": phoneNumberForPatient, "doctorUserName": doctorsUserName, "doctorIdentifier": doctorIdentifier}, { success: function(result) { console.log("Successfully invited user!"); console.log("Please have your patient log in with the following code: " + doctorCode); }, error: function(error) { console.log("There has been an error."); console.log(error); } }); createpatientwindow.style.visibility = "hidden"; $(generatecalorieswindow).addClass("slideLeft"); }; For some reason, I'm not even getting the first console message from the javascript function. Am I hooking up the jQuery listener wrong?
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43570574
tagged with: css
has comment: http://stackoverflow.com/comment/43570802
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/43570212
tagged with: javascript
tagged with: jquery
has title: Trouble linking an html form to a javascript function through jquery listeners

http://stackoverflow.com/comment/43581568
comment on: http://stackoverflow.com/q/27573503
score: 0
type: Comment
type: QuestionComment
has text: Hello after some search i have figure to solve some of the problem

http://stackoverflow.com/q/27548275
type: AnsweredQuestion
type: Question
has body: My ajax call fails with the message in question. [WebMethod(EnableSession = true)] public static string UpdateTotalPrice(List&lt;TicketPriceAjax&gt; jsonTickets) { // some server-side processing return "a string value"; } The object Iʻm trying to pass public class TicketPriceAjax { public string Fullname { get; set; } public string Price { get; set; } public string TicketDescription { get; set; } } My javascript which gets invoked on a change event $("select.combobox").change(function(e) { var ticketsArray = GetTicketsArray(); postTotalPrice(ticketsArray); }); function GetTicketsArray() { var tickets = {}; var prices = []; tickets.prices = prices; $("#divFullNames div.row").each(function () { var price = { "Fullname": $(this).find("input").val(), "Price": $(this).find("select").val(), "TicketDescription": $(this).find(":selected").text() }; tickets.prices.push(price); }); return tickets; }; function postTotalPrice(prices) { $.ajax({ type: "POST", url: "Details.aspx/UpdateTotalPrice", data: JSON.stringify(prices), contentType: "application/json; charset=utf-8", dataType: "json", async: true, success: function (data) { UpdateTotalPrice(data); }, error: function(data, textStatus, jqXHR) { console.log('error!', data, textStatus, jqXHR); } }); }; What am I doing wrong?
tagged with: javascript
tagged with: jquery
tagged with: ajax
has title: AJAX call: Invalid web service call, missing value for parameter
score: 0
answer count: 1
tagged with: asp.net
has answer: http://stackoverflow.com/a/27548330
accepted answer: http://stackoverflow.com/a/27548330
has comment: http://stackoverflow.com/comment/43523793

http://stackoverflow.com/q/27558209
tagged with: couchdb
tagged with: pouchdb
has answer: http://stackoverflow.com/a/27567443
has body: how can I assign the db.get() return value to another variable? doc = db.get(id).then(function(doc) { return doc; }).catch(function(err){ //errors }) return doc; The second return is corrupt or undefined. What would be the proper way to deal with this. Edit: after several hours research in this subject, I had to found out this is not possible this way. since it only delivers a promise or a callback, because PouchDB is programmed to be Async. Is there a way to use it as sync instead of async? As I do understand the benefits, the Sync method offers me more benefits in this case.
favorite count: 0
type: AnsweredQuestion
has title: Need a Solution for pouchDB Database Synchronously
accepted answer: http://stackoverflow.com/a/27567443
tagged with: http://stackoverflow.com/tag/json
type: Question
upvote count: 4
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
score: 4

http://stackoverflow.com/a/27558374
score: 3
downvote count: 0
answers question: http://stackoverflow.com/q/27558193
upvote count: 3
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/27558193
has body: Your problem is that a div has no src attribute, as in your example you have &lt;div id="loadImage"&gt;&lt;/div&gt; Your defaultImageurl is also empty. The solution is to use an &lt;img/&gt; element: var customImageurl = "custom_Image/web.png"; var defaultImageurl = ""; function loadGraphics(){ //v-- will not work! document.getElementById("loadImage").src = defaultImageurl; //v-- will work given your example conditions document.getElementById("loadImage").src = customImageurl; } window.onload = function(){ loadGraphics(); }; &lt;div id="loadImage-wrap"&gt; &lt;img id="loadImage" /&gt; &lt;/div&gt;

http://stackoverflow.com/comment/43479245
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27525083
has text: Please have a look if [this answer here](http://stackoverflow.com/q/15931863/896249) is helping you

http://stackoverflow.com/comment/43483148
comment on: http://stackoverflow.com/q/27526798
type: Comment
has text: That CodePen is working fine for me in IE10. Did you click the link?
type: QuestionComment
score: 0

http://stackoverflow.com/a/27556704
score: 2
downvote count: 0
upvote count: 2
type: AcceptedAnswer
has body: As per my comments on the original post, the answer is to make the call synchronous by adding async: false in the Ajax call settings, change the last return false to return null;, and remove the done function: window.onbeforeunload = unloadFunction; function unloadFunction() { var test_id = $('#test_id').val(); jQuery.ajax({ url: "/test/cleanup/" + test_id, cache: false, async: false }); return null; }
answers question: http://stackoverflow.com/q/27517979
accepted answer of: http://stackoverflow.com/q/27517979
type: Answer

http://stackoverflow.com/q/27502838
has title: Cordova multiple image upload with File Transfer
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: cordova
type: UnansweredQuestion
upvote count: 5
has body: I'm on a cordova and jquery mobile project. I've been able to upload one image with file transfer plugin. Now i try to upload 2 or 3 images following. here is the html code: Pictures: Get first picture Get second picture Get third picture Title here is jquery code: multi_upload(user_id); function multi_upload(user_id) { var image1 = "image1"; var image2 = "image2"; var image3 = "image3"; if($('#image2').prop('src') == ''){ // upload one file upload(user_id, image1, "true"); } if($('#image3').prop('src') == ''){ // upload two files upload(user_id, image1, "false"); upload(user_id, image2, "true"); } if($('#image3').prop('src') != ''){ // upload three files upload(user_id, image1, "false"); upload(user_id, image2, "false"); upload(user_id, image3, "true"); } } function upload(user_id, imagesrc, final) { var img = ''; var imageURI = ''; img = document.getElementById(imagesrc); imageURI = img.src; console.log("[imageURI] "+imageURI); var options = new FileUploadOptions(); options.fileKey = "file"; options.fileName = imageURI.substr(imageURI.lastIndexOf('/') + 1); options.mimeType = "image/jpeg"; var params = {}; params.timestamp = Math.round(+new Date()/1000); params.public_token = localStorage.getItem("token_public"); params.hash = SHA1(params.timestamp+localStorage.getItem("token_private")); params.user_id = user_id; options.params = params; options.chunkedMode = false; var ft = new FileTransfer(); if(final == "true"){ ft.upload(imageURI, "http://www.example.com/api/index.php/privates/upload", finalwin, fail, options); }else{ ft.upload(imageURI, "http://www.example.com/api/index.php/privates/upload", win, fail, options); } } If i upload two files for example, the code will upload two times the last selected picture. the console give me the imageURI who looks like this: file:///storage/sdcard0/Android/data/fr.myproject.propro/cache/modified.jpg?1418726649440:500 I suppose that is a temporary file, so i presume when i select the last file, it delete the previous one... …
type: Question
score: 5
tagged with: file-transfer
has answer: http://stackoverflow.com/a/28631815

http://stackoverflow.com/q/27560304
accepted answer: http://stackoverflow.com/a/27560380
type: AnsweredQuestion
score: 0
linked to: http://stackoverflow.com/q/21487187
type: Question
duplicate of: http://stackoverflow.com/q/21487187
has answer: http://stackoverflow.com/a/27560380
tagged with: javascript
has title: How to pass loop variable to elements
has body: Can someone please tell me how can I grab i properly? By now, it's just displaying the same number (the value of a.length when clicking on any anchor element. var a = document.getElementsByTagName('a'); for (i = 0, j = a.length; i&lt; j;i++) { a[i].onclick = function() { console.log(i); //display a.length in all anchors return false; } }
answer count: 1
has comment: http://stackoverflow.com/comment/43546822

http://stackoverflow.com/q/27607867
score: 0
has comment: http://stackoverflow.com/comment/43643790
has title: How to interact with an SVG group from the page that contains it?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43655522
linked to: http://stackoverflow.com/q/27572161
tagged with: http://stackoverflow.com/tag/svg
has comment: http://stackoverflow.com/comment/43645607
answer count: 0
has body: In a page that contains an SVG image as an object, we can address individual elements by ID (How to access SVG elements with Javascript): &lt;object data="myimage.svg" type="image/svg+xml" id="alphasvg"&gt;&lt;/object&gt; &lt;script&gt; var a = document.getElementById("alphasvg"); a.addEventListener("load", function () { var svgDoc = a.contentDocument; //get the inner DOM of alpha.svg var delta = svgDoc.getElementById("myelement"); //get the inner element by id delta.addEventListener("mousedown", function () { alert('hello World!') }, false); //add behaviour }, false); &lt;/script&gt; But using svgDoc.getElementById("mygroupelement") to reference a group element by its ID does not work. &lt;svg ...&gt; &lt;path id = "myelement" ...&gt; &lt;g id="mygroupelement" ...&gt; &lt;.. various path/polyline/etc elements..&gt; &lt;/g&gt; &lt;/svg&gt; So how do you reference a group element in an SVG? (See also How to get an SVG(+XML) image to interact with the page it is in, where the interaction is in the other direction - from the element to the page.)
linked to: http://stackoverflow.com/q/2753732
type: Question
has comment: http://stackoverflow.com/comment/43638463
tagged with: javascript
has comment: http://stackoverflow.com/comment/43658764

http://stackoverflow.com/comment/59892039
comment on: http://stackoverflow.com/a/27606842
score: 0
type: AnswerComment
has text: Hi, I'm also facing the same issue. I am getting new data from server which has new axis and other attributes, data is loaded fine and on logging, showing the data as expected. However, on update block of chart, it's plotting with old data. Not working on latest data. I also have resolved the same by first removing the "g" nodes form chart & then re-plotting. What it' like, we first need to remove nodes, it should update elements without that? Thanks,
type: Comment

http://stackoverflow.com/comment/43571632
type: Comment
comment on: http://stackoverflow.com/q/27572544
score: 0
has text: Put another way, the form is submitted to a server-side script and you would like to call that server-side script, passing it certain values and obtain the script's response. Did I get that right?
type: QuestionComment

http://stackoverflow.com/comment/43677933
comment on: http://stackoverflow.com/a/27612176
type: AnswerComment
score: 0
type: Comment
has text: Thanks… Unfortunately, sometimes it works as expected and sometimes it works as I previously described even with your code. I can't reliably recreate the behavior consistently. When I start the tasks with `grunt`it never works the first time I save a SCSS file, but it does after 3-6 saves and if/when it starts working, then it's all good until I stop grunt watch.

http://stackoverflow.com/comment/43389500
type: Comment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/66879/discussion-between-ianaya89-and-oyshee).
comment on: http://stackoverflow.com/a/27476773
score: 0
type: AnswerComment

http://stackoverflow.com/q/27543929
downvote count: 0
has answer: http://stackoverflow.com/a/27550983
accepted answer: http://stackoverflow.com/a/27550983
score: 1
linked to: http://stackoverflow.com/q/27461310
tagged with: stream
type: Question
tagged with: javascript
has body: I am working on a node.js project. Is it possible to read exactly n bytes asynchronously from a stream? Usually, if I want to read a stream asynchronously, I use events. The problem is that I need to process the rest of the stream asynchronously, too. If I listen for the data event, I can use the rest of the stream later, but I cannot control how many bytes I want to read at once. I tried to use unshift to put the unused bytes back into the buffer but this does not seem to fire the data event when another listener is added later. This question is similar, but the only answer is a synchronous solution. Is there an option to limit the number of bytes being passed to the data event listeners? Is it possible to somehow push the bytes back into the stream and still make them accessible through events?
upvote count: 1
answer count: 1
tagged with: asynchronous
favorite count: 0
has title: Read exactly n bytes asynchronously
tagged with: node.js
type: AnsweredQuestion

http://stackoverflow.com/a/27551382
has body: So you need to add change events to all of the elements and call getsum function getsum () { var rows = document.getElementsByClassName("takings"); var total = 0; for (var i = 0; i < rows.length; i++) { var val = parseFloat(rows[i].value); total += val; } var label = document.getElementById("TotalLabel"); label.value = total; } window.onload = getsum; //Example showing how to add one event listener to the page and listen for change events //The following works in modern browsers, not all browsers support addEventListener, target, and classList. document.body.addEventListener("change", function(evt) { var targ = evt.target; if(targ.classList.contains("takings")) { getsum(); } }); label { display: block; } 1 2 3 4 5 Total:
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/27551310
has comment: http://stackoverflow.com/comment/43528947
upvote count: 2

http://stackoverflow.com/comment/43695338
comment on: http://stackoverflow.com/q/27635723
score: 0
type: Comment
type: QuestionComment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/67626/discussion-between-abhishek-and-koch).

http://stackoverflow.com/q/27514599
has comment: http://stackoverflow.com/comment/43465595
downvote count: 0
favorite count: 0
has body: I am looking for help on how to adjust the color channel levels of a black and white (or grayscale) image. In photoshop this feature is called the Black and White filter. The examples below demonstrate my process. The red shirt (which is a perfect mid-gray) is black in the final image. Original Image Changed Hue to Green Final Image Now Black and White (with mid-gray/red shirt black)
has answer: http://stackoverflow.com/a/27514824
tagged with: php
tagged with: gd
has answer: http://stackoverflow.com/a/27515725
accepted answer: http://stackoverflow.com/a/27514824
upvote count: 3
tagged with: image-processing
possible better answer: http://stackoverflow.com/a/27515725
type: Question
type: AnsweredQuestion
score: 3
has title: PHP or JS: adjust color channel levels when converting image to black and white
tagged with: javascript
has comment: http://stackoverflow.com/comment/43461728
tagged with: imagemagick
answer count: 2

http://stackoverflow.com/q/27508447
has comment: http://stackoverflow.com/comment/43447101
upvote count: 0
score: -2
tagged with: javascript
tagged with: jquery
answer count: 1
favorite count: 0
has body: I have two regex's that I am trying to combine. One is email specific and the other checks certain special characters. I have arrived at this solution following much toying: "^([-0-9a-zA-Z.+_]+@[-0-9a-zA-Z.+_]+\.[a-zA-Z]{2,4}|[\\w\\-ÀÈÌÒÙàèìòùÁÉÍÓÚÝáéíóúýÂÊÎÔÛâêîôûÃÑÕãñõÄËÏÖÜŸäëïöüŸçÇŒœßØøÅåÆæÞþÐð _]){0,80}$" It does seem to check what I need it to, but for instance the following is still returned valid: abc@foo it does not force a full email address. Am I using the correct approach or is there a simpler way to structure this RegEx? I'm on a learning curve with regex so all advice appreciated.
has title: Combining RegEx's
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43447012
tagged with: regex
has comment: http://stackoverflow.com/comment/43446967
has comment: http://stackoverflow.com/comment/43447055
downvote count: 2
has comment: http://stackoverflow.com/comment/43447526
has answer: http://stackoverflow.com/a/27509227
type: Question
has comment: http://stackoverflow.com/comment/43447792

http://stackoverflow.com/comment/43647929
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27612502
has text: that part makes no sense, `intHistory` has just been parsed from JSON string to array but then you reverse it to get `item`. In the end you should have less code than you do now
score: 0

http://stackoverflow.com/comment/43647838
type: Comment
type: QuestionComment
has text: @AnthonyForloney - If OP wants to intersect his own `alert`s, then he can just wrap 'em into a function that would call something else as well. That *something* could be either hard-coded or passed as callback parameter. If the goal is to react to `alerts` from the code that OP can't change, then your approach is not applicable.
comment on: http://stackoverflow.com/q/27612749
score: 0

http://stackoverflow.com/comment/43467558
type: Comment
type: QuestionComment
score: 0
has text: the input is an array. I modified the function to take an array as a parameter and then operated on / returned that array. It passed the test suite, but i can see how it could be made more general by just taking in anything the user provides and using ....slice.call to convert it to an array and swap those values
comment on: http://stackoverflow.com/q/27518764

http://stackoverflow.com/q/27597489
has comment: http://stackoverflow.com/comment/43618587
score: 0
has comment: http://stackoverflow.com/comment/43618643
has comment: http://stackoverflow.com/comment/43618593
type: Question
tagged with: javascript
has title: How to slide multiple divs in the right direction?
tagged with: jquery
type: UnansweredQuestion
has body: tab-right is the class for the button to be clicked for shifting the content from left to right.dedicated,vps,colocation,rackspace are the ids of the divs.My problem is when I click the tab-right button first the 'dedicated' div is sliding in the right direction which is fine but the div "vps is sliding in the left direction.But I want it to slide in the right direction So, help me..........thnx:) $count=0; $(".tab-right").click(function() { $count1=0; if($count==4) { $count=0; } $count++; if($count==1) { $('#dedicated').toggle('slide', { direction: 'right' }, 700,function(){$('#vps').toggle('slide', { direction: 'right' }, 700);}); } if($count==2) { $('#vps').toggle('slide', { direction: 'right' }, 700,function(){$('#colocation').toggle('slide', { direction: 'right' }, 700);}); } if($count==3) { $('#colocation').toggle('slide', { direction: 'right' }, 700,function(){$('#rackspace').toggle('slide', { direction: 'right' }, 700);}); } if($count==4) { $('#rackspace').toggle('slide', { direction: 'right' }, 700,function(){$('#dedicated').toggle('slide', { direction: 'right' }, 700);}); } });
answer count: 0

http://stackoverflow.com/q/27522866
tagged with: jquery
has body: After many weeks of trying I have finally gotten my caroufredsel carousel centring on computers, only to discover that it still isn't doing so on mobile devices (smart phone and tablets). Please can anybody help. The website is http://www.suffolkwindowbox.co.uk - there are different sliders on most pages but they all have the same settings. The caroufredsel is the plugin. The script is: jQuery(document).ready(function($) { function runCarousel() { $("#caroufredsel-keCZE-266").carouFredSel({ circular: true, infinite: true, responsive: false, direction: "left", align: "center", width: "100%", height: 560, items: { visible: 3, start: -1, }, scroll: { items: 1, fx: "scroll", easing: "swing", duration: 1000, pauseOnHover: true, }, auto: { play: true, timeoutDuration: 5000, }, prev: { button: "#dev7-caroufredsel-wrapper-keCZE-266 .dev7-caroufredsel-prev", key: null, }, next: { button: "#dev7-caroufredsel-wrapper-keCZE-266 .dev7-caroufredsel-next", key: null, }, pagination: { container: "#dev7-caroufredsel-wrapper-keCZE-266 .dev7-caroufredsel-pag", anchorBuilder : null, }, swipe: { onTouch: true }, }); } $("#caroufredsel-keCZE-266").imagesLoaded(runCarousel); }); I have then added some additional css: .dev7-caroufredsel-wrapper { background-color: #fff; height: 560px; width: 100%; overflow: hidden; position: relative; top: 50%; left: 0; align-content:center !important; } .dev7-caroufredsel-carousel img { display: block; float: left; margin-left: 0; } .dev7-caroufredsel-prev, .dev7-caroufredsel-next { background-color: rgba(255, 255, 255, 0.7); display: block; height: 560px; width: 45.4%; top: 0; position: absolute; } .dev7-caroufredsel-prev:hover, .dev7-caroufredsel-next:hover { background-color: #fff; background-color: rgba(255, 255, 255, 0.8); } .dev7-caroufredsel-prev { left: -495px; } .dev7-caroufredsel-next { right: -495px; } .dev7-caroufredsel-pag { margin-left: -550px; position: absolute; left: 50%; bottom: 10px; } .dev7-caroufredsel-pag a { border: 2px solid #fff; …
has title: Caroufredsel not centring on mobile devices
type: UnansweredQuestion
tagged with: css
type: Question
has answer: http://stackoverflow.com/a/27523560
tagged with: javascript
tagged with: caroufredsel
score: 0
answer count: 1

http://stackoverflow.com/q/27634996
has comment: http://stackoverflow.com/comment/43689715
has answer: http://stackoverflow.com/a/27636053
has comment: http://stackoverflow.com/comment/43690284
type: Question
linked to: http://stackoverflow.com/q/3552461
tagged with: javascript
has title: Format string to time format like hh:mm
score: 0
answer count: 3
tagged with: validation
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27635105
type: UnansweredQuestion
has body: I have an input field: &lt;input id="szReminderTime" type="text" value="" maxlength="5" onblur="format_reminder_time(this.value);" name="askForQuoteAry[szReminderTime]" /&gt; The format of the Time field is hh:mm on the 24-hour clock, e.g. 7:30, 11:45, 16:10, 19:11, 22:43. If the operator types a period (11.45), a comma (11,45), a space (11 45), a dash (11-45), or nothing (1145 or 945), then each of these should be considered to have the same meaning. Then once the operator leaves the field the value should be shown with a colon, i.e. 11:45 or 9:45. To achieve this I have used the following JavaScript function which works fine for me but can anyone optimize my code as my code is not looking nice to me?
has comment: http://stackoverflow.com/comment/43690371
has answer: http://stackoverflow.com/a/27635335
has comment: http://stackoverflow.com/comment/43689494

http://stackoverflow.com/a/27623781
has comment: http://stackoverflow.com/comment/43743961
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27621426
has body: As @Alnitak said this is a strictly presentation problem. All JavaScript dates are internally stored in the UTC format and manipulated in the local timezone of the browser (OS). The only place where target timezone is coming into action is when you converting Date object to a string in order to show it to a user. All dates will be formatted according to a local timezone of the each individual user. However, if you want to format dates in some specific timezone (for example when your users are in the New York and you want to show dates in Moscow) you will have to use more advanced formatting utilities like Moment.js and Moment Timezone. When you control all the date formatting in your application - that can be easily implemented. However, when you need to relay this functionality to some third-party component that doesn't care about timezones and such (like some DatePicker component) it can become pretty ugly. The only practical solution I've found to overcome this issue is to create a standard Date object that is pretending to be in local timezone of the user. Here's the function, that you can use: /** * Returns standard Date from Moment.js date as if it was in local timezone. * Use getMoment() method of the result to get proper Moment.js date back. * * @param {object} momentDate * * @returns {Date} */ function momentAsLocalDate(momentDate) { var origOffset = momentDate.format('ZZ'); var localOffset = moment().format('ZZ'); // Creating a standard date as if date was in current browser TZ. var stdDate = new Date( // Creating date from ISO:8601 format. momentDate.format('YYYY-MM-DDTHH:mm:ss') + localOffset ); stdDate.getMoment = function() { function pad(number) { if (number &lt; 10) { return '0' + number; } return number; } // String in ISO:8601 format. var dateString = this.getFullYear() + '-' + pad(this.getMonth() + 1) + '-' + pad(this.getDate()) + 'T' + pad(this.getHours()) + ':' + pad(this.getMinutes()) + ':' + pad(this.getSeconds()) + origOffset ; // Creating a …

http://stackoverflow.com/comment/43413601
score: 0
type: Comment
type: QuestionComment
has text: Ha, Bergi, just as you posted that I found the file! V8Source/src/message.js
comment on: http://stackoverflow.com/q/27490369

http://stackoverflow.com/q/27486389
linked to: http://stackoverflow.com/q/22536385
type: UnansweredQuestion
downvote count: 1
duplicate of: http://stackoverflow.com/q/22536385
has answer: http://stackoverflow.com/a/27488326
score: -1
has answer: http://stackoverflow.com/a/27486419
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/43413984
upvote count: 0
tagged with: javascript
has body: I'm new to Promise's and I'm trying to wrap my head around getting the value. Here's an idea of what I'm trying to do: API = { get: function() { return new Promise(function(res) { setTimeout(function() { res('foo') }, 1000) }) } } var foo = API.get() console.log(foo) It's important that var foo = API.get() remains as it is. Any idea what to do here?
favorite count: 0
has title: Return promise value
tagged with: promise
has comment: http://stackoverflow.com/comment/43404603

http://stackoverflow.com/comment/43688594
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27634251
has text: @limelights questions updated with more code.

http://stackoverflow.com/comment/43676515
type: Comment
has text: I donno how to echo the section inside the for-loop
comment on: http://stackoverflow.com/a/27627565
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43564126
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27568990
score: 0
has text: Ok, you might want to fix that first. Should the call to `testAPI()` in your html have a semi-colon after it? I do more java than javaScript ;)

http://stackoverflow.com/q/27573163
tagged with: vb.net
score: 3
upvote count: 3
linked to: http://stackoverflow.com/q/6634059
type: Question
has body: I have a program that I've created for my School District to use to share files &amp; other information in a network. What I'm trying to do is to create a "Magnet Link" type of button on the intranet site so that users can click on it and open an external program that downloads the file from the server and decompresses it. If anyone could provide more information, or help me know what to look for, that'd be great. Like how you can click on a link on Curse and it opens it in the client, ect. A popup would appear asking "Are you sure this site may open this application?"
answer count: 2
downvote count: 0
tagged with: javascript
has title: How to create "Magnet Links"
has answer: http://stackoverflow.com/a/27573219
has answer: http://stackoverflow.com/a/27573251
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
type: UnansweredQuestion
tagged with: php

http://stackoverflow.com/q/27524895
answer count: 3
has answer: http://stackoverflow.com/a/27526435
has comment: http://stackoverflow.com/comment/43479888
has answer: http://stackoverflow.com/a/27525089
favorite count: 0
has body: I am fairly new at Angular and trying to build a static website using angular and bootstrap. This is what I have done so far to create navigation (and footer using same method) to add to every pages in the website. Is there any better(more efficient) way building templates with Angular? Is this what everyone does for these type of applications? app.directive("mynav", function () { return { restrict: "A", template: " Toggle navigation Home About Services Rental Products Contact Request A Quote " } });
tagged with: angularjs
has comment: http://stackoverflow.com/comment/43478744
tagged with: twitter-bootstrap
tagged with: http://stackoverflow.com/tag/html
upvote count: 4
tagged with: css
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/27525148
possible better answer: http://stackoverflow.com/a/27525089
has title: Adding navigation and footer to every page using AngularJS
type: Question
accepted answer: http://stackoverflow.com/a/27526435
tagged with: javascript
score: 4

http://stackoverflow.com/a/27624155
downvote count: 1
answers question: http://stackoverflow.com/q/27623975
score: -1
upvote count: 0
has comment: http://stackoverflow.com/comment/43670065
has comment: http://stackoverflow.com/comment/43669335
type: Answer
has body: The each function has 2 parameters, the key and the object. Check my code. var data = '{"no":"img2","name":"mylogo.jpg","location":"u_images\/1\/"} '; data = $.parseJSON(data); $(data).each(function(idx, obj) { //console.log(obj); //Check this var imgsrc = obj.location + 'name'; $('#' + idx + 'div').html('&lt;img src="' + imgsrc + '" width="50" height="50" /&gt;'); });

http://stackoverflow.com/comment/43394680
type: QuestionComment
comment on: http://stackoverflow.com/q/27480627
has text: php solution or javascript one? (as @Naruto as asked)
score: 0
type: Comment

http://stackoverflow.com/a/27507734
type: Answer
upvote count: 1
has body: Your question is leaving out some important details, but I think what you want to do is keep selecting random colors from the array, repeating no values until you've used every color and only then start repeating. Probably you best solution might be to start with a Fisher-Yates shuffle of your original array and then just select each color in turn until you reach the last color. Then simply reshuffle and start back from the beginning. So in pseudo-code, you'd have something like this: shuffleArray colorIndex = 0; while still selecting colors select color at array[colorIndex] colorIndex++ if (colorIndex &gt; array.length) colorIndex = 0; shuffleArray For example: // from http://bost.ocks.org/mike/shuffle/ function shuffle(array) { var m = array.length, t, i; // While there remain elements to shuffle… while (m) { // Pick a remaining element… i = Math.floor(Math.random() * m--); // And swap it with the current element. t = array[m]; array[m] = array[i]; array[i] = t; } return array; } var colorIndex = 0; var colors = ["rgb(199, 179, 78)", "rgb(127, 195, 133)", "rgb(102, 169, 162)", "rgb(132, 122, 224)"]; var i = 0; shuffle(colors); while (i &lt; 8) { alert(colors[colorIndex++]); i++; if (colorIndex &gt;= colors.length) { shuffle(colors); colorIndex = 0; } } Note there is one more thing to consider. Regardless of how you do this, there is a possibility that the first element selected from your "refilled" array will be the same as the last element from the previous cycle. You might want to think about how to handle that case.
score: 1
answers question: http://stackoverflow.com/q/27507547
downvote count: 0

http://stackoverflow.com/a/27618016
accepted answer of: http://stackoverflow.com/q/27618003
has comment: http://stackoverflow.com/comment/43657741
upvote count: 1
has comment: http://stackoverflow.com/comment/43657076
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27618003
has comment: http://stackoverflow.com/comment/43657246
type: Answer
has comment: http://stackoverflow.com/comment/43657196
has comment: http://stackoverflow.com/comment/43657085
has comment: http://stackoverflow.com/comment/43657299
downvote count: 0
has comment: http://stackoverflow.com/comment/43657146
has comment: http://stackoverflow.com/comment/43657121
has body: You could try this one: $(".parent :first")
score: 1
has comment: http://stackoverflow.com/comment/43657328

http://stackoverflow.com/q/27615393
has answer: http://stackoverflow.com/a/27635041
score: 3
answer count: 1
downvote count: 0
has body: I've done some looking at the Cloudinary API and upload examples for NodeJS, and it looks like the server-side uploads use a file path. Meanwhile, the client-side uploads require a frontend input tag. I already have a frontend for users to select and crop a picture to their liking, and this gives me a data URI. I'd like to save this file to Cloudinary without having to use their built in frontend option. Is this possible? This would basically mean that I would be able to call some kind of upload function that can take a URI or file blob.
favorite count: 0
accepted answer: http://stackoverflow.com/a/27635041
type: AnsweredQuestion
upvote count: 3
tagged with: cloudinary
type: Question
tagged with: javascript
has title: Upload image URI to Cloudinary

http://stackoverflow.com/comment/43501570
type: Comment
has text: ` id mainView = [[self.contentView subviews] lastObject]; NoClickWebView *aWebView = [[mainView subviews] lastObject];`
comment on: http://stackoverflow.com/a/27530676
score: 0
type: AnswerComment

http://stackoverflow.com/a/27538548
score: 0
type: AcceptedAnswer
has body: You could capture some events within the iframe using youtube's js API This is what you have to do: 1). Load the Player API in your page &lt;script src="http://www.youtube.com/player_api"&gt;&lt;/script&gt; 2). Enable jsapi in your iframe as a trailing parameter (enablejsapi) like &lt;iframe id="myIframe" src="http://www.youtube.com/embed/opj24KnzrWo?enablejsapi=1&amp;autoplay=0" width="420" height="280" frameborder="0"&gt;&lt;/iframe&gt; ... also notice we added an ID to the iframe. 3). Create 3 functions : a). onPlayerReady : Here is where you can detect when the video has loaded and is ready to play. Here you can actually start the video, etc. function onPlayerReady(event) { // video is ready, do something event.target.playVideo(); } b). onPlayerStateChange : Here is where you can detect what events are triggered: function onPlayerStateChange(event) { console.log(event.data); // event triggered // e.g. end of video if (event.data === 0) { // end of video: do something here } } When you click play or pause, an event is triggered. Then you can decide what action you want do, including pushing a tracking event, etc. This is a list of the returned values of each event : -1 – unstarted 0 – ended 1 – playing 2 – paused 3 – buffering 5 – video cued Refer to the documentation to learn more about those events c). onYouTubePlayerAPIReady : This is where you actually initialize the API and bind the events to the other functions : function onYouTubePlayerAPIReady() { var id = document.getElementById("myIframe").getAttribute("id"); var player = new YT.Player(id, { events: { onReady: onPlayerReady, onStateChange: onPlayerStateChange } }); } // youtube API ready See JSFIDDLE
type: Answer
answers question: http://stackoverflow.com/q/27537671
accepted answer of: http://stackoverflow.com/q/27537671

http://stackoverflow.com/a/27566579
answers question: http://stackoverflow.com/q/27566527
has comment: http://stackoverflow.com/comment/43594484
downvote count: 0
score: 1
has body: Like I've mentioned in my comment, it's true because of "asynchronicity" – I'm pretty sure the second argument of your checkIdandToken is a callback function. You console.log is executed before that code is run. Essentially you variable is changed, but after you run the console.log. This answer explains how asynchronous code works.
upvote count: 1
has comment: http://stackoverflow.com/comment/43568624
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27566527
type: Answer

http://stackoverflow.com/comment/43435817
type: Comment
type: QuestionComment
has text: There is still no change?
score: 0
comment on: http://stackoverflow.com/q/27502792

http://stackoverflow.com/q/27623446
answer count: 0
downvote count: 0
has comment: http://stackoverflow.com/comment/43667437
tagged with: http://stackoverflow.com/tag/json
has title: How to use d3 and date format with years before Christ?
type: Question
has comment: http://stackoverflow.com/comment/43667515
tagged with: javascript
upvote count: 2
has body: I have some data in JSON format I need to import it to build a scatter plot with d3. The problem is that the records have some dates referred to years before Christ born, for example 400 B.C. Is it possible to format it in a way that d3 accepts?
favorite count: 0
tagged with: d3.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43667387
score: 2

http://stackoverflow.com/comment/43535102
type: Comment
type: QuestionComment
has text: what effort have you made?
comment on: http://stackoverflow.com/q/27554388
score: 0

http://stackoverflow.com/q/27573537
accepted answer: http://stackoverflow.com/a/27573684
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: jQuery animate scrollTop issue
has answer: http://stackoverflow.com/a/27573684
has body: I have a search form: When I click on search btn the results get displayed which is a div: When I click on some page in the pagination grid. The search result disappears as the results are refreshing. Now when the search results appear again it looks like this: The results div gets cut out and the page scrolls back up. I need to scroll down from here so as the user sees the search result and he doesn't have to scroll down from search form. Code: $("html, body").animate({ scrollTop: $('#results').height() + $('#results').offset().top }, "slow"); Doesn't quite seem to work. 'results' is the id of the div 'search results'. I am placing the code in a knockout view model. Trying the code: $("#results").css("border", "3px solid red"); To see if the the jQuery is gettin applied, it gives the correct output the div results is bordered red. What am I doing wrong here with respect to scrolling?
type: AnsweredQuestion
tagged with: knockout.js
type: Question
score: 0

http://stackoverflow.com/comment/43505519
type: Comment
type: QuestionComment
has text: "how do I narrow it to one" --- you **ALREADY** have that code in your question.
comment on: http://stackoverflow.com/q/27538667
score: 0

http://stackoverflow.com/comment/43440378
type: AnswerComment
score: 0
type: Comment
has text: There is no other code, where I change the innerHTML attribute of a div.
comment on: http://stackoverflow.com/a/27503928

http://stackoverflow.com/a/27632685
answers question: http://stackoverflow.com/q/27632086
type: AcceptedAnswer
type: Answer
has body: #DisplayCar img { height:auto; } should work
accepted answer of: http://stackoverflow.com/q/27632086
score: 0

http://stackoverflow.com/comment/43539318
comment on: http://stackoverflow.com/q/27555957
score: 0
type: Comment
type: QuestionComment
has text: Then please next time use proper tags for your questions.

http://stackoverflow.com/comment/43503687
comment on: http://stackoverflow.com/a/27537686
type: Comment
score: 0
type: AnswerComment
has text: Yeah, seen that, that was *fast*

http://stackoverflow.com/q/27564217
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43556223
score: 0
has title: JS hide Frame from different frameset
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43562407
has comment: http://stackoverflow.com/comment/43555753
answer count: 0
type: UnansweredQuestion
has body: I need to hide a frame by clicking on tag from a different frameset. (tha page has more frames) I tried: $("#azSUBMIT").click(function(){ $("frame[name='frameHidden']").hide(); }); JSFiddle demo
tagged with: frameset
has comment: http://stackoverflow.com/comment/43559246
type: Question

http://stackoverflow.com/comment/43575185
type: Comment
type: QuestionComment
has text: I think what you're looking for is a way to get a string value from server side (code behind) to client side (javascript). Is that right?
comment on: http://stackoverflow.com/q/27574853
score: 0

http://stackoverflow.com/q/27613628
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/27613662
favorite count: 0
type: UnansweredQuestion
downvote count: 2
tagged with: css
has body: I am new to jquery and I am tiring to build a mobile web application, So I am using jquery mobile (1.4.5), and I have one simple problem I don't know how to change where the text in the select menu is located. I tried to do many things like to add a span with style of float:right or center and so on.. so here is my code: Select C עיר באר שבע ת"א אילת and the out put is like this : And what I want it to look like is something like this : So like you can see the text is on the right now and the cursor in the search field is also on the right. Any advice how I can accomplish this ? Thanks is advance to everyone !
type: Question
has title: jQuery mobile how to change select menu text align?
score: -2
tagged with: jquery-mobile
tagged with: javascript
upvote count: 0

http://stackoverflow.com/a/35757305
answers question: http://stackoverflow.com/q/27530729
score: 9
upvote count: 10
downvote count: 1
type: Answer
has body: While the original question mentions .NET 3.5, it should be known to users of 4.0+ that you can use HttpUtility.JavaScriptStringEncode("string") A second bool parameter specifies whether to include quotation marks (true) or not (false) in the result.

http://stackoverflow.com/q/27619924
score: 0
type: UnansweredQuestion
tagged with: codeigniter
tagged with: php
has comment: http://stackoverflow.com/comment/43660738
has comment: http://stackoverflow.com/comment/43660722
has answer: http://stackoverflow.com/a/29234037
type: Question
has answer: http://stackoverflow.com/a/27620256
tagged with: javascript
has title: Angular.js $http.post with Codeigniter not working
has body: I'm trying to submit a new post using $http. it's not working. I tried the shore version and the long version, both fail. console:" Failed to load resource: the server responded with a status of 500 (Internal Server Error) " This my code: $scope.doAdd = function(){ $http({ headers: {'Content-Type': 'application/x-www-form-urlencoded'}, url: 'api/addduans', method: "POST", }) .success(function(data) { alert('OK'); }); } My controller: function addduans_post() { $id_duan = $this->post('id_duan'); $title = $this->post('title'); $addr = $this->post('addr'); $dis = $this->post('dis'); $img_duan = $this->post('img_duan'); $result = $this->admin_model->add_id_da($id_duan,$title,$addr,$dis,$img_duan); if($result === FALSE) { $this->response(array('status' => 'failed')); } else { $this->response(array('status' => 'success')); } } My Model: public function add_id_da($id_duan,$title,$addr,$dis,$img_duan) { $data = array( 'id_duan' => $id_duan, 'title' => $title, 'addr' => $addr, 'dis' => $dis, 'img_duan' => $img_duan ); $this->db->insert('duan_test', $data); } This my view : Add Anyone got any idea on how to make this work? Thanks!
answer count: 3
has answer: http://stackoverflow.com/a/29233828
tagged with: angularjs
has comment: http://stackoverflow.com/comment/43660679

http://stackoverflow.com/comment/43435689
type: Comment
has text: yep i know actually this is how my setContent looks **infoWindow.setContent(texto + nombreCliente);** where **var texto = "some string" and var nombreCliente = metadata.nombreCliente (metadata from FSCollection)**
comment on: http://stackoverflow.com/a/27502148
score: 0
type: AnswerComment

http://stackoverflow.com/q/27588651
has answer: http://stackoverflow.com/a/27594112
has comment: http://stackoverflow.com/comment/43611084
has comment: http://stackoverflow.com/comment/43611309
score: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/43609867
tagged with: lightbox
has title: Gallery: Only one image as a thumbnail
tagged with: javascript
has body: Here's a link: http://lomakincello.net/etu/sehen.php I'm creating a website using HTML and CSS. I'm not familiar with JavaScript, so someone is helping me out with a HTML5/Flash-Player, which works fine, and a gallery. He tried to use the original lightbox. By default, all the pictures that belong to a gallery are displayed as a thumbnail. We would like to have several galleries (live pictures / recording sessions / miscellaneous. Something like that). Only one picture of each gallery should be displayed as a thumbnail. Our "webmaster" is finding that hard to achieve using the lightbox. So I'm asking you for an alternative. Do you knwo any scripts/script techniques that by default show only one picture of each gallery as a thumbnail or where a modification of the original code would be easy to do?
has comment: http://stackoverflow.com/comment/43609627
accepted answer: http://stackoverflow.com/a/27594112
has comment: http://stackoverflow.com/comment/43609505
answer count: 1
tagged with: gallery
favorite count: 0
upvote count: 2
linked to: http://stackoverflow.com/q/2755631
has comment: http://stackoverflow.com/comment/43601610
has comment: http://stackoverflow.com/comment/43611114
type: AnsweredQuestion

http://stackoverflow.com/comment/43692314
comment on: http://stackoverflow.com/a/27636610
score: 1
has text: As soon as the number of variables increases, maintaining that would be painful.
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27545645
type: Question
upvote count: 5
downvote count: 0
has body: I use Play 2.3.7 and get the following error: [info] Error: Error: paths fallback not supported in optimizer. Please provide a build config path override for jsparticipantroutes It appears just on prod mode with ./activator start. In dev mode everything is fine. When the application runs he can not find any assets "NetworkError: 404 Not Found - http://localhost:9000/assets/lib/requirejs/require.js" "NetworkError: 404 Not Found - http://localhost:9000/assets/stylesheets/main.css" ... ... ... ... build.sbt: import com.typesafe.sbt.SbtNativePackager.packageArchetype import com.typesafe.sbt.less.Import.LessKeys import com.typesafe.sbt.rjs.Import.RjsKeys import RjsKeys._ import com.typesafe.sbt.rjs.SbtRjs import com.typesafe.sbt.web.SbtWeb import play.PlayJava import com.typesafe.sbt.packager.Keys._ version := "1.0-SNAPSHOT" scalaVersion := "2.11.1" // Maintainer for all packages lazy val root = (project in file(".")).enablePlugins(SbtWeb,PlayJava) //build-info buildInfoSettings sourceGenerators in Compile &lt;+= buildInfo buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion) buildInfoKeys ++= Seq[BuildInfoKey]( resolvers, libraryDependencies in Test, BuildInfoKey.map(name) { case (k, v) =&gt; "project" + k.capitalize -&gt; v.capitalize }, BuildInfoKey.action("buildTime") { System.currentTimeMillis } // re-computed each time at compile ) buildInfoPackage := "info" resolvers ++= Seq( "Local Maven Repository" at "file:///"+Path.userHome.absolutePath+"/.m2/repository", "play-easymail (snapshot)" at "http://joscha.github.io/play-easymail/repo/snapshots/" ) libraryDependencies ++= Seq( cache, "org.webjars" %% "webjars-play" % "2.3.0-2", "org.webjars" % "bootstrap" % "3.3.1", "org.webjars" % "jquery" % "2.1.1", "org.webjars" % "datatables" % "1.10.1", "org.webjars" % "requirejs" % "2.1.15", "org.webjars" % "datatables-bootstrap" % "2-20120202-2", "org.webjars" % "SlickGrid" % "2.1", "org.webjars" % "select2" % "3.5.2", "org.mongodb" % "mongo-java-driver" …
tagged with: javascript
has title: Play Framework requirejs Error: Error: paths fallback not supported in optimizer
tagged with: playframework
favorite count: 0
type: UnansweredQuestion
score: 5
tagged with: requirejs
tagged with: r.js
answer count: 0

http://stackoverflow.com/comment/43428565
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27498558
score: 0
has text: Thank you 4dgaurav - that link helped! Had to do a few modifications but not near as much if I would have with others!

http://stackoverflow.com/comment/138555397
comment on: http://stackoverflow.com/a/78514448
type: AnswerComment
has text: Yes you are right, I asked the question in fact but the code I have sent as answer is the one looking for, I asked the question wrongly.
score: 0
type: Comment

http://stackoverflow.com/comment/63440547
score: 0
type: Comment
comment on: http://stackoverflow.com/a/37924017
has text: Typings already exists for quite some time now but TypeScript 2.0 will allow installing definition files directly from npm (so you don't need an additional tool like typings). Updated my post with information when TypeScript 2.0 will become available.
type: AnswerComment

http://stackoverflow.com/a/27632498
downvote count: 0
answers question: http://stackoverflow.com/q/27632391
type: Answer
score: 2
has body: Answer : There no relative aspect between null and boolean. MDN Source:- The value null is a literal (not a property of the global object like undefined can be). In APIs, null is often retrieved in place where an object can be expected but no object is relevant. When checking for null or undefined beware of the differences between equality (==) and identity (===) operators (type-conversion is performed with the former). // foo does not exist, it is not defined and has never been initialized: &gt; foo "ReferenceError: foo is not defined" // foo is known to exist now but it has no type or value: &gt; var foo = null; foo "null" Difference between null and undefined typeof null // object (bug in ECMAScript, should be null) typeof undefined // undefined null === undefined // false null == undefined // true JavaScript | MDN
upvote count: 2
has comment: http://stackoverflow.com/comment/43685101

http://stackoverflow.com/comment/43551210
comment on: http://stackoverflow.com/a/27561960
score: 1
type: AnswerComment
has text: thanks for recommend to put `clickevent = true` inside success of ajax
type: Comment

http://stackoverflow.com/comment/43421469
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27490005
has text: Are you doing more than one of these async calls? If yes, I have already had this issue and I can tell you more as response.

google-fusion-tables
type: Tag
tags question: http://stackoverflow.com/q/27550140
tags question: http://stackoverflow.com/q/27582986
tag name: google-fusion-tables
tags question: http://stackoverflow.com/q/27490124

jquery-select2
tags question: http://stackoverflow.com/q/27495232
tags question: http://stackoverflow.com/q/27494860
tag name: jquery-select2
tags question: http://stackoverflow.com/q/27594960
type: Tag
tags question: http://stackoverflow.com/q/27581691

http://stackoverflow.com/comment/43552987
type: Comment
type: QuestionComment
has text: I've tried your fiddle on Chrome, FF and IE11 and it seems fine to me. As in, I can't see what you mean by "the image is behaving weird". Can you explain a bit more please?
comment on: http://stackoverflow.com/q/27563193
score: 0

http://stackoverflow.com/comment/43608748
has text: Unfortunately this is not the right approach for me, I'm running a website with an audioplayer in the header. on page navigation everything under the header will be refreshed/navigated with ajax, the head won't update. So I really need the exact div to be refreshed preferably every hour :) But thank you for the advice!
comment on: http://stackoverflow.com/a/27592543
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27637987
tagged with: javascript
has title: How to adjust a Div property to make it expandable according to the content
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/27638097
tagged with: css
favorite count: 0
upvote count: 2
has body: I was making an application in which there were several divisions. In one particular division the content is going more than one line. As we know it will make the div scrollable to let us see the content . But in this case I want that the div adjust its height in accordance with the content so that all the content can be seen in one go and no scroll should be there..... is there any way ?? HTML: &lt;!DOCTYPE html&gt; &lt;html ng-app='myApp'&gt; &lt;head&gt; &lt;meta charset="ISO-8859-1"&gt; &lt;meta name="viewport" content="initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no"&gt; &lt;title&gt;Screen1&lt;/title&gt; &lt;link rel="stylesheet" type="text/css" href="Screen1.css"&gt; &lt;/head&gt; &lt;body BGCOLOR="#e9ecf1" ng-controller='screen1Controller'&gt; &lt;div class="main"&gt; &lt;div id="header1Main"&gt; &lt;div id="header1"&gt;Timeliness&lt;/div&gt; &lt;div id="header2"&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="clear"&gt;&lt;/div&gt; &lt;div class="opporMain"&gt; &lt;div class="opporHeader"&gt; &lt;div class="circleIcon"&gt;I&lt;/div&gt; &lt;div class="opporHeading"&gt;Heading is the main thing that we need now it is a very important propert and wee need it we will have the thing according to the needs .........&lt;/div&gt; &lt;/div&gt; &lt;div class="lineDiv"&gt;&lt;/div&gt; &lt;div class="opporContent"&gt; &lt;div class="contentStatus"&gt;one three&lt;/div&gt; &lt;div class="contentStatusDate"&gt;main thing&lt;/div&gt; &lt;div class="clearContent"&gt;&lt;/div&gt; &lt;div class="contentMainContent"&gt;"Things have been changed according to the needs"&lt;/div&gt; &lt;div class="contentUpdateTime"&gt;&lt;img src="images/timeline-3.png" alt="clock"&gt;&amp;nbsp;Just Now&lt;/div&gt; &lt;div class="clearContent"&gt;&lt;/div&gt; &lt;div class="contentUpdateBy"&gt;updated by &lt;font color="black"&gt;ziong zhu&lt;/font&gt;&lt;/div&gt; &lt;/div&gt; &lt;div class="lineDiv"&gt;&lt;/div&gt; &lt;div class="opporComment"&gt; &lt;img class="commentIcon" s…
type: AnsweredQuestion
score: 2
accepted answer: http://stackoverflow.com/a/27638097
type: Question
downvote count: 0

http://stackoverflow.com/q/27624046
tagged with: javascript
tagged with: jquery
has title: Getting my first view that use Mvc.JQuery.Datatables
upvote count: 1
tagged with: datatables
has comment: http://stackoverflow.com/comment/43900824
favorite count: 0
has comment: http://stackoverflow.com/comment/43902186
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43902435
tagged with: razor
has comment: http://stackoverflow.com/comment/43671114
has comment: http://stackoverflow.com/comment/43900442
answer count: 0
downvote count: 0
has comment: http://stackoverflow.com/comment/43901171
score: 1
has body: I am working on an asp.net mvc web application, and i want to use the strongly typed version of jQuery-Datatables plugin as mentioned on this link Link. so i created a new asp.net mvc-5 web application, then i added the Mvc.Jquery.Datatables using the "Manage Nuget Package" dialog , as follow:- Then i Accept the license and after that the following was added to my project:- using System.Web; using System.Web.Mvc; using System.Web.WebPages; using Mvc.JQuery.Datatables; [assembly: PreApplicationStartMethod(typeof(WebApplication27.RegisterDatatablesModelBinder), "Start")] namespace WebApplication27 { public static class RegisterDatatablesModelBinder { public static void Start() { if (!ModelBinders.Binders.ContainsKey(typeof(DataTablesParam))) ModelBinders.Binders.Add(typeof(DataTablesParam), new Mvc.JQuery.Datatables.DataTablesModelBinder()); } } but can anyone adivce how i can get the MVC.jquery.datatable functionalists inside my view, for example i have the following basic Index action method:- public ActionResult Index() { var emps = db.Emps.Include(e => e.Dept); return View(emps.ToList()); } and the related view:- @model IEnumerable<WebApplication27.Models.Emp> @{ ViewBag.Title = "Index"; } Index @Html.ActionLink("Create New", "Create") @Html.DisplayNameFor(model => model.FName) @Html.DisplayNameFor(model => model.LName) @Html.DisplayNameFor(model => model.Dept.Description) @foreach (var item in Model) { @Html.DisplayFor(modelItem => item.FName) @Html.DisplayFor(modelItem => item.LName) @Html.DisplayFor(modelItem => item.Dept.Description) @Html.ActionLink("Edit", "Edit", new { id=item.EmpID }) | @Html.ActionLink("Details", "Details", new { id=item.EmpID }) | @Html.ActionLink("Delete", "Delete", new { id=item.EmpID }) } so how i need to modify them to allow MVc.jquery.datatable functionality? Thanks
has comment: http://stackoverflow.com/comment/43900298
type: Question
tagged with: asp.net-mvc

http://stackoverflow.com/comment/43668782
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27623677
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/67559/discussion-between-sebri-zouhaier-and-robbertt).
score: 0

http://stackoverflow.com/comment/43577228
type: QuestionComment
has text: Without any “interruption” you would not see any transition, because the first and second change to the `translate` property would be executed within the same “cycle”, so that the second one just overwrites the first one before control is even handed back to the rendering engine. Querying `offsetWidth` makes a request to the rendering engine necessary however, to ask about the actual width of that element – and thereby “breaks” the cycle.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27575807

http://stackoverflow.com/q/27615339
type: UnansweredQuestion
upvote count: 2
downvote count: 2
type: Question
tagged with: javascript
has body: In my HTML page i have a button which on click fetches the elements in the page and passes them on to the server. Submit the function call is handled by my js code like this below. function on_submit() { var $start_date=document.getElementById("datepicker1").value; var $end_date=document.getElementById("datepicker2").value; var $vid1 = $('#vid1'); var $vid2 = $('#vid2'); var $vid1_name = $('#vid1').text(); var $vid2_name = $('#vid2').text(); var $metric = $('#metric').val(); var $frequency = $('#freq').val(); $.get('../content_focus',{type:"getData",vid1_name:$vid1_name, vid2_name:$vid2_name, vid1:$vid1, vid2:$vid2, start_date:$start_date, end_date:$end_date, metric:$metric, frequency:$frequency}, function(responseData){ alert('im done'); }); } Now the borwer console throws an error stating "'click' called on an object that does not implement interface HTMLElement." And none of my print statements or alert statements get executed i would like some help with this
has title: 'click' called on an object that does not implement interface HTMLElement
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/27627478
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/91042020
comment on: http://stackoverflow.com/a/38004441
type: Comment
has text: I think both cases work. A return is more explicit and you can avoid the else syntax as well. If this did not work for you, there is a good chance you're receiving an unexpected behavior from a 3rd party, and using the if/else syntax will also create possible problems. For example, this issue: https://github.com/caolan/async/issues/1162
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43558246
has text: @RobSp1derp1g: There is no jQuery in that bottom fiddle. It's all plain-vanilla JavaScript. I merely rewrote your functions to make them a little more efficient (and give you examples of better practices). If there's a way to get in to a chat session with you, I'll happily explain why I refactored your code the way I did. Is there a chance you can update your fiddle to include the `AtribMorada` function where it loads on pageload and causes the problem?
type: Comment
comment on: http://stackoverflow.com/a/27555825
type: AnswerComment
score: 0

http://stackoverflow.com/a/27557698
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27557548
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/27557548
score: 1
has body: Here's a Fiddle in pure JS. Basically you need to find all the inputs under your TR and loop through them, setting them to empty: window.toggleRow = function (id) { var p = document.getElementById(id); if (p.style.display =='table-row') { p.style.display = 'none'; var inputs = p.getElementsByTagName('input'); for (i = 0; i &lt; inputs.length; i++) { inputs[i].value = ""; } } else { p.style.display = 'table-row'; } }; http://jsfiddle.net/Delorian/hv19aLwL/
type: AcceptedAnswer

http://stackoverflow.com/q/27587556
favorite count: 0
tagged with: angularjs
type: AnsweredQuestion
has title: Reseting variables and editing arrays with AngularJS
upvote count: 1
tagged with: local-storage
has body: I'm building an app using AngularJS and LocalStorage. I've run into a problem that it's a tad too complex for me. I have a list of people, and the idea is to be able to add arrays of names. I choose X names, click add, creates an object in an array, it resets the list, and I can start over, choose X names, click add, etc. Here's how I create the temporary array that then I push into LocalStorage: HTML: {{staff.name}} {{staff.name}} Add passangers JS: $scope.paxlist = []; $scope.pushStaff = function (staff) { staff.chosen = true; $scope.paxlist.push(staff); console.log($scope.paxlist); }; $scope.unpushStaff = function (staff) { staff.chosen = false; var index=$scope.paxlist.indexOf(staff) $scope.paxlist.splice(index,1); console.log($scope.paxlist); } My problem is that I can create objects into the array, but when I add an object, the selected items of the list of names won't reset, so they will be pre-selected when adding the next object. At the same time, it will also stay linked to the last object added, so when I modify the selection, the last object will also get modified. This also messes with the possibility of adding an editing capability for each object of the array. I've created a Plnkr that illustrates the issue. If you could shed some light on the issue, that would be brilliant.
type: Question
has answer: http://stackoverflow.com/a/27587740
has comment: http://stackoverflow.com/comment/43599576
tagged with: javascript
has comment: http://stackoverflow.com/comment/43599574
tagged with: angular-local-storage
tagged with: arrays
answer count: 1
downvote count: 0
score: 1
accepted answer: http://stackoverflow.com/a/27587740

http://stackoverflow.com/q/27626098
has answer: http://stackoverflow.com/a/27626163
has title: Javascript - I have to use sleep function for run my function
has body: I use youtube data api. I run my code, in that. keyWordsearch() It's not working. Chrome console say "Uncaught TypeError: Cannot read property 'setApiKey' of undefined" But it is working strangely setTimeout(keyWordsearch, 1000); My all code <script src="<?php echo SITE_PUBLIC; ?>/bootstrap-3.2.0/dist/js/bootstrap.js"> What should i do? Thanks in advance
has comment: http://stackoverflow.com/comment/43672631
tagged with: youtube-javascript-api
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/27626163
score: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/27557936
downvote count: 1
has comment: http://stackoverflow.com/comment/43563962
upvote count: 31
has comment: http://stackoverflow.com/comment/43567240
has comment: http://stackoverflow.com/comment/65256933
accepted answer of: http://stackoverflow.com/q/27557624
has comment: http://stackoverflow.com/comment/83628763
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43563630
answers question: http://stackoverflow.com/q/27557624
has comment: http://stackoverflow.com/comment/101868259
has comment: http://stackoverflow.com/comment/101871387
has comment: http://stackoverflow.com/comment/43561475
has comment: http://stackoverflow.com/comment/43561747
score: 30
has body: Update: document.body.click will work in a browser, but for jsdom you need to manually create the event: document.body.addEventListener('click', function() { console.log('test'); }); var evt = document.createEvent("HTMLEvents"); evt.initEvent("click", false, true); document.body.dispatchEvent(evt) The above code is working for me in Jest and should work with "solo" jsdom as well. Autumn 2018 holiday update The tools around simulating events have gotten a great deal better. I've currently shifted my approach to use the excellent react-testing-library to render my components and dispatch events: import {render, fireEvent} from 'react-testing-library' test('example', () => { const handleClick = jest.fn() const {getByText} = render( Click Me ) fireEvent.click(getByText('Click Me')) expect(handleClick).toHaveBeenCalled() }) While I still believe in end to end tests with something like puppeteer or selenium (or cypress!) provide the highest level of confidence that something actually works, this provides a huge amount of value without polluting tests with manual event creation.
has comment: http://stackoverflow.com/comment/43564005
type: Answer
has comment: http://stackoverflow.com/comment/43562173

http://stackoverflow.com/comment/43675966
has text: I suggest switching then to Angular-UI since the accordion is already in it. If you're having trouble, just switch out the elements and the JS, which is what you need to do to get it working.
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27625642

http://stackoverflow.com/q/27623257
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/27623451
answer count: 4
has answer: http://stackoverflow.com/a/27624162
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27623451
possible better answer: http://stackoverflow.com/a/27623607
type: Question
has answer: http://stackoverflow.com/a/27623607
has body: I have a list on my website and I would like to add a mouseenter function so that two lines appear when the mouse moves over one item and disappear when the mouse leaves. I am able to make the lines appear and disappear, but when they do they move the list items up and down, which reduces functionality and is aesthetically unappealing. I would like to make the lines appear (one above and one below the SPAN) without displacing the elements in the list. Here is my code and a demonstration: http://jsfiddle.net/strw22fe/ script: $(document).ready(function(){ $("SPAN").mouseenter(function() { var line = "&lt;hr&gt;"; $("SPAN").eq(this.id-1).before(line); $("SPAN").eq(this.id-1).after(line); }); }); $(document).ready(function(){ $("SPAN").mouseleave(function() { $("hr").remove(); }); }); Note: I have applied this function to the span because I can control its width more easily than I can the width of an li.
tagged with: javascript
tagged with: jquery
has title: Using jQuery to add elements without displacing other elements
score: 0
has answer: http://stackoverflow.com/a/27623447

http://stackoverflow.com/a/27635622
accepted answer of: http://stackoverflow.com/q/27633569
upvote count: 2
type: AcceptedAnswer
has body: (1) Is there a better way than just dumping all the html code inside the this.$el.html function? That's really ugly. Yes. Just move the HTML code to a template. Mixing HTML with JavaScript is, as you say, ugly, and also error-prone. For instance, there are a couple of problems in your HTML markup, one being you have one within another . So, define a template using : Then, in your addPlayerView, use this template, like this: render: function () { var playerTemplate = document.getElementById('player-template').innerHTML; this.$el.html(_.template(playerTemplate)()); } (2) How do I attach functions to the HTML code inside the this.$el.html function? Is it just hardcoded in there? How do I pass the "addThePlayer(event)" function my player data? Define a property events in your view and attach a callback function for when you submit the form. events: { 'submit #myform': 'onAddPlayer' }, // onAddPlayer: function (event) { event.preventDefault(); // so that the form is not actually submitted. var $form = $(event.currentTarget); var data = $form.serialize(); // <-- this is where you have your player data. } (3) How to handle a click on the cancel button? Why your code 'cancel #myform': 'cancelAddPlayer' does not work while my identical code for submit does is because the latter is a standard jQuery event for when a form is submitted. There is no event called cancel. Therefore, you simply need to handle a click on the cancel button, and for that you use the following syntax: 'click #cancel-add': 'cancelPlayerAdd'. So, to wrap things up, your events property should look like this: events: { 'submit #myform': 'onPlayerAdd', 'click #cancel-add': 'cancelPlayerAdd' // <-- THIS. } Do not forget to define the function onCancelPlayerAdd! And the cancel button will be getting the identifier cancel-add: It would not hurt to get familiar with the events supported in jQuery.
has comment: http://stackoverflow.com/comment/43702985
has comment: http://stackoverflow.com/comment/43705765
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/27633569

http://stackoverflow.com/comment/43523464
score: 0
type: QuestionComment
has text: [Example that gets that information from the directions response and displays it on a google map](http://www.geocodezip.com/v3_directions_custom_iconsC.html)
type: Comment
comment on: http://stackoverflow.com/q/27547192

http://stackoverflow.com/a/27533088
answers question: http://stackoverflow.com/q/27533030
upvote count: 3
score: 3
has body: This should do it: src: ['/app/**/*.ts'],
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27533030
type: Answer

http://stackoverflow.com/comment/43690800
type: QuestionComment
comment on: http://stackoverflow.com/q/27635585
has text: It only happens on this specific page (not on the rest of my localhost) and I don't have any add-ons..
score: 0
type: Comment

http://stackoverflow.com/a/28093604
accepted answer of: http://stackoverflow.com/q/27622991
has comment: http://stackoverflow.com/comment/44723136
answers question: http://stackoverflow.com/q/27622991
type: Answer
has body: Here is solution (found it here): ... livereload: { options: { open: true, //base: [ // '.tmp', // '&lt;%= yeoman.app %&gt;' //], //middleware: function (connect) { // return [ // connect.static('.tmp'), // connect().use( // '/bower_components', // connect.static('./bower_components') // ), // connect.static(appConfig.app) // ]; //} middleware: function (connect, options) { var middlewares = []; //if (!Array.isArray(options.base)) { // options.base = [options.base]; //} // Setup the proxy middlewares.push(require('grunt-connect-proxy/lib/utils').proxyRequest); // Serve static files //options.base.forEach(function(base) { // middlewares.push(connect.static(base)); //}); middlewares.push(connect.static('.tmp')); middlewares.push( connect().use( '/bower_components', connect.static('./bower_components') ) ); middlewares.push(connect.static(appConfig.app)); return middlewares; } } }, ...
upvote count: 4
downvote count: 0
score: 4
type: AcceptedAnswer

http://stackoverflow.com/q/27573503
has title: link data from json with javascript
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/43572732
answer count: 0
type: UnansweredQuestion
has body: Hello this the link to my old question https://stackoverflow.com/questions/27567791/get-more-data-from-json-with-javascript? i have put some work in my code and i get some of the result that i need but I am still have some problems. 1- when i click in the link it plays the loop again and give me all books from all the categories . 2-the first Category Id is not showing in the links. here the code for my HTML. this my JavaScript code : Updated $(document).ready(function () { var output = $('#placeList'); $.ajax({ url: 'http://www.example.com/book/showcat.php', dataType: 'jsonp', jsonp: 'jsoncallback', timeout: 5000, success: function(data, status){ var setid=[]; $.each(data, function(i,item){ var place = ' '+item.catname+ ' '; output.append(place); }); } }); function getcategery(cataid){ $(".new").click(function (){ $.ajax({ url: 'http://www.example.com/book/catid.php?caid='+cataid, dataType: 'jsonp', jsonp: 'jsoncallback', timeout: 5000, success: function(data, status){ $.each(data, function(i,item){ var cate = ' '+ item.bookname +' '; output.append(cate); }); }, error: function(){ output.text('There was an error loading the data.'); } }); }); } }); now it shows me the categories when the page loads and if you click in Category(1) in the list it shows you the Category(2) and Category(3) books .it should only show you the Category that you click on it books .
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/43572626
has comment: http://stackoverflow.com/comment/43581568
type: Question

http://stackoverflow.com/comment/43466504
comment on: http://stackoverflow.com/q/27518156
score: 0
has text: thanks for your reply, and yes im new. im using c# winforms and would like to display a countdown timer thats on a website on my winform.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43657076
has text: i will get `.parent` isn't with that?
type: Comment
comment on: http://stackoverflow.com/a/27618016
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43689660
has text: Removed the async defer and nothing I'm afraid.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27635192

http://stackoverflow.com/comment/43727994
type: QuestionComment
comment on: http://stackoverflow.com/q/27597575
score: 0
has text: I don't think unglyfying a server side code is a good thing to do. NodeJS is pretty anoying for debugging so don't make your life harder (and if you don't work alone you will make the life of your team harder) I don't see why you are protecting a server side code from reverse engineering.
type: Comment

http://stackoverflow.com/comment/43413668
type: AnswerComment
score: 0
type: Comment
has text: The way `d.x` is accumulated is probably not right. Instead of using `d.x += d3.event.dx`, use `d.x = mouse[0]` and (`d.y = mouse[1]`). Get mouse position using `var mouse = d3.mouse(this.parentNode);` @reko
comment on: http://stackoverflow.com/a/27489931

http://stackoverflow.com/q/27530675
score: 1
accepted answer: http://stackoverflow.com/a/27530841
upvote count: 1
type: Question
has body: I am attempting to install the node.js module 'javascripting' (source code can be found: https://github.com/sethvincent/javascripting) and have been unable to install it as a global variable to run through the terminal. After installing node.js I attempted to install javascripting with the line: npm install --global javascripting While it is my understand that this should work, it only downloads the module but does not set it as a global variable to be run in terminal. The error I receive when attempting to run it as a global variable is "/usr/bin/env: node: No such file or directory". After receiving this error I attempted to move the module to /usr/bin/env from the directory it installed in (usr/local/lib/node_modules/javascripting). Unfortunately, I was not able to move the files because /usr/bin/env is not a directory, rather it seems to be some sort of executable java file (usr/bin is a directory). I am a bit lost and would love some advice on either how to install the module as a working global variable or whether there is another way to run the module without installing it as a global variable.
tagged with: javascript
tagged with: ubuntu
linked to: http://stackoverflow.com/q/19352976
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/43490067
tagged with: github
has answer: http://stackoverflow.com/a/27530841
favorite count: 0
tagged with: linux
has title: Trouble installing a module as a global variable -- /usr/bin/env not a directory
has comment: http://stackoverflow.com/comment/43490461
tagged with: node.js
type: AnsweredQuestion

http://stackoverflow.com/a/27584056
downvote count: 0
has comment: http://stackoverflow.com/comment/43592802
score: 1
accepted answer of: http://stackoverflow.com/q/27584042
answers question: http://stackoverflow.com/q/27584042
upvote count: 1
type: AcceptedAnswer
has body: You can use .find() or a context parameter in the jQuery function. $('.button').hover(function () { confirm("http://domain.com/thing?id=" + $(".id", this).text()); }); $('.button').hover(function () { confirm("http://domain.com/thing?id=" + $(this).find('.id').text()); });
type: Answer

http://stackoverflow.com/q/27611870
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27611979
has comment: http://stackoverflow.com/comment/43656644
has body: Hello can someone explain me this. This code has no problem but if you uncomment the requestAnimationFrame, I get Error: Cannot set property 'apple' of undefined var food = function () { this.makaroni = 5; this.fruits = { apple:1, banana:3 }; } food.prototype = { change: function () { this.makaroni = 10; this.fruits.apple = 5; //requestAnimationFrame(this.change); } } var food1 = new food(); food1.change(); What don't I understand here =). And the problem is only with the apple, makaroni has no problem. I really don't get it =).
possible better answer: http://stackoverflow.com/a/27612261
has comment: http://stackoverflow.com/comment/43646120
favorite count: 0
has comment: http://stackoverflow.com/comment/43646290
has answer: http://stackoverflow.com/a/27612261
upvote count: 2
has comment: http://stackoverflow.com/comment/43646164
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27611979
has title: Object oriented javascript and requestAnimationFrame
type: Question
answer count: 2
score: 2
tagged with: requestanimationframe
downvote count: 0

http://stackoverflow.com/q/27591901
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/43607558
favorite count: 0
has body: I have this line in my code: de: (_.max(data, (product) -&gt; product.prices.de )).price.de I want firstly to check that the product.prices is defined, if it is defined return product.prices.de otherwise return 0. In javascript I would write something like this: angular.isDefined(product.prices) ? product.prices.de : 0 but when I am trying the same thing in coffeescript the coffeelinter is not accepting it. Any hints? Is there difference between coffeescript and javascript in the use of query operator? Edit: I could write de: (_.max(data, (product) -&gt; product.prices?.de )).prices.de but in that case if product.prices does not exists the function returns null and not 0
has comment: http://stackoverflow.com/comment/43607737
has answer: http://stackoverflow.com/a/27592003
has comment: http://stackoverflow.com/comment/43607640
has comment: http://stackoverflow.com/comment/43607744
has comment: http://stackoverflow.com/comment/43607636
type: AnsweredQuestion
tagged with: coffeescript
type: Question
has comment: http://stackoverflow.com/comment/43607664
has title: Difference between ternary (question mark operator) in coffeescript and in javascript?
has comment: http://stackoverflow.com/comment/43607601
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/27592003
upvote count: 1

http://stackoverflow.com/comment/43688937
score: 0
has text: You should wrap ` ` in ` ` section
type: Comment
comment on: http://stackoverflow.com/q/27634703
type: QuestionComment

http://stackoverflow.com/comment/43568119
has text: Push the JSON values into an array in the order you want them. Then reference the array instead of the JSON in the view.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27571385

http://stackoverflow.com/a/27512364
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27512244
has body: Assuming step2 and step3 are functions returning a promise what is the problem with: step1.then(function() { if( opt ) { return step2(); } else { return step3(); } }) .then(step4); EDIT Your first example step1.then(opt &amp;&amp; step2).then(step3); would look like this: step1.then(function() { if( opt ) { return step2(); } }) .then(step3); If you don't return anything then undefined is returned. For every returned value that is not a Promise, the library will create a Promise that is resolved with that value. Promises/A+: The then Method: promise2 = promise1.then(onFulfilled, onRejected); If either onFulfilled or onRejected returns a value x, run the Promise Resolution Procedure Resolve(promise2, x).
has comment: http://stackoverflow.com/comment/43456350
answers question: http://stackoverflow.com/q/27512244
type: Answer
has comment: http://stackoverflow.com/comment/43456083
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/43455114
has comment: http://stackoverflow.com/comment/43456137
has comment: http://stackoverflow.com/comment/43454964
has comment: http://stackoverflow.com/comment/43456184
upvote count: 2
has comment: http://stackoverflow.com/comment/43455296

settimeout
tags question: http://stackoverflow.com/q/27518156
tags question: http://stackoverflow.com/q/27579017
tags question: http://stackoverflow.com/q/27585816
tags question: http://stackoverflow.com/q/27511060
tags question: http://stackoverflow.com/q/27576560
tags question: http://stackoverflow.com/q/27521287
tags question: http://stackoverflow.com/q/27532989
tags question: http://stackoverflow.com/q/27515048
type: Tag
tags question: http://stackoverflow.com/q/27534615
tags question: http://stackoverflow.com/q/27511184
tag name: settimeout
tags question: http://stackoverflow.com/q/27569611

http://stackoverflow.com/comment/43678480
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27619780
has text: No, it's fine as long as it's not a content script. I'll write an answer.
score: 0

http://stackoverflow.com/comment/43511162
type: Comment
comment on: http://stackoverflow.com/a/27536445
has text: Ok, perhaps I should look into scaling instead. It seems that the implementation of zoom differs greatly depending on your browser. However I have these questions: First, the following example should demonstrate that zoom and scale differs: http://jsfiddle.net/hy5vup49/5/ (only works in chrome). Zooming affects layout, while scaling does not. How would I recreate this behavior with transforms in a robust way? Second, scaling does not work on MY page in IE. What could be the cause of this?
score: 0
type: AnswerComment

http://stackoverflow.com/q/27636161
has answer: http://stackoverflow.com/a/27636458
tagged with: javascript
tagged with: jquery
tagged with: arraylist
answer count: 3
has comment: http://stackoverflow.com/comment/43691714
accepted answer: http://stackoverflow.com/a/27636998
favorite count: 0
has comment: http://stackoverflow.com/comment/43692142
has comment: http://stackoverflow.com/comment/43691570
has title: How to remove repeated object values from arrayList Jquery/Javascript
possible better answer: http://stackoverflow.com/a/27636769
has answer: http://stackoverflow.com/a/27636769
has body: I have an arrayList with objects in it. I need to show only one value, if objects has the same values. For Example : [ {a:0,b:1},{a:1,b:0},{a:0,b:1} ] From the above example I need to show only the first and second object and skip the third object because it is as same as first object. Note : the objects in array can be infinite, I cant hardcode the index value. Can anyone help me out the generic solution. This is what I have tried: points = []; newarr = []; locArray = [ {a:0,b:1},{a:1,b:0},{a:0,b:1} ]; if(abc!=null){ removeDuplicateCoordinates(); $.each(newarr,function(key,val){ points.push([val.a,val.b]); }); } function removeDuplicateCoordinates(){ var arr = locArray; $.each(arr, function(index,item){ if(searchForItem(newarr,item)&lt;0){ newarr.push(item); } }); } function searchForItem(array, item){ var i, j, current; for(i = 0; i &lt; array.length; ++i){ if(item.length === array[i].length){ current = array[i]; for(j = 0; j &lt; item.length &amp;&amp; item[j] === current[j]; ++j); if(j === item.length) return i; } } return -1; }
type: AnsweredQuestion
score: 3
upvote count: 3
has answer: http://stackoverflow.com/a/27636998
type: Question
downvote count: 0

http://stackoverflow.com/a/27640287
downvote count: 0
has body: If your code is supposed to send an email when a cell in the F5:F12 range is edited and contains only "☁" or "☀", then your code should look something like this: function onEdit(e){ try{ if( e.range.getRowIndex() &gt;= 5 &amp;&amp; e.range.getRowIndex() &lt;= 12 &amp;&amp; e.range.getColumnIndex() == 6 ){ if(e.range.getValue().charCodeAt(0) == 9729){ MailApp.sendEmail('user1...@myemail.com', 'My Subject', 'My Message:'); }else if(e.range.getValue().charCodeAt(0) == 9728){ MailApp.sendEmail('user2...@myemail.com', 'My Subject', 'My Message:'); } } }catch(error){ Logger.log(error); } } 9729 and 9728 are the decimal Unicode values for "☁" and "☀" respectively. Your code had a number of fatal syntax errors. I think you would probably benefit from studying a basic JavaScript tutorial.
has comment: http://stackoverflow.com/comment/43700286
type: Answer
has comment: http://stackoverflow.com/comment/43703927
score: 1
has comment: http://stackoverflow.com/comment/43709111
upvote count: 1
answers question: http://stackoverflow.com/q/27631440

http://stackoverflow.com/q/27590399
has answer: http://stackoverflow.com/a/27591850
score: 2
type: AnsweredQuestion
upvote count: 2
accepted answer: http://stackoverflow.com/a/27591521
type: Question
tagged with: qt
has title: QtWebKit bridge: call JavaScript functions
tagged with: pyside
tagged with: qwebkit
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I am writing a hybrid application with HTML interface and Python code. I can access Python functions via a shared object: pythonPart.py: class BO(QObject): def __init__(self, parent=None): super(BO, self).__init__(parent) @Slot(str) def doStuff(self, txt): print(txt) bridgeObj = BO() # init stuff and frame... frame.addToJavaScriptWindowObject( 'pyBridge', bridgeObj ) frame.evaluateJavaScript('alert("Alert from Python")') frame.evaluateJavaScript('testMe()') frame.evaluateJavaScript('alert("Starting test");testMe();alert("Test over")') jsPart.js: function testMe() { alert('js function testMe called'); } pyBridge.doStuff("bla"); testMe(); Calling Python functions from JS works, as does calling testMe from JS. Calling "standard" JS functions like alert from Python works, too. The last two Python lines won't: evaluateJavaScript("testMe()") doesn't do anything at all. The last line executes the first alert and won't continue after that. EDIT: I already tried having some time.sleep() between loading and calling the evaluateJavaScript and I'm loading the webpage from the local machine.
tagged with: python
possible better answer: http://stackoverflow.com/a/27591850
has answer: http://stackoverflow.com/a/27591521

http://stackoverflow.com/comment/43625197
type: AnswerComment
has text: Hi. I want same things on marker click not on button click.
type: Comment
comment on: http://stackoverflow.com/a/27601156
score: 0

http://stackoverflow.com/comment/43631468
comment on: http://stackoverflow.com/q/27604689
score: 0
has text: `array should contain new line after each third element.`?!?!
type: Comment
type: QuestionComment

vbscript
tags question: http://stackoverflow.com/q/27602059
type: Tag
tag name: vbscript
tags question: http://stackoverflow.com/q/27536819

http://stackoverflow.com/comment/43549852
score: 0
type: Comment
type: QuestionComment
has text: This will be help full to you http://www.thecssninja.com/demo/css_tree/
comment on: http://stackoverflow.com/q/27562043

http://stackoverflow.com/comment/43548903
type: QuestionComment
comment on: http://stackoverflow.com/q/27561456
score: 0
has text: dan it's not working if i use end tag
type: Comment

http://stackoverflow.com/comment/43658521
type: QuestionComment
score: 0
has text: Maybe, you don't have a /scripts/ directory in the screenshot above...
comment on: http://stackoverflow.com/q/27617523
type: Comment

http://stackoverflow.com/comment/43441208
score: 1
comment on: http://stackoverflow.com/q/27505591
type: Comment
type: QuestionComment
has text: Your HTML doesn't show any element with the fontmodal class. Could you write a fiddle ?

http://stackoverflow.com/comment/43613938
type: Comment
type: QuestionComment
has text: have no idea what you are asking for. Please explain expected UI in more detail. It actually sounds like functionality already available in select2
comment on: http://stackoverflow.com/q/27594960
score: 0

http://stackoverflow.com/comment/43651594
comment on: http://stackoverflow.com/q/27614951
has text: This is the LayzyTreegrid,the check function works fine,but it can not expanded all by default. http://jsfiddle.net/qqvrsgon/4/
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43684415
score: 0
comment on: http://stackoverflow.com/q/27631714
has text: How about resetting pagination or giving a false value. https://datatables.net/reference/api/ajax.reload%28%29
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27553015
has body: I have the same situation as the following two posts: Angular ui-router, scroll to next step on state change and Angular ui-router change state on scroll TL;DR I have multiple sections on one page where I want the user to scroll to when clicking on a link. I get the scroll to function to work but it seems to scroll to random positions, except on the first click. I also use templatecache (html2js) for my views. I have the following routing: $urlRouterProvider.otherwise("/"); var views = { "viewAbout": {templateUrl: "app/views/about/about.tpl.html"}, "viewMeetups": {templateUrl: "app/views/meetup/meetup.tpl.html"}, "viewNextMeetup": {templateUrl: "app/views/meetup/next-meetup.tpl.html"}, "viewSponsors": {templateUrl: "app/views/sponsors/sponsors.tpl.html"}, "viewContactUs": {templateUrl: "app/views/contact-us/contact-us.tpl.html"}, "viewFooter": {templateUrl: "app/views/footer/footer.tpl.html"} }; $stateProvider .state('home', { url: "/", views: views }) .state('about', { url: "/about", views: views, onEnter: function () { $('#scrollme').animate({ scrollTop: $("#about").offset().top }, 2000); } }) .state('meetups', { url: "/meetups", views: views, onEnter: function () { $('#scrollme').animate({ scrollTop: $("#meetups").offset().top }, 2000); } }) And the following menu: About Meetups Sponsors Contact us Anyone could help me out with this ?
downvote count: 0
answer count: 0
score: 1
tagged with: scroll
type: Question
tagged with: angular-ui-router
tagged with: javascript
linked to: http://stackoverflow.com/q/25120829
upvote count: 1
has title: Angularjs ui router Scroll To state change with templatecache
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/q/27604446
type: Question
tagged with: canvas
tagged with: javascript
tagged with: createjs
score: 0
accepted answer: http://stackoverflow.com/a/27614201
has body: I am using a tool container for different functions. What I want to know is how to create a hoover for my eraser button when is active and when inactive. Here are some bits of code if is helping. //loader this.manifest = [ {src:'images/brush.png', id:'brush', link: 'tool'}, {src:'images/eraser.png', id:'eraser', link: 'tool'}, {src:'images/clear.png', id:'clear', link: 'tool'} ]; //eraser tool - Here is setting the position of button. var eraser = new createjs.Bitmap(app.loader.getResult('eraser')); eraser.name = 'eraser'; eraser.x = brush.x + 90; eraser.y = brush.y; eraser.addEventListener('click', this.eraserHandler); this.toolsContainer.addChild(eraser); // eraser handler function eraserHandler: function(){ console.log("erase"); app.erase = 1 - app.erase; },
has title: How to create a hover button on canvas?
answer count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27614201

http://stackoverflow.com/comment/43555471
type: Comment
score: 0
comment on: http://stackoverflow.com/a/27565147
has text: @Anonymous are there more types of inputs?Can you add them too
type: AnswerComment

http://stackoverflow.com/a/27533916
accepted answer of: http://stackoverflow.com/q/27533730
score: 7
has comment: http://stackoverflow.com/comment/43497533
answers question: http://stackoverflow.com/q/27533730
has comment: http://stackoverflow.com/comment/43496705
upvote count: 7
has comment: http://stackoverflow.com/comment/43496839
has comment: http://stackoverflow.com/comment/43496753
has comment: http://stackoverflow.com/comment/43496662
type: AcceptedAnswer
downvote count: 0
has body: Node-mysql version >2.5 is not out yet. Node-mysql is on version 0.4.1. I suspect you are looking for just the regular mysql npm module. Mysql on npm is on version 2.5.4. Try using this instead: "mysql": "&gt;=2.5.0" If you go to this page: https://github.com/felixge/node-mysql . They say in the install instructions to use npm install mysql. This might be a bit confusing since their github page is node-mysql. Alternatively instead of adding this manually to the dependency you could go ahead and do the following: npm install mysql --save This will only install the most up to date one locally (Not globally, if you wanted to install it globally you could add the -g flag, but since you don't need that dont!).
has comment: http://stackoverflow.com/comment/43497187
type: Answer

http://stackoverflow.com/a/27531921
accepted answer of: http://stackoverflow.com/q/27531890
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27531890
upvote count: 3
has comment: http://stackoverflow.com/comment/43492878
type: Answer
has body: The jQuery function .text() returns a string. You are comparing a string with a number with this code: stockAmount == 0 So type conversion will need to be done. The == operator does that automatically, but the === operator will fail as it does not do type conversion. From the MDN documentation regarding ==: The equality operator converts the operands if they are not of the same type, then applies strict comparison. If either operand is a number or a boolean, the operands are converted to numbers if possible; else if either operand is a string, the string operand is converted to a number if possible. If both operands are objects, then JavaScript compares internal references which are equal when operands refer to the same object in memory. And ===: The identity operator returns true if the operands are strictly equal (see above) with no type conversion. If you wanted to use the === operator, you could first parse the element text to an integer using code similar to the following: var stockAmount = parseInt($("#stock").text(), 10); if (stockAmount === 0){ //... }
downvote count: 0
has comment: http://stackoverflow.com/comment/43492856
score: 3

debugging
tags question: http://stackoverflow.com/q/27551623
tags question: http://stackoverflow.com/q/27484303
tag name: debugging
type: Tag
tags question: http://stackoverflow.com/q/27508409
tags question: http://stackoverflow.com/q/27524183
tags question: http://stackoverflow.com/q/27591627

http://stackoverflow.com/comment/43460104
comment on: http://stackoverflow.com/q/27512641
type: Comment
has text: Is your motivation more based on look and feel (sophistication) or on technical issues (the header does not shink/expand as expected)?
score: 0
type: QuestionComment

http://stackoverflow.com/a/27616551
type: Answer
score: 1
upvote count: 1
has body: This format looks like PHP's serialize() function. There's an NPM Package to parse those. If you don't want to add another dependency, and assuming CodeIgniter's cookie scheme won't change much, you can do something as simple as cookies.ci_session.match(/s:32:"([a-z0-9]{32})"/)[1] Which finds the occurrence of s:32:"(??)" where ?? is 32 alphanumeric characters. The [1] is because match() returns an array of matches, [0] is the entire match (s:32:"(??)") and [1] is the first capture group (enclosed in brackets), namely ??, which is what you want.
answers question: http://stackoverflow.com/q/27615087
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27615087
downvote count: 0

http://stackoverflow.com/comment/43525494
comment on: http://stackoverflow.com/q/27549655
has text: Can you make something like a fiddle?
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/q/27570025
has body: I'm newbie to protractor framework, and I've been trying for a while to figure out how to get the outerHTML/InnerHTML/getText() (child elements) so that I can test if an element is rendered onto a view. Heads up, we've an ng-grid and I'm trying to look up in its first column to see if it contains an img element also check if it contains an attribute i.e. src=res/someImg.png. Here is what I got html ... ... test it('should render an icon in agent list', function () { var row = element.all(by.repeater('row in renderedRows')).get(3); expect(row).not.toEqual(null); //pass expect(row.element(by.css('img')).getAttribute('src').getText()).toMatch(/someImg.png/);//fail with null expect(row.element(by.css('span')).outerHTML).toBe(' '); //fails expect(row.element(by.css('i')).innerHTML).toBe(' '); //fails }); Can someone tell what am I doing wrong please?
has title: how to get an outerHTML, innerHTML, and getText() of an element
score: 20
answer count: 3
has answer: http://stackoverflow.com/a/61478387
tagged with: ng-grid
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/27575804
has comment: http://stackoverflow.com/comment/50634120
accepted answer: http://stackoverflow.com/a/27575804
possible better answer: http://stackoverflow.com/a/27571812
type: AnsweredQuestion
upvote count: 20
has answer: http://stackoverflow.com/a/27571812
downvote count: 0
type: Question
tagged with: testing
tagged with: protractor
tagged with: javascript

http://stackoverflow.com/comment/43607960
comment on: http://stackoverflow.com/q/27591905
type: Comment
type: QuestionComment
score: 0
has text: @dystroy Yeah I may do that. Thanks anyways guys!

http://stackoverflow.com/a/27509395
has body: If you need persistant storage accros page reloads, you will need to use cookies or local storage. You can do the following: if (!localStorage.getItem('reloaded_page_once')) { setTimeout(function() { localStorage.setItem('reloaded_page_once', true) window.location=window.location; }, 20000); } Checkout this stackoverflow answer to learn more about setting/reading cookies.
has comment: http://stackoverflow.com/comment/43448743
has comment: http://stackoverflow.com/comment/43449019
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27509302

http://stackoverflow.com/comment/43676396
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27627565
has text: Can the whole script section be echo-ed using php. Because this code section will be inside <?php ?>
score: 0

http://stackoverflow.com/comment/43659607
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27618864
has text: YES! Oh god, it helped. Thank you! Really. Would you mind to explain why I need that in this setup? The other buttons work fine without it.
score: 0

http://stackoverflow.com/q/27539336
has body: I tried to have text box which User can come to website select date in calendar only on Wed, Thur, Fri . The date time that user can select must be friday of current week only Higlight of current day. How to print out value of variable in jquery? Here is my coding but i can do only select Friday. $(function() { var today = new Date(); today.setHours(0, 0, 0, 0); //if only wed thru fri if (today.getDay() == 3 || today.getDay() == 4 || today.getDay() == 5) { $("#dateInput").datepicker(); } else { //document.write("Pls come again on wed,thru,fri"); $("#dateInput").error() { alert("Pls come again on frid"); } } });
score: 0
type: Question
tagged with: javascript
has title: jQuery Calendar Application how?
has answer: http://stackoverflow.com/a/27539405
answer count: 1
tagged with: jquery
type: UnansweredQuestion

http://stackoverflow.com/a/27523756
has comment: http://stackoverflow.com/comment/43478062
accepted answer of: http://stackoverflow.com/q/27523588
has comment: http://stackoverflow.com/comment/43479554
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43476981
has comment: http://stackoverflow.com/comment/43476636
has comment: http://stackoverflow.com/comment/43478222
answers question: http://stackoverflow.com/q/27523588
upvote count: 2
has comment: http://stackoverflow.com/comment/43478354
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/43477895
has comment: http://stackoverflow.com/comment/43479035
has body: Your approach is not very reliable, since you can't be 100% sure that data has already loaded when you try to access it in the second controller. Instead of assigning user data to variable always invoke getUserDetails method, which returns a promise. Then you just need to cache loaded data to avoid duplicated requests. angular.module('app') .factory('userDetailService', function($q, $http) { var userData; function getUserDetails(userId) { if (userId) { return userData ? $q.when(userData) : $http.get("/users/" + userId).success(function(data) { userData = data; return userData; }); } } return { getUserDetails: getUserDetails } }); Wrapping userData into $q.when creates a promise object, which resolves immediately. This is what you need, because service API is now consistent - you always deal with promises. The usage in both controller then would be: userDetailService.getUserDetails(userId).then(function(data) { $scope.userData = data; });

http://stackoverflow.com/q/27615634
tagged with: javascript
answer count: 2
possible better answer: http://stackoverflow.com/a/27615674
has answer: http://stackoverflow.com/a/27615674
tagged with: jquery
has answer: http://stackoverflow.com/a/27615652
favorite count: 0
has title: How to use javascript conditions correctly?
type: AnsweredQuestion
score: 0
accepted answer: http://stackoverflow.com/a/27615652
upvote count: 1
downvote count: 1
type: Question
has body: I have a slider function, which works perfectly fine with moveRight() but I am stuck, and can use it only once. I decided to use a condition to disable the move function and change the attributes of links on the second click. My code below: $('#control_next').click(function () { var used = 0; if (used == 0) { moveRight(); used = 1; } else if (used == 1) { $('.control_next').attr('href', '#business-events'); $('.control_next').addClass( "url" ); } alert(used); });

http://stackoverflow.com/comment/43573199
type: QuestionComment
comment on: http://stackoverflow.com/q/27573476
has text: ok, but i think you are using the wrong tool. good luck!
score: 0
type: Comment

http://stackoverflow.com/q/27551479
has answer: http://stackoverflow.com/a/27553155
linked to: http://stackoverflow.com/q/23056224
has title: Angular controller is not instantiated after minification
upvote count: 1
downvote count: 1
type: Question
linked to: http://stackoverflow.com/q/20866931
has body: My original source code looks like this: (function(angular) { 'use strict'; /* @ngInject */ function config($stateProvider) { $stateProvider .state('bar.foo', { url: '/foo', templateUrl: 'foo-view.html', controller: 'FooController', controllerAs: 'vm' }); } /* @ngInject */ function FooController() { window.alert('foo'); } angular .module('my.foo', []) .config(config) .controller('FooController', FooController); }(angular)); It works fine this way. Then I minify it using ngAnnotate and UglifyJS, and get this code (formatted to easier reading): function (a) { 'use strict'; function b(a) { a.state('bar.foo', { url: '/foo', templateUrl: 'foo-view.html', controller: 'FooController', controllerAs: 'vm' }) } function c() { window.alert('foo') } b.$inject = ['$stateProvider'], a.module('my.foo', []) .config(b) .controller('FooController', c) }(angular), And, it does not work. When I go to the state bar.foo the controller do not get called. Others controllers and router states works fine. This one seems to get muted, the code inside the controller function is not called. The console do not show any errors. I do not know what to do or where to look at. The entire JavaScript is bigger and is a concatenation of several small files. The single minified JS file has controllers before and after this one that works fine. Debugging the minified file shows that the JavaScript is issuing the module definition calls to AngularJS, so the module, config and controller methods of Angular are called. What should I search or check in the code? Am I missing something?
has comment: http://stackoverflow.com/comment/43529316
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/43529452
answer count: 1
tagged with: minify
has comment: http://stackoverflow.com/comment/43529674
favorite count: 0
has comment: http://stackoverflow.com/comment/43529754
tagged with: angularjs
linked to: http://stackoverflow.com/q/27232551
type: UnansweredQuestion

http://stackoverflow.com/a/27536612
has comment: http://stackoverflow.com/comment/43501906
type: Answer
upvote count: 6
has comment: http://stackoverflow.com/comment/43502087
answers question: http://stackoverflow.com/q/27514404
has comment: http://stackoverflow.com/comment/43502484
score: 6
has body: Your observation is correct. When the UI thread is blocked, network calls aren't dispatched. Even worse, Chrome has the best behavior of the bunch. When a worker makes a XHR request when the UI thread is blocked: Chrome: all requests are queued. The browser will not actually issue the requests until the UI thread unblocks. On the plus side, the worker thread is still free to run. Firefox: new XMLHttpRequest() blocks until the UI thread unblocks. IE: xhr.open() blocks until the UI thread unblocks. While Chrome fortunately does not cause a worker thread to stop and wait (even though it won't get any data), Firefox and IE will cause a worker thread to wait on the UI thread when you try to make a XHR request. There is no way to work around this; you're beholden to the browser to make requests on your behalf. I haven't done any testing with WebSockets, but they may deliver events even if the UI thread is blocked. At worst, the received messages would queue until the UI thread unblocks.
accepted answer of: http://stackoverflow.com/q/27514404
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/27546772
has title: How to add google maps api key correctly
upvote count: 1
tagged with: api-key
has body: Actually I'm running my geocoding function on my website with this code: $url = 'http://maps.googleapis.com/maps/api/geocode/json?address=' . $address . '&amp;sensor=false'; This works perfect but it runs only with a few addresses per day. To get more lat/lng coordinates per day I have created an geocoding API key. But I don't know how to add that key inside my existing code that it will run properly. I've tried this but it doesn't work: $url = 'http://maps.googleapis.com/maps/api/geocode/json?key=MY_GEOCODE_API_KEYaddress=' . $address . '&amp;sensor=false';
tagged with: http://stackoverflow.com/tag/json
type: Question
tagged with: google-maps
answer count: 1
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/27548222
favorite count: 0
type: UnansweredQuestion
downvote count: 2

http://stackoverflow.com/a/27559243
has body: I would try this [pseudocode] given i = 0, word = "" for phono in phonograms //loop over all phonograms word += phonograms[phono] //and try to assemble the current syllable if word === syllable[i] //we may have found a sullable i++ word = "" continue if not the syllable[i] starts with word //if not syllable starts with word, //then we have a phono that //breaks our rules phonos = phonograms[phono].split("") //so let's split that into characters for j in phonos phonograms.splice(phono++, 0, phonos[j]) //and insert to //the list of phonograms i++
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27558911

http://stackoverflow.com/a/60024990
answers question: http://stackoverflow.com/q/27489964
type: Answer
has body: 1st method: while (true) { // code } 2nd method: function forever() { // code forever() } forever()
score: 0

http://stackoverflow.com/comment/43583824
has text: use https://github.com/yeoman/grunt-usemin
comment on: http://stackoverflow.com/q/27577893
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27527321
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/27526680
type: Answer
answers question: http://stackoverflow.com/q/27526680
upvote count: 1
has comment: http://stackoverflow.com/comment/43501346
has body: But is this error message from the XmlHttpRequest or from the Browser? XMLHttpRequest is part of the browser. So "yes". If you meant "Is the error from the server or from the browser" then it is from the browser. The server can't know if you are making a cross origin request or not. With the above code I would expect (as seen in https://stackoverflow.com/a/16931075/343475) to see an error message in the alert box, but all I get is 0. The status code would provide information about the resource on the foreign origin (it would tell you if the resource existed and if the user of the browser had permission to access it) so it is suppressed by the Same Origin Policy.
type: AcceptedAnswer

http://stackoverflow.com/q/27572964
has answer: http://stackoverflow.com/a/52331547
has title: node.js simple web server request life cycle
tagged with: node.js
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/43572557
downvote count: 1
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/27573016
has comment: http://stackoverflow.com/comment/43571407
tagged with: javascript
has comment: http://stackoverflow.com/comment/43572326
favorite count: 0
accepted answer: http://stackoverflow.com/a/27573016
possible better answer: http://stackoverflow.com/a/52331547
upvote count: 2
has body: I'm new to server side Javascript so to Node.js. Well, Here I'm trying some very simple thing such as var http = require("http"); http.createServer(function(request, response) { console.log("node server"); response.writeHead(200, {"Content-Type": "text/plain"}); response.write("Hello World"); response.end(); }).listen(2424); As I see the result whenever I send a request to the server console.log("node server"); executes twice. Why it's happening, how node (or http.createServer) serves a request?

http://stackoverflow.com/a/27513610
type: Answer
has comment: http://stackoverflow.com/comment/43457991
has comment: http://stackoverflow.com/comment/43458183
accepted answer of: http://stackoverflow.com/q/27513075
score: 0
answers question: http://stackoverflow.com/q/27513075
has comment: http://stackoverflow.com/comment/43457706
type: AcceptedAnswer
has body: You need to setup getTTL to accept its own callback function: getTTL = (key, done = ()-&gt;) -&gt; client.ttl key, (err, reply) -&gt; if err throw err else if reply in [-1, -2] done "No TTL or key doesn't exist." else done reply Then in your hubot script robot.respond /what is the TTL for (.*)/i, (msg) -&gt; getTTL msg.match[1] msg.send Edit: To answer you're tl;dr edit: you cannot get the return value out of the callback. That value only exists in the context of the callback function. You can always assign that value to some kind of global variable from inside the callback function, but then you'll never know when that global value got assigned its value.

http://stackoverflow.com/q/27550416
upvote count: 2
has body: I am performing this request: $.get("getdataforcharts", {q: ["test"]}, function (response) { alert( "success" ); }).done(function() { alert( "second success" ); }); The URL I expect should be: /testpage/getdataforcharts?q=test However I get this: /testpage/getdataforcharts?q%5B%5D=test How do I remove the "%5B%5D"?
type: Question
tagged with: javascript
answer count: 2
has title: Ajax request contains odd data in the URL
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/27550461
type: UnansweredQuestion
score: 2
has answer: http://stackoverflow.com/a/27550462

http://stackoverflow.com/comment/43498511
has text: Couldn't he just wrap his event handler in the document.ready block?
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27534992

http://stackoverflow.com/a/27611145
downvote count: 0
type: AcceptedAnswer
has body: I think this a code you want -- you have to loop through tr not td $(document).ready(function(){ $('table tr').each(function(){ if($(this).find('td').html() == ''){ $(this).find('td').html("No Incidents recorded!"); } }); }); DEMO
has comment: http://stackoverflow.com/comment/43645072
accepted answer of: http://stackoverflow.com/q/27610616
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/27610616
score: 1

http://stackoverflow.com/q/27569703
score: 0
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/43565048
downvote count: 1
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/27569761
tagged with: asp.net
favorite count: 0
has answer: http://stackoverflow.com/a/27573223
has answer: http://stackoverflow.com/a/27569761
has comment: http://stackoverflow.com/comment/43571927
has title: Trigger onserverclick without physically clicking button
type: Question
accepted answer: http://stackoverflow.com/a/27573223
has body: I want to abstract the file-browse dialog from the user and only show one button for upload, like so: &lt;input type="button" id="uploadFile" value="Upload" /&gt; &lt;div class="hidden"&gt; &lt;form id="uploadFileForm" method="post" enctype="multipart/form-data"&gt; &lt;input type="file" id="browseForFiles" /&gt; &lt;input type="button" id="submitFile" value="Submit File" runat="server" onclick="return true;" onserverclick="SubmitFile_Click" /&gt; &lt;/form&gt; &lt;/div&gt; $("#uploadFile").click(function () { // trigger hidden file dialog $("#browseForFiles").click(); // works }); $("#browseForFiles").change(function () { $("#submitFile").click(); // doesn't work; doesn't call onserverclick }); Physically clicking on the submitFile button works fine and calls the server-side method, but since I want the actual server-side button to be hidden, the user can't physically click it. How do you fake a physical click in jQuery/Javascript? EDIT : I also tried: &lt;input type="submit" id="submitFile" value="Submit File" runat="server" onclick="return true;" onserverclick="SubmitFile_Click" /&gt; $("#uploadFileForm").submit(); // doesn't work either

http://stackoverflow.com/comment/43599192
type: Comment
has text: For now I can reference you to [this](http://api.jquery.com/ready/). But I have something better explaining the process. I just have to find it again...
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27579098

http://stackoverflow.com/comment/43591339
type: QuestionComment
has text: `iframe` has it's own `window`, you want that load event. `$('iframe').on('load...'`
score: 1
comment on: http://stackoverflow.com/q/27583398
type: Comment

http://stackoverflow.com/comment/43478631
has text: please share your html code also
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27525023
type: QuestionComment

http://stackoverflow.com/a/28851804
type: Answer
answers question: http://stackoverflow.com/q/27555909
score: 0
has body: iOS7 had problems with viewport units. Especially with viewport height. CanIUse.com also lists this buggy behaviour: partial support in iOS7 is due to buggy behavior of the "vh" unit (see workaround). http://caniuse.com/#search=viewport%20units iOS8 supports viewport units perfectly fine but there is a filed bug in modernizr about it. Modernizr says iOS8 Safari does not support vhunits even though it does. But it seems there are problems to fix this right now.

http://stackoverflow.com/comment/43576871
has text: I did look into user settings. I don't think I've excluded my visits because I see this message on the settings "Your visits are not ignored by Piwik (the Piwik ignore cookie was not found in your browser)."
comment on: http://stackoverflow.com/a/27575709
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27556451
tagged with: controller
has comment: http://stackoverflow.com/comment/43540134
upvote count: 0
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/43539910
has comment: http://stackoverflow.com/comment/43539395
has comment: http://stackoverflow.com/comment/43539922
accepted answer: http://stackoverflow.com/a/27556622
tagged with: angularjs
has comment: http://stackoverflow.com/comment/43540387
has comment: http://stackoverflow.com/comment/43540047
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27556622
downvote count: 1
has body: Background In angular 1.3 'You can no longer invoke .bind, .call or .apply on a function in angular expressions.'. In angular 1.2 I was using methods on a controller/directive's scope to generate text / templates for objects in a mixed collection. Example of the Problem For example, this example controller contains an array containing objects of varying (non-uniform) types and structures: app.controller('flavourText', function ($scope) { $scope.exampleData = { data: [ {dataType: 'a', message: 'Type A String'}, {dataType: 'b', numbers: [1,2,3,]}, {dataType: 'a', message: 'Another Type A String'}, {dataType: 'b', numbers: [1,3,3,7]}, {dataType: 'a', message: 'Last Type A String'} ] }; ); Approaches I figured out two ways to generate flavour text / switch templates: Method 1: Using ng-if This is an example of type A: {{item.message}} This is an example of type B: {{item.numbers}} This method gets really messy/inefficient in the HTML, so I started using a second method. Method 2: Using functions in expressions In the controller: $scope.generateFlavourText = function (item){ if (item.dataType === 'a') { return "This is an example of type A: " + item.message; } else if (item.dataType === 'b'){ return "This is an example of type B: " + item.numbers; } }; In the template: {{generateFlavourText(item)}} The Questions Directive Formatters/Parsers Am I supposed to be using directives and ngModel formatters/parsers for this? Is there a better way? Should I just give in and just revert back to method 1, which gets really messy and confusing (+ expensive unless bindonce is used).
type: Question
has title: Migrating to Angular 1.3 - Generating view Flavour Text based on model data - best approach?
tagged with: javascript
score: -1

visual-studio-2012
tags question: http://stackoverflow.com/q/27629653
type: Tag
tag name: visual-studio-2012

http://stackoverflow.com/comment/43636760
type: QuestionComment
has text: Would it not be easier to extract JSON out of your HTML (using jQuery), manipulate with JSON and then produce the HTML of it? I wouldn't go for a generic solution as you'll likely end with a monstrous framework in the end.
comment on: http://stackoverflow.com/q/27606014
score: 0
type: Comment

http://stackoverflow.com/comment/43579954
comment on: http://stackoverflow.com/a/27577358
type: Comment
score: 0
has text: Side note: `self.find("button#Details0").hide()` suggest you have a button in each table row with `id="Details0"` which is invalid html. Suggest you use a class name for the button instead to avoid duplicate ID's
type: AnswerComment

http://stackoverflow.com/q/27490295
has comment: http://stackoverflow.com/comment/43412232
linked to: http://stackoverflow.com/q/27488485
tagged with: module
has comment: http://stackoverflow.com/comment/43412369
type: AnsweredQuestion
score: 2
has body: (Followup to this answer) Please can someone confirm that the following syntax is still valid in ES6? module "javascripts/bar" { export function Bar() {} } I am thinking about the scenario where I use concatenation. Yes I know HTTP2 will make concatenation moot, but I would like to concatenate my modules today. If this is not valid, how should I construct my modules so that they remain valid in the same file?
upvote count: 2
has answer: http://stackoverflow.com/a/27490981
type: Question
has comment: http://stackoverflow.com/comment/43412496
tagged with: javascript
has comment: http://stackoverflow.com/comment/43413409
tagged with: ecmascript-6
has comment: http://stackoverflow.com/comment/43412378
has comment: http://stackoverflow.com/comment/43412506
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/43412837
has comment: http://stackoverflow.com/comment/43413008
has title: Current ES6 module syntax
favorite count: 0
has comment: http://stackoverflow.com/comment/43412712
has comment: http://stackoverflow.com/comment/43412795
accepted answer: http://stackoverflow.com/a/27490981
has comment: http://stackoverflow.com/comment/43412354

google-oauth
type: Tag
tags question: http://stackoverflow.com/q/27545921
tag name: google-oauth

http://stackoverflow.com/q/27614471
tagged with: angularjs
tagged with: angularjs-ng-route
has answer: http://stackoverflow.com/a/27614523
has body: In all the angularjs tutorials I am gone through. Modules are created as follows var newApp = angular.module('articles', []); or var routerApp = angular.module('routerApp', ['ui.router']); I started my project with meanjs boiler plate code and controller starts as follows angular.module('articles').controller('ArticlesController', ['$scope', '$stateParams', '$location', 'Authentication', 'Articles', function($scope, $stateParams, $location, Authentication, Articles) { $scope.authentication = Authentication; ..... ..... ]); When I change it to var newApp = angular.module('articles',[]); newApp.controller('ArticlesController', ['$scope', '$stateParams', '$location', 'Authentication', 'Articles', function($scope, $stateParams, $location, Authentication, Articles) { $scope.authentication = Authentication; ..... ..... ]); All the routes of articles stops working. If I want to include a new component into the module, how do I do it. I want to add angularFileUpload in to my module. Sample code in angularfileupload is angular .module('app', ['angularFileUpload']) .controller('AppController', function($scope, FileUploader) { $scope.uploader = new FileUploader(); }); How do I add ['angularFileUpload'] if the module is already registered? Edit: articles.client.modules.js 'use strict'; // Use Applicaion configuration module to register a new module ApplicationConfiguration.registerModule('articles');
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/27614579
answer count: 2
accepted answer: http://stackoverflow.com/a/27614523
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27614579
score: 0
tagged with: ngroute
has title: How to create module in angularjs

http://stackoverflow.com/comment/43707806
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27628315
score: 0
has text: There is not enough information here. Are you doing anything to set the range of `yScale`? Maybe there's an issue there. Also, what do you get from `console.log(yScale.domain())` after you set that? If it's not the domain you expect, then either `data_etl` has unexpected large values, or there is/are some string(s) in there.

http://stackoverflow.com/comment/43566824
type: Comment
type: QuestionComment
has text: try to read & understand the code and to know what everything does and why. then you can change whatever you want. maybe read some of my other answers or check the scrips in my bio... those explain js and my functions in a better way.
comment on: http://stackoverflow.com/q/27480049
score: 0

http://stackoverflow.com/comment/43607200
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27591732
score: 0
has text: Where do you get id from?

http://stackoverflow.com/comment/43419679
has text: Cross domain origin error maybe ? Use JSONP.
score: 1
comment on: http://stackoverflow.com/q/27493987
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43450807
has text: Have you tried this? ` `
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27510299

http://stackoverflow.com/comment/43477098
has text: `trList[i]` is perfectly valid in this instance (even if it's an object), it just does not return a jQuery object.
comment on: http://stackoverflow.com/a/27524011
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/43620324
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27592686
type: Comment
has text: Works for me, example: http://jsfiddle.net/89aeduo6/8/ (I used arial there, but same applies for other fonts). If you have other theme, there might also be some other styles applied to glyphs, use some developer tools to identify differences. If you still will have problem, try to reproduce it on fiddle.

http://stackoverflow.com/q/27564700
has answer: http://stackoverflow.com/a/27564859
has answer: http://stackoverflow.com/a/27565039
has comment: http://stackoverflow.com/comment/43554718
has answer: http://stackoverflow.com/a/27565441
upvote count: 1
has answer: http://stackoverflow.com/a/27567008
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43558939
has answer: http://stackoverflow.com/a/27564866
accepted answer: http://stackoverflow.com/a/27565441
score: 1
possible better answer: http://stackoverflow.com/a/27564771
has answer: http://stackoverflow.com/a/27564771
has comment: http://stackoverflow.com/comment/43554646
type: Question
answer count: 8
has answer: http://stackoverflow.com/a/27564895
has comment: http://stackoverflow.com/comment/43555126
downvote count: 0
tagged with: javascript
has body: I want to change the extinsion of .doc to .txt. alert(myvar) show empty alert. enter code here Try it
tagged with: ajax
has title: split function in java script
has comment: http://stackoverflow.com/comment/43555261
favorite count: 0
has comment: http://stackoverflow.com/comment/43554722
has answer: http://stackoverflow.com/a/27742610

http://stackoverflow.com/comment/43444359
comment on: http://stackoverflow.com/a/27506914
score: 0
type: Comment
has text: Yes you're right if it's in the same directory then it should be ok as it is. However see my other comments, there's loads of syntax errors in your code that should come up in the JS console and PHP error logs / display. Fix these first.
type: AnswerComment

http://stackoverflow.com/q/27529589
tagged with: google-apps-script
answer count: 2
tagged with: google-apps
tagged with: javascript
score: 4
favorite count: 0
tagged with: http://stackoverflow.com/tag/csv
accepted answer: http://stackoverflow.com/a/27529625
tagged with: regex
upvote count: 4
possible better answer: http://stackoverflow.com/a/27529699
has answer: http://stackoverflow.com/a/27529699
downvote count: 0
has answer: http://stackoverflow.com/a/27529625
type: Question
type: AnsweredQuestion
has body: I am writing a google apps script that pulls the content from a CSV file in a gmail attachment. I need to split the csv data into several an array (with each row being it's own array). I've got all that down. My problem is this: One of the values in the CSV is a "City, St" format. So when I split the array using string.split(',') I end up with an extra "column." My idea to fix this was to back up and kill that comma in the initial string. Here's the relevant portion of my code: var attachments = msgs[i][j].getAttachments(); for (var k = 0; k &lt; attachments.length; k++) { var attachmentData = attachments[k].getDataAsString(); var regex = new RegExp('\,\s(?:[A-Z]{2}\")', 'gi'); attachmentData.replace(regex,' '); ... So what I'm trying to do is just find a comma, followed by a space, followed by exactly two letters, then a quotation mark. I want to just replace the comma with a space. I've also tried var regex = new RegExp('(\,\s)([A-Z]{2}\")', 'gi'); attachmentData.replace(regex,$2); with no luck. Here's a random sample of the (very long) data string I'm running this on: Voice,Incoming,(###) ###-####,(###) ###-####,,,,"Dallas, TX",12/12/2014,06:26 PM,Phone Call,Voicemail,00:00:27,$0.000,-,, ,Incoming,(###) ###-####,,###,,,"Dallas, TX",12/12/2014,06:26 PM,Phone Call,Voicemail,00:00 Can anyone see what I'm not seeing as to why this isn't working? (Or have any ideas of a better way to do this?)
has title: regex replace not replacing (google apps script)

http://stackoverflow.com/comment/43587216
type: Comment
comment on: http://stackoverflow.com/a/27554267
has text: Ok so this is working nearly close to perfect. I've updated my pen to use the toggleClass version with your updates, and to show you kind of how these buttons will be used. The problem now it, that when you hover on any of the button (class="button-container") it flips any and all buttons with that class. Is there a way to only target the one you are hovering on?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43747882
score: 0
type: AnswerComment
has text: Ha, guess we'll both have to look into that then. I'll try and implement both your solutions, see how they differ and most importantly try to understand where I went wrong. I have a feeling I don't know some crucial 'rules' of Flux; then again, the documentation on it seems to be so sparse.
comment on: http://stackoverflow.com/a/27666235
type: Comment

http://stackoverflow.com/comment/43638490
comment on: http://stackoverflow.com/a/27607941
type: AnswerComment
score: 0
has text: In the posted code why/how "MyClass.prototype.foo()" letting me to print message on console "I am in foo".
type: Comment

http://stackoverflow.com/comment/43550132
type: AnswerComment
has text: Its compatible if you use it this way: { -o-opacity:0.5; -moz-opacity:0.5; -webkit-opacity:0.5; -ms-opacity:0.5; }
type: Comment
comment on: http://stackoverflow.com/a/27561387
score: 1

http://stackoverflow.com/a/27516788
type: Answer
has comment: http://stackoverflow.com/comment/43506497
has comment: http://stackoverflow.com/comment/43507023
answers question: http://stackoverflow.com/q/27516308
has comment: http://stackoverflow.com/comment/43486616
upvote count: 1
downvote count: 1
has body: avoid using filters if at all possible. Filters can cause huge performance issues in large applications. That said, since you put the function on the scope, you can use it in markup: published:
has comment: http://stackoverflow.com/comment/43505458
has comment: http://stackoverflow.com/comment/43463993
has comment: http://stackoverflow.com/comment/43505515
score: 0

http://stackoverflow.com/comment/43469106
type: Comment
comment on: http://stackoverflow.com/q/27519289
has text: That's ok. This is just to force your http to https using JS. My question is - when I replaced the url from https to http, it is refreshing the url in a loop.
type: QuestionComment
score: 0

http://stackoverflow.com/q/27524031
has title: How to query objects by attribute in IndexedDB?
accepted answer: http://stackoverflow.com/a/27526712
answer count: 1
downvote count: 0
favorite count: 0
score: 6
upvote count: 6
type: AnsweredQuestion
tagged with: database-cursor
tagged with: indexeddb
has answer: http://stackoverflow.com/a/27526712
type: Question
has body: I have an IndexedDB object store, which stores user-objects of the following structure: { id: 1, name: "Peter", role: "admin", password: "someHash"} The object store is created as follows: request.onupgradeneeded = function(event){ var db = request.result; var objectStore = db.createObjectStore("users", { keyPath: "id", autoIncrement: true }); objectStore.createIndex("uniqueNameIndex", "name", { unique: true }); objectStore.createIndex("roleIndex", "role", { unique: false }); }; I know how to retrieve an object by its key (the id), and I am also able to iterate over all objects using a cursor. Here's a working demo. What I wanna do now is to get all users who have a specific role - eg. retrieve all admins, without iterating the whole object store. How can I do that?
tagged with: javascript

http://stackoverflow.com/a/45938087
answers question: http://stackoverflow.com/q/27631714
upvote count: 1
has body: This is how I do it fetch every 2 seconds setTimeout(function(){ $('#table').DataTable().ajax.reload(); },2000); no need to destroy just reload table.
downvote count: 0
score: 1
type: Answer

http://stackoverflow.com/comment/43398214
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27482772
has text: Assuming this URL works when you simply browse to it? Have you tried to check network activity with firebug, chrome F12, IE8+ "development tools" or similar?
type: Comment

http://stackoverflow.com/comment/43538463
has text: @GitaarLAB, Ahhhhh, I see what you mean. Editing answer now.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27554760
type: Comment

http://stackoverflow.com/q/27552653
type: AnsweredQuestion
duplicate of: http://stackoverflow.com/q/23667086
has answer: http://stackoverflow.com/a/27552882
has title: Get address out of a Reverse Geocoded callback
type: Question
tagged with: google-maps
tagged with: javascript
tagged with: reverse-geocoding
tagged with: google-maps-api-3
score: 0
accepted answer: http://stackoverflow.com/a/27552882
answer count: 1
tagged with: callback
linked to: http://stackoverflow.com/q/23667086
has body: I've been working a small javascript project that take coordinates stored in a xml/kml file and displays them in a custom Google Maps application. I have everything working the way I want except for the reverse geocoding. I'm able to display the formatted address when I run the code inside the callback function but I can't find a way to store the address for later use (for dynamic events such as display the full address when a user clicks on the marker). Is there any way to store the address inside the callback function and then get it later? Whenever I try, it says that address is undefined. See below: var address; var geocoder = new google.maps.Geocoder(); var latlng = new google.maps.LatLng(lat, lng); geocoder.geocode({'latLng': latlng}, function (results, status) { if (status == google.maps.GeocoderStatus.OK) { if (results[1]) { address = results[1].formatted_address; alert(address); // this displays correctly } else { alert("No results found"); } } else { alert("Geocoder failed due to: " + status);} } ); alert(address); // this displays 'undefined'

http://stackoverflow.com/comment/43683154
type: Comment
has text: ok, `effect` is doing that from jQueryUI. you would need to use `animate` if you remove jQueryUI
comment on: http://stackoverflow.com/a/27631301
type: AnswerComment
score: 0

http://stackoverflow.com/q/27635735
answer count: 2
has answer: http://stackoverflow.com/a/27636238
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/27635925
has title: Function with memoization, how not to evaluate each time?
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
has body: I'm writing a simple jQuery function that will swap some HTML elements for others when on certain viewports. The idea is simple: &lt;div data-swap-for="#element" data-swap-on="phone"&gt;&lt;/div&gt; Will insert the element with id #element after that line when the current media query corresponds to phone (the details about how that is done are not important). My function looks like this: jq.fn.swapElements = function(viewport) { var targets = jq('[data-swap-for][data-swap-on='+viewport+']'); if (targets.length) { console.log('Found elements to swap for', viewport); } else { console.log('Found no elements to swap for', viewport); } return { on: function() { console.log('Should swap elements for', viewport); }, off: function() { console.log('Should restore elements', viewport); } } }; So whenever the screen enters the phone layout, it calls: jq().swapElements('phone').on(); Which should do all the DOM transformations, and when it exits the phone layout, it calls: jq().swapElements('phone').off(); Which should restore them. My problem is that these two are creating a new evaluation of the var targets... part, resulting in: As the output in the console, and I need this function to cache or remember the variables that it uses, so that the resulting console output is: &gt; Found elements to swap for phone &gt; Should swap elements for phone That is, only evaluating the elements and saving the variables once per each call (a different viewport value should call for a new evaluation). I've been looking into higher order functions and memoization, but I'm confused about how to apply this in this case and specially to a jQuery function. Please help? Thanks
type: Question

http://stackoverflow.com/comment/43693224
score: 0
type: Comment
type: QuestionComment
has text: What is given when you output POST? Also, where do you declare xmlhttp outside of the if statements?
comment on: http://stackoverflow.com/q/27637140

http://stackoverflow.com/comment/43628755
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27603265
score: 0
has text: what is your question then?

http://stackoverflow.com/comment/43690442
has text: Why can't you use the width height of the wrapper span of the letter?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27635443

http://stackoverflow.com/a/27607882
answers question: http://stackoverflow.com/q/27607544
has comment: http://stackoverflow.com/comment/43637966
accepted answer of: http://stackoverflow.com/q/27607544
type: AcceptedAnswer
downvote count: 0
has body: Try this statement: <animate dur="1" attributeName="opacity" from="1" to="0" begin="move.end" repeatCount="0" fill="freeze" /> Your Example edited http://jsfiddle.net/whbjw6g2/ <g> /*Step1.Animation*/ <animate id="startid" dur="1.5s" attributeName="y" values="155; 135;" begin="indefinite" /> /*Step2.Animation*/ <animate id="move" dur="1.5s" attributeName="y" values="5; 20;" begin="startid.begin" /> /*Step3. Doesn`t working !!!*/ <animate dur=".1" attributeName="opacity" from="1" to="0" begin="move.end" repeatCount="0" fill="freeze" /> </g>
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/a/27501748
score: 1
type: Answer
answers question: http://stackoverflow.com/q/27501629
has body: You can use a for in loop: var myFd = new FormData(); for(var key in dataObj) { myFd.append(key, dataObj[key]); } jsFiddle Demo
upvote count: 1
downvote count: 0

http://stackoverflow.com/a/32968687
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27563657
downvote count: 0
type: Answer
has body: Please try this. $('#calendar').fullCalendar('destroy'); $('#calendar').fullCalendar({ header: { left: 'prev,next today', center: 'title',strong text right: 'month,basicWeek,basicDay' //,agendaWeek,agendaDay }, defaultView: 'month', editable: true, events: myevents });

http://stackoverflow.com/a/27958189
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/27595773
answers question: http://stackoverflow.com/q/27595773
type: AcceptedAnswer
has body: I found the answer to my problem is: $scope.proposal2.sites[0][0].catf[2] Thanks to everyone

http://stackoverflow.com/comment/43441726
comment on: http://stackoverflow.com/q/27505740
score: 0
type: Comment
type: QuestionComment
has text: As folks are pointing out, it's an array. Those brackets are what say array. You'll notice your data part has two brackets right after it, meaning double array.

http://stackoverflow.com/a/27491903
has body: In html, replace the functions in ng-show by an object property : ng-show="option.voted", for example. and update option.voted in createVote function. (adapt this with userId etc.)
accepted answer of: http://stackoverflow.com/q/27491608
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27491608
type: Answer

http://stackoverflow.com/comment/43416527
type: QuestionComment
has text: recursion ends because get_facet_pivot_sunburst returns data.
comment on: http://stackoverflow.com/q/27492432
score: 0
type: Comment

http://stackoverflow.com/comment/43620888
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27598865
has text: by load event do you mean the [ajax function load](http://api.jquery.com/load/) or an onload event like window.onload? If you mean the ajax function then you can use the promise that is returned from that call to setup a callback to execute once the load is complete
score: 2

http://stackoverflow.com/q/27530229
has answer: http://stackoverflow.com/a/27530393
has body: I would like to include an inner element in an outer element using knockout, is this in any way possible? HTML: &lt;div id='id1'&gt; &lt;span data-bind="text: outerText()"&gt;&lt;/span&gt; &lt;div id='id2'&gt; &lt;span data-bind="text: innerText()"&gt;&lt;/span&gt; &lt;/div&gt; &lt;/div&gt; JavaScript: var outerModel = function() { this.outerText = ko.observable("Outer Model - Outer Text"); }; ko.applyBindings(new outerModel(), document.getElementById('id1')); var innerModel = function() { this.innerText = ko.observable("Inner Model - Inner Text"); }; ko.applyBindings(new innerModel(), document.getElementById('id2')); This gives me an error: ReferenceError: Unable to process binding "text: function(){return innerText() }" Message: 'innerText' is undefined I understand the error as the outer model doesn't contain the innertext and therefore the thing crashes. My questions is if there is a proper/better/correct way of having an inner element and getting it to work in knockout. Note: I do not want the innerModel to be a member/child of the outerModel as they are just in this HTML layout for layout purposes but aren't necessarily related. Any help appreciated. Thanks
tagged with: knockout.js
downvote count: 0
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27530393
favorite count: 0
score: 2
type: AnsweredQuestion
upvote count: 2
has title: knockout JS inner and outer bindings
type: Question

http://stackoverflow.com/a/27577768
score: 0
type: Answer
has body: I think something like this should work, although I don't do jQuery anymore, just vanilla Javascript. I'm sure you can figure out how to do it in jQuery. this is your iframe code: Click me now your main page code: I've tested this code and it seems to work, although when I did the test I used google.com, which actually alerted me a cross domain error: Load denied by X-Frame-Options: https://www.google.com/ does not permit cross-origin framing. I am not sure if this is relevant for you, as it looks like your doing everything on your own domain, just a heads up.
answers question: http://stackoverflow.com/q/27577133

http://stackoverflow.com/q/27561008
has comment: http://stackoverflow.com/comment/43548165
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/38666214
linked to: http://stackoverflow.com/q/22894306
has comment: http://stackoverflow.com/comment/43548137
has answer: http://stackoverflow.com/a/27606454
score: 2
has title: Kendo UI and AngularJS Multiselect: Difference between ng-model and k-ng-model
downvote count: 0
type: Question
tagged with: javascript
upvote count: 2
tagged with: kendo-ui
has body: I have two Kendo multi-select widgets in my template. The first one is like so: The second one is like so: Now here is my problem. Initially when I used the attribute to set k-ng-model in both multi-selects, the initial options that I had set in my controller would disappear on clicking the multi-select. This was the same problem as described here. But as the solution there says, I removed the k-ng-model and replaced it with ng-model, and the second multi-select works perfectly. But when I remove the k-ng-model and replace it with ng-model in my first multi-select, there is no pre-populated data. If I keep the k-ng-model it shows the pre-populated values, but on clicking the multi-select, they disappear. What's happening here and how do I fix it?
answer count: 2
favorite count: 0

http://stackoverflow.com/a/27558499
has comment: http://stackoverflow.com/comment/43543205
downvote count: 0
answers question: http://stackoverflow.com/q/27558477
type: Answer
upvote count: 2
score: 2
has body: The point of using .apply here is that apparently the function arguments are in the array arguments. The equivalent code without .apply would be: this._store.addData(arguments[0], arguments[1], ..) Which is obviously troublesome if arguments is of unknown length. Passing this._store again is only a necessity, it's not the point of this code.

http://stackoverflow.com/q/27563400
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/27564085
type: Question
upvote count: 1
downvote count: 0
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/27564085
favorite count: 0
has title: How do I get an object from d3.data()?
tagged with: css
tagged with: d3.js
has body: I have a variable holding all my links data in a force directed graph var linkData = d3.selectAll(".link").data(); I have a for loop looping through this data to see if any of the edges have a certain value. If they have I wish to change the class of that edge to visible, if not then change it to hidden. But the thing I am confused with is say I get the edge I want at linkData[3]; how do I chose the actual link so I can change the CSS class, seen as the linkData is the data, how do I get the actual object?

gnu-make
type: Tag
tags question: http://stackoverflow.com/q/27629113
tag name: gnu-make

asp.net
tags question: http://stackoverflow.com/q/27631954
tags question: http://stackoverflow.com/q/27615572
tags question: http://stackoverflow.com/q/27572267
tags question: http://stackoverflow.com/q/27595703
tags question: http://stackoverflow.com/q/27619632
tags question: http://stackoverflow.com/q/27607808
tags question: http://stackoverflow.com/q/27596098
tags question: http://stackoverflow.com/q/27490678
tags question: http://stackoverflow.com/q/27531347
tags question: http://stackoverflow.com/q/27615371
tags question: http://stackoverflow.com/q/27500761
tags question: http://stackoverflow.com/q/27615388
tags question: http://stackoverflow.com/q/27624914
tags question: http://stackoverflow.com/q/27617956
tags question: http://stackoverflow.com/q/27619285
tags question: http://stackoverflow.com/q/27555846
tags question: http://stackoverflow.com/q/27502841
tags question: http://stackoverflow.com/q/27614462
tags question: http://stackoverflow.com/q/27499487
tags question: http://stackoverflow.com/q/27522326
tags question: http://stackoverflow.com/q/27559560
tags question: http://stackoverflow.com/q/27530346
tags question: http://stackoverflow.com/q/27596927
tags question: http://stackoverflow.com/q/27577149
tags question: http://stackoverflow.com/q/27501847
tags question: http://stackoverflow.com/q/27580943
tags question: http://stackoverflow.com/q/27484176
tags question: http://stackoverflow.com/q/27588060
tags question: http://stackoverflow.com/q/27600507
tags question: http://stackoverflow.com/q/27626168
tags question: http://stackoverflow.com/q/27494330
tags question: http://stackoverflow.com/q/27524220
tags question: http://stackoverflow.com/q/27529040
tags question: http://stackoverflow.com/q/27574977
tags question: http://stackoverflow.com/q/27566294
tags question: http://stackoverflow.com/q/27632648
tags question: http://stackoverflow.com/q/27486274
tags question: http://stackoverflow.com/q/27521594
tags question: http://stackoverflow.com/q/27607294
tags question: http://stackoverflow.com/q/27542143
tags question: http://stackoverflow.com/q/27637980
tags question: http://stackoverflow.com/q/27512659
tags question: http://stackoverflow.com/q/27525213
tags question: http://stackoverflow.com/q/27628946
tags question: http://stackoverflow.com/q/27569703
tags question: http://stackoverflow.com/q/27518133
tags question: http://stackoverflow.com/q/27565333
tags question: http://stackoverflow.com/q/27587074
tags question: http://stackoverflow.com/q/27534670
tags question: http://stackoverflow.com/q/27552200
tags question: http://stackoverflow.com/q/27553841
tags question: http://stackoverflow.com/q/27530621
tags question: http://stackoverflow.com/q/27610165
tags question: http://stackoverflow.com/q/27567276
tags question: http://stackoverflow.com/q/27569055
tags question: http://stackoverflow.com/q/27554026
tags question: http://stackoverflow.com/q/27532282
tags question: http://stackoverflow.com/q/27596811
tags question: http://stackoverflow.com/q/27530729
tags question: http://stackoverflow.com/q/27530488
tags question: http://stackoverflow.com/q/27491206
tags question: http://stackoverflow.com/q/27494515
tags question: http://stackoverflow.com/q/27611447
tags question: http://stackoverflow.com/q/27488545
tags question: http://stackoverflow.com/q/27519758
tags question: http://stackoverflow.com/q/27637866
tags question: http://stackoverflow.com/q/27625593
tags question: http://stackoverflow.com/q/27548275
tags question: http://stackoverflow.com/q/27552755
tags question: http://stackoverflow.com/q/27520150
tags question: http://stackoverflow.com/q/27605583
tags question: http://stackoverflow.com/q/27521796
tags question: http://stackoverflow.com/q/27575761
type: Tag
tags question: http://stackoverflow.com/q/27523030
tags question: http://stackoverflow.com/q/27487611
tags question: http://stackoverflow.com/q/27535791
tags question: http://stackoverflow.com/q/27499174
tags question: http://stackoverflow.com/q/27631887
tags question: http://stackoverflow.com/q/27579122

http://stackoverflow.com/q/27563954
has body: In my project, I use angularjs for a SPA application. How is the pattern or guideline to deal with unexpected values of js variables? For example, when the user pays, the can select "bank" or "card". In my JS function, I only manage these two values, but since it is the client side, they could inject any other value. In these cases, I would like to open a "internal error" page or something similar, but I am not sure if it is the best solution. Of course, final validation is done in the server, but I want to stop it as soon as possible. Which is the common pattern used in this cases?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43553785
upvote count: 1
downvote count: 1
type: Question
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27565717
answer count: 1
favorite count: 0
has title: How to deal with unexpected values in JavaScript running in the client side?
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/27598306
accepted answer: http://stackoverflow.com/a/27632427
favorite count: 0
has title: stacked bar chart legend issue jqplot
upvote count: 1
type: AnsweredQuestion
tagged with: jqplot
score: 1
type: Question
has body: I am facing an issue with the jqplot stacked bar chart legend , i want to do the placement of the legend in my own custom manner. But whatever changes i apply doesnt take effect. what i want is this but what i am getting in the legend is as follows Code snippet i am using var s1 = [2, 6, 7, 10]; var s2 = [7, 5, 3, 4]; var s3 = [14, 9, 3, 8]; var s4 = [14, 9, 3, 8]; plot3 = $.jqplot('graph_stacked', [s1, s2, s3,s4], { // Tell the plot to stack the bars. stackSeries: true, captureRightClick: true, seriesDefaults:{ renderer:$.jqplot.BarRenderer, rendererOptions: { // Put a 30 pixel margin between bars. barMargin: 35, // Highlight bars when mouse button pressed. // Disables default highlighting on mouse over. highlightMouseDown: true }, pointLabels: {show: true} }, axes: { xaxis: { renderer: $.jqplot.CategoryAxisRenderer }, yaxis: { // Don't pad out the bottom of the data range. By default, // axes scaled as if data extended 10% above and below the // actual range to prevent data points right on grid boundaries. // Don't want to do that here. padMin: 0 } }, legend:{ show:true, placement:'outside', rendererOptions: { numberRows: 2, numberColumns: 2 }, location:'s', marginTop: '1px', border:'none' } });
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27632427
answer count: 1

http://stackoverflow.com/a/27598336
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/43645803
answers question: http://stackoverflow.com/q/27588262
has body: The line io.to(client.id) will only work if that user has first joined a room with that same name. You need something like io.on('connection', function(socket){ socket.join('some room'); }); and then you can call io.to io.to('some room').emit('some event'):
has comment: http://stackoverflow.com/comment/43645740

http://stackoverflow.com/comment/43647695
score: 0
type: AnswerComment
type: Comment
has text: Reviewing the different approaches discussed - I think it's beginning to look like this might be one of your only options. Although this would be incredibly hacky, if there's a certain simple tag that you can expect to not be in the output you could use that. e.g ... . It ruins semantics, but would be an easy thing to find/replace both the start and end tag of.
comment on: http://stackoverflow.com/a/27599150

http://stackoverflow.com/a/27603975
score: 1
has body: The problem is the limit of your developer-console.. not your Code.. i have update your Code -> it append your text to a divcontainer... start 99 end 1 JavaScript: var word = "bottles"; var div = document.getElementById('tmp'); for (var count = 99; count &gt; 0; --count) { div = document.getElementById('tmp'); div.innerHTML = div.innerHTML + count + " " + word + " of beer on the wall&lt;br&gt;"; div.innerHTML = div.innerHTML + count + " " + word + " of beer,&lt;br&gt;"; div.innerHTML = div.innerHTML + "Take one down, pass it around,&lt;br&gt;"; } div.innerHTML = div.innerHTML + "No more " + word + " of beer on the wall."; HTML: &lt;div id="tmp"&gt; &lt;/div&gt; Answer after Comment: FireFox Type about:config into the address bar and select ok to the dragons. type this into the filter devtools.hud.loglimit.console there you can set your limit...
accepted answer of: http://stackoverflow.com/q/27603724
has comment: http://stackoverflow.com/comment/43630232
answers question: http://stackoverflow.com/q/27603724
type: AcceptedAnswer
upvote count: 1
type: Answer
downvote count: 0

http://stackoverflow.com/comment/43483896
type: AnswerComment
comment on: http://stackoverflow.com/a/27527688
type: Comment
has text: Do remember that Stack Overflow isn't a *do my work for me* website. Adding to that, OP claims that they've tried a couple of things, how can you be sure that they haven't tried this already?
score: 3

http://stackoverflow.com/q/27593465
has title: Switch page with onsen navigator and AngularJS
tagged with: angularjs
type: UnansweredQuestion
downvote count: 2
has answer: http://stackoverflow.com/a/27628645
has comment: http://stackoverflow.com/comment/43615251
has body: Is there any way to switch page, using ons-navigator without ons-template tag? For example, i have project like this: --app.js --index.html --page1.html When i describe page1.html into index.html, using ons-template (like this http://codepen.io/onsen/pen/yrhtv) everything is going OK. But if i'am trying to set path into myNavigator.pushPage('page1.html', { animation : 'slide' } ) without using ons-template my app doesn't work.
type: Question
upvote count: 0
score: -2
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: onsen-ui

http://stackoverflow.com/comment/43578207
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27576389
has text: Please show the relevant code here, not just as a fiddle link.
score: 0

http://stackoverflow.com/q/27533592
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43498203
tagged with: knockout.js
type: Question
has body: I am working on a web application using Asp.Net Mvc in which I used knockout Js to retrieve and send data to Html View by performing some operation on the data. For example I have the following data in my array named datainput Grade Type Volume Price A Buy 1000 10 A Sell 1200 10 B Sell 100 100 I am computing an array which such that when displaying on a html page it just takes one distinct value of Grade and groups the data under that grade like A Buy 1000 10 Sell 1200 10 B Sell 100 100 Used the above function as follows self.uniqueSelect = ko.dependentObservable(function () { var Transactiontypes = ko.utils.arrayMap(self.datainput(), function (item) { return item.Grade }) return ko.utils.arrayGetDistinctValues(Transactiontypes); }); I dont think there is an issue with above script, not sure though but I went ahead and used the data obtained from the above script and tried to populate it to html as follows The above script for some reasons display duplicate data like if a Grade is repeated two times as in the example data it displays the same data of that grade two times and if it repeated three times then displays it thrice and so on. I thought the error was with because it just loops the data depending on the number of similar grades. results on html page are like A Buy 1000 10 Sell 1200 10 B Sell 100 100 A Buy 1000 10 Sell 1200 10 In the above data Grade A is repeated twice so all the data with grade A is repeated twice where as grade B has just one entry and so, it happened only once screen of data I received No clue how to deal with this
tagged with: javascript
has comment: http://stackoverflow.com/comment/43526081
has answer: http://stackoverflow.com/a/27534555
score: 0
has comment: http://stackoverflow.com/comment/43497016
answer count: 1
has comment: http://stackoverflow.com/comment/43527095
has title: Incorrect values from a knockout observable array
has comment: http://stackoverflow.com/comment/43525637

http://stackoverflow.com/q/27578687
has answer: http://stackoverflow.com/a/27849150
upvote count: 2
tagged with: twitter-bootstrap
has body: I am using the responsive Bootstrap theme together with the application layout control in extlib and cannot really find any documentation about if it is possible to change the Bootstrap predefined classes. in the following example there is a titlebar with tabs using the predefined Bootstrap class "nav nav-tabs" In my case I do not want the "nav-tabs" class, instead I want the "nav-pills" class but I find no way to change this using the source editor, I know I can change classes using client side script but I am hoping there is a server side way to control this. &lt;xe:this.configuration&gt; &lt;xe:bootstrapResponsiveConfiguration legal="Copyright " placeBar="true" banner="true" fixedNavbar="fixed-bottom" footer="true" invertedNavbar="true" placeBarName="#{javascript:compositeData.Title}" rightColumnLabel="RightColumnLabel" titleBar="true" defaultNavigationPath="/tab1/link1" productLogo="/logo.gif" pageWidth="full"&gt; &lt;xe:this.titleBarTabs&gt; &lt;xe:pageTreeNode label="page1" page="/page1.xsp"&gt;&lt;/xe:pageTreeNode&gt; &lt;xe:pageTreeNode label="page2" page="/page2.xsp"&gt;&lt;/xe:pageTreeNode&gt; &lt;xe:pageTreeNode label="page3" page="/page3.xsp"&gt;&lt;/xe:pageTreeNode&gt; &lt;/xe:this.titleBarTabs&gt; &lt;/xe:bootstrapResponsiveConfiguration&gt; &lt;/xe:this.configuration&gt; I have tried to add a class like this but it does nothing to the html &lt;xe:this.titleBarTabs styleClass="nav nav-pills"&gt;
type: Question
tagged with: javascript
answer count: 2
possible better answer: http://stackoverflow.com/a/27849150
downvote count: 0
tagged with: xpages
favorite count: 0
has answer: http://stackoverflow.com/a/27585463
accepted answer: http://stackoverflow.com/a/27585463
has title: Is it possible to change the predefind Bootstrap classes set in the application layout control in ExtLib
has comment: http://stackoverflow.com/comment/43582378
tagged with: css
tagged with: http://stackoverflow.com/tag/xml
score: 2
type: AnsweredQuestion

http://stackoverflow.com/q/27497581
accepted answer: http://stackoverflow.com/a/27498162
has comment: http://stackoverflow.com/comment/43427302
type: Question
has comment: http://stackoverflow.com/comment/43427338
has title: Can't stop the spinner when using Bootstrap Ladda UI
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/27498162
tagged with: ajax
has comment: http://stackoverflow.com/comment/43441848
has body: I'm new to the web developing, i will try my best to explain this.I'm try to do a contact us form and the code below are pass the information from the form to the PHP file and PHP file will return the result of sending. So, i'm trying to add in the Ladda UI in the function, so when people click on the send message button, it will start the spinning and it will stop when php file returns the result.I manage to put the Ladda.bind( '.ladda-button'); in the index page so it will start spinning, but i couldn't work out how to stop this, unless i put a time limit on it. i'm lack the knowledge for reading the code below, please help me/explain how the code works and how should i fix this.! Thanks a lot.. https://github.com/msurguy/ladda-bootstrap $(function() { $("input,textarea").jqBootstrapValidation({ preventSubmit: true, submitError: function($form, event, errors) { // additional error messages or events }, submitSuccess: function($form, event) { event.preventDefault(); // prevent default submit behaviour // get values from FORM var name = $("input#name").val(); var email = $("input#email").val(); var phone = $("input#phone").val(); var message = $("textarea#message").val(); var firstName = name; // For Success/Failure Message // Check for white space in name for Success/Fail message if (firstName.indexOf(' ') &gt;= 0) { firstName = name.split(' ').slice(0, -1).join(' '); } $.ajax({ url: "././mail/contact_me.php", type: "POST", data: { name: name, phone: phone, email: email, message: message }, cache: false, success: function() { // Success message $('#success').html("&lt;div class='alert alert-success'&gt;"); $('#success &gt; .alert-success').html("&lt;button type='button' class='close' data-dismiss='alert' aria-hidden='true'&gt;&amp;times;") .append("&lt;/button&gt;"); $('#success &gt; .alert-success') .append("&lt;strong&gt;Your message has been sent. &lt;/strong&gt;"); $('#success &gt; .alert-success') .append('&lt;/div&gt;'); //clear all fields $('#contactForm').t…
has comment: http://stackoverflow.com/comment/43426552
type: AnsweredQuestion
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/43427185

http://stackoverflow.com/q/27538839
has comment: http://stackoverflow.com/comment/43575059
type: Question
has body: I'm currently having some issues trying to implement the magnific lightbox to my tumblr blog single photo post page. After reading around seems like my best shot was to try to integrate the magnific lightbox. Would much appreciate any help on this. Quick note: I have no experience in javascript language, mainly only css and html so would much appreciate if any answers could be as descriptive as possible, maybe even some step by step on where I am going wrong with this. I know it's a lot to ask but would much appreciate some beginners patience, thanks :) The HTML {block:Photo} &lt;div class="single-content"&gt; &lt;figure class="photo-post-wrapper"&gt; &lt;div class="photo-lightbox"&gt; &lt;a href="{PhotoURL-HighRes}"&gt;&lt;img data-interchange="{PhotoURL-500}, {PhotoURL-HighRes}"&gt;&lt;/a&gt; &lt;/div&gt; &lt;/figure&gt; &lt;/div&gt; {block:Caption}{Caption}{/block:Caption} {/block:Photo} The CSS .photo-lightbox a { -moz-cursor: zoom-in; -webkit-cursor: zoom-in; cursor: zoom-in; } .photo-lightbox a:hover { opacity: 0.7; } .photo-post-wrapper { margin: 2em 0; text-align: center; } .photo-post-wrapper img { width: 100%; height: auto; } /* Magnific Popup CSS Below (Just the copy and pasted css code provided by magnific its pretty long so i'll just add the link */ //The script I have added before &lt;/body&gt; and after &lt;/footer&gt; for magnific lightbox. {block:PermalinkPage} $(document).ready(function() { $('.photo-lightbox').magnificPopup({ delegate: 'a', type: 'image', tLoading: 'Loading image #%curr%...', mainClass: 'mfp-img-mobile', gallery: { enabled: true, navigateByImgClick: true, preload: [0,1] } }); }); Not sure if it's the issue but everything is inline, have not linked any external files. link to magnific css https://github.com/dimsemenov/Magnific-Popup/blob/master/dist/magnific-popup.css EDIT: Also just wanted to add, I am considering to create a pure css lightbox if this proves to be too problematic for me to setup, anybody know if pure css lightboxe…
linked to: http://stackoverflow.com/q/23406370
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43511806
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
type: UnansweredQuestion
has title: Implementing magnific lightbox to tumblr issue
upvote count: 1
tagged with: css
has answer: http://stackoverflow.com/a/27574768
score: 1

http://stackoverflow.com/a/27636093
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/124078207
upvote count: 1
answers question: http://stackoverflow.com/q/27635600
has body: Depending on which browsers you need to support, you can use MutationObserver: var observer = new MutationObserver( function (mutations) { alert('Label was changed!'); } ); observer.observe(document.querySelector('#frameGroupCode'), { childList: true }); Example jsFiddle
type: Answer

http://stackoverflow.com/comment/43554293
has text: Thank you...I just define as you told to the last of my JavaScript... but still not working... Can you explain me how...
type: Comment
comment on: http://stackoverflow.com/a/27562447
score: 0
type: AnswerComment

http://stackoverflow.com/q/27512548
has comment: http://stackoverflow.com/comment/43455399
has title: Javascript/JQuery - how to call a function on completion of previous function
has body: I'm using the following Javascript functions to display a gallery of pictures. function disp_pics(currObj,table){ if(currObj != "none"){ $("div .checkout2").removeClass("checkout2").addClass("checkout"); $(currObj).closest("div").removeClass("checkout").addClass("checkout2"); } function getData(table){ return $.ajax({ url: "newphoto_gallery_display.php", type: "GET", data: { table: table }, dataType: "html" }); } function display_result(data){ var dfd = new $.Deferred(); dfd.done(equalise); $("#ajaxoutput").html(data); setTimeout(function() { dfd.resolve(); }, 1000); } function equalise(){ var highestBox = 0; $('.photodisplay').each(function(){ if($(this).height() &gt; highestBox) { highestBox = $(this).height(); } }); $('.photodisplay').height(highestBox); } var promise=getData(table); promise.success(function (data) { promise.done(display_result(data)); }); }; The function getData fetches the picture data from a database. The function display_result then outputs that data to the div id "ajaxoutput". Pictures are displayed along with relevant data in boxes (HTML tables with a border). The function equalise is then called to make all the boxes of equal height. Without the time delay in the display_result the equalise function is called before all the pictures and data have been displayed and therefore messes up the display. Is there a way to do away with the time delay and only call equalise function when display_result has finished outputting all the data to the ajaxoutput div? I've tried all sorts of Deferred's and $.when.......then.... combinations, but haven't managed to achieve the desired result without delaying the script, which isn't ideal. Any suggestions would be welcome.
type: Question
has answer: http://stackoverflow.com/a/27515130
upvote count: 5
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/43457589
tagged with: jquery
answer count: 3
has answer: http://stackoverflow.com/a/27512707
favorite count: 0
tagged with: deferred
type: UnansweredQuestion
score: 5
has answer: http://stackoverflow.com/a/27513595

http://stackoverflow.com/a/27580095
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/27580017
has body: You can check for the length of the string. e.match_timer.length &gt; 0 or e.match_timer &gt; 0 if it is number.
upvote count: 2
type: Answer

http://stackoverflow.com/q/27552132
accepted answer: http://stackoverflow.com/a/27552225
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27552232
score: 1
has body: Im stuck on a problem and I actually don't know what I am searchig for. I thought filter was it but doesn't look like. Problem: I have a button with following content Group ... I have a second button, if I click it, I want to select the html content of the first button. $('#buttonTwo').on('click', function(){ var group = $('#myButton').html(); alert(group); }); At the moment it also selects the but I don't want it. Can anyone may help me to only select Group ... ?
possible better answer: http://stackoverflow.com/a/27552232
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27552225
has comment: http://stackoverflow.com/comment/43530576
favorite count: 0
has comment: http://stackoverflow.com/comment/43530507
has title: Select content (html) from button but not everyting

http://stackoverflow.com/comment/43440553
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27505256
score: 1
has text: Then you most likely did not include the _Parse_ library at the correct place.

http://stackoverflow.com/q/27479650
tagged with: css
has comment: http://stackoverflow.com/comment/43392854
type: UnansweredQuestion
has body: Thanks for any help you can offer me/point me in the write direction. I am not sure how to explain what is happening. I current have a page with an image background (the image is 4044,2160 so it is larger than you would view on a single screen (normally)). Currently when the page loads, the image is top-centered and is not on repeat and thus fills the background completely. However when inserting html code (CRUD) via javascript, etc. with the resulting page becoming larger than the original in the y direction, the background stops and does not fill the space below. http://postimg.org/image/jqzx0vuzr/ I am not sure what to do to fix it and most likely think it is a css problem. Below is code: HTML &lt;section id="index" class="index clinic"&gt; &lt;div id="x_container"&gt; Javascript insertion of code &lt;/div&gt; &lt;/section&gt; CSS .clinic{ width:100%; position:relative; background: url(../img/clinic.jpg) no-repeat top center; } .index{ height: 100%; padding: 0; } #index.index { padding:15% 0 0 0; } #xcrud_container{ width: 90%; margin: 0 auto; } It seems that the javascript does not matter as to what is inserted, (have tried lorem ipsum, etc.) But just to expand on what is inserted, the size of the x_container changes based on a state and this is altered by javascript. (Thus page is not reloaded and background size recalculated) I have currently tried a clearfix solution (but to no avail) as well as attempting repeat-y on the background image. Lastly I have attempted to manually create the page through directly saving the html code (i.e. it is not inserted by anything and is apart of the html code of the page) to the page and attempting to see if the background expands. It does not. The background fills the initial view area, however as soon as you scroll down the page, the white area reappears. Just to make sure this is known the background image is larger than area viewed, thus the white area should not be present. Any help would be greatly appreciated, as I ha…
has title: CSS Relative background not expanding on insertion of html code
has comment: http://stackoverflow.com/comment/43393151
has answer: http://stackoverflow.com/a/27479861
tagged with: background
type: Question
score: 0
answer count: 2
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27480116
tagged with: http://stackoverflow.com/tag/html

dom
tags question: http://stackoverflow.com/q/27501054
type: Tag
tags question: http://stackoverflow.com/q/27489343
tags question: http://stackoverflow.com/q/27598865
tags question: http://stackoverflow.com/q/27518211
tags question: http://stackoverflow.com/q/27528486
tags question: http://stackoverflow.com/q/27615056
tags question: http://stackoverflow.com/q/27580582
tags question: http://stackoverflow.com/q/27521755
tags question: http://stackoverflow.com/q/27550984
tags question: http://stackoverflow.com/q/27477641
tags question: http://stackoverflow.com/q/27590459
tags question: http://stackoverflow.com/q/27579735
tags question: http://stackoverflow.com/q/27496645
tags question: http://stackoverflow.com/q/27604699
tags question: http://stackoverflow.com/q/27546079
tags question: http://stackoverflow.com/q/27599684
tags question: http://stackoverflow.com/q/27501189
tags question: http://stackoverflow.com/q/27604903
tags question: http://stackoverflow.com/q/27529568
tags question: http://stackoverflow.com/q/27614636
tags question: http://stackoverflow.com/q/27504511
tags question: http://stackoverflow.com/q/27583871
tags question: http://stackoverflow.com/q/27514368
tags question: http://stackoverflow.com/q/27531115
tags question: http://stackoverflow.com/q/27638222
tags question: http://stackoverflow.com/q/27615663
tags question: http://stackoverflow.com/q/27557622
tags question: http://stackoverflow.com/q/27623946
tags question: http://stackoverflow.com/q/27604769
tags question: http://stackoverflow.com/q/27517704
tags question: http://stackoverflow.com/q/27478537
tags question: http://stackoverflow.com/q/27593311
tags question: http://stackoverflow.com/q/27493909
tags question: http://stackoverflow.com/q/27584750
tags question: http://stackoverflow.com/q/27547429
tags question: http://stackoverflow.com/q/27523099
tags question: http://stackoverflow.com/q/27571334
tags question: http://stackoverflow.com/q/27477052
tags question: http://stackoverflow.com/q/27626424
tags question: http://stackoverflow.com/q/27528854
tags question: http://stackoverflow.com/q/27628947
tags question: http://stackoverflow.com/q/27544053
tags question: http://stackoverflow.com/q/27523222
tags question: http://stackoverflow.com/q/27623527
tags question: http://stackoverflow.com/q/27552969
tags question: http://stackoverflow.com/q/27577555
tags question: http://stackoverflow.com/q/27512759
tags question: http://stackoverflow.com/q/27482056
tags question: http://stackoverflow.com/q/27567927
tags question: http://stackoverflow.com/q/27583398
tag name: dom
tags question: http://stackoverflow.com/q/27492154
tags question: http://stackoverflow.com/q/27548409
tags question: http://stackoverflow.com/q/27550633
tags question: http://stackoverflow.com/q/27518874
tags question: http://stackoverflow.com/q/27527194
tags question: http://stackoverflow.com/q/27625441
tags question: http://stackoverflow.com/q/27514399
tags question: http://stackoverflow.com/q/27618117
tags question: http://stackoverflow.com/q/27545860
tags question: http://stackoverflow.com/q/27609140
tags question: http://stackoverflow.com/q/27524960
tags question: http://stackoverflow.com/q/27563856
tags question: http://stackoverflow.com/q/27496515
tags question: http://stackoverflow.com/q/27608051
tags question: http://stackoverflow.com/q/27490595
tags question: http://stackoverflow.com/q/27526951
tags question: http://stackoverflow.com/q/27624095
tags question: http://stackoverflow.com/q/27484781
tags question: http://stackoverflow.com/q/27635354

http://stackoverflow.com/a/27558800
answers question: http://stackoverflow.com/q/27555191
downvote count: 0
type: Answer
has body: Try this if you want to loop var blocks_count = 4; // or how many blocks do you have for(var i = 1; i &lt;= blocks_count; ++i){ $( "input[name='radioset_" + i + "'" ).change(function() { if ($( "#option_A_" + i).prop( "checked" )) { // do option A thing for radioset_i } else { // do option B thing for rasioset_i }); }
upvote count: 1
score: 1

http://stackoverflow.com/a/27617210
has comment: http://stackoverflow.com/comment/43656199
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/43657195
answers question: http://stackoverflow.com/q/27617096
has comment: http://stackoverflow.com/comment/43656457
accepted answer of: http://stackoverflow.com/q/27617096
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43657047
has comment: http://stackoverflow.com/comment/43657558
has body: Push functions expects elements as param. https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/push You could use for (i=0; i&lt; my_vars["content"].length; i++) { Game.push({ id : my_vars["content"][i].ID, price : my_vars["content"][i].price, quantity : my_vars["content"][i].quantity }); }
type: Answer

http://stackoverflow.com/a/27487547
has body: I'm really not sure about your use case but you could overwrite $.fn.trigger method: (function ($) { var oldTrigger = $.fn.trigger; $.fn.trigger = function () { if (arguments[0].match(/^section:/)) { doStuff(arguments[0].split(':')[1]); } return oldTrigger.apply(this, arguments); }; })(jQuery); var section = "top"; jQuery(document).trigger('section:' + section); function doStuff(section) { alert(section); } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt;
type: Answer
score: 0
answers question: http://stackoverflow.com/q/27486373

http://stackoverflow.com/comment/43476989
type: AnswerComment
type: Comment
has text: @LucyBain I've added a little update to my answer which will hopefully make everything clear. The key part of the ECMAScript specification is http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3, specifically points 6 and 7.
comment on: http://stackoverflow.com/a/27523825
score: 0

http://stackoverflow.com/q/27561481
has title: File watcher for less in grunt not updating css
has body: I have the following gruntfile.js code: less: { development: { files: [{ expand: true, cwd: 'assets/less', src: ['*.less'], dest: 'wwwroot/content/css/', ext: '.css' }] } }, watch: { less: { files: ["assets/less/*.less"], task: ["less:development"] } }; grunt.loadNpmTasks("grunt-contrib-less"); grunt.loadNpmTasks("grunt-contrib-watch"); When I run the watch task and make changes on any of my less files, it detected the changes in the less files: File "assets\less\abc.less" changed. But the problem is it is not updating my abc.css file. Does anyone know why is this and how to fix it? Thanks
tagged with: css
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/27443188
accepted answer: http://stackoverflow.com/a/27569444
tagged with: less
type: Question
score: 5
upvote count: 5
tagged with: javascript
tagged with: gruntjs
answer count: 1
has answer: http://stackoverflow.com/a/27569444
downvote count: 0
favorite count: 0

http://stackoverflow.com/q/27504511
has body: I have for loop in my JS: for (var i=0;i&lt;2;i++) { $scope.widget = widgets[i]; $scope.header = widgets[i].data.header; $scope.items = widgets[i].data.items; $scope.footer = widgets[i].data.footer; var widget = widgets[i]; var div1 = '&lt;div id="' + widget.id + '" class="' + widget.width +'" &gt;'; var div2 = '&lt;div class="panel" style="background-color:' + widget.color +';color:white;"&gt;'; var header = widget.body.headerTemplate; var panelStart = '&lt;div class="panel-collapse pull out"&gt;'; var widgetBody = widget.body.itemTemplate; var widgetFooter = widget.body.footerTemplate; var panelEnd = '&lt;/div&gt;'; var div2End = '&lt;/div&gt;'; var div1End = '&lt;/div&gt;'; var widgetHTML = div1 + div2 + header + panelStart + widgetBody + widgetFooter + panelEnd + iv2End +iv1End; console.log(widgetHTML); var linkingFunction = $compile(widgetHTML); var elem = linkingFunction($scope); $(elem).appendTo("#widgetsContainer"); } Which append some HTML to div container. In that HTML there are data-binding like this: &lt;a href='{{header.redirectUri}}'&gt;{{header.title}}&lt;/a&gt; Of course, $scope variables changes every time it loops, and in the end all scope variables update HTML with last values. Is it possible to not update HTML after it is drawn?
downvote count: 0
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/27504641
has title: Don't update HTML when angular $scope changes
accepted answer: http://stackoverflow.com/a/27504641
type: AnsweredQuestion
score: 2
upvote count: 2
tagged with: dom
type: Question
possible better answer: http://stackoverflow.com/a/27504624
has comment: http://stackoverflow.com/comment/43439083
has answer: http://stackoverflow.com/a/27504624
tagged with: javascript
answer count: 2
has comment: http://stackoverflow.com/comment/43439106

http://stackoverflow.com/a/27535467
has body: You can just do data With Loop and Array records=[]; $('.schedentry1').each(function () { if (records.indexOf($(this).val()) > -1) { $(this).parent("div").css("border","1px solid red"); } records.push($(this).val()) }) With selectors(jquery itself still loops through selectors and returns array) Since you have only 4 values you can do this with selectors also $('.schedentry1[value="00:00"]:gt(0),.schedentry1[value="00:10"]:gt(0),.schedentry1[value="00:20"]:gt(0)') .parent("div") .css("border","1px solid red"); div{margin:10px 0px; }
answers question: http://stackoverflow.com/q/27535345
score: 0
type: Answer

http://stackoverflow.com/a/27529552
downvote count: 1
has body: As you said, main() is the global execution context. It's still alive until : you close the tab if you're in a browser you kill the process if you're on a server (like node) the tab/process crashes So unless one of the use cases above happen, the runtime is still alive, so is the event loop (which will process the task queue).
has comment: http://stackoverflow.com/comment/43488914
type: Answer
has comment: http://stackoverflow.com/comment/43488591
score: 2
accepted answer of: http://stackoverflow.com/q/27529328
upvote count: 3
answers question: http://stackoverflow.com/q/27529328
type: AcceptedAnswer

http://stackoverflow.com/q/27633390
type: Question
has body: I am using this script jQuery.each(jQuery('textarea[data-autoresize]'), function() { var offset = this.offsetHeight - this.clientHeight; var resizeTextarea = function(el) { jQuery(el).css('height', 'auto').css('height', el.scrollHeight + offset); }; jQuery(this).on('keyup input', function() { resizeTextarea(this); }).removeAttr('data-autoresize'); }); }); and this is my html &lt;h:inputTextarea id="newUserIds" value="#{surveyAction.newUsers}" cols="41" rows="10" onkeyup="AutoGrowTextArea(this)" styleClass="animated"&gt; &lt;p:ajax event="blur" process="@this" immediate="true" /&gt; &lt;/h:inputTextarea&gt; How do I target that specific textarea on the javascript so that the action only applies there.
has answer: http://stackoverflow.com/a/27638962
answer count: 2
accepted answer: http://stackoverflow.com/a/27635080
has comment: http://stackoverflow.com/comment/43689370
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43689854
has title: Textarea autogrow onkeyup
has answer: http://stackoverflow.com/a/27635080
tagged with: css
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27638962

http://stackoverflow.com/a/27582584
has comment: http://stackoverflow.com/comment/43589617
score: 1
has body: Assuming you're already using jQuery on the page, you could use .val() to change the button text and .after() to add new DOM elements. The code might look something like the following: $('.edit-form').on('click', function(){ $('.submitform-submit') .val('Edit') .after(' Button 1 ') .after(' Button 2 '); }); See this JSFiddle for a working example: http://jsfiddle.net/p5cy6xv8/
upvote count: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27582451
type: Answer
answers question: http://stackoverflow.com/q/27582451

http://stackoverflow.com/comment/43415267
comment on: http://stackoverflow.com/a/27491864
type: Comment
type: AnswerComment
has text: Thanks a lot for the reply. However, the page that needs to execute javascript is an ascx (User Control) page. Also, thanks for the edit on my question!
score: 0

http://stackoverflow.com/q/27513600
has comment: http://stackoverflow.com/comment/43495662
type: UnansweredQuestion
tagged with: facebook
has answer: http://stackoverflow.com/a/58784799
tagged with: php
downvote count: 0
has title: Facebook Open Graph isn't loading image
type: Question
score: 3
tagged with: javascript
upvote count: 3
has body: I've put together a micro site that lets users decorate a tree to be shared on facebook/twitter/etc... http://jajo.net/odditree/share.php?file=u/1418759317.png Some php magic creates and uploads their image, then sets a variable to be retrieved on the last page. $file = $_GET["file"]; $url = "http://www.jajo.net/odditree/" . $file; Everything is working fine except for the Facebook share dialog. At first, I tried using a URL to share the image: <a class="btn fb" href="" onclick="window.open('http://www.facebook.com/sharer.php?s=100&p[url]=<?echo $url?>&p[images][0]=<?echo $url?>&p[title]=Jajo - Holiday Odditree=', 'newwindow', 'width=600, height=250'); return false;"> Share on Facebook Sometimes this would load the description, sometimes the image. Never both. After struggling to make this work I conceded to Facebook's will and created an App. After following the dev documentation I put this together: Facebook Again The site now relies on Facebook for the heavy lifting and all I need to do is provide open graph data. Here's what that looks like: <meta property="og:description" content="<?if ($url) {?>Behold my @Jajo Holiday #Odditree! Share your own Odditree creation. http://jajo.net/odditree<?}else{?>Create your own Odditree. http://jajo.net/odditree<?}?>"> <meta property="og:image" content="<?php echo $params['image']; ?>"> As far as I can tell, everything is where it needs to be, It even echos the data correctly when I view-source. Yet the share button only shows this: The logo image it's pulling there goes away when it's shared and on my timeline it's just a blank box. Instead of the open graph image: I've debugged and scrapped several times, but my og:image always comes up empty. https://developers.facebook.com/tools/debug/og/object/ I'm at a loss here. If anyone can help me troubleshoot this issue, I'd really appreciate it. ===UPDATES=== After involving several people, having a lengthy chat, and pulling hair out... We were unable to make this work in time for …
answer count: 2
tagged with: api
has answer: http://stackoverflow.com/a/27513959
tagged with: facebook-graph-api
favorite count: 0

http://stackoverflow.com/comment/43638449
type: AnswerComment
has text: This seems to look like a hack .tosring looks better in my opinion but your code does work.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27608141

http://stackoverflow.com/q/27623946
tagged with: server-side
accepted answer: http://stackoverflow.com/a/27624107
has title: How to get the fully url from a dynamic website
tagged with: php
possible better answer: http://stackoverflow.com/a/27624055
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27624055
has body: Consider a dynamic website running an application, where you can see the URL from your browser as: www.example.com/game Now the /game is probably a folder? And how can i see the actual path to the application? Can't I see the server side scripting language, such as: www.example.com/game/robobo.php or www.example.com/game/robobo.aspx or something similar? Now, I know you can guess some of these (typically with the "index" name), however there may be many subfolders.
tagged with: dom
type: Question
has answer: http://stackoverflow.com/a/27624107
has answer: http://stackoverflow.com/a/27624119
tagged with: javascript
has answer: http://stackoverflow.com/a/27627176
has comment: http://stackoverflow.com/comment/43668399
tagged with: asp.net
score: 0
answer count: 4

http://stackoverflow.com/comment/43482634
type: QuestionComment
type: Comment
score: 1
has text: If you console.log the response (`data`) are the strings the same for both scripts?
comment on: http://stackoverflow.com/q/27526968

http://stackoverflow.com/a/27525085
upvote count: 4
downvote count: 0
score: 4
answers question: http://stackoverflow.com/q/27525023
accepted answer of: http://stackoverflow.com/q/27525023
type: AcceptedAnswer
has body: The error is happening because your key variable is empty. '*[name='+key+']' is evaluating to '*[name=]'. To avoid the error, you can wrap your key variable in quotes: $('*[name="'+key+'"]').addClass('error'); This way you will not get the error as instead of trying to evaluate *[name=] it will try to evaluate *[name=""]. However as your key variable appears to be empty, this will probably not produce the result you're looking for. Double check your code to ensure key is set prior to addClass being called. In fact, if what you say is true that the "error" class is added, I imagine your code here is being executed twice - once when key is empty, and again when key is in fact equal to "first_date".
type: Answer

http://stackoverflow.com/q/27639162
has comment: http://stackoverflow.com/comment/44052109
favorite count: 0
upvote count: 3
has comment: http://stackoverflow.com/comment/43787509
has comment: http://stackoverflow.com/comment/43697352
has body: I have a master-detail chart that displays several series of values against timestamps in line, spline and column formats, depending on the user's choice. My issue is that when a range of timestamps (say a whole week) and their corresponding values are missing, the spline, line and master do what is expected and plot a smooth line between the gap. However this is misleading and I would rather it show a break in the line once a given range of timestamps are missed. I have tried connectNulls: false but as both the timestamps and values are missing this does not work. Is there any way to achieve this? Preferably without looping through the data and adding the missing timestamps and null values, as the intervals are not always regular.
has comment: http://stackoverflow.com/comment/43697658
tagged with: highcharts
answer count: 0
downvote count: 0
has title: Creating gaps in Highcharts
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/101726219
linked to: http://stackoverflow.com/q/27251912
type: Question
score: 3

http://stackoverflow.com/q/27502491
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43461786
has comment: http://stackoverflow.com/comment/43471053
has comment: http://stackoverflow.com/comment/43435370
has answer: http://stackoverflow.com/a/27521580
tagged with: design-patterns
has comment: http://stackoverflow.com/comment/43454544
type: Question
has comment: http://stackoverflow.com/comment/43460878
has comment: http://stackoverflow.com/comment/43435619
tagged with: prototype
answer count: 2
tagged with: javascript
has title: how to implement parasitic inheritance to avoid nesting
tagged with: inheritance
possible better answer: http://stackoverflow.com/a/27521580
has answer: http://stackoverflow.com/a/27503560
accepted answer: http://stackoverflow.com/a/27503560
score: 0
has body: I would like to follow the inheritance structure shown above. I would like create an engineer using this syntax: var Mark = new Employee(id).WorkerBee(project).Engineer(); To achieve this syntax, I have to create a nested object following a parasitic inheritance pattern like so: function Employee(id) { this.id = id; this.WorkerBee = function(project) { this.project = project; this.Engineer = function() { ... return this; }; return this; }; } To avoid deep layers of nesting, I am trying to rewrite it using prototypes. How can I rewrite my code to achieve the same goal as above ? function Employee(id) { //variables this.id = id this.name = ""; this.dept = "general"; //methods this.getId = function() { return this.id } } Employee.prototype.WorkerBee = WorkerBee; function WorkerBee(project) { //variables this.projectName = project this.projects = []; //methods this.getProjectName = function() { return this.projectName } return this } WorkerBee.prototype.Engineer = Engineer function Engineer() { //variables this.dept = "engineering"; this.machine = ""; //methods this.getDept = function() { return this.dept } return this } var Mark = new Employee("5").WorkerBee("Secret Project").Engineer(); console.log(Mark.getId()) //should print "5" console.log(Mark.getProjectName()) //should print "Secret Project" console.log(Mark.getDept()) //should print engineering
has comment: http://stackoverflow.com/comment/43435206

http://stackoverflow.com/a/27602686
score: 0
answers question: http://stackoverflow.com/q/27602519
has body: Use the tag for the non JavaScript users and duplicate its content for the JavaScript users. To the duplicated content add a class modifier like .hidden to set it to display: none by default. Apply your fadeIn function to it. If you don't like the duplication you could have the JavaScript take the content from the tag create a DOM element from it and inject it into the page. $(function() { $('#box').delay(200).fadeIn(); }); .box { width: 300px; margin: 0 auto; border: 1px solid #c66; background-color: #f99; color: #fff; font-size: 24px; padding: 24px; font-family: Helvetica, Arial; text-align: center; } .hidden { display: none; } Content Content
type: Answer

http://stackoverflow.com/comment/43663886
score: 0
comment on: http://stackoverflow.com/q/27621659
has text: Yes you're right. That does not sound like a very good solution you've found there. I'd suggest going for something else - like reCaptcha https://www.google.com/recaptcha/intro/index.html
type: QuestionComment
type: Comment

http://stackoverflow.com/a/27608530
type: AcceptedAnswer
downvote count: 0
score: 4
answers question: http://stackoverflow.com/q/27603385
type: Answer
has body: Yes. Starting a second transaction in response to the "complete" event of a previous transaction is both correct and the easiest way to reason about the sequencing. Per spec (section "steps for committing a transaction"): [...] Only after the transaction has been successfully written is the "complete" event fired. As you note, you may see "success" events from individual requests, but the overall transaction may abort (index consistency, quota, etc) so waiting for "complete" is the right thing to do if you need to reason about the success of the first transaction in subsequent ones.
accepted answer of: http://stackoverflow.com/q/27603385
upvote count: 4

http://stackoverflow.com/q/27508316
type: Question
tagged with: firefox
tagged with: javascript
score: 0
tagged with: window.location
answer count: 1
type: UnansweredQuestion
has body: I have a problem concerning a site I'm creating &lt;div id="footer"&gt;&lt;/div&gt; &lt;script&gt; function preloadFunc() { window.location.hash = 'footer' } window.onpaint = preloadFunc(); &lt;/script&gt; Above is the piece of code (placed in the head, the div is positioned 15300px top) redirecting the page to the bottom before anything else gets loaded (I wanna start from bottom up). It works perfectly here for chrome/safari, but only seems to redirect in FF after a refresh. Is there a workaround for this? (+ #div in the end of the url is not possible as redirecting a domain to a url#div seems to not work server side/cpanel. presumably because #div is not a directory)
has comment: http://stackoverflow.com/comment/43446832
has title: window.location.hash problems in firefox
has answer: http://stackoverflow.com/a/27508364
has comment: http://stackoverflow.com/comment/43446990

http://stackoverflow.com/q/27514787
type: AnsweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/27514826
type: Question
answer count: 2
tagged with: javascript
has body: I'm trying to rotate a set of 6 images in javascript, not jquery. The first image shows up, but the rest of them don't rotate. Here's my code: &lt;html&gt; &lt;head&gt; &lt;script type="text/javascript"&gt; function rotatePic() { var qutAd = document.getElementById("yumOreos"); var imgs = ["images/img1.png", "images/img2.png", "images/img3.png", "images/img4.png", "images/img5.png", "images/img6.png"]; var ad = 0; qutAd.src = imgs[ad]; setInterval(function () {ad++;if (ad == imgs.length) {ad = 0;}}, 4000); } &lt;/script&gt; &lt;/head&gt; &lt;body onload="rotatePic()"&gt; &lt;img id="yumOreos"&gt; &lt;/body&gt; &lt;/html&gt; What am I doing wrong? Thanks.
upvote count: 1
has answer: http://stackoverflow.com/a/27514859
favorite count: 0
possible better answer: http://stackoverflow.com/a/27514859
accepted answer: http://stackoverflow.com/a/27514826
has title: Javascript Change Image on Timer

http://stackoverflow.com/q/27536000
has comment: http://stackoverflow.com/comment/43500471
type: UnansweredQuestion
has body: I've learned how when you set up code to look like, for example: document.getElementById(id).innerHTML = text; that it will change the contents of id to be text; But I also see sometimes that instead of setting the getElementById().innerHTML to something, it is reversed, setting a variable equal to getElementById().innerHTML and I don't see what the purpose of that is throughout the rest of the code.
has comment: http://stackoverflow.com/comment/43500501
has comment: http://stackoverflow.com/comment/43500390
has answer: http://stackoverflow.com/a/27536066
tagged with: innerhtml
has comment: http://stackoverflow.com/comment/43500470
type: Question
has title: Setting a variable = to getElementById().innerHTML
tagged with: javascript
score: -4
downvote count: 4
upvote count: 0
tagged with: getelementbyid
answer count: 1
favorite count: 0

require
tags question: http://stackoverflow.com/q/27593123
tag name: require
tags question: http://stackoverflow.com/q/27622462
tags question: http://stackoverflow.com/q/27624017
tags question: http://stackoverflow.com/q/27520445
type: Tag

http://stackoverflow.com/a/27632031
upvote count: 1
has comment: http://stackoverflow.com/comment/43684277
score: 1
has body: When you use delete on an array it doesn't remove that index, it sets the elment to undefined but the array length remains the same. So you would use splice() but you will also need to realize that whatever you do to obj1 will happen to obj also because obj1 is a reference to obj. it is not a copy when you do obj1=obj
has comment: http://stackoverflow.com/comment/43684662
has comment: http://stackoverflow.com/comment/43684328
has comment: http://stackoverflow.com/comment/43684581
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43684404
accepted answer of: http://stackoverflow.com/q/27631973
has comment: http://stackoverflow.com/comment/43689171
answers question: http://stackoverflow.com/q/27631973
type: Answer

http://stackoverflow.com/comment/43474666
comment on: http://stackoverflow.com/q/27522902
has text: What is the best method to show the popup only the 1st time the user access the website? Using sessions/cookie
score: 3
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43448308
type: QuestionComment
has text: @garbanzio: I don't think that's a sensible approach. You won't be able to use all features blindly (as not all of them can be emulated), so you'll have to check for each feature anyway. And when you do that you might as well decide if you need the shams or not.
comment on: http://stackoverflow.com/q/27508833
score: 0
type: Comment

http://stackoverflow.com/q/27599761
type: UnansweredQuestion
tagged with: php
has title: casebox ECMS demo after installation
answer count: 0
tagged with: solr
has body: After installation casebox ECMS demo gave following error: https://dev.casebox.org/audit An error occured: exception 'Apache_Solr_HttpTransportException' with message ''400' Status: Bad Request' in /var/www/html/casebox/httpsdocs/libx/Solr/Service.php:331 Stack trace: #0 /var/www/html/casebox/httpsdocs/libx/Solr/Service.php(1110): Apache_Solr_Service-&gt;_sendRawGet('`http://127.0.0....`') #1 /var/www/html/casebox/httpsdocs/classes/CB/Solr/Service.php(222): Apache_Solr_Service-&gt;search('', 0, 0, Array) #2 /var/www/html/casebox/httpsdocs/classes/CB/Search.php(418): CB\Solr\Service-&gt;search('', 0, 0, Array) #3 /var/www/html/casebox/httpsdocs/classes/CB/Search.php(37): CB\Search-&gt;executeQuery() #4 /var/www/html/casebox/httpsdocs/cores/audit/Demosrc/TreeNode/Offices.php(111): CB\Search-&gt;query(Array) #5 /var/www/html/casebox/httpsdocs/cores/audit/Demosrc/TreeNode/Offices.php(51): Demosrc\TreeNode\Offices-&gt;getRootNodes() #6 /var/www/html/casebox/httpsdocs/classes/CB/Browser.php(181): Demosrc\TreeNode\Offices-&gt;getChildren(Array, Array) #7 /var/www/html/casebox/httpsdocs/classes/CB/Browser.php(98): CB\Browser-&gt;collectAllChildren() #8 /var/www/html/casebox/httpsdocs/classes/CB/BrowserView.php(19): CB\Browser-&gt;getChildren(Array) #9 [internal function]: CB\BrowserView-&gt;getChildren(Array) #10 /var/www/html/casebox/httpsdocs/remote/router.php(76): call_user_func_array(Array, Array) #11 /var/www/html/casebox/httpsdocs/remote/router.php(123): ExtDirect\doRpc(Array) #12 {main} please advice ..
has comment: http://stackoverflow.com/comment/43709991
type: Question
tagged with: javascript
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/43622896

http://stackoverflow.com/comment/112626191
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/63689435
type: Comment
has text: Modifying native types prototypes is rarely a good idea. But your code is working. Maybe you should consider creating a small object constructed with your string and use those two methods with it

http://stackoverflow.com/a/27598459
score: 0
has body: I think,this is solution for your problem Give input type password. &lt;input type='password'/&gt;
type: Answer
has comment: http://stackoverflow.com/comment/43620192
answers question: http://stackoverflow.com/q/27597697

http://stackoverflow.com/comment/43406447
type: Comment
has text: I will get no error on my mobile, but I thought there was a function in Chrome developer tool, to inspect the elements of what you see on your mobile device.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27487006

http://stackoverflow.com/comment/43661644
comment on: http://stackoverflow.com/q/27620357
score: 0
type: Comment
type: QuestionComment
has text: should test the indexOf == 1 for the "/" or am I missing something ?

http://stackoverflow.com/comment/43609690
has text: If that doesn't work, give us more details in your original post. What does grupe look like? What is tvarURL?
comment on: http://stackoverflow.com/a/27592896
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/comment/43515132
type: Comment
has text: Now the console gives me Uncaught TypeError: Cannot read property 'regional' of undefined..
comment on: http://stackoverflow.com/a/27543536
type: AnswerComment
score: 0

http://stackoverflow.com/q/27518993
score: 6
has body: I have a very large list of elements (14000+), I want to have a search field that as you type text into it, it filters the results and hides unrelated elements. Currently I'm using this: $.expr[':'].containsIgnoreCase = function (n, i, m) { return jQuery(n).text().toUpperCase().indexOf(m[3].toUpperCase()) &gt;= 0; }; $("#search").on("keyup", function () { var filter = $("#search").val(); $(".list-group-item").not(":containsIgnoreCase('" + filter + "')").addClass("hidden"); $(".list-group-item:containsIgnoreCase('" + filter + "')").removeClass("hidden"); }); Which works wonderfully...on smaller lists. This list is simply too large to be manageable with that code. I don't know if there is any other code that can handle this many elements client side. If not, would it be better to leave the list blank, and do an ajax request to populate the list as matches are made?
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/43469228
has answer: http://stackoverflow.com/a/31507681
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/43467738
upvote count: 6
has title: Filtering large list with javascript
accepted answer: http://stackoverflow.com/a/31507681

http://stackoverflow.com/q/27547980
has body: I added a not-null validation to one of my oracle-apex form items. I want that to be executed only when one of other items in my form is set to some specific value. Is there a simple way to do this?
type: AnsweredQuestion
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/27548539
score: 1
tagged with: javascript
has title: How can I conditionally validate a validation created on a item within Oracle Application Express?
answer count: 1
downvote count: 0
tagged with: oracle-apex
favorite count: 0
has answer: http://stackoverflow.com/a/27548539

http://stackoverflow.com/q/27625480
has answer: http://stackoverflow.com/a/27626053
has answer: http://stackoverflow.com/a/27625679
tagged with: arrays
tagged with: javascript
has title: remove duplicated pairs of object arrays in javascript
possible better answer: http://stackoverflow.com/a/27625782
score: 0
has answer: http://stackoverflow.com/a/27625782
accepted answer: http://stackoverflow.com/a/27625679
has body: Fiddle Example: I have an array of objects like this: var bigarr = [ [ { name: 'ABC',id: 391},{ name: 'XYZ',id: 545}], [ { name: 'EFG',id: 390},{ name: 'XYZ',id: 545}], [ { name: 'XYZ',id: 545},{ name: 'ABC',id: 391}], [ { name: 'ABC',id: 391},{ name: 'XYZ',id: 545}] ]; How can I remove any of the duplicated pair of objects that have id545 and 391 to reduce the array to this: var newbigarr = [ [ { name: 'ABC',id: 391},{ name: 'XYZ',id: 545}], [ { name: 'EFG',id: 390},{ name: 'XYZ',id: 545}] ]; I have thought of filtering out the duplicated pairs by making a new list of array: [{391: 391,545: 545},{390: 390,545: 545}] and then iterating over it and bigarr to build the newbigarr, but my code isn't even able to create that list to begin with. var test_id = []; for(var i = 0;i &lt; bigarr.length;i++) { var value_obj = {}; for(var j in bigarr[i]) { var value = bigarr[i][j]["id"]; value_obj[value] = value; } test_id.push(value_obj); } console.log(test_id); I'm using lodash,so any solution involving lodash is welcomed.
tagged with: lodash
answer count: 4
type: AnsweredQuestion
tagged with: underscore.js
has answer: http://stackoverflow.com/a/27625882
type: Question

http://stackoverflow.com/comment/43401681
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27484778
has text: just a question is it possible to just have the 1 menu, and use media queries for styling the different menu on mobile vs desktop?
score: 0

http://stackoverflow.com/comment/43606801
type: Comment
comment on: http://stackoverflow.com/a/27591523
has text: I'm not sure what you mean. Using `.setAttribute()` isn't bad. I'm just saying that you're confusing the term "markup" with the DOM. The `querySelector` method doesn't care at all about markup. It only cares about which attributes are present on the DOM element
score: 2
type: AnswerComment

http://stackoverflow.com/comment/82198760
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27509931
score: 1
has text: @baao No no don't delete it. The different titles may help people get to that dupe target.

http://stackoverflow.com/comment/43540644
type: Comment
has text: So you cannot modify the controller code at all?
comment on: http://stackoverflow.com/q/27557048
score: 0
type: QuestionComment

http://stackoverflow.com/q/27622032
tagged with: google-chrome-extension
answer count: 1
has comment: http://stackoverflow.com/comment/43684110
favorite count: 0
has answer: http://stackoverflow.com/a/27938756
score: 6
has title: Element created by Content script on page creating issue with Gmail,Facebook,stackoverflow etc
upvote count: 7
tagged with: gmail
type: AnsweredQuestion
has body: I am developing a Chrome extension and my requirement is to create element(button) on page for each tab open and wants to show simple alert message on clicking button..it works properly for all but it always creating issue with Gmail,Facebook and Stackoverflow..please help me to resolve this issue. I am having the code of adding button to a web page in my Content script. manifest.json .... .... "content_scripts": [ { "matches":["http://*/*", "https://*/*"], "css": [ "style.css" ], "js":["contentScript.js"], "all_frames": false, "run_at": "document_idle" } ] .... .... contentScript.js .... .... function addButton() { document.body.innerHTML += ' Show Button '; var button = document.getElementById("my_button"); button.addEventListener("click", function () { alert("hello"); }, false); } ..... ..... .... I think some Gmail security features is creating the issue.
tagged with: google-chrome
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/43678207
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27938756

http://stackoverflow.com/q/27516875
tagged with: twitter-bootstrap
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
score: 2
upvote count: 2
has answer: http://stackoverflow.com/a/27773801
has title: Boostrap affix only when past scroll point
type: Question
tagged with: javascript
has body: I am trying to implement Bootstraps Affix function on my site, the sidebar I would like to only scroll after the adjacent div starts going out of view. I would like the .submenu to only be sticky once the first .test-div starts to scroll out of view, so it scrolls with .test-div initially to the top but once the first .test-div starts to go out of sight should it become sticky. jsFiddle link CSS: body { padding-top: 200px; } .test-div { min-height: 400px; border: 1px solid #D1D1D1; margin-bottom: 10px; } .footer { border: 1px solid red; height: 500px; } HTML: Header Header Header Header Header Header Header sub menu will go here sub menu will go here sub menu will go here sub menu will go here sub menu will go here sub menu will go here sub menu will go here sub menu will go here sub menu will go here sub menu will go here sub menu will go here sub menu will go here sub menu will go here sub menu will go here sub menu will go here sub menu will go here sub menu will go here sub menu will go here sub menu will go here sub menu will go here sub menu will go here Footer
answer count: 3
possible better answer: http://stackoverflow.com/a/27819928
accepted answer: http://stackoverflow.com/a/27773801
downvote count: 0
has answer: http://stackoverflow.com/a/27516961
has answer: http://stackoverflow.com/a/27819928
tagged with: jquery
favorite count: 0

http://stackoverflow.com/q/27529581
type: AnsweredQuestion
tagged with: jsfiddle
tagged with: javascript
has body: I am trying to read an external csv in JSFiddle using d3.js I have followed the instructions suggested HERE, but still no success. THIS is my JSfiddle d3.csv.parse( d3.select("pre#ddata").text(), function (data) {... Can someone please suggest what I a doing wrong here
tagged with: dc.js
has title: How to read a csv file in jsfiddle
type: Question
score: 0
has comment: http://stackoverflow.com/comment/43488501
answer count: 1
has answer: http://stackoverflow.com/a/27530001
has comment: http://stackoverflow.com/comment/43489241
has comment: http://stackoverflow.com/comment/43492330
accepted answer: http://stackoverflow.com/a/27530001
has comment: http://stackoverflow.com/comment/43489055
has comment: http://stackoverflow.com/comment/43487989
tagged with: d3.js

http://stackoverflow.com/comment/43438620
type: Comment
score: 0
has text: You can try `$.datepicker.formatDate('dd/mm/yy', new Date(1970, 5-1, 29))` to show proper date. Can you please replicate bug which you mentioned, i.e. displaying 05/05/1972, since it is showing Nan/Nan/Nan as @RoryMcCrossan has mentioned
comment on: http://stackoverflow.com/q/27504176
type: QuestionComment

http://stackoverflow.com/comment/43503372
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27537383
has text: Please at least include the full HTML. No way to tell if you've assigned `ng-controller` or `ng-app` correctly.
score: 0

http://stackoverflow.com/q/27549328
has body: I am currently wanting to develop a webpage that displays my achievements in Stack Exchange. Just the basic info... Badges earned, and reputation. I am a beginner in Javascript. I reviewed the Javascript SDK briefly but cannot seem to get past the intro. Apparently, to access the information I need to have an access token to load the '/me' urls. Here's a link to the api : https://api.stackexchange.com/docs/js-lib Am I taking the right approach to this? All I need to load is the reputation and badges earned. And reload these values everytime the page is refreshed.
tagged with: web-deployment
has title: Portfolio with Stack Exchange Basic Info
has comment: http://stackoverflow.com/comment/43526184
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43525588
has comment: http://stackoverflow.com/comment/43526289
has comment: http://stackoverflow.com/comment/43526334
tagged with: stackexchange-api
has answer: http://stackoverflow.com/a/27550258
has comment: http://stackoverflow.com/comment/43525827
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27550258
has comment: http://stackoverflow.com/comment/43525883
type: Question
upvote count: 4
downvote count: 0
answer count: 1
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/43526149
favorite count: 0

polymer
tags question: http://stackoverflow.com/q/27553043
tags question: http://stackoverflow.com/q/27476513
tags question: http://stackoverflow.com/q/27547156
tags question: http://stackoverflow.com/q/27514157
tags question: http://stackoverflow.com/q/27557956
tag name: polymer
tags question: http://stackoverflow.com/q/27541764
tags question: http://stackoverflow.com/q/27518166
tags question: http://stackoverflow.com/q/27616142
tags question: http://stackoverflow.com/q/27592495
tags question: http://stackoverflow.com/q/27610589
tags question: http://stackoverflow.com/q/27570466
tags question: http://stackoverflow.com/q/27594812
tags question: http://stackoverflow.com/q/27615396
tags question: http://stackoverflow.com/q/27517957
tags question: http://stackoverflow.com/q/27551957
tags question: http://stackoverflow.com/q/27504243
tags question: http://stackoverflow.com/q/27513414
tags question: http://stackoverflow.com/q/27628668
tags question: http://stackoverflow.com/q/27592169
type: Tag
tags question: http://stackoverflow.com/q/27560456

http://stackoverflow.com/comment/43645586
has text: Add a `keyup` handler for the textarea that counts the characters.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27611610

http://stackoverflow.com/comment/43490118
type: QuestionComment
has text: You can use the same HttpServerUtility.HtmlEncode which is more reliable and can convert any special character to quivalent HTML Code.
comment on: http://stackoverflow.com/q/27530729
score: 2
type: Comment

http://stackoverflow.com/q/27484262
tagged with: javascript
score: 0
tagged with: google-chrome-app
answer count: 1
accepted answer: http://stackoverflow.com/a/27484323
has title: How to alert user upon update of chrome app?
type: AnsweredQuestion
tagged with: google-chrome
has body: I have a chrome app that I am going to be updating and the update will break previous saves. Now I would like to alert the users of the app upon successful completion of the update. I do have an chrome api that I am trying to use which is: chrome.runtime.onInstalled.addListener(function(){ }); Now I have read the chrome.runtime developer docs and it says that I can use: chrome.runtime.onInstalled.addListener(function callback) With a callback function of: function(object details) {...}; The problem is that I can not figure out what exactly to do with the info as I have tried a couple of different set ups with this code but none work. any help with this issue would be appreciated Please note that I am trying to display a window that would contain this message. Also my current code is in the background.js of my app although as said the code does not work.
type: Question
has answer: http://stackoverflow.com/a/27484323

merge
tags question: http://stackoverflow.com/q/27498518
type: Tag
tags question: http://stackoverflow.com/q/27538480
tag name: merge
tags question: http://stackoverflow.com/q/27524289

http://stackoverflow.com/comment/43578271
type: QuestionComment
has text: If this is a 24/7, data-driven page, is animation really that important? Since you don't have to worry about browser compatibility, how about rewrite the logic with "plain" JS and remove all animations?
type: Comment
score: 0
comment on: http://stackoverflow.com/q/27572916

http://stackoverflow.com/comment/43467702
score: 0
comment on: http://stackoverflow.com/q/27518989
type: QuestionComment
type: Comment
has text: plunker or fiddle demo ?

http://stackoverflow.com/q/27586326
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: asp.net
has title: Responce.Write to divID
has body: I know javascript and I am learning ASP.NET C# What I want to do(done is javascript): document.getElementById('divID-1').innerHTML= ' Wrong Password '; I need to make a statement equivalent to the javascript one but in ASP.NET C# When I do Response.Write('Wrong Password'); It writes it to a spot that is covered by my navbar. I have to go into inspect element to see it.(Pain in the butt.) If I could just write it to a visible or a specific DIV that would be easier.
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/27586388
tagged with: c#
type: AnsweredQuestion
tagged with: javascript
tagged with: string
accepted answer: http://stackoverflow.com/a/27586388

http://stackoverflow.com/comment/43753905
score: 0
type: AnswerComment
has text: glad it doesn't apply in your case.
type: Comment
comment on: http://stackoverflow.com/a/27649858

http://stackoverflow.com/q/27613409
favorite count: 0
has title: UploadCare doesn't show alert upon closing dialog
type: AnsweredQuestion
score: 3
tagged with: uploadcare
downvote count: 0
accepted answer: http://stackoverflow.com/a/27620693
has body: When the UploadCare dialog is closed I expect the alert to show, but it doesn't. Why not?'' $('#uc_open').on('click', function() { uploadcare.openDialog(null, { imagesOnly: true }).done(function(file) { file.done(function(fileInfo) { // }).fail(function(error, fileInfo) { alert(error); }); }); return false; });
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27620693
upvote count: 3
answer count: 1

http://stackoverflow.com/comment/43667270
score: 0
type: Comment
has text: It looks like sPaginationType takes two options, 'two_button' and 'full_numbers.' When I put: 'sPaginationType': 'full_numbers' it worked.
type: AnswerComment
comment on: http://stackoverflow.com/a/27621518

http://stackoverflow.com/q/27480479
downvote count: 0
type: UnansweredQuestion
tagged with: iframe
has answer: http://stackoverflow.com/a/27954414
has body: My application has an angular module: var io = angular.module('IO_Operations', []); The module also has a Service to realize input/output things: io.service('ioService', function () { var dataStore = {}; return { pushData: function (key, value) { dataStore[key] = value; }, getData: function (key) { return dataStore[key]; } }; }); Later I want to store the dataStore variable with JSON in a file as object. Now i have an iframe in my aplication to display some content with tabs, you could call it something like a browser. To give the ability to make some settings, I wanted to do it in one iframe. In order to save the data to a file, I need to call the IO_Service, which is in the parent application In my iframe I have a module: var settings = angular.module("settings", []); with a controller settings.controller("MyController", function ($scope) { ... } So I need to declare a dependency for the parent module to use the ioService in order to call the pushData function. Does anyone have some tips for me to realize this?
type: Question
has title: Parent module as dependency
has comment: http://stackoverflow.com/comment/44315096
score: 9
answer count: 2
tagged with: javascript
favorite count: 0
upvote count: 9
tagged with: angularjs
has answer: http://stackoverflow.com/a/27480589
has comment: http://stackoverflow.com/comment/44301521

http://stackoverflow.com/comment/43450822
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27510244
score: 0
has text: @nikoshr Thank you! Sorry for posting such a simple miss on my part!

http://stackoverflow.com/comment/43662290
score: 0
type: AnswerComment
has text: Have you tried configuring jshint as normal with a .jshintrc file in your project root? Then you can add "Ext" as a global for jshint. Anyway you could always start a new question solely about that.
comment on: http://stackoverflow.com/a/27620708
type: Comment

http://stackoverflow.com/q/27511174
has answer: http://stackoverflow.com/a/27511240
answer count: 5
has body: My requirement is to store key-value pairs in a data structure and fetch or delete the pairs when necessary using keys in JavaScript. How can I do it in JavaScript as one does it in Java? I have seen an answer creating an instance of hash map like: var hash={}; Now Ie can add values in it like: hash={ "January":"1","Feb":"2" } Can I insert values dynamically using keys and fetch them and also get the size of the hash map?
has title: Is there a way to create hashmap in javascript and manipulate it like adding and deleting values
upvote count: 16
has comment: http://stackoverflow.com/comment/43452526
has answer: http://stackoverflow.com/a/27511238
has answer: http://stackoverflow.com/a/27517598
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/50053923
downvote count: 1
type: Question
tagged with: keyvaluepair
has answer: http://stackoverflow.com/a/50053923
tagged with: hashmap
has answer: http://stackoverflow.com/a/27511648
accepted answer: http://stackoverflow.com/a/27511238
tagged with: javascript
score: 15
has comment: http://stackoverflow.com/comment/43452586
favorite count: 0

http://stackoverflow.com/a/27559043
has comment: http://stackoverflow.com/comment/43545153
has comment: http://stackoverflow.com/comment/43545343
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27558552
has comment: http://stackoverflow.com/comment/43576217
has comment: http://stackoverflow.com/comment/43614491
has comment: http://stackoverflow.com/comment/43614422
answers question: http://stackoverflow.com/q/27558552
score: 0
has comment: http://stackoverflow.com/comment/43545261
has body: This is because outer scope's name has not yet been assigned the inner scope's source. When you declare an isolate scope with "=", Angular $watches for changes (see code) in both values and does the two-way binding, but the $watches haven't yet fired when validator is invoked. You can check it with this code: $scope.validateName = function(){ console.log("outside directive: name = " + $scope.name); $timeout(function(){ console.log("but just after digest cycle: name = " + $scope.name); }); }; There are a few things you could do: 1) You could fire validator after $timeout: scope.localValidate = function(){ $timeout(function(){ scope.validator(); }); }; and the template: &lt;input ng-change="localValidate()"..&gt; 2) You could $watch for changes in source and then fire the $validator (instead of in ng-change): scope.$watch("source", function(){ scope.validator(); }); 3) You could pass the value to validate into the validator function: &lt;input ng-change="validator({name: source})"..&gt;
has comment: http://stackoverflow.com/comment/43613969
has comment: http://stackoverflow.com/comment/43545333
type: Answer
has comment: http://stackoverflow.com/comment/43545235
has comment: http://stackoverflow.com/comment/43545142

http://stackoverflow.com/comment/43525385
comment on: http://stackoverflow.com/a/27549224
type: Comment
score: 0
type: AnswerComment
has text: thats what I want to do, is give them a class but to do that you have to check its source and target nodes to see if they have a class of visible or hidden :/ :(

http://stackoverflow.com/comment/43696210
type: Comment
comment on: http://stackoverflow.com/q/27637488
score: 0
has text: But why not simply build a queue using an array? Then after the last log is completed. Simple pick the next from the queue, until the queue is empty.
type: QuestionComment

http://stackoverflow.com/q/27638402
has comment: http://stackoverflow.com/comment/43695929
possible better answer: http://stackoverflow.com/a/77472484
tagged with: exif
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/27638728
accepted answer: http://stackoverflow.com/a/27638728
has answer: http://stackoverflow.com/a/77472484
type: Question
answer count: 2
has title: Strip EXIF data from image
tagged with: javascript
linked to: http://stackoverflow.com/q/41490122
score: 22
favorite count: 0
has body: How can I strip the EXIF data from an uploaded image through javascript? I am currently able to access the EXIF data using this exif-js plugin, like this: EXIF.getData(oimg, function() { var orientation = EXIF.getTag(this, "Orientation"); }); However, I have not found any way to actually remove the Exif data, only to retrieve it. More specifically, I am trying to do this to get rid of the orientation Exif data which rotates my image on certain browsers.
has comment: http://stackoverflow.com/comment/43695734
upvote count: 22

http://stackoverflow.com/a/27546827
has comment: http://stackoverflow.com/comment/43520125
has comment: http://stackoverflow.com/comment/43520105
type: Answer
accepted answer of: http://stackoverflow.com/q/27546725
answers question: http://stackoverflow.com/q/27546725
has body: You need to understand that you can't return from asynchronous operations. Response is simply not yet available when you try to return data. Typically in Javascript you would use callback or promise pattern. In Angular promise is a very natural choice. app.service("GetDivision", ["$http", function($http) { this.division = function(divisionNumber){ return $http.post("/api/division", {division:divisionNumber}).success(function(data){ return data; }); } }]); and in controller: GetDivision.division(1).then(function(data) { $scope.division = data; }); Make sure you read this very popular thread on the subject: How do I return the response from an asynchronous call?
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43520067
has comment: http://stackoverflow.com/comment/43520056
score: 8
upvote count: 8

http://stackoverflow.com/comment/43599783
type: QuestionComment
comment on: http://stackoverflow.com/q/27586999
has text: Please explain what you want in more detail.
score: 0
type: Comment

http://stackoverflow.com/comment/43493216
score: 0
has text: @mb21: I updated the question. Looks like it no longer works on Angular 1.3.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27531444

http://stackoverflow.com/q/27476086
tagged with: jquery
favorite count: 0
tagged with: ajax
score: -3
downvote count: 4
type: AnsweredQuestion
has body: I am attempting my first Phonegap app - and my first AJAX calls. I have an xmlhttp request returning JSON provided by ColdFusion. It dynamically builds a form. This works great. But when I try to submit that form via AJAX - for an onscreen refresh, it doesn't work. Either the form doesn't submit (as below) or if I change the "button" to "submit" - it leaves the page and goes to the link which is not what I want. Can I do an AJAX send on a dynamic form like this? Or is there another way I should be building this form? Not sure what the protocol is...
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/43387655
type: Question
has comment: http://stackoverflow.com/comment/43386826
has title: Dynamic javascript jSon built form not submitting through ajax - Phonegap
tagged with: javascript
upvote count: 1
has answer: http://stackoverflow.com/a/27476538
answer count: 1
accepted answer: http://stackoverflow.com/a/27476538

http://stackoverflow.com/comment/43469396
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27519726
has text: @UlugbekKomilovich oh but i didnt use display:block in my css

http://stackoverflow.com/a/27561614
has comment: http://stackoverflow.com/comment/43583372
answers question: http://stackoverflow.com/q/27561456
type: Answer
has comment: http://stackoverflow.com/comment/43548989
has comment: http://stackoverflow.com/comment/43549269
score: 0
has body: Try the following :

http://stackoverflow.com/a/27515573
downvote count: 0
has body: JavaScript cannot do this, nor any other client-side language. As a matter of fact, there are no server-side languages that can do that either. As others stated, you can watch for a keyboard combination, but there is (currently) no way to detect that.
type: Answer
answers question: http://stackoverflow.com/q/27515503
upvote count: 1
score: 1

http://stackoverflow.com/comment/43519591
has text: @VictorHugo Could you edit your original post, showing some more precise steps on how you are currently reacting? I would suggest that the loadMe should be on the main page and gets called to load your editor. As that would then also have the target div element, you can use this one to create the editor script (instead of based on classes). But your question is slightly to abstract for me to really imagine what could go wrong, or where it goes wrong, show some code :)
comment on: http://stackoverflow.com/a/27534508
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/43659804
has text: I don't know why someone down voted the question, I think its not related to async reading , I am able to log the array, but I just want to extract its properties
comment on: http://stackoverflow.com/q/27619233
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43655209
score: 0
comment on: http://stackoverflow.com/q/27616870
type: Comment
type: QuestionComment
has text: @Ghost,thanks for the quick idea. Can you please show/teach me step by step how to do that?

http://stackoverflow.com/a/27516753
type: Answer
downvote count: 0
score: 1
has body: jsFiddle demo Add a span element between .left and .right &lt;span class="middleLine"&gt;&lt;/span&gt; CSS: .welcome-inputs { float: none; margin: 0 auto; width: 80%; background:white; height:100px; text-align:center; /* ADD THIS */ } .welcomeforms { color: #6B6B6B; margin: 0 auto; width: 100px !important; } .left { float: left; /*border-right: 3px solid red; REMOVE THIS */ } .right { float: right; } body { background:blue; } span.middleLine{ display:inline-block; border-right: 2px solid red; margin-left:-1px; /* cause the border is 2px */ height:100%; }
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27516659
answers question: http://stackoverflow.com/q/27516659

http://stackoverflow.com/q/27492561
possible better answer: http://stackoverflow.com/a/37361718
accepted answer: http://stackoverflow.com/a/27523029
answer count: 4
has answer: http://stackoverflow.com/a/37361718
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27774887
type: Question
has title: pace.js: "start" event not triggered?
score: 8
has answer: http://stackoverflow.com/a/38483714
tagged with: pace.js
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27523029
tagged with: jquery-events
has body: I can't seem to find a solution to this problem I posted in the comments of this question … I'm using the pace.js plugin and I would love to load/show parts of my page immediately without having to wait for the preloader to load all content. I thought of doing this by simply calling the start event and show the selector immediately. However I can't seem to find the cause why my done event is fired, but start is not. I also tried with hide which is also fired, but stop or restart is not. $(window).load(function(){ Pace.on('start', function() { alert('start') // not fired }); Pace.on('done', function() { alert('done') // fired! }); }); Any ideas?
downvote count: 0
tagged with: preload
favorite count: 0
upvote count: 8
linked to: http://stackoverflow.com/q/27488146

http://stackoverflow.com/a/27617200
has body: You can get the values first on app load and create. Actually rather than setting it to 0 initially, store that as 'index' in your localstorage. Then you can pick up where you left off
score: 0
has comment: http://stackoverflow.com/comment/43655744
type: Answer
answers question: http://stackoverflow.com/q/27617099
has comment: http://stackoverflow.com/comment/43656552

http://stackoverflow.com/a/27556472
upvote count: 3
accepted answer of: http://stackoverflow.com/q/27553866
type: Answer
has body: Insert the following snippet before or after your code: //# sourceURL=name-of-script.js Now, whenever your code throws an error, you will see "name-of-script.js" instead of &lt;anonymous&gt;. This feature is a part of Source maps, you can read more about this feature in the Chrome devtools documentation.
answers question: http://stackoverflow.com/q/27553866
score: 3
downvote count: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/43476108
has text: Either something is transforming that code before it is sent to the browser, or you have another alert somewhere that you haven't found yet.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27523030
score: 0

http://stackoverflow.com/q/27484654
has body: I want to preselect a value in my select but there is nothing, why is this? Plnkr angular.module('selectExample', []) .controller('ExampleController', ['$scope', function($scope) { $scope.cardSelect = [ {name:'black', shade:'dark'}, {name:'white', shade:'light'}, {name:'red', shade:'dark'}, {name:'blue', shade:'dark'}, {name:'yellow', shade:'light'} ]; $scope.card = $scope.cardSelect[2]; // red }]);
accepted answer: http://stackoverflow.com/a/27484719
upvote count: 1
has title: Preselect a value
type: Question
type: AnsweredQuestion
duplicate of: http://stackoverflow.com/q/12654631
score: 1
downvote count: 0
answer count: 1
tagged with: javascript
linked to: http://stackoverflow.com/q/12654631
has answer: http://stackoverflow.com/a/27484719
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/a/27553368
score: 3
downvote count: 0
answers question: http://stackoverflow.com/q/27553286
has comment: http://stackoverflow.com/comment/43533374
accepted answer of: http://stackoverflow.com/q/27553286
has body: Is there a way to prevent strings from behaving like multi-Dimensional Arrays? You can't change the behavior of strings, no, but that test is open to other problems as well. For instance, it'll say this is a two-dimensional array: var obj = {0: {0: "foo"}}; // Yes, that's valid syntax. Rare, but valid. Instead, consider Array.isArray: if (Array.isArray(ary) &amp;&amp; Array.isArray(ary[0])) { alert( "this array is 2 dimensional" ); } else { alert( "this array is not 2 dimensional" ) } Array.isArray was added in ES5, but can be easily shimmed for really old engines: if (!Array.isArray) { (function() { var toString = Object.prototype.toString; Array.isArray = function(arg) { return toString.call(arg) === "[object Array]"; }; })(); } Side note: JavaScript doesn't have multi-dimensional arrays. It has arrays, which can contain other arrays. Just because there's an array at index 0 doesn't mean that there's an array at index 1.
upvote count: 3
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/43428912
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27498976
has text: better add a type="fail" or "success" to know what color to show.
score: 0

http://stackoverflow.com/q/27565056
tagged with: ecmascript-6
has comment: http://stackoverflow.com/comment/43555297
has answer: http://stackoverflow.com/a/27566039
has answer: http://stackoverflow.com/a/76724631
tagged with: javascript
has answer: http://stackoverflow.com/a/51269589
favorite count: 0
downvote count: 3
possible better answer: http://stackoverflow.com/a/40062566
answer count: 5
tagged with: template-strings
has title: ES6 template literals vs. concatenated strings
has answer: http://stackoverflow.com/a/27567436
accepted answer: http://stackoverflow.com/a/27567436
score: 125
has comment: http://stackoverflow.com/comment/115606670
linked to: http://stackoverflow.com/q/7299010
tagged with: node.js
upvote count: 128
has body: I have the following code for ECMAScript 6 template literals: let person = {name: 'John Smith'}; let tpl = `My name is ${person.name}.`; let MyVar = "My name is " + person.name + "."; console.log("template literal= " + tpl); console.log("my variable = " + MyVar); The output is as follows: template literal= My name is John Smith. my variable = My name is John Smith. This is the fiddle. I tried searching for the exact difference, but I couldn't find it, What is the difference between the following two statements? let tpl = `My name is ${person.name}.`; And let MyVar = "My name is "+ person.name+"."; I am already able to get the string MyVar concatenated with person.name here, so what would be the scenario to use the template literal in?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/66358373
has answer: http://stackoverflow.com/a/40062566
has comment: http://stackoverflow.com/comment/43557939
linked to: http://stackoverflow.com/q/29055518
type: Question

http://stackoverflow.com/a/46889340
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27483303
has body: The short answer to your question is: "You can't." It is not possible to edit/add/remove GET Data with window.history.pushstate - this is because GET information is sent to the server before the page is served, while any JavaScript interaction takes place after the page is served.

http://stackoverflow.com/comment/44267437
comment on: http://stackoverflow.com/a/27512153
has text: @Bergi: Oh :D I think I read that thread but didn't realize or remember that you asked. NVM then :) (I just stumbled upon this question while browsering the ecmascrip-6 tag).
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/84946181
comment on: http://stackoverflow.com/a/27537742
type: AnswerComment
type: Comment
has text: Yes, but `[ 'a', 'b', 'c' ].map((_, i) => typeof i)` returns `[ 'number', 'number', 'number' ]`.
score: 3

http://stackoverflow.com/comment/43610638
has text: It is returning `lan`; did you check to see what its value is?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27593491
score: 0

http://stackoverflow.com/comment/43809580
type: AnswerComment
score: 0
has text: if this worked; please choose it as the accepted answer.
type: Comment
comment on: http://stackoverflow.com/a/27637189

http://stackoverflow.com/comment/43458235
has text: Thank you every one. I got it. The click finally worked. Although the body didn't move, just the menu showed up, but i will fix that on my own. But Thank you guys a lot. :)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27513672

http://stackoverflow.com/comment/43531904
comment on: http://stackoverflow.com/q/27552806
type: QuestionComment
score: 2
has text: you could try `if (!user_role)`
type: Comment

http://stackoverflow.com/comment/43649770
type: QuestionComment
score: 3
has text: Just inspect the elements on StackOverflow to figure out how they did it.
comment on: http://stackoverflow.com/q/27613815
type: Comment

http://stackoverflow.com/comment/43670224
type: Comment
has text: Take a look now, I think this will solve the problem
comment on: http://stackoverflow.com/a/27624617
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43459695
comment on: http://stackoverflow.com/a/27514666
score: 1
has text: .ted-collapse is not guaranteed to be an immediate child of .ted-panel
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/43661329
type: Comment
score: 0
comment on: http://stackoverflow.com/a/27620217
type: AnswerComment
has text: Do not set as display:none, just move the container outside the viewport. You can also set visibility: hidden, but the space would be ocupied.

http://stackoverflow.com/a/27629768
has comment: http://stackoverflow.com/comment/43697633
downvote count: 0
has comment: http://stackoverflow.com/comment/43697248
has comment: http://stackoverflow.com/comment/43681598
has body: Something like this #mytest { border: 1px solid #000; } #topper { height: 30px; } #rollit { width: 50%; overflow: auto; height:200px; } basically, do not set a height to an element you want to auto-expand.. http://jsfiddle.net/gaby/yLa6v2qk/5/
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/27629313
score: 1

http://stackoverflow.com/comment/43536356
type: Comment
comment on: http://stackoverflow.com/q/27553594
score: 0
has text: Thanks for the tip. I originally had an annotations list specified, but apparently it is not necessary and the annotations don't display whether or not I specify the annotations list, so I guess I'm still SOL ( i did edit the example though so other people wont suggest the same thing). Any commas in particular? Did you get it to work on the jsfiddle? Thank you.
type: QuestionComment

http://stackoverflow.com/q/27523330
has comment: http://stackoverflow.com/comment/43481587
has answer: http://stackoverflow.com/a/27523813
accepted answer: http://stackoverflow.com/a/27523813
has comment: http://stackoverflow.com/comment/43480878
type: Question
answer count: 2
has body: I use jQuery to add line in a table, with some input / select. I have a template line that is display : none, and for add a new line I duplicate this one and past it at the end of tbody of my table. Some code : CSS : .template { display: none; } .regle { display: block; } PHTML : foo bar foobar <?php echo $this->form->foo->renderViewHelper(); ?> <?php echo $this->form->foo->renderErrors(); ?> [ ... ] jQuery : $("#ajout_regle").click(function(){ $( ".template" ) .clone() // Edit : I forgort it when I copy / past my code ! .first() .appendTo( "#listTable tbody" ) .addClass('regle') .find("input[type='text']").val(""); }); With IE8 it work pretty well, the line is add correctly in the tbody and is correctly display. But in FF, all the line is display in the first column and the rest of the table is empty... I think display : none / block have something to do with that but don't know why.
score: 5
has comment: http://stackoverflow.com/comment/43475848
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/43475642
possible better answer: http://stackoverflow.com/a/27523514
has title: appendTo doesn't put my element where I want
tagged with: css
has answer: http://stackoverflow.com/a/27523514
upvote count: 5
type: AnsweredQuestion
tagged with: clone
downvote count: 0

http://stackoverflow.com/comment/43523797
score: 0
has text: @Stefan because it is an optional parameter? Javascript is dynamic and does not require that you match a certain number of parameters for a function such as this
comment on: http://stackoverflow.com/q/27548746
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27682869
accepted answer of: http://stackoverflow.com/q/27509371
answers question: http://stackoverflow.com/q/27509371
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43807204
has comment: http://stackoverflow.com/comment/43820372
has comment: http://stackoverflow.com/comment/43801277
has comment: http://stackoverflow.com/comment/43820071
has comment: http://stackoverflow.com/comment/43800635
has body: As it says in the docs, jqLite's find() function is "Limited to lookups by tag name", which means you can't use it to select elements by classes - so you need to use querySelector instead. Note that you also need startingelem[0] instead of just startingelem when using it. I had to use angular.element to get the jqLite object for on() binding (you can use plainJS there as shown below), so it looks a bit ugly: angular.element(startingelem[0].querySelector(".editable")).on('click',function(){ startingelem[0].querySelector('.editable-input').select(); }); Here is the fully working version: http://jsfiddle.net/ar7znuz5/ Plain JS version using addEventListener: startingelem[0].querySelector(".editable").addEventListener('click',function(){ startingelem[0].querySelector('.editable-input').select(); }); And the fully working version: http://jsfiddle.net/ar7znuz5/1/ The last version, with selects and a newer original code: http://jsfiddle.net/ar7znuz5/7/
type: Answer
has comment: http://stackoverflow.com/comment/43820410
has comment: http://stackoverflow.com/comment/43800028
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43799473
has comment: http://stackoverflow.com/comment/43798963

http://stackoverflow.com/a/27590800
answers question: http://stackoverflow.com/q/27581761
score: 0
type: Answer
has body: If what you mean is a pause()/resume() features, then no, it's currently not implemented in Velocity. You'll have to manually restart your animation and you can use force-feeding to restart it from where you last stopped it.

http://stackoverflow.com/q/27549134
has body: I am porting a bunch of images that I stored locally to an online resource that stays up to date. Originally when I stored the images locally I could use the following condition for my images. &lt;img ng-src="/Content/champions/.png" This would grab the current image pathway based off a name, and if it did not exist it would simply return the image path of /Content/champions/None.png I figured this would work the same way via a url. So I made the syntax. &lt;img ng-src="http://ddragon.leagueoflegends.com/cdn/4.20.1/img/champion/.png" What I assumed would occur, is that if the above URL returned 404 (Not Found), it would default back to my local storage for the None image. However, it still tries to display an online image and shows the "broken image/picture" icon rather than conditioning over the to my local "None" image. How might I fix this? Or why is Angular not responding correctly to this scenario when it is saying Not Found 404 (Not Found)? Sometimes it tries to add the conditioned syntax to the URL rather than re-looking in the home directory, could that be the problem? i.e. It sometimes returns the following rather than restarting from my Content folder. http://ddragon.leagueoflegends.com/cdn/4.20.1/img/champion//Content/champions/None.png
possible better answer: http://stackoverflow.com/a/32564730
has comment: http://stackoverflow.com/comment/76843306
answer count: 4
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
score: 17
favorite count: 0
tagged with: angularjs
type: Question
has comment: http://stackoverflow.com/comment/43525750
has answer: http://stackoverflow.com/a/27549961
has title: AngularJS ng-src condition if Not Found (via url)
linked to: http://stackoverflow.com/q/16310298
upvote count: 17
has answer: http://stackoverflow.com/a/32564730
has answer: http://stackoverflow.com/a/37277335
accepted answer: http://stackoverflow.com/a/27549961
has answer: http://stackoverflow.com/a/52742536
tagged with: image

http://stackoverflow.com/q/27597810
accepted answer: http://stackoverflow.com/a/27597886
tagged with: javascript
score: 0
answer count: 1
has body: In Underscore _.each, is there any way to use a named function as the iteratee and pass it an argument? parseItems: function() { return _.each(this.items, this.parseItem(item), this); } Or do I have to do it like this: parseItems: function() { return _.each(this.items, function(item) { this.parseItem(item); }, this); }
has title: Pass Argument to Named Iteratee in Underscore .each
has answer: http://stackoverflow.com/a/27597886
type: AnsweredQuestion
tagged with: underscore.js
type: Question

http://stackoverflow.com/a/27534979
answers question: http://stackoverflow.com/q/27529476
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27529476
has body: For anyone struggling as I did: I just found the flatMapLatest function which does exactly what i need.
type: Answer
score: 2
downvote count: 0
upvote count: 2

http://stackoverflow.com/comment/43515747
type: QuestionComment
has text: [This question](http://stackoverflow.com/questions/12992351/how-to-update-elements-of-d3-force-layout-when-the-underlying-data-changes) may help.
type: Comment
comment on: http://stackoverflow.com/q/27542512
score: 0

http://stackoverflow.com/a/27513125
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43457424
has comment: http://stackoverflow.com/comment/43457524
has comment: http://stackoverflow.com/comment/43456710
answers question: http://stackoverflow.com/q/27512641
type: Answer
has comment: http://stackoverflow.com/comment/61861245
upvote count: 7
accepted answer of: http://stackoverflow.com/q/27512641
has body: Something like this might work for you but it is not the best solution. If the a wheel event occurs right before the scroll event, then the scroll is done with the wheel otherwise it is done with using something else then the wheel. There is a slight time difference between both events that are triggered thats why I use a threshold currTime - lastWheelTime &gt; 30. $('.test').on('scroll wheel DOMMouseScroll mousewheel', function(e) { var lastWheelTime, currTime = (new Date()).getTime(); if( e.type === 'scroll' ) { lastWheelTime = $(this).data().lastWheelTime || 0; if( currTime - lastWheelTime &gt; 30 ) { $('.info').text('no wheel'); } else { $('.info').text('with wheel'); } } else { $(this).data().lastWheelTime = (new Date()).getTime(); } }); .test { width: 200px; height: 300px; border: 1px solid red; overflow: auto; } .inner { height: 600px; } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; &lt;div class="info"&gt;&lt;/div&gt; &lt;div class="test"&gt; &lt;div class="inner"&gt;&lt;/div&gt; &lt;/div&gt;
has comment: http://stackoverflow.com/comment/43457265
score: 7
has comment: http://stackoverflow.com/comment/43457599

http://stackoverflow.com/comment/43689707
type: Comment
type: AnswerComment
has text: You can use immediate child selector `$("#parent>div:lt(2)").clone();`
comment on: http://stackoverflow.com/a/27634810
score: 0

http://stackoverflow.com/a/27589234
has body: You are using async XMLHttpRequest (note that it should be spelled by capital "H"), so most probably playSound function is called before request.onLoad (note: missing =) completes. Try to trace execution of your script using console.log or similar to find bugs like this and use JavaScript Console to catch syntax errors.
downvote count: 0
answers question: http://stackoverflow.com/q/27589179
score: 4
type: Answer
upvote count: 4

http://stackoverflow.com/comment/43555080
type: AnswerComment
comment on: http://stackoverflow.com/a/27564948
score: 0
type: Comment
has text: Thanks but i think that is good `$(".load-more").html(' No More Posts ') // if there are none left` and can you help me to add loading.gif image when posts load?

http://stackoverflow.com/comment/43609505
type: Comment
comment on: http://stackoverflow.com/q/27588651
has text: Sorry for not answering immidiately. Ire ceived this from the author of the code. The code itself follows in my next comment.I followed icio’s answer in this thread: http://stackoverflow.com/questions/2755631/is-it-possible-to-lightbox-many-images-but-only-show-one-image-to-activate-them The link (href=„red.jpg“) works fine without JS. When JS code is added, the lightbox opens when I click on thumb.jpg, but neither any image nor control elements are shown. Instead, whatever icon the browser uses to replace images that could not be found is shown.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/43553779
type: QuestionComment
comment on: http://stackoverflow.com/q/27557624
has text: Yes, the code in the browser works fine
score: 0
type: Comment

http://stackoverflow.com/comment/43685461
type: QuestionComment
has text: @agentpx I just done some changes in my question. check else if method. Right it is calling the method `getXml` but it doesn't show the alert popup
score: 0
comment on: http://stackoverflow.com/q/27632398
type: Comment

http://stackoverflow.com/comment/43580703
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27573276
type: QuestionComment
has text: which phonegap/cordova version are you using? phonegap-1.0.0.js is so old

http://stackoverflow.com/comment/43488512
comment on: http://stackoverflow.com/q/27529328
has text: He begins talking about the call stack right around the 10 minute mark.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27487425
score: 3
has body: I'm trying to remove all empty params from a url string. My url looks like this http://localhost/wm/frontend/www/?test=&amp;lol=1&amp;boo=2 my code should return http://localhost/wm/frontend/www/?lol=1&amp;boo=2 but it doesn't instead it returns http://localhost/wm/frontend/www/?&amp;lol=1&amp;boo=2 This is the regex i'm using replace("/(&amp;?\w+=((?=$)|(?=&amp;)))/g","") i know i could just use replace() strings that match '?&amp;' after the 1st replace, but i would rather edit my regex to do so, so it's in 1 line of code. Any ideas? here is my jsfiddle
has answer: http://stackoverflow.com/a/27487918
has answer: http://stackoverflow.com/a/27487531
has comment: http://stackoverflow.com/comment/43423701
answer count: 4
favorite count: 0
has answer: http://stackoverflow.com/a/27487608
possible better answer: http://stackoverflow.com/a/27487531
tagged with: regex
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27488405
upvote count: 3
has comment: http://stackoverflow.com/comment/43407131
type: Question
accepted answer: http://stackoverflow.com/a/27487608
has title: remove all empty values from url string
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/27624935
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/27625290
type: AnsweredQuestion
score: 1
tagged with: rsa
has body: I believe this is a pretty basic question, but I'm starting the studies in JavaScript and in RSA, so I'm a little bit lost. I just downloaded the library Cryptico, which gives me an easy to use RSA key gen/encryption/decryption. The public part of the generated RSA Key, can be extracted easily just using the command: publicKeyString(RsaKey) Which is: my.publicKeyString = function(rsakey) { pubkey = my.b16to64(rsakey.n.toString(16)); return pubkey; } The rsakey.n is defined while generating the key in the function: function RSAGenerate(B, E) { var rng = new SeededRandom(); var qs = B &gt;&gt; 1; this.e = parseInt(E, 16); var ee = new BigInteger(E, 16); for (;;) { for (;;) { this.p = new BigInteger(B - qs, 1, rng); if (this.p.subtract(BigInteger.ONE).gcd(ee).compareTo(BigInteger.ONE) == 0 &amp;&amp; this.p.isProbablePrime(10)) break; } for (;;) { this.q = new BigInteger(qs, 1, rng); if (this.q.subtract(BigInteger.ONE).gcd(ee).compareTo(BigInteger.ONE) == 0 &amp;&amp; this.q.isProbablePrime(10)) break; } if (this.p.compareTo(this.q) &lt;= 0) { var t = this.p; this.p = this.q; this.q = t; } var p1 = this.p.subtract(BigInteger.ONE); var q1 = this.q.subtract(BigInteger.ONE); var phi = p1.multiply(q1); if (phi.gcd(ee).compareTo(BigInteger.ONE) == 0) { this.n = this.p.multiply(this.q); this.d = ee.modInverse(phi); this.dmp1 = this.d.mod(p1); this.dmq1 = this.d.mod(q1); this.coeff = this.q.modInverse(this.p); break; } } } But the private part of the key, I just can't understand how to extract, so I'll be able to save public/private key parts and available for later using. Library Documentation: https://github.com/wwwtyro/cryptico
tagged with: cryptico
upvote count: 1
accepted answer: http://stackoverflow.com/a/27625290
type: Question
tagged with: javascript
has title: Extract RSA private key from Cryptico.js

http://stackoverflow.com/comment/43455760
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27512641
has text: @JoeSwindell: I've already looked at that question. I'm not trying to detect if it was the user or not. I just want to know if it's done via mousewheel or scrollbar.
score: 0

http://stackoverflow.com/comment/43670068
score: 0
has text: I want to know how It really works.
comment on: http://stackoverflow.com/q/27623926
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27481068
favorite count: 0
has comment: http://stackoverflow.com/comment/43394956
has comment: http://stackoverflow.com/comment/43395750
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27481737
accepted answer: http://stackoverflow.com/a/27481737
type: AnsweredQuestion
downvote count: 0
has title: Move focus to next field if user doesn't change the option
score: 1
has comment: http://stackoverflow.com/comment/43394978
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/11002421
has comment: http://stackoverflow.com/comment/43395606
upvote count: 1
has body: I have a HTML Select list as follows: Some Text 1 Some Text 2 Some Text 3 Some Text 4 And Have some JavaScript code, which moves the focus to the next element on change of #myoptions. $("#somebox").on("change", "#myoptions", function(){ $("#somename1").focus() }); The question is: - How can I move the focus to the next element if user just clicks on the select list, checks other options in the list but doesn't change the option? (In this case, focus lies there on the same select, because user doesn't change the value) Here is the JSFiddle created. Note- In our code tab key is disabled, so quite hard for user to move the focus to the next element.
answer count: 1
tagged with: jquery

http://stackoverflow.com/q/27536256
has answer: http://stackoverflow.com/a/31005863
tagged with: angular-ui-router
downvote count: 0
has title: AngularJS loading indicator with angular-busy and $stateChangeStart
score: 1
type: Question
tagged with: javascript
upvote count: 1
answer count: 1
has body: I'm attempting to use the angular-busy directive to trigger a loading indicator on state change. The directive template takes a promise (cg-busy='myPromise'), and I'm using ui-router for my routing. What is the best way to trigger the loading indicator on state change from company.list to company.detail so that the indicator is shown while the promises are being resolved? My thought is to create a blank promise on $stateChangeStart, and pass that into the cg-busy template, but that doesn't seem to be working. HTML: Companies Company Name Drugs owned {{ Item.label }} ({{ Item.parent_ticker }}) {{ Item.metric_applications_count }} routes: angular.module('company').config(function($stateProvider) { $stateProvider.state('company', { url: '/company', abstract: true, views: { 'nav': { templateUrl: 'app/main.nav.html' }, 'main': { templateUrl: 'app/company/company.html' }, 'list@company': { templateUrl: 'app/company/company.list.html', controller: 'CompanyListCtrl' }, 'footer@': { templateUrl: 'app/main.footer.html' } } }); $stateProvider.state('company.list', {url: '',views: {} }); $stateProvider.state('company.detail', { url: '/{id:[0-9]{1,4}-[0-9]{1,4}}', resolve: { Overview: function($stateParams, companyService){ var d = companyService.getOverview($stateParams.id); return d; }, Products: function($stateParams, companyService){ var d = companyService.getProducts($stateParams.id); return d; }, Revenues: function($stateParams, companyService){ var d = companyService.getRevenues($stateParams.id); // not a promise return d; } }); company ctrl: angular.module('company').controller('CompanyListCtrl', function ($rootScope, $scope, $state, $stateParams, $q, utilService, companyService) { $scope.List = companyService.getAll().$object; $rootScope.$on("$stateChangeStart", function (ev, to, toParams, from, fromParams) { $scope.myPromise = $q.defer(); console.log('stateChangeStart'); console.log($scope.myPromise); }); }); redacted routes for brevity.
favorite count: 0
tagged with: loading
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/comment/43676561
comment on: http://stackoverflow.com/a/27627489
type: AnswerComment
score: 0
type: Comment
has text: no, you capture the submit event of form and preventDefault and do ajax inside submit handler. Need `type=submit` to allow `Enter`. No need keypress or keydown handlers that way. In fact your key handelr would bypass ajax

http://stackoverflow.com/q/27592559
type: Question
accepted answer: http://stackoverflow.com/a/27744734
tagged with: webpack
tagged with: javascript
has title: Webpack workflow splitting vendor and app code efficiently
answer count: 1
downvote count: 0
tagged with: workflow
tagged with: gulp
favorite count: 0
has answer: http://stackoverflow.com/a/27744734
tagged with: npm
score: 11
upvote count: 11
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/26603499
has body: I have had trouble finding sufficient Webpack documentation and examples to hash out an ideal dev workflow for my situation. Here are all the features that would make the workflow ideal: Watching, ideally through Gulp, with efficient caching. (Don't think I need hot module replacement and suspect it might not fit into my dev environment well.) Vendor modules (right now I have only npm packages, not all of them exposing UMD globals in their main file, if it came down to that) that are a. not parsed &amp; re-compiled during watch (so recompilation is faster), b. do not receive a sourcemap (so browser devtools are faster to respond), and c. write to a distinct vendor.js bundle that browsers can cache separately from app bundles. App modules that are a. explicit about all dependencies (i.e. import React from 'react'; even if React is actually globally exposed or something via #2), b. are re-compiled during watch, and c. do receive a sourcemap. Most of what I have read in documentation or examples has not seemed to hit this workflow on the head. While I do see in the docs how to create a vendor-specific bundle (reproduced here: Simple solution to share modules loaded via NPM across multiple Browserify or Webpack bundles), the simple example provided does not address 2a and 2b. I don't see in the docs any ways to specify different compile-configurations (sourcemaps, etc.) for different chunks, or to create completely separate Webpack bundles with separate config files that can reference each other, unless by globalizing all vendor libraries and using them as externals (?), which isn't ideal ... Also, I am curious whether Gulp users are using gulp-webpack or instead a setup like that provided in http://webpack.github.io/docs/usage-with-gulp.html. (I'm not sure how well the webpack-dev-server would fit into my dev environment so would like to stick to gulp-watch if possible.) Am I missing something that other Webpack users know about? What's the best way to do this? OR is i…

http://stackoverflow.com/comment/43564625
comment on: http://stackoverflow.com/q/27569563
has text: If you allow @, shouldn't you also allow dots?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43672382
comment on: http://stackoverflow.com/a/27617862
type: AnswerComment
type: Comment
has text: you are missing the `#` before the color. check the updated: http://jsfiddle.net/w1bpmkn5/1/
score: 1

http://stackoverflow.com/q/27481562
downvote count: 0
answer count: 1
has title: Fuelux datepicker how do I initialise it?
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: datepicker
has body: I'm trying to use the fuelux datepicker and can't seem to even initialise it properly! Any help would be most appreciated. I've based it on the examples here: https://gist.github.com/vernak2539/9980566 Header of page: HTML: Before my JS: JS: $(document).ready(function(){ $('#myDatepicker').datepicker(); }); Also tried in a fiddle and thought it would be sufficient but it isn't working: http://jsfiddle.net/z2rpos9g/
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27482625
upvote count: 5
tagged with: fuelux
accepted answer: http://stackoverflow.com/a/27482625
score: 5

http://stackoverflow.com/q/27618664
upvote count: 1
tagged with: css
has title: jQuery Sticky Header displacing the page content
type: AnsweredQuestion
has body: I am using jQuery Sticky header in my theme. It seems to work fine in most of the pages but in two pages it is displacing the content to the right on load and on scrolling down it places it back in the right position. i am trying to debug the issue with no results. On Page Load On Scroll DEMO Link
score: 1
has comment: http://stackoverflow.com/comment/43658388
possible better answer: http://stackoverflow.com/a/27618740
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27618756
accepted answer: http://stackoverflow.com/a/27618833
tagged with: sticky
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27618740
answer count: 4
favorite count: 0
has answer: http://stackoverflow.com/a/27618833
has answer: http://stackoverflow.com/a/27618728
has comment: http://stackoverflow.com/comment/43658391

http://stackoverflow.com/q/27552631
type: Question
has answer: http://stackoverflow.com/a/27564746
score: 0
answer count: 1
has title: Dynamically add/remove xaxis categories in Highcharts
has body: I am creating a polar spider chart and I'd like to know if it's possible to, dynamically, add/remove xaxis categories. Per example, let's say I have xaxis categories like [Banana, Apple, Pear, Grape] and instead of a legend with series, I would have a legend-like with the xaxis categories. When I would click on the Banana, the Banana category would disappear from the chart and when I click again it would re-appear. I read about xaxis setCategories but that implies defining a constant array which is not my purpose at all. Thank you.
tagged with: http://stackoverflow.com/tag/json
tagged with: highcharts
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/q/27554348
has comment: http://stackoverflow.com/comment/43535197
has body: I have a site which has a parallax scroll effect and it's running the skrollr.js script. It's a mobile first website, but I would like for the script to not run on mobile devices because it won't allow scrolling. Does anyone know how I can prevent the script from running when on a mobile device? Thanks. The code where the script is uploaded is at then end of the body section. If any other code is needed let me know. &lt;!-- SCRIPTS --&gt; &lt;script type="text/javascript" src="js/skrollr.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; skrollr.init(); &lt;/script&gt; &lt;!--/ SCRIPTS --&gt;
score: 6
has title: How to disable a script when on mobile device
has comment: http://stackoverflow.com/comment/43535174
tagged with: css
upvote count: 6
has comment: http://stackoverflow.com/comment/43535114
has answer: http://stackoverflow.com/a/27554384
has comment: http://stackoverflow.com/comment/43535192
has comment: http://stackoverflow.com/comment/43535243
has comment: http://stackoverflow.com/comment/43535158
type: Question
has comment: http://stackoverflow.com/comment/43535033
tagged with: mobile
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43535017
has answer: http://stackoverflow.com/a/53485985
has comment: http://stackoverflow.com/comment/43535008
has comment: http://stackoverflow.com/comment/43535222
has comment: http://stackoverflow.com/comment/43535139
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43536097
has comment: http://stackoverflow.com/comment/43535606
downvote count: 0
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/27593185
upvote count: 1
tagged with: match
has answer: http://stackoverflow.com/a/27594079
type: Question
has answer: http://stackoverflow.com/a/27593484
score: 1
has answer: http://stackoverflow.com/a/27593347
accepted answer: http://stackoverflow.com/a/27593254
tagged with: arrays
downvote count: 0
tagged with: javascript
has body: I have an dynamic string with for numbers and a unit. The unit can be changed to cm, %, ... but it is always the same for all 4 numbers. like "10px 12px 14px 16px" not "10px 12% 14cm 16in" I need a reqular expression to give me a result like below: string = "10px 12px 14px 16px" result = array = [ "10 12 14 16", "px" ] Consider the reqular expression should match any unit not the only mentioned above. I have tried this but no luck: var string = "10px 11px 13px 14px"; var match = string.match(/([0-9]+)(.*)/); result: Array [ "10px 11px 13px 14px", "10", "px 11px 13px 14px" ]
favorite count: 0
answer count: 5
has answer: http://stackoverflow.com/a/27593298
tagged with: regex
has title: Regular expression for numbers and units
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27594079
has answer: http://stackoverflow.com/a/27593254

http://stackoverflow.com/comment/43696697
type: Comment
score: 4
type: QuestionComment
has text: I think this may be the case of an [XY problem](http://meta.stackexchange.com/a/66378).
comment on: http://stackoverflow.com/q/27638924

http://stackoverflow.com/comment/43517446
has text: While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.
type: AnswerComment
comment on: http://stackoverflow.com/a/27545104
score: 0
type: Comment

http://stackoverflow.com/tag/r
tags question: http://stackoverflow.com/q/27532393
tags question: http://stackoverflow.com/q/27534981
tag name: r
type: Tag

http://stackoverflow.com/a/27613540
type: Answer
score: 0
has body: Remove the parseFloat and your string won't be cast to a number? change: function(event) { this.setState({value: event.target.value}); } http://jsfiddle.net/2hauj2qg/1/
answers question: http://stackoverflow.com/q/27613490

http://stackoverflow.com/q/27572069
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/27572188
tagged with: javascript
tagged with: angularjs
has body: I'm developing a colorpicker with Angular and trying to incorporate some of the ideas I've seen elsewhere in order to write the expression that will be called whenever a user picks a color. &lt;color-picker on-pick='something($color)'&gt;&lt;/color-picker&gt; I've noticed that all of the built in directives use this style of scope binding, rather than say for instance, passing the function straight onto the scope. &lt;color-picker on-pick='something'&gt;&lt;/color-picker&gt; An example of this style is ngRepeat: &lt;li ng-repeat='item in items' ng-bind='$index'&gt;&lt;/li&gt; I understand that the something($color) expression will evaluated with the parent scope, rather than the scope of the directive itself, meaning that the $color property would have to be available on the parent scope in order to be correctly evaluated. However, if the directive has an isolate scope, it won't see the parent. Even if it could, I don't want to clobber a $color variable into that scope. In a similar vein, I've seen somewhere that a scope binding using &amp;prop will evaluate the expression within the parent scope, rather than the directive's scope. However, if that is the case, how can it be possible to make calls like on-pick='something($color)' as the $color property comes from the directive's scope, whereas the something function would be on the parent scope? The Angular documentation for ngRepeat refers to these variables as 'special variables', however a look at the source shows that they are assigned onto a scope generated from some system of block mapping. I struggled to follow past there at a quick glance.
has title: Modifying parent scope for Special Variables within Angular expressions
tagged with: angularjs-directive
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27572188
type: Question

jquery-isotope
tags question: http://stackoverflow.com/q/27539693
type: Tag
tags question: http://stackoverflow.com/q/27587334
tags question: http://stackoverflow.com/q/27531497
tags question: http://stackoverflow.com/q/27580277
tags question: http://stackoverflow.com/q/27606356
tag name: jquery-isotope

http://stackoverflow.com/q/27524364
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/43477344
has body: In controller List&lt;String&gt; currectTime = userService1.getUserCurrectTime(time,hash); I need to extract each value from the ajax success responce. $( ".dropdownlist" ).change(function() { var time=$('#dropdownlist').val(); var hash=$('#hash').val(); alert(time+hash); var savedata = { time:time, hash:hash }; $.ajax({ type:'POST', url:'../test', data:savedata, error:function() { alert("error"); }, success:function(data) { alert(data); var obj = JSON.parse(data); } }); }); If I alert the response data I see the below ["28-12-2014 01:10:45 NST","30-12-2014 02:40:35 NST","06-11-2014 16:10:45 NST"] How can I get these values separately.
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27524466
answer count: 2
has comment: http://stackoverflow.com/comment/43477383
tagged with: jsp
score: 1
possible better answer: http://stackoverflow.com/a/27524466
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/27524389
accepted answer: http://stackoverflow.com/a/27524389
type: AnsweredQuestion
upvote count: 2
tagged with: http://stackoverflow.com/tag/json
has title: how to extract string list values in ajax success

http://stackoverflow.com/comment/43541313
comment on: http://stackoverflow.com/a/27557379
type: Comment
score: 0
type: AnswerComment
has text: Print out the value to your console if you would. It seems like you are declaring two different scopes of movement speed. I suspect (simply based on the code above) that you are not operating on the variable you think you are. If you are seeing the movement event printing out in the console, but the character is not moving that is the first thing I would examine.

http://stackoverflow.com/comment/43575663
comment on: http://stackoverflow.com/a/27573886
score: 0
type: AnswerComment
has text: This definitely does not work for me. It's worked before when I didnt use a modal but inside the modal it doesnt work at all
type: Comment

http://stackoverflow.com/q/27619717
answer count: 3
possible better answer: http://stackoverflow.com/a/27620826
accepted answer: http://stackoverflow.com/a/27619817
has comment: http://stackoverflow.com/comment/43660395
has answer: http://stackoverflow.com/a/27620169
has title: Partially filling a rectangle in HTML5
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27619817
has body: I have a canvas in which I want to draw multiple rectangles (of varying sizes). These rectangles have to be filled or emptied over time, be it automatically or by input from the user. The problem is that I have never programmed HTML5 before and don't know how to partially fill a rectangle or increase the fill (through something like rectangle.backgroundHeight++). Here is my code: &lt;canvas id="myCanvas" height="1000" width="1000" /&gt; &lt;script&gt; window.addEventListener('load', function () { var ctx = document.getElementById('myCanvas').getContext('2d'); var interval = setInterval(function() { return function () { // Draw large fuel tanks var fuelA = ctx.rect(150, 60, 110, 130); var fuelB = ctx.rect(600, 60, 110, 130); // Draw small fuel tanks var fuelC = ctx.rect(40, 300, 60, 130); var fuelD = ctx.rect(300, 300, 60, 130); var fuelE = ctx.rect(500, 300, 60, 130); var fuelF = ctx.rect(750, 300, 60, 130); ctx.stroke(); }; }(), 1000/25); }, false);
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27620826
type: Question
tagged with: rectangles
tagged with: javascript
score: 0

http://stackoverflow.com/q/27633386
accepted answer: http://stackoverflow.com/a/27633949
favorite count: 0
has comment: http://stackoverflow.com/comment/57321310
answer count: 5
linked to: http://stackoverflow.com/q/19656372
type: AnsweredQuestion
has body: As, we know in C# windows form application we can print content directly to print without any preview. I want to print content in jQuery/JavaScript when user click a button, browser does not show any print preview and content printed to printer.
score: 12
type: Question
upvote count: 12
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43687271
has comment: http://stackoverflow.com/comment/43686519
has answer: http://stackoverflow.com/a/71079900
has answer: http://stackoverflow.com/a/27633949
linked to: http://stackoverflow.com/q/4849952
has answer: http://stackoverflow.com/a/70289151
has title: How to skip browser default print preview and print content directly to printer in jquery/javascript?
has comment: http://stackoverflow.com/comment/43686494
possible better answer: http://stackoverflow.com/a/27638122
has answer: http://stackoverflow.com/a/48712319
has answer: http://stackoverflow.com/a/27638122

http://stackoverflow.com/comment/43650032
type: Comment
has text: You've got an extra .append in your answer, but it worked after that. This was new learning for me, as I didn't know how to use properties correctly. Thanks!
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27614016

http://stackoverflow.com/q/27488275
tagged with: javascript
tagged with: jquery
tagged with: ajax
has body: I am using the AjaxFileUpload plugin in my code, but ie8 and ie10 are not sending the Cookie in the request header on the POST to AjaxFileUploadHandler.axd. I see the "eye" icon at the bottom of ie8 and see that AjaxFileUploadHandler.axd is "blobked", so this not sending of the cookie is on purpose. I have the tag below in my own web.config, but the issue is the scripts for AjaxFileUpload are pulled in from a dll, and so even with this AjaxFileUploadHandler is still "blocked". I downloaded the source code to the AjaxControlToolkit, which creates the dll for the project, and now I am trying to find where I can add the P3P header so that ie can be happy. I see XMLHttpRequest() in the code of the toolkit, is there any way to add this P3P header to it to satisfy ie? EDIT: The fix is to comment out iframe.security = "restricted"; I updated the code below. &lt;httpProtocol&gt; &lt;customHeaders&gt; &lt;add name="P3P" value='CP="Potato"'/&gt; &lt;/customHeaders&gt; &lt;/httpProtocol&gt; In particular this issue is with the iframe that the toolkit uses. Is there any way to just add P3P to the iFrame? this.createIFrame = function() { var name = this._iframeName, iframe = document.createElement("IFRAME"); iframe.width = "0"; iframe.height = "0"; iframe.style.display = "none"; iframe.src = "about:blank"; //iframe.src = "javascript:'&lt;script&gt;window.onload=function(){document.write(\\'&lt;script&gt;document.domain=\\\"" + document.domain + "\\\";&lt;\\\\/script&gt;\\');document.close();};&lt;\/script&gt;'"; iframe.id = name; iframe.name = name; //iframe.security = "restricted"; document.body.appendChild(iframe); iframe.contentWindow.name = name; $addHandlers(iframe, { load: Function.createDelegate(this, this.onIFrameLoadedHandler) }); this._iframe = iframe; }; this.onIFrameLoadedHandler = function (e) { /// &lt;summary&gt; /// Event handler to capture when iframe receive response from server. /// &lt;/summary&gt; /// &lt;param name="e"&gt;&lt;/param&gt; if (!control._curren…
score: 0
accepted answer: http://stackoverflow.com/a/27491091
type: AnsweredQuestion
has title: Can I add a P3P Response Header to XMLHttpRequest?
tagged with: cookies
has answer: http://stackoverflow.com/a/27491091
tagged with: ajaxcontroltoolkit
type: Question
answer count: 1

http://stackoverflow.com/comment/43647100
has text: Downvoters who don't explain their vote are lazy. Voting to close this as "off topic" makes no sense, it's a question about using javascript to parse date strings.
comment on: http://stackoverflow.com/q/27594214
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27524429
type: Answer
score: 1
answers question: http://stackoverflow.com/q/27524180
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27524180
downvote count: 0
has body: I assume you are using a shared javascript file on all pages of the site which is why the timer will keep running on every page. You could make sure that the timer only runs on the homepage by checking the page url and wrap your startTimer function inside this check: if (document.location.href == "http://www.yourhomepage.com"){ startTimer(); } Replace http://www.yourhomepage.com with whatever url your homepage is on. This will only work if your pages are separate html files. If you are using a hashbang method whereby the document doesn't change, this will not work.
type: AcceptedAnswer

http://stackoverflow.com/comment/43431352
score: 0
type: Comment
has text: Yeah.. I second you on that. Infact after the departure of XP even IE7 support is not required.
comment on: http://stackoverflow.com/a/27500387
type: AnswerComment

http://stackoverflow.com/a/27495468
score: 1
has body: As the error points out, a is expected to be a function, that is, it must be callable. The new keyword requires a function object that knows how to construct an instance - but a does not. Letting it inherit from Function.prototype (by using __proto__) does not help anything, callability is an intrinsic property of objects. You are able to call new f(), as f is such a constructor function, being created by the Function constructor.
has comment: http://stackoverflow.com/comment/43425588
has comment: http://stackoverflow.com/comment/43500852
has comment: http://stackoverflow.com/comment/43426218
has comment: http://stackoverflow.com/comment/43427603
upvote count: 1
answers question: http://stackoverflow.com/q/27494663
type: Answer
has comment: http://stackoverflow.com/comment/43425267
has comment: http://stackoverflow.com/comment/43423545
has comment: http://stackoverflow.com/comment/43501211
has comment: http://stackoverflow.com/comment/43423366
downvote count: 0

http://stackoverflow.com/q/27554388
favorite count: 0
has comment: http://stackoverflow.com/comment/43537697
has answer: http://stackoverflow.com/a/27554416
downvote count: 5
upvote count: 0
has answer: http://stackoverflow.com/a/27554492
score: -5
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43535331
linked to: http://stackoverflow.com/q/4090518
has comment: http://stackoverflow.com/comment/43535102
type: Question
has body: I was ask a question in an interview to convert a string number to a number. eg : My string is "TEN" . and I have to convert it to number 10. Please help. Thanks
linked to: http://stackoverflow.com/q/11980087
answer count: 2
has title: convert string num to number javascript
tagged with: javascript

http://stackoverflow.com/comment/43449089
has text: var aa = function() {}; will assign a function to var aa. This makes people thinking that "function() {}" is an "expression-string". However, javascript treats it as "statement-string". We need to use "(function() {})" as "expression-string".
type: AnswerComment
comment on: http://stackoverflow.com/a/27509015
score: 0
type: Comment

http://stackoverflow.com/a/27534818
answers question: http://stackoverflow.com/q/27534742
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27534742
type: Answer
has body: This is using underscore.js, especially the template function of the library: More infomation here: http://underscorejs.org/#template
score: 1
upvote count: 1

http://stackoverflow.com/comment/43544181
has text: I just came back to post the answer as I just discovered the problem, wish I checked back earlier now. I was styling inside the ` ` tag, which seems so obvious when I look back now. You are correct, that's the way to do it. Thanks for answering.
comment on: http://stackoverflow.com/a/27558838
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/43437055
comment on: http://stackoverflow.com/a/27503330
has text: Thank you so very much, I was unaware of this, thank you for the thorough answer I shall study it!
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/27521477
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43472821
has comment: http://stackoverflow.com/comment/43472524
has comment: http://stackoverflow.com/comment/43472363
type: Answer
has comment: http://stackoverflow.com/comment/43473014
has comment: http://stackoverflow.com/comment/43472258
has comment: http://stackoverflow.com/comment/43472611
accepted answer of: http://stackoverflow.com/q/27521280
has body: Avoid using table elements as a layout. I know it seems convenient when you first start off, but save yourself the trouble and just go straight into learning to style with css function validateForm(){ var checked = document.querySelector('form').elements.some(function(el){ return el.checked; }); if(checked){ //at least one is checked } else { //none are checked } }
answers question: http://stackoverflow.com/q/27521280

http://stackoverflow.com/a/27552572
answers question: http://stackoverflow.com/q/27552427
accepted answer of: http://stackoverflow.com/q/27552427
has comment: http://stackoverflow.com/comment/43541691
has comment: http://stackoverflow.com/comment/43539564
has body: Using the flex property to determine how each flex element can expand/contract is going to be your solution here: Example fiddle Here's the important stuff that we're adding: CSS .mainPanel > div { padding: 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 25%; /* <-- Added */ } .mainPanel > div:nth-child(2) { /* <-- This whole block added */ flex: 2 0 auto; max-width: 50%; } So here's what that flex property is telling you about the layout parameters of your flex box. Example: flex: 2 0 auto 2 – This is how many "parts" your flex element can grow to. This can be set individually with flex-grow. 0 – This is the floor for how many "parts" your flex element can shrink to. This can be set individually with flex-shrink. auto – This is essentially the min-width for the element. It won't be able to shrink beyond that point. Setting it to auto means we size the element to its content. This can also be set individually with the property flex-basis.
upvote count: 5
score: 5
has comment: http://stackoverflow.com/comment/43539941
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/43509075
comment on: http://stackoverflow.com/q/27540814
type: Comment
type: QuestionComment
score: 8
has text: The structure you describe isn't **an** object.

http://stackoverflow.com/a/27545026
has comment: http://stackoverflow.com/comment/43517896
downvote count: 0
has comment: http://stackoverflow.com/comment/43517072
has comment: http://stackoverflow.com/comment/43519023
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43516646
accepted answer of: http://stackoverflow.com/q/27544765
type: Answer
has comment: http://stackoverflow.com/comment/43517245
answers question: http://stackoverflow.com/q/27544765
has comment: http://stackoverflow.com/comment/43517358
has body: HTML Start Close JS $('#start').click(function () { $(this).addClass('start'); }); $('#close').click(function () { $('#start').removeClass('start'); }); CSS .start { // css style here }
score: 1
has comment: http://stackoverflow.com/comment/43517455
upvote count: 1

http://stackoverflow.com/q/27627263
has comment: http://stackoverflow.com/comment/43679799
has answer: http://stackoverflow.com/a/27627800
type: AnsweredQuestion
tagged with: hide
tagged with: toggle
type: Question
possible better answer: http://stackoverflow.com/a/27627339
accepted answer: http://stackoverflow.com/a/27627800
has answer: http://stackoverflow.com/a/27627339
tagged with: javascript
has answer: http://stackoverflow.com/a/27627355
has title: Show an element right after one that has been clicked
has body: When I click a section, how to toggle another div? Here is my code: room 101 room 102 room 103 room 104 room 105 item1 item2 item3 item4 item5 I want the output like this: when I click any room, the all five items will be toggled and shown just beneath the room. For example: When I click room 101, the outcome should looks like this: room 101 item1 item2 item3 item4 item5 room 102 room 103 room 104 room 105
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/43492440
score: 0
comment on: http://stackoverflow.com/a/27520982
type: AnswerComment
has text: Thaks so much man! So since the second approach is not right way and it is not guaranteed that the second async.each runs after the first one the problem is: Does it mean I cannot have a simple for loop like my new updated question? If yes, it is easy to change this one to async.each, but the problem is this one is recursive and that's make it complicated! If this needs to be async as well and not a for loop, do you know how I can have this recursive functionality here?
type: Comment

http://stackoverflow.com/comment/43546636
has text: @ArunPJohny so? I need to relies on `.show()/.hide()`?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27560199

http://stackoverflow.com/comment/101768050
comment on: http://stackoverflow.com/a/27637038
type: AnswerComment
score: 1
has text: @MarkJackson: No, `_` isn't special; it's a valid identifier in JS, just like `x` or `foo`. These definitions are equivalent: a) `function f(x) { return x; }`, b) `function f(_) { return _; }`. I'd say @sagar43's answer is incorrect, because `_` _is_ in fact used in the body of `chart.x`, so omitting the parameter (`chart.x = function() { ... }`) would change the function's semantics.
type: Comment

http://stackoverflow.com/q/27479841
has comment: http://stackoverflow.com/comment/62253599
upvote count: 6
tagged with: javascript
has body: Is there any way to use the Persian or Arabic calendar in Amcharts trendline? Months names are not useful, because they conflict with other calendars. AmCharts Live Editor
answer count: 3
has answer: http://stackoverflow.com/a/34634337
has answer: http://stackoverflow.com/a/27541778
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/62278633
score: 6
tagged with: amcharts
has answer: http://stackoverflow.com/a/49119580
downvote count: 0
has title: amCharts - How can I use non-English calendar?
tagged with: calendar
type: Question

http://stackoverflow.com/comment/43657555
type: Comment
type: QuestionComment
has text: @MilindAnantwar I now but if he just wants to hide it css can do the trick
score: 0
comment on: http://stackoverflow.com/q/27618267

http://stackoverflow.com/comment/43590896
comment on: http://stackoverflow.com/q/27583120
type: Comment
has text: Yes.But no difference
type: QuestionComment
score: 0

http://stackoverflow.com/a/27561340
has comment: http://stackoverflow.com/comment/43549259
has comment: http://stackoverflow.com/comment/43549090
has body: Yo can set the url like: /myDomainName/myService and get the params from req.query.location and req.query.userId This might help you: http://expressjs.com/api.html#req.query
upvote count: 2
type: Answer
accepted answer of: http://stackoverflow.com/q/27561273
score: 2
has comment: http://stackoverflow.com/comment/43549220
answers question: http://stackoverflow.com/q/27561273
has comment: http://stackoverflow.com/comment/43549071
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/27580173
tagged with: javascript
tagged with: passport.js
favorite count: 0
has body: i want to know to handle user firstname and lastname in passportjs knowing i tried the folowing code : passport.use('local-register', new passportLocal (strategyOption, function (email, password, firstname, lastname, callback) { console.log(' ------- pass :' + password); console.log(' ------- email :' + email); console.log(' ------- fname :' + firstname); console.log(' ------- lname :' + lastname); var searchedUser = { email: email }; User.findOne(searchedUser, function (err, user) { if (err) return callback (err); //console.log(user); if (user) return callback (null, false, { message: 'User do exist!' }); var newUser = new User({ firstname: firstname, lastname: lastname, email: email, password: password }); newUser.save(function (err) { if(err) console.log('hi'); callback (null, newUser); }); }); })); but in the console i got the following stuff : ---- p : pass(the password giving) ---- email : the email ... ---- fname : - here i got a wierd thing - ------- fname :function verified(err, user, info) { if (err) { return self.error(err); } if (!user) { return self.fail(info); } self.success(user, info); } ------- lname :undefined and the worst : unknown callback ... so node can't handle the callback and when i delete the fname and the lname parameter .. everything works like a charm so does anyone know how to handle the fname and lname in passport ? Thankx,
tagged with: node.js
type: UnansweredQuestion
score: 1
has answer: http://stackoverflow.com/a/73762785
tagged with: database
type: Question
upvote count: 1
answer count: 1
downvote count: 0
has title: Handling firstname and lastname in passportjs

http://stackoverflow.com/a/27590870
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/43605505
upvote count: 6
accepted answer of: http://stackoverflow.com/q/27590853
has comment: http://stackoverflow.com/comment/43605535
answers question: http://stackoverflow.com/q/27590853
score: 6
has body: The issue is generally the dynamic addition ... it wasn't there when the click event was set to monitor. Try ... $(document).on("click", ".vocab-word", function() { alert( "Handler for .click() called." ); }); This will allow your code to monitor the event at the document level, regardless of what changes. UPDATE: The concept is to monitor above where the element will be added and I don't know your code so can't guarantee other elements you can attach to. It is possible, depending on the complexity of your code to cause performance issues using the $(document).on() code ... try $("body") or lower HTML elements.
type: AcceptedAnswer

http://stackoverflow.com/q/27518566
type: AnsweredQuestion
score: -5
has body: I have to display like this please explain. here 4 means no. of years var categories = [2014, 2015, 2016, 2017, 2018]; var d = new Date(); var date = d.getFullYear(); for (var i = 0; i &lt;= date + 4; i++) { var categories2 = []; categories2[i] = date; date++; }
has comment: http://stackoverflow.com/comment/43467027
has answer: http://stackoverflow.com/a/27518729
type: Question
downvote count: 5
has title: javascript array using for loop
answer count: 2
has comment: http://stackoverflow.com/comment/43466996
upvote count: 0
accepted answer: http://stackoverflow.com/a/27521702
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27518729
favorite count: 0
has answer: http://stackoverflow.com/a/27521702

http://stackoverflow.com/comment/43634338
has text: @Mohamed-Yousef The HTML doesn't matter, it all follows the pattern of `<span class="ajax-<value in object>"` where a new level is indicated with a `-`.
comment on: http://stackoverflow.com/q/27606014
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/27526451
tagged with: javascript
score: -1
has title: Upload image by URL in single-page application with Canvas and File API
tagged with: ember.js
downvote count: 1
answer count: 1
favorite count: 0
tagged with: fileapi
type: AnsweredQuestion
upvote count: 0
accepted answer: http://stackoverflow.com/a/27530515
tagged with: amazon-s3
has body: We have a single-page application (Rails back-end, Ember.js front-end) where we're currently moving away from a server-side image uploader to a client-side image uploader. We previously used the Carrierwave gem to do resizing and sending to S3 on the server. Now we want to the resizing (using HTML5 Canvas and File API) and sending to S3 directly on the client. This works well when the user selects an image from his computer. It's definitely way faster for the user and puts less load on the server. However, our users have gotten used to the "Upload by URL" functionality that we offered. It works like the "Search by image" functionality on Google Image Search. Instead of selecting a file from his computer, the user pastes a URL to an image. Because of the same-origin policy, we cannot use Canvas API on an external image (it becomes tainted, see https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Using_images#Using_images_from_other_domains). I see two possible solutions: In order to be able to upload to S3 directly from the client, we need to generate a pre-signed key on the server. We could pass the URL to the image in that same request, download it on the server while we generate the pre-signed key, and put the image as base64 payload in the response. Use a proxy on our domain and use it to bypass the SOP. So access the image on the client as https://www.mydomain.com/?link=http://www.link.to/image/selected/by/user.jpg. My questions are: Do you know any other way to bypass the same-origin policy to provide a "Upload by URL" functionality? Which solution do you think is best? How hard is it to setup 2)? I have no experience in setting up proxies. FWIW, we host our application on Heroku. I hope the situation I described is clear enough. Thank you! Yoran
type: Question
has answer: http://stackoverflow.com/a/27530515
tagged with: canvas

http://stackoverflow.com/comment/43634545
type: Comment
score: 0
comment on: http://stackoverflow.com/a/27573111
has text: The point is, that the function doesn't call itself, it calls `setTimeout` only, and the process `setTimeout` runs, calls the function. You can loop the timeouts outside of the function, and get technically the same result. The difference is, that you have more control over the execution, when you set the timers within a function.
type: AnswerComment

http://stackoverflow.com/comment/43431641
score: 0
type: Comment
has text: I have tried it, its not working. Instead it does not show any files :(
comment on: http://stackoverflow.com/a/27499416
type: AnswerComment

http://stackoverflow.com/comment/43668224
type: AnswerComment
score: 0
has text: Thanks, but this doesn't send multiple data to PHP.
type: Comment
comment on: http://stackoverflow.com/a/27607310

http://stackoverflow.com/q/27626352
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has body: I have this Javascript background wrapper that i want to add on its images some "description" div in the middle. &lt;script type="text/javascript"&gt; &lt;!-- var slideInterval=20000; var slideTransition=3500; var slideArray=["index_files/background1.jpg","index_files/background2.jpg","index_files/background3.jpg"]; jQuery.fx.interval=33; // --&gt; &lt;/script&gt; As it's seen, this plugin allows me only to slide images and not DIVs. And i want to include the description below (3 descriptions for 3 images) &lt;div style="opacity: 1 ! important;" class="description"&gt; &lt;h2&gt;An everyday...&lt;/h2&gt; &lt;p&gt;Sharing rides in underground Paris...&lt;a href="http://www.es-processing.com/mobility.htm" class="more" target="_blank" title="More"&gt;More &amp;gt;&amp;gt;&lt;/a&gt;&lt;/p&gt; &lt;/div&gt; What is the best way to think about when i want to associate each of the 3 description Div to the above plugin "background1...3" so the plugin will automatically display them together. Appreciate your comments.
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43673341
has title: Background carousel to include DIVs in slide images
type: Question
has answer: http://stackoverflow.com/a/27626610
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27626610
has comment: http://stackoverflow.com/comment/43673273
has comment: http://stackoverflow.com/comment/43673849

http://stackoverflow.com/q/27633345
tagged with: yii
tagged with: javascript
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/27634067
tagged with: php
type: AnsweredQuestion
has body: This is my code for creating a form: $form=$this-&gt;beginWidget('AForm', array( 'id'=&gt;'form', 'htmlOptions' =&gt; array('class'=&gt;'form-horizontal','name'=&gt;'post-form','ng-controller'=&gt;'FormController','novalidate'), 'enableClientValidation'=&gt;true, 'clientOptions'=&gt;array('validateOnSubmit'=&gt;true, ), )); result is: &lt;form method="post" action="/post/" id="form" 0="novalidate" ng-controller="FormController" name="post-form" class="form-horizontal ng-pristine ng-valid ng-scope"&gt; where should i add "novalidate" so that it looks like: &lt;form method="post" action="/post/" id="form" ng-controller="FormController" name="post-form" class="form-horizontal ng-pristine ng-valid ng-scope" novalidate&gt;
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/27634067
score: 1
has comment: http://stackoverflow.com/comment/43686459
has title: How to add "Novalidate" with form in Yii framework. I am using Angularjs
downvote count: 0
answer count: 1

http://stackoverflow.com/comment/43448108
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27508884
has text: Your answer is good. Thank you very much. I have read this, "eval() returns the value of the last expression evaluated.", but it does NOT make me think of I need to do this eval("(" + fctString + ")") instead of eval(fctString). I must miss something. What is it? Or, why var aa = eval("function x() {}") returns undefined? But var aa = eval("(function x() {})") returns a function?

http://stackoverflow.com/comment/43525287
score: 0
type: Comment
type: QuestionComment
has text: Actually the `addRect` function wipes out all the event listeners created within onload. `innerHTML += ...` doesn't append, it replaces.
comment on: http://stackoverflow.com/q/27549432

http://stackoverflow.com/comment/43586961
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27581288
type: Comment
has text: $scope is not valid Dom element you can use class ot tag name in querySelector('')

http://stackoverflow.com/comment/43575825
score: 0
has text: @KevinB error handlers do not work with JSONP. http://api.jquery.com/jQuery.ajax/
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27575195

http://stackoverflow.com/comment/43569426
has text: I don't think `z-index` would have to do anything with this issue.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27571601

http://stackoverflow.com/a/27581486
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/27581407
score: 1
has comment: http://stackoverflow.com/comment/116854366
has body: You can simplify this greatly. If you think about it, once they click on a radio button, they can't really deselect it: they can only click on another radio button. So, once the button has changed once, there's really no need to monitor it anymore and you can just enable the button from there. $("input:radio").change(function () { $("#postGender").attr("disabled", false); }); Demo
downvote count: 0

http://stackoverflow.com/comment/43548739
type: Comment
comment on: http://stackoverflow.com/q/27561041
score: 0
has text: You should add both the `x` and `y` in the same frame so that it will produce a diagonal trajectory if they are not aligned.
type: QuestionComment

http://stackoverflow.com/q/27615087
upvote count: 2
answer count: 1
has answer: http://stackoverflow.com/a/27616551
favorite count: 0
has title: Parse CodeIgniter cookie with Node.js
tagged with: node.js
score: 2
downvote count: 0
tagged with: socket.io
type: Question
type: AnsweredQuestion
has body: I'm trying to parse a CodeIgniter cookie with node.js. I'm using this code to get all the cookies: function parse_cookies(_cookies) { var cookies = {}; _cookies &amp;&amp; _cookies.split(';').forEach(function( cookie ) { var parts = cookie.split('='); cookies[ parts[ 0 ].trim() ] = ( parts[ 1 ] || '' ).trim(); }); return cookies; } It returns all the cookies so then I do: var cookies = parse_cookies(handshakeData.headers.cookie); console.log(cookies.ci_session); But the ci_session cookie is in this format: a:4:{s:10:"session_id";s:32:"152933dbf8a52a55b48518b940451aey";s:10:"ip_address";s:12:"192.168.1.68";s:10:"user_agent";s:72:"Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:34.0)+Gecko/20100101+Firefox/34.0";s:13:"last_activity";i:1419314157;}44503444ab1688f1e3a5ece6a3ff1e024e4b773f How can I get the session_id value from it?
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27616551

http://stackoverflow.com/comment/43690540
type: Comment
comment on: http://stackoverflow.com/q/27635618
score: 0
type: QuestionComment
has text: Check the below solution.

http://stackoverflow.com/comment/43692520
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27636704
score: 0
has text: Thank you @BhojendraSah. See my appended comment in my OQ. The change() function is not even firing.

http://stackoverflow.com/q/27530621
tagged with: javascript
tagged with: webforms
has title: Make ajax request to Control Method in Web Forms
has answer: http://stackoverflow.com/a/27530813
score: 0
answer count: 1
tagged with: jquery
tagged with: asp.net
tagged with: ajax
has body: I have control LogInOut.ascx which i use on different pages *.aspx I need to add logic on button click. I need to make ajax call to contol's method but i don't know how to get access to it. What i try : LogInOut.ascx/validateUser, /validateUser, /Controls/LogInOut.ascx/validateUser, but always get error in ajax call *( in debug mode i never was in this method, so problem in javascript).
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43490199
has comment: http://stackoverflow.com/comment/43489978
type: Question
has comment: http://stackoverflow.com/comment/43490052

http://stackoverflow.com/comment/43466942
type: AnswerComment
comment on: http://stackoverflow.com/a/27518257
type: Comment
score: 1
has text: @azimhamdan, the correct thing to do is accept Aweary's answer. You don't need to create another answer that is no different than the one that helped you.

http://stackoverflow.com/a/27496443
score: 1
has comment: http://stackoverflow.com/comment/43424992
downvote count: 0
has comment: http://stackoverflow.com/comment/43424925
type: Answer
answers question: http://stackoverflow.com/q/27496421
has comment: http://stackoverflow.com/comment/43425252
upvote count: 1
has body: Because javascript is interpreted by the browser its impossible.You have better luck with some kind of a javascript engine such as Node or JavaScriptCore.

http://stackoverflow.com/comment/43485556
type: QuestionComment
has text: Do a geocode query every time the map is moved for "airport" (e.g. `https://maps.googleapis.com/maps/api/geocode/json?sensor=false&address=airport&bounds={{northeast: lat,lng}}|{{southwest: lat,lng}}` and put markers on the results that are returned
score: 0
comment on: http://stackoverflow.com/q/27513292
type: Comment

http://stackoverflow.com/comment/43511191
type: QuestionComment
comment on: http://stackoverflow.com/q/27538321
score: 0
has text: I think you would have more luck sticking with 1 name like `items` instead of `second` and `third`. A good example of the this pattern is - http://jimliu.github.io/angular-ui-tree/. Your recursive function will know the depth.
type: Comment

http://stackoverflow.com/a/27490801
has comment: http://stackoverflow.com/comment/43413411
downvote count: 0
answers question: http://stackoverflow.com/q/27490629
type: Answer
upvote count: 2
score: 2
has body: You can use mouseenter and mouseleave instead of mouseover and mouseout. These have the functionality you need, provided you're targeting the supported browsers (see links above). Here's a working jsFiddle from your code: http://jsfiddle.net/rgthree/rs6qm9v5/2/

http://stackoverflow.com/a/27547108
downvote count: 0
has body: The answer is the session: PHP manual on sessions It lets you store information that your scripts can access as your user moves from page to page. Have a look at tiztag tutorial on sessions or a sitepoint tutorial on sessions hth
upvote count: 2
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/43520750
has comment: http://stackoverflow.com/comment/43521710
answers question: http://stackoverflow.com/q/27546984

http://stackoverflow.com/comment/43537749
type: Comment
has text: Yes, im not getting any Email with your Code, I think that im missing Something I fiil te "emailTo" variable with my Email, and Subject, but I don't know.. mayb is because I don't have any SpreadSheet ID, or at least I don't know how to get it, and the thing of Events created by other is... if someone inside my domain of emails create an event with an especific title or color, or location then send the description, title, email to the spreadSheet, I don't know if i explained myself well?.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27555249

http://stackoverflow.com/comment/43543045
comment on: http://stackoverflow.com/q/27558411
score: 0
type: Comment
type: QuestionComment
has text: If you're getting a reference error then you are likely running in strict mode.

donut-chart
tags question: http://stackoverflow.com/q/27508146
tags question: http://stackoverflow.com/q/27505312
type: Tag
tag name: donut-chart

http://stackoverflow.com/comment/43496589
type: QuestionComment
has text: Then you have another problem and we'd have to see actual code to help.
type: Comment
comment on: http://stackoverflow.com/q/27534025
score: 0

http://stackoverflow.com/comment/43483880
comment on: http://stackoverflow.com/q/27527618
score: 1
has text: Possibly a duplicate of [How to create 2nd level property with for JS object using bracketss](http://stackoverflow.com/q/20380504/710446)
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43428437
has text: @Srinivas I thought I understood your question until I saw your comment above. Could you clarify what you're trying to do?
comment on: http://stackoverflow.com/a/27498587
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/43658451
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27618722
score: 0
has text: is stackoverflow project completing site ?

http://stackoverflow.com/comment/43554848
comment on: http://stackoverflow.com/a/27563814
type: AnswerComment
has text: probably this was an issue, and ot works with document.forms, not with document.form.
score: 0
type: Comment

http://stackoverflow.com/a/27523383
type: Answer
answers question: http://stackoverflow.com/q/27523298
has body: var objectRet= jQuery.parseJSON(response); for(var i=0;i&lt;objectRet.length;++i) { alert(objectRet[i].class_id) }
has comment: http://stackoverflow.com/comment/43475925
score: 0

http://stackoverflow.com/comment/44100734
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27560886
type: Comment
has text: @user3827303 It might be straightforward to you, but I obviously thought it was really confusing because I took the time to write a question about it. How is anyone supposed to learn using SO if we're just going to dismiss it as "the answer is obvious. Go look for it."?

http://stackoverflow.com/comment/43448219
type: QuestionComment
comment on: http://stackoverflow.com/q/27508020
has text: Good question and one that should be explored a bit more. MVC as it turns out converts Get and Post requests from the Query String data of the HTTP Get or Post, JSON always uses name value pairs so the stage is set for allowing MVC to convert the query string or JSON name value pairs to strong types. Here's how MVC converts strong types on POSTS, the post is sent with the query string to the proper controller. MVC then parses the name value pairs and injects them into the strong type signature of the controller. As long as there are name matches you get everything as a strong type.
score: 0
type: Comment

http://stackoverflow.com/comment/43636886
type: Comment
comment on: http://stackoverflow.com/q/27607393
has text: `options || (options = {});` is the same as `options = options || {};`. Just make it an empty object if undefined
score: 0
type: QuestionComment

http://stackoverflow.com/comment/132034108
has text: Thanks for the answer Jazi. It worked for me only with double digits (days and month more than 9) but not with single digits. So 1 January 2023 gave a format error. To fix it I changed the var sDate to: var sDate = toDateValue.getFullYear() + '-' + ("0" + toDateValue.getMonth() + 1).slice(-2) + '-' + ("0" + toDateValue.getDate()).slice(-2); So forcing a double digit for months and days. Now it works fine.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27565234

http://stackoverflow.com/comment/44209262
type: Comment
comment on: http://stackoverflow.com/a/27882341
score: 0
type: AnswerComment
has text: Thanks. So you're saying the `.done` part should still contain code? Could you perhaps give a code example on how to print the data returned by iplookup.php to the console, including the `.done` part of the AJAX call? ps. your link to the manual does not work :)

knockout-components
type: Tag
tags question: http://stackoverflow.com/q/27536537
tag name: knockout-components

http://stackoverflow.com/q/27557548
has body: I'm creating a table where users can make rows appear/disappear, and would like all the data from the hidden rows to be cleared when they choose to delete a row. The table I'm trying to manipulate is as follows: Ingredient Name Amount (in Mg) % Carrier $$/Kilo Total Carrier Volume Total Ingredient Volume Mg % Calculate Final Volume New Ingredient Mg % Calculate Final Volume New Ingredient Delete Ingredient Mg % Calculate Final Volume New Ingredient Delete Ingredient Mg % Calculate Final Volume New Ingredient Delete Ingredient Mg % Calculate Final Volume New Ingredient Delete Ingredient I have this function to toggle the rows: function toggleRow(id) { var p = document.getElementById(id); if (p.style.display =='table-row') { p.style.display = 'none'; p.td.innerHTML = ""; } else { p.style.display = 'table-row'; } }; This does not have any effect. I've also tried: p.innerHTML = ""; But this clears the entire row but I only want to clear the data held within the td's in that row. What am I doing wrong? Thank you.
tagged with: javascript
has answer: http://stackoverflow.com/a/27557698
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/42709866
tagged with: http://stackoverflow.com/tag/html
has title: Clearing all data from a table row with Javascript
has comment: http://stackoverflow.com/comment/43541383
accepted answer: http://stackoverflow.com/a/27557698
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43541390
possible better answer: http://stackoverflow.com/a/27557659
has answer: http://stackoverflow.com/a/27557659
type: Question

http://stackoverflow.com/comment/43418357
comment on: http://stackoverflow.com/a/27475278
score: 0
type: Comment
has text: You may update your question being more specific with what you tried and what was the result, etc. I'm willing to help.
type: AnswerComment

http://stackoverflow.com/a/29514855
upvote count: 282
downvote count: 1
answers question: http://stackoverflow.com/q/27612713
has comment: http://stackoverflow.com/comment/61729737
has body: You can use Array.from or spread syntax (...). Example: const x = new Set([ 1, 2, 3, 4 ]); const y = Array.from(x); console.log(y); // = [ 1, 2, 3, 4 ] const z = [ ...x ]; console.log(z); // = [ 1, 2, 3, 4 ]
type: Answer
score: 281

http://stackoverflow.com/comment/45472628
type: QuestionComment
has text: I asked the same question - http://stackoverflow.com/q/28561561/104380
comment on: http://stackoverflow.com/q/27572523
score: 0
type: Comment

http://stackoverflow.com/q/27523765
type: Question
has title: How does JS type coercion work?
linked to: http://stackoverflow.com/q/7615214
has comment: http://stackoverflow.com/comment/43476409
tagged with: javascript
tagged with: equality
linked to: http://stackoverflow.com/q/523643
score: 4
answer count: 2
tagged with: coercion
favorite count: 0
linked to: http://stackoverflow.com/q/47015361
has comment: http://stackoverflow.com/comment/114159058
possible better answer: http://stackoverflow.com/a/27524410
accepted answer: http://stackoverflow.com/a/27523825
upvote count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27524410
has body: I'm learning about == vs. === and came across this answer which was very helpful in understanding the concept. However I wondered about one of the examples: '0' == false // true This might make sense, since == doesn't check for type. But then I tried some possible coercions in the console and found the following: Boolean('0') // true String(false) // "false" I would have thought '0' == false has the same truth value as '0' === String(false), but that doesn't seem to be the case. So how does the coercion actually work? Is there a more basic type I'm missing?
downvote count: 0
has comment: http://stackoverflow.com/comment/43476488
has answer: http://stackoverflow.com/a/27523825

http://stackoverflow.com/q/27531198
accepted answer: http://stackoverflow.com/a/27531241
has title: Adding and removing class on toggle
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/27531241
upvote count: 3
type: Question
type: AnsweredQuestion
score: 3
tagged with: javascript
answer count: 1
downvote count: 0
tagged with: jquery
has body: Am trying to toggle between colors using .js. i want the color to be red when i close the panel, then change to black when i open the panel. Fiddle Here HTML Click to slide the panel down or up Hello world! CSS .flip{ color: back; } .panel,.flip { padding:5px; text-align:center; background-color:#e5eecc; border:solid 1px #c3c3c3; } .panel{ padding:50px; } .red{ color: red; } JS $(document).ready(function(){ $(".flip").click(function(){ $(".panel").slideToggle("slow"); $(".flip").addClass("red"); }); });
favorite count: 0

http://stackoverflow.com/comment/43507203
type: Comment
has text: You read the full question? `"also tried second solution by replacing pfno.css("dispay") = "block" to pfno.css("dispay","block") but both could not work"`
comment on: http://stackoverflow.com/a/27539773
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43562558
has text: I can't manipulate the code on your server. Please post a *minimal, complete* example here or on http://jsfiddle.net that *fully* represents the problem you're experiencing.
comment on: http://stackoverflow.com/a/27552832
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/43422861
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27495545
has text: It nearly works :P it's assigned the handles properly however when i click on one it will just activate both =/

http://stackoverflow.com/comment/43485301
score: 0
comment on: http://stackoverflow.com/a/27528270
type: Comment
has text: I tried this earlier but it didn't work and more over I have another knockout view model I referenced in the same html script
type: AnswerComment

http://stackoverflow.com/comment/79863325
has text: fname is not found in my case, although the selector does show up
type: Comment
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/27551608

http://stackoverflow.com/comment/43550532
has text: Do you get the `window is undefined` error when running in the browser? That would be most odd. I've reviewed your code and there are no visible syntax errors. Please run your code in the browser, not in some ST environment (don't know how that works). Open up devtools and view the console. Perhaps you will see an error in `SC.initialize` or some other run-time error. Impossible to say without more information or context.
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27537374

http://stackoverflow.com/comment/43621518
type: AnswerComment
comment on: http://stackoverflow.com/a/27598958
type: Comment
has text: I don't know why you failed to inform that. And your update failed to show that.
score: 0

http://stackoverflow.com/a/78191992
type: Answer
has body: import { mock, clear } from "jest-random-mock"; beforeEach(() => { mock(); }); test("your test cases", () => { mock(); const r1 = Math.random(); clear(); mock(); const r2 = Math.random(); clear(); // expect r1 should be same with r2. }); afterEach(() => { clear(); });
score: 0
answers question: http://stackoverflow.com/q/27596324

http://stackoverflow.com/comment/43681080
type: Comment
has text: Are you sure that you did it exactly that way? I was using this approach without issues. Config can be a bit different for you, but the idea itself is to listen for changes on the result css files.
type: AnswerComment
comment on: http://stackoverflow.com/a/27612176
score: 0

http://stackoverflow.com/comment/43616846
type: AnswerComment
comment on: http://stackoverflow.com/a/27596059
score: 0
type: Comment
has text: The problem is I have more than one scene in my flash file, so that doesn't merge all the scenes into one .swf. I'll be left with 6 swf files and there's no way I can merge them using flash.

http://stackoverflow.com/comment/43801274
comment on: http://stackoverflow.com/a/27616508
type: Comment
score: 0
type: AnswerComment
has text: I've ran the array through the little code you posted above to convert an array to object and it seems to be fine. However, when I use that object with the export to excel, it just outputs an excel 5 columns of undefined.

http://stackoverflow.com/q/27617136
score: 2
tagged with: xquery
type: Question
upvote count: 2
tagged with: xpath-2.0
answer count: 2
has answer: http://stackoverflow.com/a/29426143
has comment: http://stackoverflow.com/comment/43661777
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/43662008
has comment: http://stackoverflow.com/comment/43657872
has body: I'm trying to find the element by using contains.The problem is If the string contains one single quote or double quote,it's difficult to get it. I'm using this xpath to match directly to the first element.Is there a better way to implement without using 'and' statement here ? Xpath Used :- .//*[local-name()='GEOGRAPHY_TITLE'][contains(.,"APAC &gt; Andaman Islands &gt; test&amp;'&lt;,")and contains(., '"123')] XML Used :- &lt;MST&gt; &lt;MST_GEOGRAPHY &gt; &lt;GEOGRAPHY_TITLE&gt;APAC &amp;gt; Andaman Islands &amp;gt; test&amp;amp;'&amp;lt;,\"123&lt;/GEOGRAPHY_TITLE&gt; &lt;GEOGRAPHY_ID&gt;5a7a24ec-93ff-8be6-7ef9-fa021500df0e&lt;/GEOGRAPHY_ID&gt; &lt;TENANT_ID&gt;{0559cdcb-c63b-4c81-be91-b78e831bf5a5}&lt;/TENANT_ID&gt; &lt;ACTIVE&gt;1&lt;/ACTIVE&gt; &lt;/MST_GEOGRAPHY&gt; &lt;MST_GEOGRAPHY &gt; &lt;GEOGRAPHY_TITLE&gt;APAC &amp;gt; Andaman Islands &amp;gt; test\"123&amp;amp;'&amp;lt;,\"123&lt;/GEOGRAPHY_TITLE&gt; &lt;GEOGRAPHY_ID&gt;5a7a24ec-93ff-8be6-7ef9-fa021500df0e&lt;/GEOGRAPHY_ID&gt; &lt;TENANT_ID&gt;{0559cdcb-c63b-4c81-be91-b78e831bf5a5}&lt;/TENANT_ID&gt; &lt;ACTIVE&gt;1&lt;/ACTIVE&gt; &lt;/MST_GEOGRAPHY&gt; &lt;MST_GEOGRAPHY &gt; &lt;GEOGRAPHY_TITLE&gt;hi&lt;/GEOGRAPHY_TITLE&gt; &lt;GEOGRAPHY_ID&gt;5a7a24ec-93ff-8be6-7ef9-fa021500df0e&lt;/GEOGRAPHY_ID&gt; &lt;TENANT_ID&gt;{0559cdcb-c63b-4c81-be91-b78e831bf5a5}&lt;/TENANT_ID&gt; &lt;ACTIVE&gt;1&lt;/ACTIVE&gt; &lt;/MST_GEOGRAPHY&gt; &lt;/MST&gt;
tagged with: xpath
tagged with: xpathnavigator
downvote count: 0
has title: Xpath using contains
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43661940
has answer: http://stackoverflow.com/a/27620601

http://stackoverflow.com/q/27619502
favorite count: 0
has body: I'm seeing an issue converting snazzymaps.com map styles to static map urls where brightness and/or color is converted incorrectly. I have already read this question and used the tool in the comment. Here's a good example of the problem: https://snazzymaps.com/style/30/cobalt [ { "featureType": "all", "elementType": "all", "stylers": [ {"invert_lightness": true}, {"saturation": 10}, {"lightness": 30}, {"gamma": 0.5}, {"hue": "#435158"} ] } ] gives: https://i.sstatic.net/zRBDY.png Using the code/tool from http://jsfiddle.net/gaby/s6Dyp/, gives: https://i.sstatic.net/EN10p.png It's obviously much brighter. Clearly, some value is off but I'm not sure which one(s). Tinkering with the vals, I can get a vaguely similar result to the original by tweaking gamma to 0.9 and the lightness to 10. It doesn't look to me like there's an issue with the conversion since the values are the same. Rather, it seems the static map service is giving different a result for the same values. Has anyone come across a similar problem?
has answer: http://stackoverflow.com/a/27622639
type: AnsweredQuestion
has title: Issue Converting Google Maps styles to Google Static Maps URI
has comment: http://stackoverflow.com/comment/43664328
has comment: http://stackoverflow.com/comment/43659938
linked to: http://stackoverflow.com/q/23153166
type: Question
tagged with: google-maps
tagged with: javascript
tagged with: google-maps-static-api
score: 0
upvote count: 1
answer count: 1
downvote count: 1
accepted answer: http://stackoverflow.com/a/27622639

http://stackoverflow.com/comment/43623114
score: 0
type: QuestionComment
type: Comment
has text: Your jsfiddle displays 12 for me on Firefox.
comment on: http://stackoverflow.com/q/27599941

http://stackoverflow.com/comment/43408297
comment on: http://stackoverflow.com/q/27488181
type: Comment
has text: @user2573699 The problem is most likely with your service then.
score: 1
type: QuestionComment

youtube-javascript-api
type: Tag
tags question: http://stackoverflow.com/q/27626098
tags question: http://stackoverflow.com/q/27577920
tags question: http://stackoverflow.com/q/27492954
tag name: youtube-javascript-api
tags question: http://stackoverflow.com/q/27483691
tags question: http://stackoverflow.com/q/27590131

http://stackoverflow.com/q/27557098
upvote count: 1
has comment: http://stackoverflow.com/comment/43540553
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43540968
has comment: http://stackoverflow.com/comment/43540442
accepted answer: http://stackoverflow.com/a/27557562
has body: My issue seems like it would be on here already but I just can't find it. Apologies in advance!!!! After clicking one of multiple (unique) buttons, the initial corresponding div selected keeps executing even when clicking a different button. How can I stop the first clicked button from executing the same code? HTML Redeem Redeem Jquery content[0] = content; content[1] = other content; $(freeButton).click(function(){ if(!visible) { $('#items').append(content[0]); visible = true; } else { $('#items').remove(content[0]); visible = false; } }); $(giftCardButton).click(function(){ if(!visible) { $('#items').append(content[1]); visible = true; } else { $('#items').remove(content[1]); visible = false; } });
has comment: http://stackoverflow.com/comment/43540494
tagged with: javascript
has comment: http://stackoverflow.com/comment/43540472
has comment: http://stackoverflow.com/comment/43540513
has answer: http://stackoverflow.com/a/27557562
has title: Jquery stop the first clicked button from executing the same code
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/43540509
has comment: http://stackoverflow.com/comment/43540922
has comment: http://stackoverflow.com/comment/43540544
linked to: http://stackoverflow.com/q/11280817
has comment: http://stackoverflow.com/comment/43541134
score: 1

http://stackoverflow.com/comment/43591220
type: Comment
comment on: http://stackoverflow.com/a/27583204
type: AnswerComment
has text: @user1830568: Because of the IP or IP range, because of the exact content of the request, etc., etc. Re XSS, it's the job of foo.com to code defensively and prevent those.
score: 0

http://stackoverflow.com/comment/43513858
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27543308
has text: I'm travelling and using mobile to ans, so not sure I can update that much. But can you try once before asking complete solution? Just pass reference of element on which click event is bind. You haven't given enough code also for us to understand.
score: 0

http://stackoverflow.com/a/27620868
upvote count: 1
downvote count: 0
has body: In general you could use a localization / internationalization library, which will solve some other tasks you are likely to run into as well. For example this one: https://github.com/jquery/globalize/blob/master/doc/api/number/parse-number.md Snippet: Globalize.locale( "es" ); Globalize.parseDate( "3,14" ); // 3.14
type: Answer
score: 1
answers question: http://stackoverflow.com/q/27620543

http://stackoverflow.com/comment/43392835
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27479626
has text: So your question is: how to remove the extension icon from the extensions bar?

http://stackoverflow.com/q/27563984
answer count: 1
has answer: http://stackoverflow.com/a/27564615
has body: I'm using Mottie's Tablesorter, and it's ideal for what I need! However I can't figure out how (or if it's even possible) to put the "reset search" button inside one of the table headers (where a filter would usually be). I have a jsfiddle here of it working with the reset button outside of the table: http://jsfiddle.net/OPSJono/1dpd1a6y/4/ This is the part of the JS that determines what goes into the filter table header row. But I can't seem to find a way to put a button in there. This code currently returns nothing into that cell (as filter_reset doesn't exist) 6: function ($cell, indx) { return $.filter_reset; } However I would like the reset button inside the "actions" header. I've looked around and can't find anyone else who's put the reset button inside of a filter header before. Any help or a point in the right direction would be appreciated!
tagged with: tablefilter
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
type: Question
tagged with: reset
tagged with: tablesorter
score: 0
has title: Mottie jQuery Tablesorter reset button inside table header

http://stackoverflow.com/q/27621385
linked to: http://stackoverflow.com/q/4968406
has comment: http://stackoverflow.com/comment/43663309
has title: Get an object attribute value using another array as reference
type: Question
accepted answer: http://stackoverflow.com/a/27621702
tagged with: arrays
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/43663467
has comment: http://stackoverflow.com/comment/43663375
has body: I have two arrays, one is an Array of Objects like this: [ Object {ID: "2006", Description: "ABCDEFG"} Object {ID: "2102", Description: "HIJKLMN"} Object {ID: "2616", Description: "OPQRSTU"} ] And the another is an array with the attributes ["ID", "Description"] I'm trying to use JQuery .each function to capture the values using the Array as reference and create a HTML table, just like this: var columns = new Array(); var strTable = ''; var tHead = ''; var tBody = ''; //Capture the columns $.each(arrObjects, function (a, b) { columns=Object.getOwnPropertyNames(b) }); //Make the Table Head; $.each(columns, function (a, b) { tHead += ' '+ b +' ' }); //Create table body $.each(arrObjects, function (aa, bb) { tBody += ' ' $.each(columns, function (a, b) { tBody += ' '+ bb.b +' ' }); tBody += ' ' }) strTable = ' ' + tHead + ' ' + tBody + ' ' But using this way, I am always getting the value undefined. Could you help me create a function that receive one Array of Objects and it retrieve a table? Or help me find out what I'm doing wrong it's ok too.
has comment: http://stackoverflow.com/comment/43663387
has comment: http://stackoverflow.com/comment/43663360
linked to: http://stackoverflow.com/q/1051061
has answer: http://stackoverflow.com/a/27621702
type: AnsweredQuestion

http://stackoverflow.com/a/27625679
has comment: http://stackoverflow.com/comment/43672042
upvote count: 1
answers question: http://stackoverflow.com/q/27625480
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27625480
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43671917
has comment: http://stackoverflow.com/comment/43671960
has body: If you are using underscore, you could do something like this: var bigarr = [ [ { name: 'ABC',id: 391},{ name: 'XYZ',id: 545}], [ { name: 'EFG',id: 390},{ name: 'XYZ',id: 545}], [ { name: 'XYZ',id: 545},{ name: 'ABC',id: 391}], [ { name: 'ABC',id: 391},{ name: 'XYZ',id: 545}] ]; console.log(_.uniq(bigarr,function(item){ return [ [item[0].id+item[0].name], [item[1].id+item[1].name] ].sort().toString() })) Edit: this only works if you always have one pair of objects with an id and a string name. Deepened objects or other keys are not checked

http://stackoverflow.com/q/27584914
tagged with: javascript
has title: Grab URL parameter onclick of url.. Jquery, Javascript
tagged with: jquery
tagged with: ajax
possible better answer: http://stackoverflow.com/a/27584995
has answer: http://stackoverflow.com/a/27584997
answer count: 4
favorite count: 0
has answer: http://stackoverflow.com/a/27585016
upvote count: 1
has body: I am having some trouble trying to store the url parameters of some dynamic links that I created with an ajax post response. The ajax post is working correctly and the name and subgenre vars are being properly filled from the ajax response. Now what I would like to happen is that a user clicks on one of the generated urls, the parameters inside of the urls, i.e. subgenre="blah", are going to be sent to a database and stored. The problem I am having is that a standard event click function will not work inside or outside of the document ready function. $(document).ready(function() { $.each(data, function() { $('#artist-suggestions').append('&lt;li&gt;&lt;a href="http://...../100.php" artist="'+ this.name +'" subgenre="'+ this.subgenre +'" onclick="artistGen()"&gt;' + this.name + this.new + '&lt;/a&gt;&lt;/li&gt;'); }); }); I then created an onclick function, as below, but I can not use the "this" query because it is outside of the document scope. I had to put the onclick function outside of the document ready function or else it would not work. function artistGen(){ alert('dfdsf'); }; What am I missing here or what am I doing wrong?
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/27584984
type: Question
has answer: http://stackoverflow.com/a/27584995
downvote count: 0
accepted answer: http://stackoverflow.com/a/27584984

http://stackoverflow.com/q/27476364
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: idangerous slider styling peek preview for prev/next
type: Question
has body: I'm trying to use the iDangerous Slider to show some images from a gallery. The idea is to view the active item in the center and the prev/next item should peek out left and right. For a better understanding i attached an image. I was unable to set some kind of viewport. I hope you can help me. For easier testing, i set up a Fiddle: http://jsfiddle.net/rxmkjx1e/3/ EDIT I figured out that slidesPerView: 2 produces a really near solution. But how can i variegate the width of the visible part of the prev/next image?
type: AnsweredQuestion
tagged with: javascript
has answer: http://stackoverflow.com/a/27482716
score: 0
accepted answer: http://stackoverflow.com/a/27482716
answer count: 1
tagged with: slider

http://stackoverflow.com/comment/121397833
type: AnswerComment
comment on: http://stackoverflow.com/a/27496510
score: 1
type: Comment
has text: `chrome.extension.getURL` is deprecated. Now you should use `chrome.runtime.getURL`.

http://stackoverflow.com/a/27508160
has comment: http://stackoverflow.com/comment/43446972
has comment: http://stackoverflow.com/comment/43446473
score: 0
has comment: http://stackoverflow.com/comment/43446806
answers question: http://stackoverflow.com/q/27507843
has body: Remember to add the id on the input when you replace it so it will change also when you change the value of the text input. But is very similar to dupa response. $('#qty').live('change', function () { if ((this.value) == 10) { $(this).replaceWith($('&lt;input /&gt;', { 'type': 'text', 'value': + (this.value), 'id': 'qty' })); } else if ( this.value === '' &amp;&amp; $(this).prop('type') === 'text' ) { console.log('Do whatever you want when value is empty'); } });
type: Answer
has comment: http://stackoverflow.com/comment/43446709

http://stackoverflow.com/a/27585775
type: AcceptedAnswer
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27585657
has body: I have found the answer of this question myself. The problem was in jquery code in the script tag, correct jquery code is as below: &lt;script&gt; $("#filename").change(function(e) { var ext = $("input#filename").val().split(".").pop().toLowerCase(); if($.inArray(ext, ["csv"]) == -1) { alert('Upload CSV'); return false; } if (e.target.files != undefined) { var reader = new FileReader(); var csvLines; var csvValues; var i; reader.onload = function(e) { csvLines = e.target.result.split("\n"); for(i=1; i&lt;csvLines.length; i++){ csvValues = csvLines[i].split(","); importedLat = csvValues[0]; importedLon = csvValues[1]; markerFunc(importedLat, importedLon); addLayer(); } }; reader.readAsText(e.target.files.item(0)); } return false; }); &lt;/script&gt;
accepted answer of: http://stackoverflow.com/q/27585657

http://stackoverflow.com/comment/43554899
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27562260
has text: i have defined all the necessary libraries, the problem is that it works when i build a separate application,when i embed inside a view it does not work
score: 0

http://stackoverflow.com/comment/43679323
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27626476
has text: True, `getName` is available for every instance and for every instance the same and only created once. Still this way delivers more readable code :-)
score: 0

http://stackoverflow.com/q/27512292
downvote count: 0
score: 1
type: Question
tagged with: javascript
upvote count: 1
answer count: 1
favorite count: 0
has body: I am wondering how I could keep an object's location static with regard to the camera. I.e. I have two objects, one which I want to observe from multiple angles using the trackball camera and another one which should always remain static with regard to the current camera view. E.g. overlaying a mesh (to be observed from multiple angles using the trackball camera) on an image (static position with regard to trackball camera). Hope I explained my question alright. Thanks for any advice :) Currently I have: object.position.copy( camera.position ); object.rotation.copy( camera.rotation ); object.updateMatrix(); EDIT I figured it out: object.position.copy( camera.position ); object.rotation.copy( camera.rotation ); object.updateMatrix(); object.translateZ( - 10 );
has answer: http://stackoverflow.com/a/27513625
accepted answer: http://stackoverflow.com/a/27513625
tagged with: three.js
has title: Three.js - Keep an object's location static with respect to the camera
type: AnsweredQuestion

http://stackoverflow.com/comment/43658679
comment on: http://stackoverflow.com/a/27606647
score: 0
type: AnswerComment
type: Comment
has text: and one more thing how can i store all these lat and lot to y database?

http://stackoverflow.com/comment/43642752
comment on: http://stackoverflow.com/a/27609741
score: 0
type: Comment
has text: I mean I cannot access `data` from function prototype of this object
type: AnswerComment

http://stackoverflow.com/q/27628618
score: 0
type: Question
accepted answer: http://stackoverflow.com/a/27632335
tagged with: reactjs
has title: ReactJS: Dom rendering in wronger order
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/43686327
has answer: http://stackoverflow.com/a/27632335
has body: I have a page that is a table with several columns. The user has the ability to sort the entries in the table by several different values; when the user clicks on the header, sorting is performed, and a new render of the page is triggered. However, while the sorting is performed correctly, the DOM doesn't render in the right order; some elements in the table switch places, but most stay the same. When inspecting elements using the react plugin for Chrome, React has things in the correct order; it's just that the DOM doesn't actually match what react thinks is going on. My code is as follows: var BinData = React.createClass( { render: function() { return ( {this.props.data.Name ? this.props.data.Name: "Databin Name"} {this.props.data.ShortID ? this.props.data.ShortID: "None"} {this.props.data.formatedLatestTimestamp} {this.props.data.ShortURL} {this.props.data.Size} {this.props.data.Owner} Analyze in Wolfram|Alpha Open in Wolfram Language Download raw data Access settings Remove from my list ); } }); var BinList = React.createClass( { getInitialState: function() { return { sorting: "Date" }; }, sortByName: function(bins,selected) { function compare(a,b) { if (a.Name < b.Name) { return -1; } if (a.Name > b.Name) { return 1; } return 0; } if (selected == "My Databins") { bins.Creator.sort(compare); } else if (selected == "Recent Databins") { bins.Contributor.sort(compare); } else { bins.SharedWithMe.sort(compare); } this.setState({sorting: "Name"}); }, sortByDate : function(bins,selected) { function compare(a,b) { return b.LatestTimestamp - a.LatestTimestamp; } if (selected == "My Databins") { bins.Creator.sort(compare); } else if (selected == "Recent Databins") { bins.Contributor.sort(compare); } else { bins.SharedWithMe.sort(compare); } this.setState({sorting: "Date"}); }, sortByOwner: function(bins,selected) { function compare(a,b) { if (a.Owner < b.Owner) { return -1; } if (a.Owner > b.Owner) { return 1; } return 0; } if (selected == "My Databins") { bins.Creator.s…
type: AnsweredQuestion

http://stackoverflow.com/a/27483398
type: Answer
answers question: http://stackoverflow.com/q/27483243
has body: Basic approach Use .each() to loop over each div Select fields of interest within that div using find() put data into an array Ideally use a class on your inputs rather than id then they're easier to select. Code var data = []; $('div.form-group').each(function () { data.push({ name: $(this).find('input').val(), project: $(this).find('select').val() }); }); console.log(data);
score: 0

http://stackoverflow.com/a/27627136
has body: I added an iteration counter to check how many times it has changed. Added this by other variables: var iter = 1; Added this in the newWord function: iter = iter + 1; if (iter &gt; 5) { return; } var word; if (iter == 5) { word = 'awesome'; } else { ... Here's my solution by changing your code: http://codepen.io/anon/pen/YPGWYd
downvote count: 0
has comment: http://stackoverflow.com/comment/43677726
answers question: http://stackoverflow.com/q/27626759
type: Answer
has comment: http://stackoverflow.com/comment/43677862
has comment: http://stackoverflow.com/comment/43675236
has comment: http://stackoverflow.com/comment/43674984
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/43675126

http://stackoverflow.com/q/27570886
favorite count: 0
has answer: http://stackoverflow.com/a/27764179
tagged with: sinon
accepted answer: http://stackoverflow.com/a/27764179
has comment: http://stackoverflow.com/comment/43642883
tagged with: node.js
score: 2
type: AnsweredQuestion
tagged with: unit-testing
type: Question
has body: Let's say we have some code that does this: callFunction(new Buffer(foo)); And we want to unit test this call with a sinon.js spy: var spy = sinon.spy(callFunction); expect(spy.to.have.been.calledWith(foo)); This will fail because callFunction was called with new Buffer(foo) and not foo. The tests pass if we do expect(spy.to.have.been.calledWith(new Buffer(foo)) but is it wise to keep creating new buffers for every test? Is there a better way to do this?
tagged with: javascript
has title: How do you test for values created in a new Buffer in unit tests
upvote count: 2
has comment: http://stackoverflow.com/comment/43581576
downvote count: 0
answer count: 1

http://stackoverflow.com/q/27517984
has comment: http://stackoverflow.com/comment/43465971
upvote count: 1
accepted answer: http://stackoverflow.com/a/27518019
downvote count: 1
type: Question
has title: Check box jQuery show hidden div
tagged with: javascript
has answer: http://stackoverflow.com/a/27518045
possible better answer: http://stackoverflow.com/a/27518006
has answer: http://stackoverflow.com/a/27518006
tagged with: jquery
has answer: http://stackoverflow.com/a/27518025
has answer: http://stackoverflow.com/a/27518019
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: checkbox
tagged with: css
answer count: 4
type: AnsweredQuestion
has body: I think this is simple, but I can't find the answer. I have a check box and two div: JS Fiddle. HTML: All Ini ALL Ini not ALL JavaScript: $('#All').click(function(){ if (this.checked) { $('#not_all').hide(1000); $('#all').show(1000); }else{ $('#not_all').attr('style','inline-block'); $('#all').hide(1000); $('#not_all').show(1000); } }); I want first view to be and hidden . When I uncheck the check box, the view is and hidden .
score: 0

http://stackoverflow.com/q/27490006
tagged with: javascript
has body: I am working on a simple voting app with one questions. I would like the users to be directed to the results page if they had already voted through a cookie. Is it better to manipulate the cookies through PHP or through AngularJS ngcookies API ? Thanks
answer count: 1
has title: Cookies in angular / php?
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
tagged with: php
downvote count: 1
has answer: http://stackoverflow.com/a/27490071
score: -1
type: Question
upvote count: 0

http://stackoverflow.com/q/27513626
score: 1
has comment: http://stackoverflow.com/comment/43457875
has comment: http://stackoverflow.com/comment/43457817
upvote count: 1
has body: I have this javascript defining what happens when a user clicks on a button: $(document).on("click", ".open-ViewResultsModal", function () { var versionNumber = $(this).data('id'); $(".modal-body #versionNumber").val(versionNumber); $('#viewResultsModal').modal('show'); }); HTML: &lt;input type="hidden" id="versionNumber" name="versionNumber" value="work plz"/&gt; This works fine in that the versionNumber input I have defined in my modal gets the correct value. However, I don't know how to use that to do the JSTL logic I have to do: &lt;c:forEach var="result" items="${array[&lt;versionNumber&gt;]}"&gt; ... &lt;/c:forEach&gt; I have been trying and failing to somehow get the value of the input into that variable I'm using in my for loop. I read about using the implicit param variable to pass this kind of information, but I don't know how that is done in this context.
type: Question
tagged with: jstl
tagged with: javascript
tagged with: modal-dialog
answer count: 1
downvote count: 0
tagged with: jsp
has answer: http://stackoverflow.com/a/27513817
favorite count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/3287114
has comment: http://stackoverflow.com/comment/43457523
has title: Set a value in JSP passed from javascript to a modal for JSTL

http://stackoverflow.com/comment/43492047
comment on: http://stackoverflow.com/q/27531695
score: 0
type: Comment
type: QuestionComment
has text: well yeah, i am noob in this css and jquery so that's was the point of my question

http://stackoverflow.com/comment/43589284
has text: Why don't you use the tracker from Piwik or OWA and then bypass the backend and pull the data from the db to do your stuff (I think they both run on MySql ? That would you would have a widely tested tracker and don't need to worry that any homegrown solution interferes with other scripts on your site.
comment on: http://stackoverflow.com/q/27581199
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43540047
type: QuestionComment
comment on: http://stackoverflow.com/q/27556451
score: 0
has text: @PSL: Please check out [the official AngularJS migration docs](https://docs.angularjs.org/guide/migration) and see where it says: 'You can no longer invoke .bind, .call or .apply on a function in angular expressions. This is to disallow changing the behaviour of existing functions in an unforeseen fashion.' - basically you can't call functions in expressions
type: Comment

http://stackoverflow.com/a/27499846
score: 4
has body: After reading documentation more closely, i found i was missing calling stop(). As stated on documentation onComplete - [OPTIONAL] - A function that will fire when the job is complete, when it is stopped. So now i am manually calling the stop() on completion and getting the callback. So now my code looks like: CronWrapper.prototype.pushNotificationCron = function() { // change console to winston in real implementation. console.log('Creating job'); var jobPattern = '*/10 * * * * *'; var job = new CronJob(jobPattern, function(){ var date = new Date(); console.log('Cron started on \t' + date); job.stop(); }, onJobCompleted, false); console.log('Starting job'); job.start(); }; // var onJobStarted = function(){ // var date = new Date(); // console.log('Cron started on \t' + date); // }; var onJobCompleted = function(){ winston.info('Job completed:'); }; Output Cron started on Tue Dec 16 2014 13:13:30 GMT+0530 (IST) info: Job completed:
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/27499660
answers question: http://stackoverflow.com/q/27499660
upvote count: 4

http://stackoverflow.com/q/27482361
has answer: http://stackoverflow.com/a/27482462
has title: jquery Missing Manual tutorial: replaceWith() into hover() not working
has body: I'm dealing with the jquery Missing Manual (O'Reilly) tutorial of page 215. Given this HTML &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;meta charset="UTF-8"&gt; &lt;title&gt;Rollover Images&lt;/title&gt; &lt;link href="../_css/site.css" rel="stylesheet"&gt; &lt;style&gt; #gallery img { display: inline-block; margin: 10px; border: 1px solid rgb(0,0,0); } &lt;/style&gt; &lt;script src="../_js/jquery.min.js"&gt;&lt;/script&gt; &lt;script src="my_scripts/rollover.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div class="wrapper"&gt; &lt;header&gt; JAVASCRIPT &lt;span class="amp"&gt;&amp;amp;&lt;/span&gt; jQUERY: THE&amp;nbsp;MISSING&amp;nbsp;MANUAL &lt;/header&gt; &lt;div class="content"&gt; &lt;div class="main"&gt; &lt;h1&gt;Rollover Images&lt;/h1&gt; &lt;p&gt;Mouse over the images below&lt;/p&gt; &lt;div id="gallery"&gt; &lt;a href="../_images/large/blue.jpg"&gt;&lt;img src="../_images/small/blue.jpg" width="70" height="70" alt="blue"&gt;&lt;/a&gt; &lt;a href="../_images/large/green.jpg"&gt;&lt;img src="../_images/small/green.jpg" width="70" height="70" alt="green"&gt;&lt;/a&gt; &lt;a href="../_images/large/orange.jpg"&gt;&lt;img src="../_images/small/orange.jpg" width="70" height="70" alt="orange"&gt;&lt;/a&gt; &lt;a href="../_images/large/purple.jpg"&gt;&lt;img src="../_images/small/purple.jpg" width="70" height="70" alt="purple"&gt;&lt;/a&gt; &lt;a href="../_images/large/red.jpg"&gt;&lt;img src="../_images/small/red.jpg" width="70" height="70" alt="red"&gt;&lt;/a&gt; &lt;a href="../_images/large/yellow.jpg"&gt;&lt;img src="../_images/small/yellow.jpg" width="70" height="70" alt="yellow"&gt;&lt;/a&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;footer&gt; &lt;p&gt;JavaScript &amp;amp; jQuery: The Missing Manual, 3rd Edition, by &lt;a href="http://sawmac.com/"&gt;David McFarland&lt;/a&gt;. Published by &lt;a href="http://oreilly.com/"&gt;O'Reilly Media, Inc&lt;/a&gt;.&lt;/p&gt; &lt;/footer&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; The tutorial is aski…
has answer: http://stackoverflow.com/a/27482596
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27482462
score: 0
answer count: 2
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27482596
type: AnsweredQuestion
tagged with: replacewith
tagged with: jquery-hover
type: Question

http://stackoverflow.com/a/27538363
upvote count: 174
has comment: http://stackoverflow.com/comment/114412268
has comment: http://stackoverflow.com/comment/90365127
has comment: http://stackoverflow.com/comment/97870474
answers question: http://stackoverflow.com/q/27538349
accepted answer of: http://stackoverflow.com/q/27538349
score: 174
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/90335930
has body: If your environment supports Object.assign, then you can do the same in a succinct way like this const arrObj = [{a: 1, b: 2}, {c: 3, d: 4}, {e: 5, f: 6}]; console.log(arrObj.reduce(function(result, current) { return Object.assign(result, current); }, {})); // If you prefer arrow functions, you can make it a one-liner ;-) console.log(arrObj.reduce(((r, c) =&gt; Object.assign(r, c)), {})); // Thanks Spen from the comments. You can use the spread operator with assign console.log(Object.assign({}, ...arrObj)); ES5 solution: You can use Array.prototype.reduce like this var resultObject = arrObj.reduce(function(result, currentObject) { for(var key in currentObject) { if (currentObject.hasOwnProperty(key)) { result[key] = currentObject[key]; } } return result; }, {}); console.log(resultObject); # { a: 1, b: 2, c: 3, d: 4, e: 5, f: 6 } This solution, simply gathers all the keys and their values in every object in the result, which is finally returned to us as the result. This check if (currentObject.hasOwnProperty(key)) { is necessary to make sure that we are not including all the inherited enumerable properties in the result.
has comment: http://stackoverflow.com/comment/90335888
type: Answer

http://stackoverflow.com/a/27515179
upvote count: 2
type: AcceptedAnswer
has body: You can include additional content in the HTML header, before body, or after body for HTML output from R Markdown documents. I have a simple JavaScript function here, and you may include it in &lt;script&gt;&lt;/script&gt;. The knitrBootstrap package is much fancier than my naive JS function.
type: Answer
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27512554
answers question: http://stackoverflow.com/q/27512554

http://stackoverflow.com/q/27578397
answer count: 5
has answer: http://stackoverflow.com/a/27578407
has answer: http://stackoverflow.com/a/27578419
upvote count: 1
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/27578412
type: Question
accepted answer: http://stackoverflow.com/a/27578407
has answer: http://stackoverflow.com/a/27578412
has title: jQuery : toggle class opening all class
has answer: http://stackoverflow.com/a/27578414
downvote count: 0
has answer: http://stackoverflow.com/a/27578441
tagged with: javascript
has body: I have following code and I have gone through many SO question but still I am not able to make it run. I want to use toggle but problem is that It is opening all the class related to this.What I want is to toggle only class that is clicked. I have tried e.preventDefault , e.stopPropagation(); and return false.But none of them worked for me. NOTE I don't know the use of above mentioned three.I have used them at the end not at the beginning. $(".read").click(function(e){ //e.preventDefault(); $(".expand").toggle(); return false; }); .expand{display:none;background:#000;color:white;} Lorem Ipsum Text Read More Lorem Ipsum text again ! Lorem Ipsum Text Read More Lorem Ipsum text again ! Lorem Ipsum Text Read More Lorem Ipsum text again !
tagged with: jquery
favorite count: 0

http://stackoverflow.com/q/27585117
has comment: http://stackoverflow.com/comment/43594885
has body: I'm currently programming a website system as part of my studies. I'm using PHP,HTML and Javascript throughout the project. I'm a novice programmer and i'm learning as i go along. My current problem is that when a form submit button is pressed e.g. UPDATE or DELETE. I wanted a confirmation box asking the user 'Are you sure you want to submit?' using javascript. However whenever I click the button , an empty alert box appears even though there is text inside the JS function. Please look at the code below ! : function confirm() { return alert("Are you want to submit the form"?); } &lt;/script&gt; The html code is echoed in a php while loop echo "&lt;td&gt;" . "&lt;input type=submit name=update value=update onclick='confirm();'" . "&gt; &lt;/td&gt;"; echo "&lt;td&gt;" . "&lt;input type=submit name=delete value=delete onclick='confirm();'" . "&gt; &lt;/td&gt;"; I am grateful for anyone taking their time to help !
favorite count: 0
has title: Blank alert confirmation box from javascript function, when called from HTML form
has answer: http://stackoverflow.com/a/27585133
has answer: http://stackoverflow.com/a/27585201
accepted answer: http://stackoverflow.com/a/27585201
tagged with: php
downvote count: 1
type: AnsweredQuestion
score: 1
tagged with: forms
has comment: http://stackoverflow.com/comment/43594747
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/43594749
possible better answer: http://stackoverflow.com/a/27585133
has comment: http://stackoverflow.com/comment/43594833
tagged with: javascript
has comment: http://stackoverflow.com/comment/43594724
has comment: http://stackoverflow.com/comment/43594895
has answer: http://stackoverflow.com/a/27585142
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43594852

http://stackoverflow.com/a/27624892
has comment: http://stackoverflow.com/comment/43671400
accepted answer of: http://stackoverflow.com/q/27607179
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/43670897
answers question: http://stackoverflow.com/q/27607179
has comment: http://stackoverflow.com/comment/43671758
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Solution is quite easy : What are the parameters ? • The start radius of your circle. • The end radius of your circle. • The number of square per circle. Then what do you need to compute ? • The rotation to be performed between two circles : easy ,that's just a full rotation divided by the number of square per circle : var angle = 2 * Math.PI / squaresPerCircle; • The size of each square, given the current radius. Easy also : compute the circumference of the current circle (2*PI*radius), then the size of one square is approximately this circumference divided by the number of squares (since you want to fill the circle) : squareSize = 2 * Math.PI * currentRadius / squaresPerCircle; approximation is good enough even for like 10 squares per circles. ( Otherwise the 'real' way to get the height when you have radius and angle is done with : squareSize = 2 * currentRadius * Math.tan(angle/2); ) Snippet : // parameters var startRadius = 5; var maxRadius = 200; var squaresPerCircle = 20; function start() { // boilerplate var canvas = document.getElementById("outputCanvas"); var ctx = canvas.getContext("2d"); canvas.width = 600; canvas.height = 600; // ctx.save(); ctx.translate(canvas.width / 2, canvas.height / 2); var currentRadius = startRadius; var angle = 2 * Math.PI / squaresPerCircle; // loop on each ring do { squareSize = 2 * Math.PI * currentRadius / squaresPerCircle; // squareSize = 2 * currentRadius * Math.tan(angle/2); ctx.save(); // loop on every square of a single ring for (var cIndex = 0; cIndex < squaresPerCircle; cIndex++) { ctx.fillRect(currentRadius, -squareSize / 2, squareSize, squareSize); ctx.rotate(angle); }; ctx.restore(); currentRadius += squareSize; } while (currentRadius < maxRadius); ctx.restore(); } onload = start; Canvas not supported...

http://stackoverflow.com/comment/63810970
type: AnswerComment
comment on: http://stackoverflow.com/a/27512224
has text: You're right: `$index` will be different if we use angular's `filter`. In simple scenarios - like the one here - `ng-show` / `ng-if` will accomplish the same thing.
score: 0
type: Comment

http://stackoverflow.com/comment/43598659
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27587158
has text: You code `$('input[name="radioGrpSbjOption"]')` find all radios and returns first one value that is `0`.
type: Comment

java
tags question: http://stackoverflow.com/q/27492384
tags question: http://stackoverflow.com/q/27550149
tags question: http://stackoverflow.com/q/27531810
tags question: http://stackoverflow.com/q/27588775
tags question: http://stackoverflow.com/q/27617349
tags question: http://stackoverflow.com/q/27496052
tags question: http://stackoverflow.com/q/27600871
tags question: http://stackoverflow.com/q/27626181
tags question: http://stackoverflow.com/q/27511317
tags question: http://stackoverflow.com/q/27506866
tags question: http://stackoverflow.com/q/27609387
tags question: http://stackoverflow.com/q/27601680
tags question: http://stackoverflow.com/q/27620914
tags question: http://stackoverflow.com/q/27636806
tags question: http://stackoverflow.com/q/27533785
tags question: http://stackoverflow.com/q/27585864
tags question: http://stackoverflow.com/q/27571189
tags question: http://stackoverflow.com/q/27562061
tags question: http://stackoverflow.com/q/27478541
tags question: http://stackoverflow.com/q/27522039
tags question: http://stackoverflow.com/q/27508249
tags question: http://stackoverflow.com/q/27598524
tags question: http://stackoverflow.com/q/27525308
tags question: http://stackoverflow.com/q/27510191
tags question: http://stackoverflow.com/q/27620195
tags question: http://stackoverflow.com/q/27540706
tag name: java
tags question: http://stackoverflow.com/q/27565269
tags question: http://stackoverflow.com/q/27621084
tags question: http://stackoverflow.com/q/27610851
tags question: http://stackoverflow.com/q/27540029
tags question: http://stackoverflow.com/q/27516503
tags question: http://stackoverflow.com/q/27520024
tags question: http://stackoverflow.com/q/27629194
tags question: http://stackoverflow.com/q/27479169
tags question: http://stackoverflow.com/q/27500315
tags question: http://stackoverflow.com/q/27549075
tags question: http://stackoverflow.com/q/27608110
type: Tag
tags question: http://stackoverflow.com/q/27545408
tags question: http://stackoverflow.com/q/27629929
tags question: http://stackoverflow.com/q/27502744
tags question: http://stackoverflow.com/q/27604679
tags question: http://stackoverflow.com/q/27585339
tags question: http://stackoverflow.com/q/27483681

recurly
type: Tag
tag name: recurly
tags question: http://stackoverflow.com/q/27483847

http://stackoverflow.com/q/27566862
has comment: http://stackoverflow.com/comment/43559291
downvote count: 1
score: -1
linked to: http://stackoverflow.com/q/162326
has comment: http://stackoverflow.com/comment/43558801
type: Question
has comment: http://stackoverflow.com/comment/43558784
has comment: http://stackoverflow.com/comment/43558906
has comment: http://stackoverflow.com/comment/43558932
tagged with: javascript
has comment: http://stackoverflow.com/comment/43558803
has answer: http://stackoverflow.com/a/27567048
favorite count: 0
duplicate of: http://stackoverflow.com/q/1423777
answer count: 1
linked to: http://stackoverflow.com/q/1423777
has body: I want to just check whether a radio button is selected or not through javascript. I am getting an object is undefined error with the below code. function ValidateRadioButton() { if (document.form1.optfirst.checked == true) { alert("Option1 is checked"); } else if (document.form1.optsecond.checked == true) { alert("Option2 is checked"); } return false; }
duplicate of: http://stackoverflow.com/q/162326
upvote count: 0
type: UnansweredQuestion
has title: Validation to check if a radio button is checked or not through javascript

http://stackoverflow.com/q/27615266
score: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/43652213
linked to: http://stackoverflow.com/q/25988531
favorite count: 0
answer count: 3
has comment: http://stackoverflow.com/comment/43652172
has answer: http://stackoverflow.com/a/27615347
has comment: http://stackoverflow.com/comment/43652167
has answer: http://stackoverflow.com/a/27615704
upvote count: 1
has comment: http://stackoverflow.com/comment/43661783
downvote count: 1
type: AnsweredQuestion
has title: Output of below code statements
has body: var abc = function() { console.log(1); } function abc() { console.log(2); } abc(); I am expecting that it will console 2, but no it will console 1 because of function and variable hoisting.Anybody who want to make it more clear.
possible better answer: http://stackoverflow.com/a/27615452
has answer: http://stackoverflow.com/a/27615452
accepted answer: http://stackoverflow.com/a/27615704
type: Question

http://stackoverflow.com/q/27511164
possible better answer: http://stackoverflow.com/a/27511213
upvote count: 1
has answer: http://stackoverflow.com/a/27511213
tagged with: angularjs
tagged with: javascript-objects
has answer: http://stackoverflow.com/a/27511226
accepted answer: http://stackoverflow.com/a/27511226
type: AnsweredQuestion
downvote count: 0
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/43452633
type: Question
has title: why two $scopes updates at the same time, duplicate data
tagged with: javascript
tagged with: angularjs-scope
has body: I have this piece of code $scope.addToOrder = function(index) { var tempItem = $scope.item; if (tempItem[index].validate == true){ if (_.isEmpty($scope.item2) == true) { $scope.item2.push(tempItem[index]); } else { for (var i = 0; i &lt; $scope.item2.length; i++) { if ($scope.item2[i] == tempItem[index]) { break; } if (i == $scope.item2.length - 1) { $scope.item2.push(tempItem[index]); } } } } } I want to push data from one object to other (item to item2), it works well, but when i change data from item also item2 updates i dont want this. What i missing?
answer count: 2

http://stackoverflow.com/comment/43545422
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27559549
has text: @jfriend00 and I am here trolling and wasting everyone's time :) pointless..
score: 0

http://stackoverflow.com/q/27519366
tagged with: javascript
tagged with: jquery
score: 0
has body: I have a donut raphael donut chart that I would like when clicked to show a cooresponding div of text. I tried to set id's for each section and then trigger them with jquery using this code but it is not working. jQuery(document).ready(function() { jQuery(".div1, .div2, .div3, .div4").hide(); jQuery("#arched1, #arched2, #arched3, #arched4").bind("click", function () { jQuery(".div1, .div2, .div3, .div4").hide(); if (jQuery(this).attr("id") == "oxbowarc1") { jQuery(".div1").show(); } else if ($(this).attr("id") == "oxbowarc2") { jQuery(".div2").show(); } else if (jQuery(this).attr("id") == "oxbowarc3") { jQuery(".div3").show(); } else { jQuery(".div4").show(); } }); }); What can I do to make this work? Here is the fiddle http://jsfiddle.net/dll416/17j9Lhwg/1/
has answer: http://stackoverflow.com/a/27519455
type: Question
type: AnsweredQuestion
has title: Show/Hide Divs when clicking on donut chart Section
tagged with: raphael
accepted answer: http://stackoverflow.com/a/27519455
answer count: 1

http://stackoverflow.com/q/27537613
has answer: http://stackoverflow.com/a/27609659
tagged with: android
tagged with: android-studio
type: UnansweredQuestion
score: 1
has body: I Develop apps using appcelerator Titanium , Appcelerator Titanium requires Java JDK 32 bit installed and the Environment variable java_home set to it's path , sometimes i want to do some edits nativley using android studio , but the problem is that android studio requires Java JDK 64 bit installed and the environment Variable JAVA_HOME set to it's location , when i set the environment variable to one of the sdks the program that require the other one crash , So the question is Is there a way to get both working on my pc ? Thanks in advance
upvote count: 1
type: Question
tagged with: javascript
tagged with: eclipse
answer count: 1
has title: How to get android studio and appcelerator titanium work together
downvote count: 0
favorite count: 0
tagged with: appcelerator

http://stackoverflow.com/comment/43461786
score: 0
type: QuestionComment
type: Comment
has text: @T.J.Crowder My Engineer subclass needs some variables found in the Employee class. There is a quick workaround for this since Engineer is only 2 levels away from Employee but it becomes an issue when I'm in the nth subclass away from Employee. Ideally this nth subclass has access to n-1th's, n-2th... subclass all the way back to Employee
comment on: http://stackoverflow.com/q/27502491

http://stackoverflow.com/q/27570394
type: Question
has answer: http://stackoverflow.com/a/27572262
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27572262
has body: (This is an extremely simplified example of a problem I ran into. It might not make too much functional sense) I need a textbox that I can type currency into, that will translate to an int on the viewmodel and to a nicely formatted value in the textbox I took the code from Example 4: Filtering and validating user input And threw away lastInputWasValid and the NaN-test. My result is here: http://jsfiddle.net/cvv341ro/8 If I type 1234, the value of acceptedNumericValue will be 1234 and the value in the textbox will be €1234. Good! If I type €567.0, the value of acceptedNumericValue will be 567 and the value in the textbox will be €567. Brilliant! But, If I then type 567.0000 (the same as the accepted value), knockout will write a value to acceptedNumericValue that's already there, and not update the textbox. I get this :) so I'll give knockout a kick, and call valueHasMutated on the acceptedNumericValue to make it work I can see the computed being called, but the textbox will not change the text to €567, whatever I do. Why!? :'( Very short recap: run the jsfiddle -> change the text to 123.0 -> blur -> why won't the textbox update to €123?
answer count: 1
downvote count: 0
has title: Why won't knockout update the value in my textbox?
favorite count: 0
score: 2
type: AnsweredQuestion
upvote count: 2
tagged with: knockout.js

http://stackoverflow.com/comment/43691829
comment on: http://stackoverflow.com/q/27635889
type: Comment
type: QuestionComment
has text: @RobG, Totally agreed with you. I just used OPs code.
score: 0

http://stackoverflow.com/comment/43685959
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27632865
has text: I also added the expected result in the original post.

http://stackoverflow.com/comment/43443203
type: Comment
comment on: http://stackoverflow.com/a/27506501
has text: `somedata` could be a not valid part of a querystring, so this solution would fix this problem.
type: AnswerComment
score: 0

http://stackoverflow.com/q/27571015
type: Question
tagged with: javascript
has body: I'm writing a web app for mobile with Ionic framework. I'm trying to add a facebook login option. It is running on my localhost but on my nexus phone it shows me a blank page with this error: The redirect_uri URL must be absolute LoginCtrl.js: $scope.fbLogin = function () { openFB.login( function (response) { if (response.status === 'connected') { } else { } }, { scope: 'email,publish_actions' }); } I have configured the openFB with my facebook APP_ID. In the facebook Valid OAuth redirect URIs I have attached my localhost oauthcallback.html file and https://www.facebook.com/connect/login_success.html for Cordova. I have followed this tutorial. Can anyone help me figure out what am I doing wrong and why it doesn't work on my mobile?
favorite count: 0
type: UnansweredQuestion
tagged with: facebook
tagged with: http://stackoverflow.com/tag/html
has title: Ionic login with facebook error: URL must be absolute
score: 2
answer count: 0
upvote count: 3
downvote count: 1
tagged with: ionic-framework

http://stackoverflow.com/a/27549056
accepted answer of: http://stackoverflow.com/q/27549015
score: 2
answers question: http://stackoverflow.com/q/27549015
upvote count: 3
downvote count: 1
has comment: http://stackoverflow.com/comment/43524369
has comment: http://stackoverflow.com/comment/43524808
has comment: http://stackoverflow.com/comment/43524377
type: AcceptedAnswer
has body: In property definition, JavaScript handles it via the internal method DefineOwnProperty, where assignment is handled by the internal method Put. In short, the second one checks whether or not a property is read-only and if yes, leads to rejection. This can have consequences when using read-only properties, which prevent assignment, but not definition. If you want to create a new property it is better use definition. If you want to change the value of a property, you can use assignment. Take a look here for more, very interesting article. EDIT: In fact, defineProperty is used for reasons such as defining read only properties and other reasons about the behavior of the property defined. Take a look here for more too.
has comment: http://stackoverflow.com/comment/43524358
type: Answer

http://stackoverflow.com/comment/43629926
score: 4
type: Comment
type: QuestionComment
has text: "associative arrays" in javascript are objects, not arrays
comment on: http://stackoverflow.com/q/27603832

http://stackoverflow.com/comment/43670169
type: AnswerComment
has text: I've been reading the $.when documentation on jquery.com and I see a lot of mention about `Deferred` but I haven't been able to make sense of it. Would it be too involved to show me how this would be done as it pertains to the code I included above?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27624820

http://stackoverflow.com/comment/43443652
has text: ok, this was just a writing error here, in my code its correct. Fixed the post, but not hte problem.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27506675

http://stackoverflow.com/q/27567142
type: Question
tagged with: c#
has title: passing string parameter from js view to controller
tagged with: javascript
score: -1
answer count: 1
has answer: http://stackoverflow.com/a/27567186
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43559858
has body: Below mentioned function is getting "value" from " Status Lead General" function mypage (value) { var x=value; if(x=="Lead") { var y = value; window.location = '@Url.Action("tagWiseContacts", "Status",new {y=value})' } I want to pass the "value" as parameter to a function in the Controller, but it's working,I also tried other methods too.
downvote count: 3

http://stackoverflow.com/a/27598383
has comment: http://stackoverflow.com/comment/43626077
has comment: http://stackoverflow.com/comment/43621514
has body: I guess the border is something like 1000 as it's getting hard for browsers to deal with huge amount of smal object instances. For example, if you load hundrets of point objects from a KML it's getting pretty slow at every JS webmap framework. A better way to deal with that problem is to use server side components to filter the objects. For example stream simplified layers for low zoomlevels and just stream the nessary objects within your current map view via a bbox filter strategy.
has comment: http://stackoverflow.com/comment/43628483
upvote count: 7
has comment: http://stackoverflow.com/comment/43629872
type: Answer
has comment: http://stackoverflow.com/comment/43628448
downvote count: 0
score: 7
answers question: http://stackoverflow.com/q/27597259
has comment: http://stackoverflow.com/comment/43627401

http://stackoverflow.com/comment/43685939
has text: try on textarea, it is not supported.
type: Comment
comment on: http://stackoverflow.com/a/27599768
score: 0
type: AnswerComment

http://stackoverflow.com/a/27541150
answers question: http://stackoverflow.com/q/27540456
score: 1
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has body: You can use .nvtooltip:before and make a triangle using CSS. Check here You can check demo here. Add the below styles in the CSS tab. .nvtooltip:before { content: ""; display: block; width: 0; height: 0; border-top: 12px solid transparent; border-bottom: 12px solid transparent; border-right: 12px solid #d1d1d1; position: absolute; top: 16px; left: -12px; }
type: Answer
accepted answer of: http://stackoverflow.com/q/27540456

http://stackoverflow.com/comment/43583200
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27579310
has text: ^1 I never knew you could do that

http://stackoverflow.com/q/27619696
accepted answer: http://stackoverflow.com/a/27620032
type: AnsweredQuestion
has title: IndexOf not finding string in text
has comment: http://stackoverflow.com/comment/43660384
downvote count: 1
has comment: http://stackoverflow.com/comment/43660483
type: Question
has comment: http://stackoverflow.com/comment/43660214
answer count: 2
has comment: http://stackoverflow.com/comment/43660714
has comment: http://stackoverflow.com/comment/43660238
has comment: http://stackoverflow.com/comment/43660420
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43660518
has comment: http://stackoverflow.com/comment/43660309
has comment: http://stackoverflow.com/comment/43660793
score: 0
has comment: http://stackoverflow.com/comment/43660401
has answer: http://stackoverflow.com/a/27620032
possible better answer: http://stackoverflow.com/a/27620628
has comment: http://stackoverflow.com/comment/43660221
has comment: http://stackoverflow.com/comment/43660735
has comment: http://stackoverflow.com/comment/43660762
has answer: http://stackoverflow.com/a/27620628
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43660804
has body: So I've this &lt;p&gt; that contains characters wrapped with a &lt;span&gt; that in total form a sentence. Now I need to insert some &lt;br/&gt; at several unknown positions in the &lt;p&gt; where certain words are positioned. To do this I wrote a function: function spaceInsert() { var sentence = [ 'spirit of brotherhood.' ]; for( var i = 0; i &lt; sentence.length; i++ ) { console.log( sentence[i] ); console.log( $( '#body .tattoo-letters' ).text() ); console.log( $( '#body .tattoo-letters' ).text().indexOf( sentence[i] ) ); } } the sentence array contains the sentences which need a breakline. Why is indexOf returning -1 ( not found? ). I am logging the text and it is in there. EDIT The text in the console - second console log ( it is appended, so can't show any html ). All human beings are born free and equal in dignity and rights. They are endowed with reason and conscience and should act towards one another in a spirit of brotherhood.Everyone is entitled to all the rights and freedoms set forth in this Declaration, without distinction of any kind, such as race, colour, sex, language, religion, political or other opinion, national or social origin, property, birth or other status. Furthermore, no distinction shall be made on the basis of the political, jurisdictional or international status of the country or territory to which a person belongs, whether it be independent, trust, non-self-governing or under any other limitation of sovereignty.
favorite count: 0
has comment: http://stackoverflow.com/comment/43660814
upvote count: 1
has comment: http://stackoverflow.com/comment/43660445
has comment: http://stackoverflow.com/comment/43660673

http://stackoverflow.com/q/27550775
tagged with: dropdownbox
has comment: http://stackoverflow.com/comment/43528571
answer count: 0
type: Question
has body: I have this chosen jquery dropdown box that shows the states/provinces when I click on a checkbox that is labelled Canada or another checkbox labelled United states. I want to let my users have the option to remember their recent choices. If they clicked on the Canada checkbox and then clicked on a province in the dropdown list. I want to be able to choose the options again with through the click of some other button. However, i'm not having much luck because the dropdown list of provinces is dynamically changed after the checkbox is set, and the elements in the dropdown list appear to be null. How would I go about doing this? Thanks in Advance!
tagged with: javascript
has title: How do you set value of an Ajax dynamically updated multiple chosen dropdown box using jquery?
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/43527795
tagged with: ajax
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/27579484
upvote count: 1
has body: I'm thinking of using three.js for my art project. What I want to do is to write some code that generates some graphics and then save it in high resolution. When I say high resolution I mean something like 7000 x 7000 px or more, because I would like to print it. So far I have been doning something like that with Flash and vvvv but I would like to know if this is possible and if there are some examples available in three.js. You can see some of my stuff here: https://www.behance.net/onoxo
answer count: 1
accepted answer: http://stackoverflow.com/a/27586987
tagged with: webgl
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/27586987
type: Question
tagged with: three.js
has comment: http://stackoverflow.com/comment/43594623
has title: How to render large scale images from canvas composition

http://stackoverflow.com/a/27609768
upvote count: 7
answers question: http://stackoverflow.com/q/27608922
type: Answer
has body: I got this working (sufficiently for my current needs, at least). I copied the localhost cert from "Certificates (Local Computer) > Personal > Certificates" to "Certificates (Current User) > Personal > Certificates". This got rid of the red cross-out of https in Chrome (and the "NET::ERR_CERT_AUTHORITY_INVALID" message) as well as the "net::ERR_INSECURE_RESPONSE" error in AngularJS. Note that in my case, the localhost cert had to be in both the Local Computer store and in the Current User Store, otherwise the netsh command for binding it to port 5555 (for the Owin app) would fail: netsh http add sslcert ipport=127.0.0.1:5555 certhash=1234555555555555555555511155555555555555 appid={1234a123-1234-1234-1234-123412341234} SSL Certificate add failed, Error: 1312, A specified logon session does not exist. It may already have been terminated. There is still no nice green padlock in Chrome (it now has a yellow little triangle on the pad lock, "The identity of this website has been verified by ca.acme.com but does not have public audit records"), but this does not seem to interfere with the Web API communication, so it should be fine. If anybody knows of an easy way to make it all green and nice with no warnings, I am still interested, but it is not critical.
downvote count: 0
score: 7
has comment: http://stackoverflow.com/comment/64607618

http://stackoverflow.com/q/27490005
has title: JavaScript loops through both if and else, what am I missing?
has comment: http://stackoverflow.com/comment/43411604
answer count: 0
type: UnansweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/43411627
type: Question
has comment: http://stackoverflow.com/comment/43411629
tagged with: if-statement
tagged with: javascript
has comment: http://stackoverflow.com/comment/43421469
has comment: http://stackoverflow.com/comment/43412021
has comment: http://stackoverflow.com/comment/43412936
has comment: http://stackoverflow.com/comment/43411642
upvote count: 1
downvote count: 0
favorite count: 0
has body: if (manager.getProductType() === manager.TYPE_HARDWARE) { anotherManager.setTransactionType(manager.TYPE_HARDWARE); } else { anotherManager.clearAllTransactionTypes(); } For some reason, both the if and the else execute when I debug and trace in firebug. Any ideas what might be causing this? manager.getProductType() evaluates to "HARDWARE" manager.TYPE_HARDWARE evaluates to "HARDWARE"

http://stackoverflow.com/q/27595493
possible better answer: http://stackoverflow.com/a/27597311
has answer: http://stackoverflow.com/a/27597311
has comment: http://stackoverflow.com/comment/43618122
type: Question
score: 3
has title: Adding a letter into a cell
has comment: http://stackoverflow.com/comment/43617896
downvote count: 0
tagged with: javascript
favorite count: 0
answer count: 3
has answer: http://stackoverflow.com/a/27597410
has answer: http://stackoverflow.com/a/27600126
has body: I am trying to figure out how to add a letter into a cell. I am making a matching game and before I try to make it so a letter is randomly implemented into the cell I would like to know how to just put a letter in a cell when the page loads, even if it is preset and not random. So at the current moment I have 12 cells (12 tds) and I want to make it so when you click one of these cells it will show the letter that is in that cell. Would anybody know how I would start to go about this? The code I have so far is in a jsfiddle, even though it is not much I just want to show you what I mean. As you can see I am trying to match letters up Thanks What I would like to know is how, when I click on one of the green cells, I can make a letter appear in the box out of one of the letters in my array I provided http://jsfiddle.net/6c9qg845/ var letters = ["A", "A", "B", "B", "C", "C", "D", "D", "E", "E", "F", "F"];
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43623026
accepted answer: http://stackoverflow.com/a/27597410
upvote count: 3

http://stackoverflow.com/comment/43437057
has text: I would better go with directive that would listen height change.
comment on: http://stackoverflow.com/q/27503277
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27571483
tagged with: local-storage
has comment: http://stackoverflow.com/comment/43611451
type: Question
tagged with: backbone.js-collections
tagged with: javascript
has answer: http://stackoverflow.com/a/27594128
has body: I'm using Backbone.localStorage and have the following Collection: var PlayersCollection = Backbone.Collection.extend({ model: Player, localStorage: new Backbone.LocalStorage("players-backbone"), }); and trying to set initial data by using: var col = new PlayersCollection([ { "model": "myapp.person", "pk": 1 }, { "model": "myapp.person", "pk": 2 } ]); But unfortunately I have no the items above in my collection: col.localStorage.records // [] nothing How could I initialize localStorage store based in initial collection data?
has title: Unable to set initial collection data in Backbone.localStorage plugin
has comment: http://stackoverflow.com/comment/43621907
upvote count: 1
answer count: 1
favorite count: 0
tagged with: backbone.js
has comment: http://stackoverflow.com/comment/43611635
type: UnansweredQuestion
downvote count: 0
score: 1

http://stackoverflow.com/comment/43415329
type: QuestionComment
comment on: http://stackoverflow.com/q/27491542
has text: @BenjaminGruenbaum - I was thinking? It just takes a while. You probably could do this with namespacing, but that would mean `$(document).on('ready.first')` and `$(document).off('ready.first')` etc. but you shouldn't use `on` for the DOM ready handler, it's actually bad practice, so I was thinking maybe there was a better way ?
score: 0
type: Comment

http://stackoverflow.com/a/27525688
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43480022
has comment: http://stackoverflow.com/comment/43480462
type: Answer
has comment: http://stackoverflow.com/comment/43480721
score: 0
answers question: http://stackoverflow.com/q/27525460
accepted answer of: http://stackoverflow.com/q/27525460
has body: You're repeating over a number of items and writing out elements. One of those elements is a form: &lt;form method="post" action="AddtoCart.php" id="productForm"&gt; &lt;input type = "hidden" value="&lt;?php echo $MenuItem['Item_ID']?&gt;" name="CC" /&gt; &lt;/form&gt; However it has a hardcoded id attribute - productForm. This means that each of the forms in your page has the same ID, which is not valid - IDs are meant to be unique. The submitForm function is getting hold of the form by ID, so will always find the first one with that ID and submit it, hence your problem. To solve this, each form needs to have a unique ID: &lt;form method="post" action="AddtoCart.php" id="productForm&lt;?php echo $MenuItem['Item_ID']?&gt;"&gt; &lt;input type = "hidden" value="&lt;?php echo $MenuItem['Item_ID']?&gt;" name="CC" /&gt; &lt;/form&gt; And this needs to be passed into your submitForm function: &lt;a class="view-link shutter" href="javascript: submitForm('&lt;?php echo $MenuItem['Item_ID']?&gt;');" name="Add"&gt; which can then be adjusted to use it: function submitForm(formID) { $('#productForm' + formID).submit(); }

http://stackoverflow.com/q/27599029
has answer: http://stackoverflow.com/a/61885182
has comment: http://stackoverflow.com/comment/43621406
has answer: http://stackoverflow.com/a/27599593
type: Question
tagged with: browser
has comment: http://stackoverflow.com/comment/43621627
has answer: http://stackoverflow.com/a/27599768
accepted answer: http://stackoverflow.com/a/28558042
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27599593
favorite count: 0
has comment: http://stackoverflow.com/comment/43622224
has comment: http://stackoverflow.com/comment/43621761
tagged with: http://stackoverflow.com/tag/html
tagged with: cross-browser
answer count: 4
has comment: http://stackoverflow.com/comment/43621431
has comment: http://stackoverflow.com/comment/43681102
has answer: http://stackoverflow.com/a/28558042
has comment: http://stackoverflow.com/comment/43686223
has body: I thought I could detect by doing like this but it was not. var input = $("#d_textarea"); var str = "123456789012"; input.val(str); var maxlengthEnable = (input.val() != str); console.log(maxlengthEnable); is there any way to detect a browser enable maxlegnth feature?
has title: how to detect a browser is maxlength feature enable
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/43621537
has comment: http://stackoverflow.com/comment/43621694
upvote count: 3

http://stackoverflow.com/q/27626541
has comment: http://stackoverflow.com/comment/43673779
has comment: http://stackoverflow.com/comment/43674434
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27626933
has comment: http://stackoverflow.com/comment/43674541
score: -1
has title: Getting the latitude and longitude of the point in between (by percentage) two points on Google Maps JS API?
linked to: http://stackoverflow.com/q/19128954
has comment: http://stackoverflow.com/comment/43674386
tagged with: google-maps
upvote count: 0
answer count: 1
tagged with: javascript
has body: Here is the code I have so far: function initialize() { var mapOptions = { center: { lat: 21.9072222, lng: -47.715}, zoom: 3 }; var map = new google.maps.Map(document.getElementById('derby-to-lima'), mapOptions); var line = new google.maps.Polyline({ path: [new google.maps.LatLng(53.9834124, -1.5863153), new google.maps.LatLng(-12.0553442, -77.0451853)], strokeColor: "#008CBA", geodesic: true, strokeOpacity: 0.5, strokeWeight: 5, map: map }); } google.maps.event.addDomListener(window, 'load', initialize); I want to draw another line on top of the existing one that stops at the point in between the two points, which can be changed by percentage. It's kind of hard to explain, but imagine the first point is the start, and the last is the end. You are given how far a runner currently is by the percentage of the way through they are. Now show how far they are (assuming they ran in a straight line). Thanks, I've been stuck on this for a while.
favorite count: 0
tagged with: google-maps-api-3
accepted answer: http://stackoverflow.com/a/27626933
linked to: http://stackoverflow.com/q/25562799
linked to: http://stackoverflow.com/q/23176555
type: AnsweredQuestion

http://stackoverflow.com/comment/43461131
type: QuestionComment
comment on: http://stackoverflow.com/q/27515031
score: 0
has text: None of your attempts are cleaner than simply typing it out on two lines...
type: Comment

http://stackoverflow.com/q/27517253
has body: I'm trying to use the hammer:hammer 2.0.4_2 package with Meteor 1.0.1 and I'm getting the following error: Exception from Tracker afterFlush function: undefined is not a function TypeError: undefined is not a function I figured that the error has something to do with DOM not being rendered yet, because of the Helper Block. So far I couldn't find an answer to this anywhere. Does someone else have the same error or knows how this can be fixed? client/profile.js Template.myTemplate.rendered = function() { this.$('body').hammer({ <-- Line of the Error in Console.. drag_min_distance:1, swipe_velocity:0.1 }) } Template.myTemplate.events({ 'press #mcPress': function() { console.log('yay!') } }) client/profile.html {{#with thisUser}} // some html stuff Some content {{/with}}
type: Question
accepted answer: http://stackoverflow.com/a/27526480
has title: Tracker afterFlush error with Meteor and Hammer JS package
tagged with: javascript
tagged with: hammer.js
answer count: 1
downvote count: 0
tagged with: meteor
favorite count: 0
has answer: http://stackoverflow.com/a/27526480
upvote count: 1
type: AnsweredQuestion
score: 1

http://stackoverflow.com/comment/43495431
has text: Have you tried adding jQuery to the project? Multiple ways to do this, and it largely compresses the code that you would have to right. If not, me/someone can generate a non-jQuery solution, but it's usually easier to use a library to get past the tons of boilerplate.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27533441
type: Comment

http://stackoverflow.com/comment/43455639
score: 0
type: Comment
type: QuestionComment
has text: What are you using client-side?
comment on: http://stackoverflow.com/q/27512659

http://stackoverflow.com/comment/43624557
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27600451
has text: Thnks a lot @TrueBlueAussie, for your help. Will try to understand and implement the same .

http://stackoverflow.com/comment/43406736
has text: have a look at [`array.filter()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)
type: QuestionComment
type: Comment
score: 1
comment on: http://stackoverflow.com/q/27487518

http://stackoverflow.com/comment/54272774
has text: i'll create plunkr today for this @AqibMumtaz
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27623909

http://stackoverflow.com/comment/43684676
type: Comment
comment on: http://stackoverflow.com/a/27631182
has text: you are welcome! stay with us on SO and everything will be possible for you
type: AnswerComment
score: 0

http://stackoverflow.com/comment/43584575
comment on: http://stackoverflow.com/q/27580017
type: Comment
score: 1
type: QuestionComment
has text: try using `ng-if="e.match_timer !==''"`

http://stackoverflow.com/comment/43682058
has text: Thanks @DelightedD0D! Your comment on the main question prompted me to go back and figure out why my ls wasn't working. It's a security setting issue on Chrome. Went into Firefox and it worked just fine for me to create the fiddle. Thanks for the constructive feedback, leading me to question myself and learn something. :-)
comment on: http://stackoverflow.com/a/27630559
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/124899447
score: 0
has text: It is worth to note that port knocking is vulnerable to the network's traffic sniffing since the knock sequence is not encrypted. There are some approaches to counter that vulnerability [cryptoknock](https://github.com/Jiab77/cryptknock), [fwknop](https://www.usenix.org/system/files/login/articles/1063-fwknop.pdf), [sKnock](https://www.net.in.tum.de/fileadmin/bibtex/publications/papers/sknock.pdf). However none of them is designed to work from within a web browser.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27556937

http://stackoverflow.com/a/27545961
has comment: http://stackoverflow.com/comment/75836358
score: 3
accepted answer of: http://stackoverflow.com/q/27545865
answers question: http://stackoverflow.com/q/27545865
type: AcceptedAnswer
downvote count: 0
has body: Since, you are assigning selected to ng-model, you should be able just to use it: 4 8 12
type: Answer
upvote count: 3

http://stackoverflow.com/a/27596694
downvote count: 0
has comment: http://stackoverflow.com/comment/43617823
has comment: http://stackoverflow.com/comment/43617436
score: 1
answers question: http://stackoverflow.com/q/27596658
upvote count: 1
has body: Why not use a simple selector and each? $('#driver').on('click', function() { var fields = []; $('input, select').each(function() { if ($(this).is('[type=checkbox]')) { if ($(this).is(':checked')) { fields.push($(this).val()); } } else if ($(this).is('[type=radio]')) { if ($('[name=' + $(this).attr('name') + ']:checked').get(0) === this) { fields.push($(this).val()); } } else if (!$(this).is('[type=submit], [type=button]')) { fields.push($(this).val()); } }); console.log(fields); }); Did you read the print? Option 1 Option 2 Test? Yes No
has comment: http://stackoverflow.com/comment/43617502
type: Answer

http://stackoverflow.com/comment/67172690
comment on: http://stackoverflow.com/q/27501409
type: Comment
type: QuestionComment
has text: @Alok That topic is about detection of exit from full-screen mode. This one is about how to exit consistently with `Esc` regardless of how exactly (with `F11` key or via Full Screen API) user has entered full-screen mode.
score: 0

http://stackoverflow.com/q/27482148
has body: I have a little script running so i can scroll trough a div with the mousedown option. Unfortunately it resets on each click and i can't quite figure out why it is doing this. &lt;script&gt; $(function () { var clicked = false, clickX; $("#gallery").on({ 'mousemove': function(e) { clicked &amp;&amp; updateScrollPos(e); }, 'mousedown': function(e) { clicked = true; clickX = e.pageX; }, 'mouseup': function() { clicked = false; $('html').css('cursor', 'auto'); } }); var updateScrollPos = function(e) { $('#gallery').scrollLeft($(window).scrollLeft() + (clickX - e.pageX)); } }); &lt;/script&gt; I am assuming it has something to do with clickX = e.pageX; $('#gallery').scrollLeft($(window).scrollLeft() + (clickX - e.pageX)); Why am I? because : "Returns the horizontal coordinate of the event relative to whole document." So I am assuming it takes the original position when you click but it doesnt update when you actually scroll this. Anyone has a fix for this? http://jsfiddle.net/fLr4d7kt/6/
type: Question
has comment: http://stackoverflow.com/comment/43401956
tagged with: javascript
has title: Stop jQuery "click scroll" reset
tagged with: click
has answer: http://stackoverflow.com/a/27485815
has comment: http://stackoverflow.com/comment/43397872
downvote count: 0
answer count: 1
tagged with: jquery
tagged with: mousedown
favorite count: 0
has comment: http://stackoverflow.com/comment/43400407
accepted answer: http://stackoverflow.com/a/27485815
type: AnsweredQuestion
score: 1
upvote count: 1

http://stackoverflow.com/a/27579291
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27579268
upvote count: 1
type: Answer
has body: Maybe just use Javascript to dump it to the console? For example, with JQuery... $( "#element" ).mouseover(function(e) { console.log(e); }); For your particular problem maybe something like this (untested!) $( ".buzz" ).mouseover(function(e) { $(e.target).find('.buzz-container').each(function(idx, child){ console.log(child); }); });

http://stackoverflow.com/comment/43468845
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27519571
score: 0
has text: When posting questions you should make sure that your code is readable. Your _js_ is formatted that bad with wrong indenting that it is hard to read and understand.

http://stackoverflow.com/a/27580361
has comment: http://stackoverflow.com/comment/43586459
score: 0
answers question: http://stackoverflow.com/q/27580035
has comment: http://stackoverflow.com/comment/52494483
type: Answer
has body: There's nothing available OOTB using the native javascript Date object but Moment.js handles your ISO8601 durations just fine (and there's little point re-inventing the wheel here...) e.g. the following demo prints: "6 months is greater than 10 minutes" var d1 = moment.duration('P6M'), d2 = moment.duration('PT10M'); console.log( d1.humanize() + ( d1 &lt; d2 ? ' is less than ' : ' is greater than ' ) + d2.humanize() );

http://stackoverflow.com/a/27677977
accepted answer of: http://stackoverflow.com/q/27570708
type: Answer
score: 1
upvote count: 1
has body: Calling 'markModified' on the _.merge return value (as suggested by a previous answer) didn't resolve this issue for me. The issue Adam Zerner reported is that _merge causes the 'updated' object to contain invalid data for array properties. I am also experiencing this issue using the angular-fullstack generator, for example if I delete elements out of an array this change doesn't get stored in Mongoose/mongo. Calling the set function on the mongoose document (e.g. thing.set(..., as suggested by Zerner) resolves the issue for me. I also read this discussion thread: https://github.com/DaftMonk/generator-angular-fullstack/issues/637; it suggests replacing _merge with _extend (see also https://github.com/DaftMonk/generator-angular-fullstack/issues/310) which also works for me.
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27570708

http://stackoverflow.com/q/27596936
has answer: http://stackoverflow.com/a/27597013
answer count: 4
has comment: http://stackoverflow.com/comment/43617678
has answer: http://stackoverflow.com/a/27596999
has answer: http://stackoverflow.com/a/27597058
upvote count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27597197
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/43617727
score: 1
has title: Simple javascript for a clock not working
has comment: http://stackoverflow.com/comment/43617679
has body: Hi this is my first javascript and it is not working. The script is programmed to display a clock. The code is as follows: The javascript is : function display_c(){ var refresh=1000; // Refresh rate in milli seconds mytime=setTimeout('display_ct()',refresh) } function display_ct() { var strcount var x = new Date() document.getElementById('ct').innerHTML = x; tt=display_c(); } When execute I get a blank screen. What and where is the mistake ? TIA :)
tagged with: javascript
favorite count: 0

http://stackoverflow.com/comment/43614816
comment on: http://stackoverflow.com/a/27585653
type: AnswerComment
score: 0
type: Comment
has text: This is an option I tried myself as well. It works - most of the time - but sometimes the small timeout is not long enough and it takes two clicks to work. This means that on some other systems it might take a lot of iterations to work. I'm looking for something that _always_ works. I don't think increasing the delay arbitrarily is a good solution.

http://stackoverflow.com/q/27553866
accepted answer: http://stackoverflow.com/a/27556472
tagged with: google-chrome-extension
answer count: 1
has title: inline javascript stacktrace: better origin than @<anonymous>
type: AnsweredQuestion
has body: I'm working on a Chrome extension. I need to append Javsacript as inline-script for content security purposes. The issue now is that, because script is inlined, the stacktrace shows @ as source, instead of the file name: ReferenceError: asdf is not defined fetchContactByEmail@&lt;anonymous&gt;:5439:1 I need to distinguish between the source of the caller in the stack trace, to tell if it's from my script. Is there a way to tell the source of inline script? (P.S. the problem I'm trying to solve is: there could be multiple extensions injecting script onto the same page, and they override Array.prototype methods. I want to set up a switch that checks if caller is my script, then execute my function; if caller is other extension's script, execute their function.)
has answer: http://stackoverflow.com/a/27556472
type: Question
tagged with: javascript
score: 0

http://stackoverflow.com/q/27521271
has comment: http://stackoverflow.com/comment/43472726
has answer: http://stackoverflow.com/a/27521695
has comment: http://stackoverflow.com/comment/54379222
has comment: http://stackoverflow.com/comment/43472681
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/33143657
has comment: http://stackoverflow.com/comment/43472191
upvote count: 6
has title: AngularJS : use a variable into
type: AnsweredQuestion
tagged with: data-binding
has body: i have a controller named "HomeCtrl" which calculates the total number of user's into the {{total}} binding variable, like this: .controller('HomeCtrl', function($scope, $http){ $scope.total = 0; }); In my view, I am trying to display my total in an animated widget by passing {{total}} as the value of an attribute on a tag, like this: 1k Users Total Total utilisateurs : {{total}} Here is the widget directive: .directive('xeCounter', function(){ return { restrict: 'EAC', link: function(scope, el, attrs) { var $el = angular.element(el), sm = scrollMonitor.create(el); sm.fullyEnterViewport(function() { var opts = { useEasing: attrDefault($el, 'easing', true), useGrouping: attrDefault($el, 'grouping', true), separator: attrDefault($el, 'separator', ','), decimal: attrDefault($el, 'decimal', '.'), prefix: attrDefault($el, 'prefix', ''), suffix: attrDefault($el, 'suffix', ''), }, $count = attrDefault($el, 'count', 'this') == 'this' ? $el : $el.find($el.data('count')), from = attrDefault($el, 'from', 0), to = attrDefault($el, 'to', ''), duration = attrDefault($el, 'duration', 2.5), delay = attrDefault($el, 'delay', 0), decimals = new String(to).match(/\.([0-9]+)/) ? new String(to).match(/\.([0-9]+)$/)[1].length : 0, counter = new countUp($count.get(0), from, to, decimals, duration, opts); setTimeout(function(){ counter.start(); }, delay * 1000); sm.destroy(); }); } }; }) I can display the correct value of {{total}} in my view, but when I pass {{total}} into the attribute, as data-to= "{{total}}", it does not work. It doesn't recognize it as a number.
has answer: http://stackoverflow.com/a/29689353
type: Question
accepted answer: http://stackoverflow.com/a/33143657
tagged with: javascript
tagged with: angularjs-scope
score: 6
possible better answer: http://stackoverflow.com/a/27521695
has comment: http://stackoverflow.com/comment/43473185
answer count: 3

http://stackoverflow.com/comment/43618746
has text: where is your button? inside iframe or on the page where iframe is set?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27597552

http://stackoverflow.com/comment/43384683
score: 0
comment on: http://stackoverflow.com/a/27475000
type: AnswerComment
has text: %2Fjavascript%3Asort(1)%3B - inconsole i see the link as
type: Comment

http://stackoverflow.com/comment/43429997
type: QuestionComment
comment on: http://stackoverflow.com/q/27496418
score: 1
type: Comment
has text: It would help a lot if the code would be a lot more trimmed, and like @SherinMathew said if it'd be an actual repro. If we can't repro the scenario it'll be very hard for us to help you (especially with so much mostly irrelevant code). GL!

http://stackoverflow.com/a/27605418
has comment: http://stackoverflow.com/comment/43633242
type: Answer
has body: I think the problem in the script sharethis.com. Try disabling "Measure copy and shares of your website's content" in http://www.sharethis.com/get-sharing-tools/
score: 3
has comment: http://stackoverflow.com/comment/43633174
upvote count: 3
answers question: http://stackoverflow.com/q/27605280
has comment: http://stackoverflow.com/comment/43633058
accepted answer of: http://stackoverflow.com/q/27605280
has comment: http://stackoverflow.com/comment/43633258
has comment: http://stackoverflow.com/comment/43633213
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43633147

http://stackoverflow.com/comment/43418994
type: Comment
comment on: http://stackoverflow.com/q/27493578
type: QuestionComment
has text: Please post code, so that it will help people to inspect problem.
score: 0

http://stackoverflow.com/a/27564762
upvote count: 1
has comment: http://stackoverflow.com/comment/43554819
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43554890
has body: where is the string "Foo" (i.e. the name of the function Foo) stored In the global scope. You can avoid this by using a self invoking anonymous function : (function() { alert('Hello World'); })(); , or by associating a var to a function within a local scope : function myBigFunction() { var myfunction = function foo(){alert('Hello World');}; } No hidden name.
answers question: http://stackoverflow.com/q/27564731

http://stackoverflow.com/q/27476385
downvote count: 0
type: Question
has body: I have a menu with icons and I am trying to make the fontawesome icon of the selected list rotate by adding the class .fa-spin. I have no idea why my code is not working eventhough I made the Index equal to the clicked item. I appreciate some insights. 1 2 3 4 5 6 Here is my Jquery code: $('nav ul li a').click(function(){ $('nav ul li .fa').eq($(this).index()).addClass('fa-spin').siblings().removeClass('fa-spin'); });
has answer: http://stackoverflow.com/a/27476504
tagged with: javascript
has comment: http://stackoverflow.com/comment/43387063
accepted answer: http://stackoverflow.com/a/27476504
upvote count: 2
answer count: 2
tagged with: jquery
favorite count: 0
has title: Selected item does not spin
possible better answer: http://stackoverflow.com/a/27477701
has comment: http://stackoverflow.com/comment/43387049
has answer: http://stackoverflow.com/a/27477701
score: 2
type: AnsweredQuestion

http://stackoverflow.com/comment/43650421
has text: remove `var` and, if you like, leave `oneDay=null;`
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27614200

http://stackoverflow.com/a/27630363
has comment: http://stackoverflow.com/comment/43681645
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27630286
has comment: http://stackoverflow.com/comment/43681748
type: AcceptedAnswer
downvote count: 0
has body: Yes you can do that technically, but it is not a good idea. When using ajax, it is good to keep the data small. Instead of get everything from php and search it with js loop, you can improve your php script to let it accept queries. In your php: &lt;?php $whereCategory = isset($_GET['category'])? "where category like '{$_GET['category']}'" : ''; $sql = "select * from advanced_data {$whereCategory};"; ... In your ajax: $.getJSON('age_get.php?category=testCategory', function(data) { ... });
type: Answer
has comment: http://stackoverflow.com/comment/43681459
has comment: http://stackoverflow.com/comment/43681920
has comment: http://stackoverflow.com/comment/43681514
answers question: http://stackoverflow.com/q/27630286
score: 1

http://stackoverflow.com/a/27502462
has body: handle your anchor click and open dialog, if yes then set browser url to anchor href attribute $(".btn-delete").click(function(e) { var ahref = $(this) $("#dialog-confirm").dialog({ resizable: false, height: 140, modal: true, buttons: { "Yes": function() { $(this).dialog("close"); window.location = $(ahref).prop("href"); }, "No": function() { $(this).dialog("close"); } } }); e.preventDefault(); }); delete item
type: Answer
answers question: http://stackoverflow.com/q/27501945
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27501945
has comment: http://stackoverflow.com/comment/43435319

http://stackoverflow.com/a/27570545
has body: Two problems with that code: You want to use appendTo, not append. a.append(b) appends the content b to the element a; a.appendTo(b) is the other way around, it appends a to b. You need to remove the id of the cloned element; if you don't, you create an invalid document, because ids must be unique So: $(document).ready(function(){ $('#copy').clone().removeAttr("id").appendTo('#paste'); }); $(document).ready(function(){ $('#copy').clone().removeAttr("id").appendTo('#paste'); }); Some stuff to copy.
upvote count: 4
downvote count: 0
answers question: http://stackoverflow.com/q/27570438
type: Answer
score: 4

http://stackoverflow.com/comment/43413564
has text: @vp_arth I get an error and the page doesn't load properly if I do `... || default:'TBA'`.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27490652
score: 0

http://stackoverflow.com/comment/47154685
has text: Rather than change the question so drastically, you should probably have marked an answer correct and started a new question. I only saw the change in question because I clicked the link by accident.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27571714

http://stackoverflow.com/q/27595258
favorite count: 0
downvote count: 2
type: AnsweredQuestion
type: Question
upvote count: 0
score: -2
tagged with: arrays
answer count: 1
accepted answer: http://stackoverflow.com/a/27595274
has title: JavaScript - Wired behavior of Array_Push()
tagged with: javascript
has body: I have a weird behavior of Array_Push(). I am adding array to predefined array. Problem is that for some reason length of array increase for two when I am pushing array to predefined array. Here is code: example array: Object {id: 2, firstName: "First name", lastName: "Last name", phones: Array[0], emails: Array[0]…}$$hashKey: "00A"address: "Street 3"city: "Washington "emails: Array[0]firstName: "First name"id: 2lastName: "Last name"notes: "No notes"phones: Array[0]__proto__: Object JavaScript: var contacts = [ { id: 0, firstName: 'John', lastName: 'Doe', phones: [{'phone1': '222222222'}], emails: [{'email1': 'example@mail.com'}], address: 'Some Streetz 2.', city: 'Las Vegas', notes: 'Napomena', }, { id: 1, firstName: 'Mike', lastName: 'Smith', phones: [{'phone1':'111111'}], emails: [{'email1': 'example@mail.com'}], address: '459 5th Av.', city: 'New York', notes: 'Napomena', } ]; adding array to contacts array this.addContact = function (contact) { alert (contacts.length);//output is 2 contact.id = contacts.length ++;//getting ID od new array console.log(contact);// contacts.push(contact); alert ("++"+contacts.length);//output is 4 console.log(contacts); };
has answer: http://stackoverflow.com/a/27595274
has comment: http://stackoverflow.com/comment/43614167
has comment: http://stackoverflow.com/comment/43614216
has comment: http://stackoverflow.com/comment/43614217

http://stackoverflow.com/q/27518411
has answer: http://stackoverflow.com/a/27518869
favorite count: 0
accepted answer: http://stackoverflow.com/a/27518869
tagged with: angularjs
has comment: http://stackoverflow.com/comment/43466917
has comment: http://stackoverflow.com/comment/43495282
type: AnsweredQuestion
downvote count: 0
has title: orderBy in inner loop on nested ng-repeat
type: Question
has body: I want to filter websites that are in the filtered categories and display them in order of their rank.The code snippet is: {{website.title}},{{website.rank}} But in the nested loop, since orderby is in inner loop, it works for each iteration of outer loop but the overall result is not sorted according to rank. Say there are three categories and filter gives cat1 &cat2. If websites with rank 6,2,5 are is cat1 and 9,1 in cat2 then the result will be 2,5,6,1,9.I want the result to be 1,2,5,6,9.How should I do that ? Should I pass the category in some function and write the js code to get the array of filtered website and then sort them and return them to template or is there any other better way to do that in template itself?
score: 1
tagged with: nested-loops
has comment: http://stackoverflow.com/comment/43493736
upvote count: 1
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/27556648
tagged with: here-api
possible better answer: http://stackoverflow.com/a/50556741
has answer: http://stackoverflow.com/a/50556741
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: grails
has answer: http://stackoverflow.com/a/27561585
has body: How can I call HERE maps through HTTPS ? I'm using HTTPS on my server so when I call this: The browser blocks the request because of "Mixed Content" and therefore no map is shown... I tried to change "http" to "https" on the script source but I get the same issue cause both javascripts have "http" calls inside their codes. By the way the backend is written in Grails and the channel is secured using Spring Security Core plugin.
favorite count: 0
score: 8
accepted answer: http://stackoverflow.com/a/27561585
upvote count: 8
has title: How to call HERE Maps API v3 using HTTPS
type: AnsweredQuestion

http://stackoverflow.com/a/27621771
downvote count: 0
upvote count: 2
type: Answer
score: 2
has body: Musefan's answer is excelent, but following is also another way! $(document).ready(function () { ($('#checkbox').prop('checked')==true) ? $('#row').fadeOut('slow'):$('#row').fadeIn('slow'); $('#checkbox').change(function () { if (!this.checked) $('#row').fadeIn('slow'); else $('#row').fadeOut('slow'); }); });
answers question: http://stackoverflow.com/q/27621174

http://stackoverflow.com/comment/43439586
has text: EDIT2 I was adding listener every time. However first solution works perfect! Thanks man. You've helped me a lot. I'm going to implement this solution for window event like animate to Topoffset which also doesnt work.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27504141

http://stackoverflow.com/a/27548797
has body: One easy option is to surround the '33 available' with the tag like so: 33 available EDIT: You can do this with the following code: $('td').contents().filter(function() { return this.nodeType==3 && this.nodeValue.trim(); }).last().wrap(''); This is getting the last text node that has non white space characters and wrapping it in a span. Now you can access just that text and hide it: $('#available').hide();
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/27548713
downvote count: 0

http://stackoverflow.com/comment/43545802
type: QuestionComment
comment on: http://stackoverflow.com/q/27559797
score: 0
has text: Isn't it working with SetInterval?
type: Comment

http://stackoverflow.com/q/27479290
has body: I made a simple demo-page for my problem: http://jsfiddle.net/vvgv93k0/2/ As you can see it consists of an iframe and a simple p: &lt;iframe src="http://www.w3schools.com" width="100%" height="300"&gt;&lt;/iframe&gt; &lt;p&gt;Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium do What i would like to prevent is, that when the user clicks into the iframe, and then scrolls, the iframe is scrolled. I want that only the main page is scrolled! I tried to make my iframe not selectable with: -webkit-user-select: none; But that somehow didnt worked! Wht can i do so that the scroll is never perfromed in the iframe? Thanks!
has title: Disable scroll in Iframe
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/27479300
linked to: http://stackoverflow.com/q/15494568
tagged with: http://stackoverflow.com/tag/html
duplicate of: http://stackoverflow.com/q/15494568
tagged with: css
score: 2
upvote count: 2
accepted answer: http://stackoverflow.com/a/27479300
type: AnsweredQuestion

http://stackoverflow.com/q/27634121
has title: Unable to get property 'childNodes' of undefined or null reference error
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: dhtml
tagged with: scriptaculous
has body: We are doing a cross browser compatibility for a tool which was built over 8 years ago. The tool works only with IE7. Now we are doing the compatibility for higher IE versions and other browsers as well. While checking in IE8 and above, its throwing an error saying "able to get property 'childNodes' of undefined or null reference" in effects.js of script.aculo.us Here's the bit where its throwing the error - var Enumerable = { each: function(iterator) { var index = 0; try { this._each(function(value) { try { iterator(value, index++); } catch (e) { if (e != $continue) throw e; } }); } catch (e) { if (e != $break) throw e; } }, Since it was built 8 years ago, i believe this error is because of the very old versions of DHTMLX (1.5) and old version of script.aculo.us is used. But not sure though. Any idea about this error? Thanks.
score: 2
answer count: 0
upvote count: 2
type: UnansweredQuestion
type: Question
tagged with: cross-domain

http://stackoverflow.com/comment/43655722
type: QuestionComment
has text: In fiddle this functionality is not working as expected. therefore pasted it here. if fiddle makes it easy then please visit here http://jsfiddle.net/gjh4wvj4/1/
type: Comment
comment on: http://stackoverflow.com/q/27617173
score: 0

http://stackoverflow.com/q/27491206
has answer: http://stackoverflow.com/a/27491985
score: 2
type: AnsweredQuestion
downvote count: 0
type: Question
upvote count: 2
answer count: 2
accepted answer: http://stackoverflow.com/a/27491864
tagged with: javascript
tagged with: webforms
possible better answer: http://stackoverflow.com/a/27491985
has answer: http://stackoverflow.com/a/27491864
has comment: http://stackoverflow.com/comment/43415349
tagged with: asp.net
favorite count: 0
has body: I have an asp.net webforms application that I am working on. It uses a main aspx page to create a layout, and then uses ascx pages within a panel to display data. What I need to do is use javascript with a user control (ascx files). I thought that having a script manager on the main aspx page would allow me to register scripts in the Page_Load function on the .ascx pages. Here is a basic example of what I am trying to do: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Dim csConsoleLogSomething As String = "ConsoleLogSomethingScript" Dim consoleLogScript As String = "function logSomething() { console.log('SOMETHING'); }" Dim cs As ClientScriptManager = Me.Page.ClientScript cs.RegisterStartupScript(Me.GetType(), csConsoleLogSomething, consoleLogScript, True) 'I have also tried using: Dim cs As ClientScriptManager = Me.Parent.Page.ClientScript End Sub Here is the HTML on the ascx page: &lt;table width="100%" cellpadding="0" cellspacing="0" style="margin: 0px;"&gt; &lt;tr&gt; &lt;td&gt; &lt;input id="btnWTF" type="button" onclick="logSomething()" value="DO SOMETHING FOR THE LOVE OF MOSES" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; Here is the script manager declaration on the main aspx page: &lt;asp:ScriptManager ID="ScriptManager1" runat="server" EnableTheming="True" EnablePageMethods="true"&gt; &lt;/asp:ScriptManager&gt; I have also tried to create a simple alert to come up on the page load, but I cannot get any of my script to execute. When I push the button I get 'ReferenceError: logSomething is not defined' Any help would be greatly appreciated. For kicks I also just tried this method to no avail: ScriptManager.RegisterStartupScript(Button1, Button1.GetType(), csConsoleLogSomething, consoleLogScript, True) The buttons HTML: &lt;asp:Button ID="Button1" runat="server" Text="Button"/&gt; This resulted in a post to the main aspx page. Nothing was logged to the console. If possible I would like to stay away from asp controls. The end goal…
has comment: http://stackoverflow.com/comment/43415218
tagged with: registerstartupscript
tagged with: ascx
has title: Registering script with User Control

http://stackoverflow.com/q/27483701
has answer: http://stackoverflow.com/a/27483855
accepted answer: http://stackoverflow.com/a/27483855
tagged with: cordova
tagged with: webview
possible better answer: http://stackoverflow.com/a/27484615
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27484615
has title: Launch a website as a mobile app using PhoneGap and have access to phonegap plugins
type: Question
score: 0
answer count: 2
has body: I created an app with window.location = 'http://www.google.de'; described by this tutorial: http://antonylees.blogspot.de/2013/02/launch-website-as-mobile-app-using.html Is there a possibility to use onclick="window.open('https://www.google.de', '_system');" with cordova Plugin ́&lt;gap:plugin name="org.apache.cordova.inappbrowser" /&gt; I read in the tutorial above it should be possible to access the phonegap plugins with &lt;access origin="http://your.website" subdomains="true"/&gt; But this doesn't work. Unfortunately it only opens inside of webview. But I want to open it outside of the webview in the browser. Has anyone an idea? Best regards
tagged with: javascript

http://stackoverflow.com/a/27617326
type: Answer
has comment: http://stackoverflow.com/comment/43656493
score: 0
has body: This should work, however unbeforeunload requires a string to be returned. If not it will not fire due to security reasons. Add this as last line. return "Do you want to quit?"; However this thread blames jQuery as culprit window.onbeforeunload not firing change window.onbeforeunload = fnCallUnload; to window.addEventListener("beforeunload", fnCallUnload, false);
answers question: http://stackoverflow.com/q/27617019
has comment: http://stackoverflow.com/comment/43656544
has comment: http://stackoverflow.com/comment/43659248

http://stackoverflow.com/comment/43688372
has text: `$(this).siblings('.qty').val()` should be `$(this).closest('td').siblings('td').find('qty').val()`(same for .unit) as siblings should be inside same parent. `qty` and `unit` are not siblings
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27634398
type: Comment

http://stackoverflow.com/a/27783633
accepted answer of: http://stackoverflow.com/q/27475623
answers question: http://stackoverflow.com/q/27475623
has body: Do you have the latest versions of jquery.js, jquery.flot.js and jquery.flot.pie.js? Try placing your javascript code above html.
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44696284
type: Answer

http://stackoverflow.com/comment/43693636
type: QuestionComment
has text: $(container).append(' '); You can dynamically element like this. I used text box you can add as you want.
comment on: http://stackoverflow.com/q/27637316
score: 0
type: Comment

http://stackoverflow.com/a/27477647
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27476301
type: Answer
has body: function a(){ b(); } function b(){ console.log(arguments.callee.caller); }; function b will log: function a(){ b(); }
score: 0
accepted answer of: http://stackoverflow.com/q/27476301

http://stackoverflow.com/a/27566803
score: 1
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27566590
type: Answer
accepted answer of: http://stackoverflow.com/q/27566590
has comment: http://stackoverflow.com/comment/43558713
has body: i think you need to parse json first. look at the api.jquery.com/jquery.parsejson // data = '{ "name": "John" }' var obj = jQuery.parseJSON( data ); console.log( obj.name); // result will be "John" P.S. also better use 'succes' instead 'complete', you can read about this here Difference between .success() and .complete()? success: function(data) { console.log("response is good", data); }, error: function (){ console.log("something is went wrong"); }
upvote count: 1

http://stackoverflow.com/comment/43614584
type: QuestionComment
has text: Never covered this in school (got my degree in social work), but I just spent about an hour on it and I think I've got it. Both answers below are very helpful.
score: 0
comment on: http://stackoverflow.com/q/27595015
type: Comment

http://stackoverflow.com/a/27592725
score: 1
answers question: http://stackoverflow.com/q/27592687
has body: Check this demo Use JavaScript Number() Function function add(){ var a = document.getElementById("num1").value; var b = document.getElementById("num2").value; var ans = Number(a) + Number(b) ; document.getElementById("sum").value = ans; }
upvote count: 1
type: Answer
downvote count: 0

http://stackoverflow.com/comment/43698138
has text: SVG fill on scroll ... http://codyhouse.co/gem/icons-filling-effect/
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27639415
type: QuestionComment

http://stackoverflow.com/q/27539459
favorite count: 0
type: UnansweredQuestion
has body: I'm developing the Google Map web application using Google Map 3 library, I want to add the HTML panel when I click on button on infowindow. The panel position always beside the infowindow. Can everyone help me or give me an example to resolve it? It looks like this: For example I have some code, could I display the div #panel on the right of the div #content? Info windows
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/43509361
tagged with: google-maps
has title: Display the HTML panel next to infowindow on Google Map
tagged with: javascript
has comment: http://stackoverflow.com/comment/43506855
tagged with: google-maps-api-3
score: 0
upvote count: 1
downvote count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/43508258

http://stackoverflow.com/comment/61784459
type: Comment
has text: var authData = myFirebaseRef.getAuth();
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/37121601

http://stackoverflow.com/comment/43395639
type: AnswerComment
comment on: http://stackoverflow.com/a/27480835
type: Comment
has text: rate it if my answer is helpful to you
score: 0

http://stackoverflow.com/q/27543671
tagged with: http://stackoverflow.com/tag/html
has title: Javascript form validation not empty or no whitespaces
type: AnsweredQuestion
score: 3
upvote count: 3
accepted answer: http://stackoverflow.com/a/27543803
type: Question
has comment: http://stackoverflow.com/comment/43515073
tagged with: javascript
has comment: http://stackoverflow.com/comment/43515450
has body: I'm trying to validate a form I'm creating and can't seem to understand how this works. I'm trying to make sure the field isn't empty or contains no white-spaces I have validated it server side but not client side. Could someone please show me the code like below to validate against being empty or having no white-spaces? I see these below and this is what I thought they did: x===null // means if field is empty x==="" // on trying this means if the field is empty x===" " // and this checks if there is 1 white space First name:
tagged with: validation
downvote count: 0
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/27543803
has comment: http://stackoverflow.com/comment/43514581

http://stackoverflow.com/q/27564297
has answer: http://stackoverflow.com/a/27564566
type: UnansweredQuestion
tagged with: php
has title: instant messaging system using JavaScript
type: Question
has comment: http://stackoverflow.com/comment/49239636
tagged with: javascript
tagged with: ajax
has answer: http://stackoverflow.com/a/27579738
score: 0
tagged with: sockets
has body: I have a school project where i need to create an instant webbased messageing system. Ive looked into PHP sockets to complete this task PHP socket manual From these im starting to see a pattern. As you well know PHP can only run once (from top to bottom) and from these examples i can see that a while loop is what makes the socket listen for new connections. (meaning the php script never stops) these examples the echo the output of the socket. as far as i can see this is great if you just want a plain site. However this is not the case. I want to build this application using JavaScript to "ask" the socket if there is any new messages and if there is then render the messages accordingly. Since im very new to PHP sockets im not sure if this should be done purely by PHP or if it is possible to use JavaScript to listen to the socket (via Ajax) and then print the output as a JSON?
answer count: 4
has answer: http://stackoverflow.com/a/27564783
has comment: http://stackoverflow.com/comment/43554942
has answer: http://stackoverflow.com/a/27570697

http://stackoverflow.com/q/27542126
answer count: 2
tagged with: javascript
downvote count: 4
accepted answer: http://stackoverflow.com/a/27542161
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has body: In the following page I want to see the div with id "divId" to display Hello World! text. Do I have to enable something somewhere, in order to get to see that? Or I am just plain wrong. Hello World Page But still I am not getting the output as dsired!!!!
score: -3
possible better answer: http://stackoverflow.com/a/27542204
has title: What's wrong in the following HTML page? I want to see Hello World Printed on the page
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27542204
has answer: http://stackoverflow.com/a/27542161
upvote count: 1
type: Question

http://stackoverflow.com/a/27561178
has body: Use a common class is good instead of different id like, $(function(){ $('.mydatepicker').datepicker({ numberOfMonths: 2, dayNamesMin: ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'], changeYear:true, changeMonth: true, autoSize: true }); }); Then, your HTML should look like, date date date To Use #date-range you can use class in a tr-row like $(".from-date").datepicker({ defaultDate: "+1w", changeMonth: true, numberOfMonths: 3, onClose: function (selectedDate) { $(this).closest('tr').find('.to-date').datepicker("option", "minDate", selectedDate); } }); $(".to-date").datepicker({ defaultDate: "+1w", changeMonth: true, numberOfMonths: 3, onClose: function (selectedDate) { $(this).closest('tr').find('.from-date').datepicker("option", "maxDate", selectedDate); } }); Date-range Demo
score: 0
has comment: http://stackoverflow.com/comment/43552263
has comment: http://stackoverflow.com/comment/43553725
answers question: http://stackoverflow.com/q/27561097
type: Answer
has comment: http://stackoverflow.com/comment/43550048
has comment: http://stackoverflow.com/comment/43552309

http://stackoverflow.com/a/27603412
has comment: http://stackoverflow.com/comment/43629236
type: Answer
accepted answer of: http://stackoverflow.com/q/27603265
has body: There's no onsubmit for input fields, therefore this.ID_UNIQUE.value=randomNum is never running. Also, regarding the following code var elem = document.getElementById("ID_UNIQUE"); elem.value = randomNum; Your element doesn't have an ID of ID_UNIQUE You may be running that code before the form is loaded The simplest solution is to do the following, making sure you do call this after your HTML is loaded: &lt;input type="hidden" name="ID_UNIQUE" id="ID_UNIQUE" /&gt; &lt;script&gt; var now = new Date(); var randomNum = ''; randomNum += Math.round(Math.random()*9); randomNum += Math.round(Math.random()*9); randomNum += now.getTime(); var elem = document.getElementById("ID_UNIQUE").value = randomNum; &lt;/script&gt; }
has comment: http://stackoverflow.com/comment/43629191
score: 7
has comment: http://stackoverflow.com/comment/43629076
upvote count: 7
answers question: http://stackoverflow.com/q/27603265
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/71378260
score: 0
has text: I'm facing the exact same issue. Did you ever find a solution to this other than redrawing the chart as Parth suggests?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27614539

http://stackoverflow.com/comment/43449696
has text: Thanks. The docs may need updating, as it says that you should never call both together: https://tokbox.com/opentok/libraries/client/js/reference/Session.html#disconnect
type: AnswerComment
comment on: http://stackoverflow.com/a/27494640
score: 0
type: Comment

http://stackoverflow.com/comment/43488883
type: QuestionComment
has text: @forgivenson CVS *does* change your files if it finds a CVS keyword; see my answer and the links included therein
score: 1
comment on: http://stackoverflow.com/q/27529233
type: Comment

http://stackoverflow.com/q/27540769
type: Question
score: 0
has answer: http://stackoverflow.com/a/27540870
upvote count: 1
has answer: http://stackoverflow.com/a/27544135
downvote count: 1
has answer: http://stackoverflow.com/a/27540837
answer count: 3
has title: Remove Same values array Jquery
has comment: http://stackoverflow.com/comment/43509182
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has body: How do I remove the repeated array which has the same values as the first array. Below is the array I have. Can anyone help me out on this. I need to remove the repeated array which is second one and show only the 1st array. JS: arr = [ [10,20] , [10,20] ]
favorite count: 0

http://stackoverflow.com/comment/43563190
comment on: http://stackoverflow.com/a/27568638
score: 0
type: Comment
has text: Just to expand on this question a little the action CalibrationViewer/AttachmentUpload expects a ID, however regardless of the checkbox selected, the last row ID is returned each time ? ...any ideas?
type: AnswerComment

http://stackoverflow.com/comment/43461267
score: 0
type: AnswerComment
has text: Sorry, to be more clear I should have said have this function `return Organizations.find({_id: user.organizationId});`
type: Comment
comment on: http://stackoverflow.com/a/27515447

http://stackoverflow.com/q/27626527
score: -3
tagged with: http://stackoverflow.com/tag/html
duplicate of: http://stackoverflow.com/q/152975
tagged with: xpath
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/6453269
linked to: http://stackoverflow.com/q/152975
upvote count: 1
has answer: http://stackoverflow.com/a/27626686
type: Question
has comment: http://stackoverflow.com/comment/43673841
tagged with: javascript
has body: Html google Test Test Right now I am working on project where some one insist to use xPath selector. I have similar DOM structure as i mention above. I want change color of second div. How to use xpath selector in jQuery
downvote count: 4
answer count: 1
accepted answer: http://stackoverflow.com/a/27626686
duplicate of: http://stackoverflow.com/q/6453269
has title: how to add jQuery click event using xPath?
tagged with: jquery
has comment: http://stackoverflow.com/comment/43673707
favorite count: 0

http://stackoverflow.com/comment/43585561
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/27580582
has text: According to the [documentation on MDN](https://developer.mozilla.org/en-US/docs/Web/API/Range), `Range` objects do not have a `getNodes()` method. Did something give you the impression that they do? What are you trying to do? What is that `[3]` for?
type: Comment

http://stackoverflow.com/comment/43508089
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27540257
has text: Can you show us your code?
score: 0

http://stackoverflow.com/a/27588471
has body: Ok, I get another way, I do not use the button (content) from TinyMCE but make the "insert button" in attachment_path and make some js for selected image, put url image to button, and click event on insert button. Scenario : First image selected, prop disabled attribute on button and put url an image to button And then click the button, put attribute data-url to field_name and close windowManager button : Insert javascript : $('#iButton').on('click', function(){ if (($('#list-all-image li').hasClass('active')) && ($(this).attr('data-url') != "")){ var url = $(this).attr('data-url'); top.tinymce.activeEditor.windowManager.getParams().oninsert(url); top.tinymce.activeEditor.windowManager.close(); } else { alert('Please select an image first!'); } });
answers question: http://stackoverflow.com/q/27587451
score: 0
type: Answer

http://stackoverflow.com/comment/43528835
type: Comment
score: 0
type: AnswerComment
has text: What colpick.js looks like: (function ($) { var colpick = function () {...} }(); $.fn.extend({ colpick: colpick.init, }); })(jQuery);
comment on: http://stackoverflow.com/a/27550783

http://stackoverflow.com/a/27610621
has body: I don't think $.ajax actually returns anything - but I could be wrong. Either way, that's not too important, because you shouldn't rely on the results of an ajax call being available immediately. Your alert statement is firing before the Ajax request is finished - it sounds like you know that already. When leveraging asynchronous calls (ajax), its a best practice to have any logic that relies on the data returned from the call to be done in (or triggered by) a callback (or as @Jack Zelig mentions, promises). This is what success parameter of $.ajax is all about. It will get called once the request completes successfully. You can also define complete and error callbacks - which fire once the request is complete (regardless of status) and once the request fails respectively. So to summarize, your best option is probably this: var jqXHR = $.ajax ({ type: "GET", url: "https://myjirasite/jira/rest/api/2/project/ON/versions?", dataType: 'jsonp', success: successHandler }); function successHandler(data) { alert(JSON.parse(data)); } In this way, only once data is received will an alert be shown that will contain the data.
has comment: http://stackoverflow.com/comment/43644645
has comment: http://stackoverflow.com/comment/43644452
has comment: http://stackoverflow.com/comment/43644320
score: 0
has comment: http://stackoverflow.com/comment/43644479
type: Answer
answers question: http://stackoverflow.com/q/27610325
has comment: http://stackoverflow.com/comment/43644596
has comment: http://stackoverflow.com/comment/43644383

identifier
tag name: identifier
type: Tag
tags question: http://stackoverflow.com/q/27596093
tags question: http://stackoverflow.com/q/27507110

http://stackoverflow.com/q/27553171
possible better answer: http://stackoverflow.com/a/27553322
has title: Trigger functions from checkbox on click by clicking on a button
accepted answer: http://stackoverflow.com/a/27553410
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27553322
tagged with: checkbox
answer count: 4
type: AnsweredQuestion
has body: I have a couple of checkboxes and a button. When I click on checkbox - function is triggered. This is the desired behavior but I want to trigger it by clicking on the button. I want to have the possibility to first select checkboxes (I tried with return false and event.preventDefault but these completely switch the selection off) and then by clicking the button - trigger functions from checkboxes. Here is a link to jsfiddle: http://jsfiddle.net/j93k2xns/6/ So for instance: I can select 3 checkboxes (nothing should happen) and after I click the button - three alerts should appear. The code: HTML: first second third fourth JS: var check_state; $(document).on('click','input[name="check[]"]', function(e){ if(check_state === true) { alert('a'); } else { return false; } }); $(document).on('click','#val-button', function(){ check_state = true; });
type: Question
has answer: http://stackoverflow.com/a/27553383
has answer: http://stackoverflow.com/a/73955425
tagged with: javascript
score: 0
tagged with: jquery
has answer: http://stackoverflow.com/a/27553410

http://stackoverflow.com/comment/43488501
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27529581
score: 0
has text: You are not reading from an external .csv file in your fiddle. Can you get your visualization to show up with local data first?

http://stackoverflow.com/q/27541890
answer count: 1
has body: In JavaScript, var arr = [1, 2, 3, 4, 5]; var arr2 = arr.slice(); arr2 will not change if arr values are changed. That is, arr[0] = 0;, still arr2[0] == 1; // true. Consider this: var obj = {name: 'John', company: 'XYZ'}; var obj2 = obj; // Creates a duplicate of obj But obj.name = 'Dave', makes obj2.name = 'Dave' as well. How can we do a slice() operation for objects?
tagged with: javascript
linked to: http://stackoverflow.com/q/728360
has title: Create clone of an object in JavaScript
favorite count: 0
accepted answer: http://stackoverflow.com/a/27542037
score: -4
has comment: http://stackoverflow.com/comment/43511037
duplicate of: http://stackoverflow.com/q/728360
type: AnsweredQuestion
type: Question
downvote count: 4
upvote count: 0
has answer: http://stackoverflow.com/a/27542037

http://stackoverflow.com/comment/43680739
comment on: http://stackoverflow.com/q/27630021
type: Comment
type: QuestionComment
has text: Please learn how to create a **minimal** test case that replicates your issue. Including an entire block of code will not help...
score: 2

http://stackoverflow.com/q/27520187
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28831269
has comment: http://stackoverflow.com/comment/43470015
upvote count: 1
downvote count: 1
type: Question
tagged with: jquery-ui
tagged with: javascript
tagged with: jquery
has title: jQueryUI sortable strange behaviour
possible better answer: http://stackoverflow.com/a/27520320
accepted answer: http://stackoverflow.com/a/28831269
has answer: http://stackoverflow.com/a/27520320
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/43469927
favorite count: 0
has body: My friend made a HTML, I just added jQueryUI and made a part sortable. But it's responding awkwardly. Can you guys have a look and suggest what to do to fix is? This is the JSBin. http://jsbin.com/woyami/1/edit?html,css,output
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/27750224
has body: It seems that Multi graphs in Rickshaw have stack:true by default. This makes the hover detail locations offset from the actual graph lines. It also causes other problems, such as not allowing multiple series with different numbers of points. To fix, just set stack:false in your Graph constructor arguments, as in: var graph = new Rickshaw.Graph( { element: document.querySelector('#timeSeriesPlot_'+index), series: chartData, renderer: 'multi', width: jQuery('.chartAndLegend').width()-100, height: 500, dotSize: 2, stack: false });
type: Answer
upvote count: 3
accepted answer of: http://stackoverflow.com/q/27613420
score: 3
answers question: http://stackoverflow.com/q/27613420
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/27535779
type: Answer
answers question: http://stackoverflow.com/q/27532794
downvote count: 0
has body: Is there a way using Proxy to detect if a property was executed, or was it just accessed? No, as JavaScript does not distinguish between attributes and methods. It's all just properties that are accessed, and their value can be called if it's a function. You would need to return a function (so that it can be called) but also mimics a string, maybe by tampering with the .valueOf()/.toString()/[Symbol.toPrimitive]() methods of that function object.
score: 2
has comment: http://stackoverflow.com/comment/43501234
upvote count: 2
has comment: http://stackoverflow.com/comment/43500973
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43500867
accepted answer of: http://stackoverflow.com/q/27532794

http://stackoverflow.com/q/27602993
accepted answer: http://stackoverflow.com/a/27604899
answer count: 1
downvote count: 0
favorite count: 0
tagged with: angularjs
linked to: http://stackoverflow.com/q/12225475
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27604899
has body: I'm new to angular and I need to cache data to increase the performance. For this I'm using $cacheFactory by Angular. When I try, myApp.factory('myCache', function($cacheFactory) { return $cacheFactory('myData'); }); With myApp.controller('MyMain', ['$scope', '$http', 'myCache', function ($scope, $http, myCache) { var cache = myCache.get('myData'); if (cache) { $scope.variable = cache; } else { $http.get('http://www.example.com/path/to/api/endpoint') .success(function(data) { $scope.variable = data; myCache.put('myData', data); } ); } } This works fine, but it only caches one set of data, as I want to cache multiple set of data I uses myApp.factory('myCache', function($cacheFactory) { return { get : function(cacheKey){ return $cacheFactory(cachekey); } } }); So if I go to another page I can cache another set of data like this, myApp.controller('MyMain', ['$scope', '$http', 'myCache', function ($scope, $http, myCache) { var cache = myCache.get('myData2'); if (cache) { $scope.variable = cache; } else { $http.get('http://www.example.com/path/to/api/endpoint') .success(function(data) { $scope.variable = data; myCache.put('myData2', data); } ); } } etc. However in the latter way although it doesn't give any error no data is returned and no ajax call is made to cache the data. How can I fix this? And cache multiple sets of data using $cacheFactory?
upvote count: 3
type: Question
score: 3
has title: Caching multiple data in Angular $cacheFactory?
tagged with: javascript
tagged with: caching

http://stackoverflow.com/q/27559797
has comment: http://stackoverflow.com/comment/43545802
tagged with: javascript
type: AnsweredQuestion
type: Question
has body: Is it possible to insert setTimeout and setInterval on this code? I'm trying to make the background color change fro red to blue and will stop in three seconds. Thanks in advance for your help! &lt;Script&gt; var flag = true; function changeColor () { if(flag==true) { document.getElementById("yourId").style.background="red"; flag=false; } else if (flag==false) { document.getElementById("yourId").style.background="#235CDB"; flag = true; } } setInterval( function changeColor () { if(flag==true) { document.getElementById("yourId").style.background="red"; flag=false; } else if (flag==false){ document.getElementById("yourId").style.background="#235CDB"; flag = true; } }, 400);// --&gt; &lt;/SCRIPT&gt;
answer count: 1
has answer: http://stackoverflow.com/a/27559857
score: 0
accepted answer: http://stackoverflow.com/a/27559857
has title: How can i insert setTimeout and setInterval on this code

http://stackoverflow.com/q/27578574
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/19882331
score: 0
tagged with: http://stackoverflow.com/tag/html
has title: Unable to upload images on phonegap android app using html input tag
has comment: http://stackoverflow.com/comment/43604769
has body: I am developing an android app using phonegap. we need to access images on mobile and upload that to server. Iam using a html input tag to upload image &lt;input uploadonchange id="fileData" type="file" accept="image/*" name="upload" /&gt; onchange I am calling method and reading file details to check the file name and type in js var fileinput = document.getElementById("fileData"); var file = fileinput.files[0] but iam not getting file details like type. i can see that file size is updated with actual file size, but the name of the file is not same as actual file name. type property is empty. I tried to implement this on a html page and load it from chrome browser. it works fine there. and prompt i got on chrome is a "Choose an action" lightbox with camera,camcorder,soundrecorder,documents when uploading from my android app i got android "Open from". permissions in android manifest are &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt; &lt;uses-permission android:name="android.permission.GET_ACCOUNTS" /&gt; &lt;uses-permission android:name="android.permission.WAKE_LOCK" /&gt; &lt;uses-permission android:name="android.permission.VIBRATE" /&gt; &lt;uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /&gt; &lt;permission android:name="com.transmit.transmit.permission.C2D_MESSAGE" android:protectionLevel="signature" /&gt; &lt;uses-permission android:name="com.transmit.transmit.permission.C2D_MESSAGE" /&gt; &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&gt; &lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /&gt; &lt;uses-permission android:name="android.permission.MANAGE_DOCUMENTS" /&gt; &lt;uses-permission android:name="android.permission.CAMERA" /&gt; android studio log's at hte time of uploading image 12-20 19:45:21.599 2452-2452/com.phonegap.helloworld D/CordovaActivity﹕ Paused the application! 12-20 19:45:21.600 2452-2452/com.phonegap.helloworld D/CordovaWebV…
has comment: http://stackoverflow.com/comment/43600911
tagged with: cordova
answer count: 0
type: UnansweredQuestion
tagged with: android
has comment: http://stackoverflow.com/comment/43582509
has comment: http://stackoverflow.com/comment/43584359

http://stackoverflow.com/q/27484355
has comment: http://stackoverflow.com/comment/43404111
has comment: http://stackoverflow.com/comment/43443348
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27498000
has comment: http://stackoverflow.com/comment/43400873
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/43400955
has answer: http://stackoverflow.com/a/27484511
linked to: http://stackoverflow.com/q/27494663
has comment: http://stackoverflow.com/comment/43403369
score: 0
has body: In the code below i am not able to instantiate b as new a() but able to do so as new f(). My conclusion is for new to work the object has to be a direct/immediate descendant of function. Is that accurate? I am relatively new to javascript and am struggling to get a fundamental understanding of the language. thanks, var f = new Function(); console.log("Prototype of f:" + f.prototype); console.log("Constructor of f:" + f.constructor); console.log("Prototype Link of f:" + f.__proto__); if (f instanceof Function) console.log("f isa Function"); function A() {} console.log("Prototype of A:" + A.prototype); console.log("Constructor of A:" + A.constructor); console.log("Prototype Link of A:" + A.__proto__); var a = new A(); console.log("Prototype of a:" + a.prototype); console.log("Constructor of a:" + a.constructor); console.log("Prototype Link of a:" + a.__proto__); if (a instanceof Function) console.log("a isa Function"); if (a instanceof A) console.log("a isa A"); var b = new f(); console.log("Prototype of b:" + b.prototype); console.log("Constructor of b:" + b.constructor); console.log("Prototype Link of b:" + b.__proto__); // b = new a(); // error: Uncaught TypeError: object is not a function (anonymous function)
duplicate of: http://stackoverflow.com/q/27494663
has title: // error: Uncaught TypeError: object is not a function (anonymous function)

http://stackoverflow.com/q/27533441
has answer: http://stackoverflow.com/a/27533533
has body: I have c# code which generates Anchor tags on fly. I wanted to change some of anchor tag target based on its text. For example dynamic code generated HTML like below THE BEST SITE I wanted to change its target if text equals THE BEST SITE Note: I have no jQuery files included in asp.net project. So far I have tried including this script just to get the text, but it is not even displaying the alert $(document).ready(function() { $(".txt").click(function() { alert($(this).text()); }); });
has comment: http://stackoverflow.com/comment/43495432
has comment: http://stackoverflow.com/comment/43495503
has comment: http://stackoverflow.com/comment/43495350
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27533533
has title: Change Anchor Target based on Text using JavaScript (No jQuery)
has comment: http://stackoverflow.com/comment/43495385
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/27533673
tagged with: javascript
has comment: http://stackoverflow.com/comment/43495527
has comment: http://stackoverflow.com/comment/43495303
score: 0
possible better answer: http://stackoverflow.com/a/27533673
has comment: http://stackoverflow.com/comment/43495520
has comment: http://stackoverflow.com/comment/43495321
has comment: http://stackoverflow.com/comment/43495431
has comment: http://stackoverflow.com/comment/43495375

http://stackoverflow.com/q/27594656
type: AnsweredQuestion
score: 0
has answer: http://stackoverflow.com/a/27594891
type: Question
has comment: http://stackoverflow.com/comment/43613007
has title: why does change image onclick not work local on pc?
has body: I have this little testscript which works fine when images are on the sever. But it does not work when images are local on my pc. (.html and images in the same folder ofcourse) &lt;img alt="" src="http://www.mywebsite.nl/images/markwhite.png" id="imgClickAndChange" onclick="changeImage()" /&gt; &lt;script&gt; function changeImage() { if (document.getElementById("imgClickAndChange").src == "http://www.mywebsite.nl/images/markwhite.png") { document.getElementById("imgClickAndChange").src = "http://www.mywebsite.nl/images/markgreen.png"; } else { document.getElementById("imgClickAndChange").src = "http://www.mywebsite.nl/images/markwhite.png"; } } &lt;/script&gt; So when testing locally on my desktop it does not work. Can somebody explain me this? &lt;img alt="" src="markwhite.png" id="imgClickAndChange" onclick="changeImage()" /&gt; &lt;script&gt; function changeImage() { if (document.getElementById("imgClickAndChange").src == "markwhite.png") { document.getElementById("imgClickAndChange").src = "markgreen.png"; } else { document.getElementById("imgClickAndChange").src = "markwhite.png"; } } &lt;/script&gt;
has comment: http://stackoverflow.com/comment/43612977
answer count: 1
accepted answer: http://stackoverflow.com/a/27594891
tagged with: javascript
has comment: http://stackoverflow.com/comment/43613478

http://stackoverflow.com/a/27504624
answers question: http://stackoverflow.com/q/27504511
has body: Use one way binding , if you use Angular 1.3.x then use or use bind-once
type: Answer
score: 0

http://stackoverflow.com/comment/43545805
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27559819
has text: Your html is invalid

safari-extension
tags question: http://stackoverflow.com/q/27477650
type: Tag
tags question: http://stackoverflow.com/q/27489665
tag name: safari-extension

http://stackoverflow.com/q/27481253
tagged with: http-post
accepted answer: http://stackoverflow.com/a/27481398
answer count: 1
tagged with: jquery
type: AnsweredQuestion
score: 0
has body: I am reading the HTML from the CKEditor and am able to display it in the alert but for some odd reason when I get to the ajax post it gives an error. I have identified this by removing it and passing a plain string just in case. That works fine. function GetHTML() { var _content = CKEDITOR.instances.editor1.getData(); alert(content); var _filename = $("#pages").val(); var url = "/CMS/UpdateHTML/"; $.ajax({ url: url, data: {content: _content, filename: _filename }, cache: false, type: "POST", success: function (data) { }, error: function (reponse) { alert("error : " + reponse); } }); } I never actually get to the controller code. It just gives an error error : [object Object] the code in the controller is &lt;HttpPost()&gt; Function UpdateHTML(content As String, filename As String) As ActionResult stop Return Json("") End Function
has answer: http://stackoverflow.com/a/27481398
has title: Passing CKEDITOR.instances.editor1.getData() to HTTPPost gives error
type: Question
tagged with: asp.net-mvc
tagged with: javascript
tagged with: ckeditor

http://stackoverflow.com/comment/43437739
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27503585
has text: @atmd here is the link to my code http://brightlet.kollkolen.com/tagsinput.html as you can see when typing a comma the placeholder shows again.
score: 0

http://stackoverflow.com/a/27627202
has body: Vertices holds the value of V that was originally assigned to it. If you come from an object oriented language background like C#, this is equivalent to "pass by value" (i.e only the value gets passed and not the reference).
has comment: http://stackoverflow.com/comment/43675937
has comment: http://stackoverflow.com/comment/43675289
type: Answer
has comment: http://stackoverflow.com/comment/43675955
has comment: http://stackoverflow.com/comment/43677015
has comment: http://stackoverflow.com/comment/43675747
has comment: http://stackoverflow.com/comment/43675475
has comment: http://stackoverflow.com/comment/43675196
score: 0
has comment: http://stackoverflow.com/comment/43677450
answers question: http://stackoverflow.com/q/27627029

http://stackoverflow.com/q/27592326
tagged with: underscore.js-templating
type: AnsweredQuestion
has body: I found a strange problem with the underscore templates. &lt;string does not display the string with html encoded &lt; but returns an empty string instead. But &lt; string works correctly. Note the space required. jsfiddle: http://jsfiddle.net/BwHxv/281/ In the fiddle, try adding a space, so you'll see that it works correctly. Any particular reason? If a user accidentally types this character, it should not turn into an empty string.
type: Question
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27592401
has answer: http://stackoverflow.com/a/27592401
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/27592382
tagged with: backbone.js
has title: Underscore template: "<string" not displayed, but "< string" is
has answer: http://stackoverflow.com/a/27592382

http://stackoverflow.com/comment/43549053
has text: yes using javascript I am getting name of customer but how to retrive that customer's id from mysql
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27561631

http://stackoverflow.com/a/31725648
has comment: http://stackoverflow.com/comment/51393256
has body: casper.then(function () { var wsurl = "http://siddimaniaajax.esy.es/ajaxCall.php"; var params = {name:"siddhartha"}; var jsonObject_fields = casper.evaluate(function(wsurl, params) { try { return JSON.parse(__utils__.sendAJAX(wsurl, 'POST', params, false)); } catch (e) { console.log("Error in fetching json object"); } }, wsurl, params); console.log(JSON.stringify(jsonObject_fields)); }); &lt;?php if(isset($_POST['name']) &amp;&amp; !empty($_POST['name'])) { $arr = array('name' =&gt; $_POST['name']); echo json_encode($arr); } ?&gt;
has comment: http://stackoverflow.com/comment/51387618
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27499751

http://stackoverflow.com/a/27558192
downvote count: 0
has comment: http://stackoverflow.com/comment/43553882
has comment: http://stackoverflow.com/comment/43543384
type: Answer
has comment: http://stackoverflow.com/comment/43576978
answers question: http://stackoverflow.com/q/27557888
has body: jsFiddle Demo You can use a permutation subset recursive algorithm to find the set of all of the sums and also their combinations. var x = [1, 32, 921, 9213, 97, 23, 97, 81, 965, 82, 965, 823]; var sums = []; var sets = []; function SubSets(read, queued){ if( read.length == 4 || (read.length &lt;= 4 &amp;&amp; queued.length == 0) ){ if( read.length &gt; 0 ){ var total = read.reduce(function(a,b){return a+b;},0); if(sums.indexOf(total)==-1){ sums.push(total); sets.push(read.slice().sort()); } } }else{ SubSets(read.concat(queued[0]),queued.slice(1)); SubSets(read,queued.slice(1)); } } SubSets([],x); console.log(sums.sort(function(a,b){return a-b;})); //log sums without sort to have them line up to sets or modify previous structure console.log(sets);
has comment: http://stackoverflow.com/comment/43549143
accepted answer of: http://stackoverflow.com/q/27557888
upvote count: 4
has comment: http://stackoverflow.com/comment/43546411
score: 4
has comment: http://stackoverflow.com/comment/43576994
type: AcceptedAnswer

http://stackoverflow.com/q/27489752
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/43411457
has answer: http://stackoverflow.com/a/27492157
has comment: http://stackoverflow.com/comment/43444605
has comment: http://stackoverflow.com/comment/43411136
has comment: http://stackoverflow.com/comment/43441665
has comment: http://stackoverflow.com/comment/43413220
favorite count: 0
has title: No result in database when POST ID element in Javascript into PDO Insertion
accepted answer: http://stackoverflow.com/a/27492157
has comment: http://stackoverflow.com/comment/43415179
upvote count: 1
tagged with: php
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/43413205
tagged with: mysql
has comment: http://stackoverflow.com/comment/43413413
type: Question
has body: I have this following code to handle selection in select form: Then I need to declare PHP variable, as: $stock=isset($_POST['pilStock']); $stock=strip_tags($stock); After that, I need to save the data in $stock in the database but it gave me nothing. This is the INSERT code I used: $data = $xvg->prepare("INSERT INTO mytable (prod_stock) VALUES (:prod_stock) $data->execute(array(':stock'=>$stock)); I tried it many times and makes me dizzy... please. UPDATED: Here's the SELECT OPTION which is related to $pilStock: $stockz variable is from SELECT * FROM other_table (then the result must be selected by user and saved it in the database) <?php $stockz=$row['stock']; if ($stockz=='1'){ echo " "; echo " 1 "; echo " "; } elseif ($stockz=='2'){ echo " "; echo " 1 "; echo " 2 "; echo " "; } ?>

http://stackoverflow.com/comment/43430671
type: Comment
has text: @RaphaelMüller That would be amazing, thank you!
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27499633

http://stackoverflow.com/q/27557265
tagged with: javascript
has title: Is communicating between bootstrap.js and main.js possible in a Firefox Add-on SDK extension?
tagged with: firefox-addon
upvote count: 1
answer count: 1
accepted answer: http://stackoverflow.com/a/27558383
tagged with: firefox-addon-sdk
favorite count: 0
has body: I would like to do some processing in bootstrap.js and then send it to main.js to show UI. Is it possible to communicate between the bootstrap.js file and the main.js file in a Bootstrapped Firefox Add-on?
has answer: http://stackoverflow.com/a/27558383
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question

http://stackoverflow.com/comment/43567204
type: Comment
type: QuestionComment
has text: How about making a custom cursor with a white background and switch to that when you're hovering over the image?
score: 2
comment on: http://stackoverflow.com/q/27570877

http://stackoverflow.com/comment/43554205
type: Comment
type: QuestionComment
has text: I think it would be interesting to know what the array looks like after the filter call and before it is passed to return_dublicates method.
score: 0
comment on: http://stackoverflow.com/q/27563025

http://stackoverflow.com/q/27525308
score: 4
has body: I am trying to start the barcode scanner upon the user pressing a button in the html. However i am recieving an error: Uncaught TypeError: Object [object Object] has no method 'scanBarcode'", source: file:///android_asset/www/index.html (49) Which is being called in javascript with: function scanner(){ Android.scanBarcode(); } Now in the Java file i have the following code, which declares the function withinpublic class JavaScriptInterface Here is my MainActivity.java file: public class MainActivity extends Activity { @SuppressWarnings("deprecation") @SuppressLint("SetJavaScriptEnabled") @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.activity_main); WebView myWebView = (WebView)findViewById(R.id.webView); myWebView.addJavascriptInterface(new WebAppInterface(this), "Android"); myWebView.setInitialScale(1); WebSettings webSettings = myWebView.getSettings(); webSettings.setJavaScriptEnabled(true); webSettings.setBuiltInZoomControls(false); webSettings.setSupportZoom(true); webSettings.setJavaScriptEnabled(true); webSettings.setLoadWithOverviewMode(true); webSettings.setUseWideViewPort(true); //webView.getSettings().setJavaScriptEnabled(true); myWebView.setWebChromeClient(new WebChromeClient()); //myWebView.setWebViewClient(new WebViewClient()); myWebView.loadUrl("file:///android_asset/www/index.html"); } public class JavaScriptInterface { Context mContext; // Instantiate the interface and set the context JavaScriptInterface(Context c) { mContext = c; } // using Javascript to call the finish activity public void closeMyActivity() { finish(); } public void scanBarcode() { Intent intent = new Intent("com.google.zxing.client.android.SCAN"); intent.setPackage("com.google.zxing.client.android"); startActivityForResult(intent, 0); } } //JavascriptInterface public void onActivityResult(int requestCode, int resultCode, Intent intent) { if (requestCode == 0)…
answer count: 1
has answer: http://stackoverflow.com/a/27539076
accepted answer: http://stackoverflow.com/a/27539076
favorite count: 0
linked to: http://stackoverflow.com/q/18028666
tagged with: android
has title: Scan Barcode Within WebView Android
upvote count: 4
type: AnsweredQuestion
downvote count: 0
tagged with: java
tagged with: zxing
tagged with: barcode-scanner
type: Question
tagged with: javascript

http://stackoverflow.com/q/27629638
has comment: http://stackoverflow.com/comment/43680227
has comment: http://stackoverflow.com/comment/43694143
has answer: http://stackoverflow.com/a/27629782
has answer: http://stackoverflow.com/a/27629777
type: Question
has comment: http://stackoverflow.com/comment/43680198
has comment: http://stackoverflow.com/comment/43680422
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/8397852
has comment: http://stackoverflow.com/comment/43680388
has body: I have html code like - x The div 'insert_calendar_eda_form' is inserted initially. Javascript code calendar_eda_add_form = function (clicked_id, arraylength){ htmlstr = ""; htmlstr += ' Add Events for - ' ; htmlstr += ' ' htmlstr += ' Start Date ' htmlstr += ' ' htmlstr += ' End Date ' htmlstr += ' ' htmlstr += ' ' htmlstr += ' ' htmlstr += ' ' $("#insert_calendar_eda_form").html(htmlstr); The form 'calendar_eda_add_form' html is created dynamically by Javascript. HTML code for event listener $(document).ready(function(){ $('#insert_calendar_eda_form').on('submit', 'calendar_eda_add_form', function(event){ alert ('clicked add event'); event.preventDefault(); somefunction(); }); }); Calendar_eda_add_form is generated dynamically by JS. I am trying to propagate the "submit" event, but does not seem to work. Can you please help?
has comment: http://stackoverflow.com/comment/43680454
score: 0
has comment: http://stackoverflow.com/comment/43680390
answer count: 3
has comment: http://stackoverflow.com/comment/43679960
has answer: http://stackoverflow.com/a/27629917
has comment: http://stackoverflow.com/comment/43680385
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43680113
has comment: http://stackoverflow.com/comment/43680219
has comment: http://stackoverflow.com/comment/43680659
has title: Not able to propagate event listener (submit for form) for element generated by(later) javascript
type: UnansweredQuestion

http://stackoverflow.com/comment/43635993
score: 0
has text: On the c# side, what serializer are you using - Json.NET, `DataContractJsonSerializer` or `JavaScriptSerializer`?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27605683

http://stackoverflow.com/q/27619763
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: I'm trying to make an app for my university project in Intel XDK and added sliders which doesn't work. I have tried different sliders some even from www.responsiveslides.com but its not working. Can anyone tell me about any specific slider that would work in XDK ?
tagged with: css
has comment: http://stackoverflow.com/comment/43666062
type: UnansweredQuestion
tagged with: intel-xdk
type: Question
has title: Adding a Slider or Carousel in an app in Intel XDK
answer count: 1
tagged with: slideshow
has answer: http://stackoverflow.com/a/27696494
tagged with: javascript

http://stackoverflow.com/comment/43534072
comment on: http://stackoverflow.com/q/27553909
has text: Is there an error throwing in the console or anything?
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/43588776
has text: The idea was that if I add "1" when the first bracket appears, i will remove it if the other one is there. So the array won't be empty
comment on: http://stackoverflow.com/q/27582160
type: QuestionComment
type: Comment
score: 0

http://stackoverflow.com/comment/43558518
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27566796
score: 5
has text: ID must be unique - only one for one page!

http://stackoverflow.com/q/27610851
has body: I have an android app that comminicates with a nodejs server via http. To each request I add a SHA1 checksum that iterates over the key value pairs I'm sending to the server so that it would validate it on arrival. I have tested this and it works okay as long as the values I'm sending are in English. Sending a request that contains a string value in Hebrew for example or that includes an unstandard character (like é, ç or à) will fail the request base on a checksum mismatch. The checksum is calculated first in the andoird client (JAVA) and than in the nodejs server for verification. I eliminated the possibility that this is caused due to the Right To Left nature of the Hebrew language by sending a single letter value, and it still failed. What could cause this? I assume this might be because the encoding of a JAVA string for non standard characters is different from that of nodejs. But how can I solve this? Here is the relevant code from the server side: var shasum = crypto.createHash('sha1'); while (fieldsPointer &lt; allFields.length || filesPointer &lt; allFiles.length) { shasum.update(fieldKey); let fieldKey = allFields[fieldsPointer]; shasum.update(fieldKey); let fieldValue = fields[allFields[fieldsPointer]]; shasum.update(fieldValue); } and the client side: try { MessageDigest md = MessageDigest.getInstance("SHA-1"); for(Entry&lt;String, Object&gt; entry : allParams.entrySet()) { md.update(entry.getKey().getBytes()); if(entry.getValue() instanceof String) { String value = (String) entry.getValue(); md.update(value.getBytes()); } else (...) // some other instance checking for non String values } String checksum = bytesToHex(md.digest()); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); }
has answer: http://stackoverflow.com/a/27612521
score: 0
tagged with: android
answer count: 1
has title: SHA1 sum on multilanguage strings
has comment: http://stackoverflow.com/comment/43644668
has comment: http://stackoverflow.com/comment/43644350
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43644167
tagged with: java
type: Question
accepted answer: http://stackoverflow.com/a/27612521
tagged with: javascript

http://stackoverflow.com/comment/43523187
has text: Maybe you have included validator codes before jquery core?
score: 0
comment on: http://stackoverflow.com/q/27547015
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43408492
type: Comment
type: QuestionComment
score: 1
has text: There are no images in your fiddle. You will need to host them somewhere and link to them absolutely.
comment on: http://stackoverflow.com/q/27488286

http://stackoverflow.com/comment/43482256
comment on: http://stackoverflow.com/q/27526411
type: Comment
type: QuestionComment
score: 0
has text: it's not a duplicate because I can't use an ajax Request, it must be with a form...

http://stackoverflow.com/a/27476573
downvote count: 1
score: 10
answers question: http://stackoverflow.com/q/27476283
type: Answer
upvote count: 11
has body: Writing a solution like this you will quickly come to realize you will have to abandon the idea of dynamic line breaks if your words differ in length by a reasonable amount. That small detail aside, you can easily achieve the effect you're after using a standard pyramid of jQuery animate callback hell: var target = $('#target'); var change = function(str) { var tmp = $(' ' + str + ' '); tmp.css({ display: "inline-block", position: "absolute" }) .appendTo('body') .hide(); var targetWidth = tmp.outerWidth(); tmp.remove(); target.animate({ opacity: 0 }, 200, function() { target.animate({ width: targetWidth }, 300, function() { target.empty() .html(str) .css({ display: "initial" }) .animate({ opacity: 1 }, 200); }); }); } var samples = [ "some sample", "another example", "just" ]; var i = 0; setInterval(function() { change(samples[++i % samples.length]); }, 1400); .container { margin: 0 auto; text-align: center; } #target { display: inline-block; vertical-align: bottom; white-space: no-wrap; height: 1em; } This is text in a longer sentence

http://stackoverflow.com/q/27494297
accepted answer: http://stackoverflow.com/a/27496501
tagged with: javascript
has title: MEANJS: Check db for url and route to dynamic Angular state
answer count: 1
downvote count: 0
has body: Context Users can register with a unique URL slug that identifies their page, e.g. 'http://example.com/slug'. Current State In my Express.js file, I successfully check my database to see if the slug exists on a user, then redirect the user from 'http://example.com/slug' to 'http://example.com/#!/slug' to take advantage of Angular's routing. With Angular, however, I can't use $http or $location services in my router file (since it's taking place inside module.config...see this Stack Overflow explanation for more details). Desire Basically what I want to do is route the user to a 'default' view when a valid slug is found, or home if it's not. Any suggestions would be much appreciated. For reference, my module.config code can be found here (note that the 'default' state I want to use is 'search'): core.client.routes.js 'use strict'; // Setting up route angular.module('core').config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) { // Redirect to home when route not found. $urlRouterProvider.otherwise('/'); // Home state routing $stateProvider. state('home', { url: '/', templateUrl: 'modules/core/views/home.client.view.html' }). state('search', { url: '/search', templateUrl: 'modules/core/views/search.client.view.html' }); } ]); What I would like to do, is something like this... 'use strict'; // Setting up route angular.module('core').config(['$stateProvider', '$urlRouterProvider', '$http', '$location', function($stateProvider, $urlRouterProvider, $http, $location) { // Get current slug, assign to json. var slug = $location.path(); var data = { link: slug }; // Check db for slug $http.post('/my/post/route', data).success( function(response) { // Found slug in db }).error( function(response) { // Route to home $location.path('/'); }); // Home state routing $stateProvider. state('home', { url: '/', templateUrl: 'modules/core/views/home.client.view.html' }). state('search', { // Set URL to slug url: '/' + slug, templateUrl: 'modules/co…
favorite count: 0
tagged with: meanjs
tagged with: angularjs
linked to: http://stackoverflow.com/q/24727042
has answer: http://stackoverflow.com/a/27496501
linked to: http://stackoverflow.com/q/17497006
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question

http://stackoverflow.com/q/27605234
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43639678
linked to: http://stackoverflow.com/q/14611264
has comment: http://stackoverflow.com/comment/43633046
tagged with: css
has comment: http://stackoverflow.com/comment/43633285
answer count: 0
has comment: http://stackoverflow.com/comment/43633180
has body: This is my section that is loading my CSS files without problem on FF and chrome. The "main.css" isn't loading at all in IE although in previous version of my website it worked fine. However, if i edit the line in IE11 developper tool, and rewrite "main.css" and pressed enter, my page will be styled again in IE. Is there a way to force IE to execute the "main.css" line?
score: 1
has comment: http://stackoverflow.com/comment/43633933
has title: internet explorer 11 not loading stylesheet
has comment: http://stackoverflow.com/comment/43633186
has comment: http://stackoverflow.com/comment/43632698
upvote count: 1
has comment: http://stackoverflow.com/comment/43639600
type: Question
has comment: http://stackoverflow.com/comment/43632879
tagged with: internet-explorer
tagged with: javascript
has comment: http://stackoverflow.com/comment/43639479
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/43633473

http://stackoverflow.com/comment/44006810
type: Comment
score: 0
has text: @Scriptable Yes it runs fine. I was trying to create a button on that fiddle and was trying to load window on click of that. But I am new to JavaScript. That is my requirement.
type: AnswerComment
comment on: http://stackoverflow.com/a/27722380

http://stackoverflow.com/q/27618857
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27619039
favorite count: 0
answer count: 1
has body: I'm following Daniel's answer here : Compare two dates with JavaScript But it's not working as is should. This is my code: selectedDateEnd is a date selected from jQuery UI Datepicker controller is the a date from a list (last date added (in the future)) 12096e5 is a magic number which is 14 days in milliseconds. A user can only create a new item that is 14 days older than the last item created. if(+selectedDateEnd &gt;= (+controller + 12096e5)){ cl('selectedDateEnd &gt;= controller'); cl(selectedDateEnd + ' &gt;= ' + controller); } else { cl('selectedDateEnd &lt; controller'); cl(selectedDateEnd + ' &lt; ' + controller); } And the output is this: selectedDateEnd &lt; controller Thu Feb 12 2015 00:00:00 GMT+0100 &lt; Thu Feb 12 2015 00:00:00 GMT+0100 According to the logic, it should output: Thu Feb 12 2015 00:00:00 GMT+0100 &gt;= Thu Feb 12 2015 00:00:00 GMT+0100 What have I done wrong here? See my fiddle: http://jsfiddle.net/ueoxv9w7/
linked to: http://stackoverflow.com/q/492994
has comment: http://stackoverflow.com/comment/43660044
downvote count: 2
has title: Comparing javascript dates are not working correctly
has answer: http://stackoverflow.com/a/27619039
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43659200
has comment: http://stackoverflow.com/comment/43660054
tagged with: date
has comment: http://stackoverflow.com/comment/43658646
has comment: http://stackoverflow.com/comment/43659654
type: Question
has comment: http://stackoverflow.com/comment/43659398
upvote count: 0
score: -2
has comment: http://stackoverflow.com/comment/43658933
has comment: http://stackoverflow.com/comment/43658856
has comment: http://stackoverflow.com/comment/43658736

http://stackoverflow.com/a/27495679
answers question: http://stackoverflow.com/q/27495577
downvote count: 0
has comment: http://stackoverflow.com/comment/43423707
has comment: http://stackoverflow.com/comment/43457483
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43423675
type: Answer
has body: You can use lodash's _.values and _.some with a predicate to make this work. var obj = { id: 45, name: 'test', value: 'car', description: 'I like soup' } var testObject = function(searchTerm){ console.log(_.some(_.values(obj), function (s) { return _.isString(s) ? s.indexOf(searchTerm) !== -1 : '' + s === searchTerm; })); } testObject('soup'); testObject('4'); testObject('45'); &lt;script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js"&gt;&lt;/script&gt;
has comment: http://stackoverflow.com/comment/43458275
has comment: http://stackoverflow.com/comment/43458403
score: 1
accepted answer of: http://stackoverflow.com/q/27495577
upvote count: 1
has comment: http://stackoverflow.com/comment/43457531

http://stackoverflow.com/q/27598163
has answer: http://stackoverflow.com/a/27599842
has body: I'm badly stuck in this part of my coding where I have to show the user a message that the data has been saved. I have a function in C# , which executes a SQL procedure and returns a value. C# function: Sql p = new Sql("Data_Set"); try { p.Add("plan_table", dt); \\ A temp table p.Run(); HttpContext.Current.Response.Redirect("/projmain/index.html"); return "success"; } catch (Exception e) { return "Error saving Data &lt;br&gt;&lt;hr&gt;" + e.Message + "&lt;br&gt;&lt;br&gt;" + e.StackTrace + "&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;" + p.ToString() + ""; } } I want to capture the return value in my HTML file where I'm using JsonMethodPost (Java Function). And display a message saying that the data has been saved.
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/27598237
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27598272
type: UnansweredQuestion
has title: Capturing the return value of cs function through Javascript
type: Question
tagged with: c#
tagged with: javascript
tagged with: jquery

ruby-on-rails-4
type: Tag
tags question: http://stackoverflow.com/q/27637820
tags question: http://stackoverflow.com/q/27499689
tags question: http://stackoverflow.com/q/27592998
tags question: http://stackoverflow.com/q/27527240
tags question: http://stackoverflow.com/q/27504878
tags question: http://stackoverflow.com/q/27587547
tags question: http://stackoverflow.com/q/27635996
tags question: http://stackoverflow.com/q/27581215
tags question: http://stackoverflow.com/q/27614184
tags question: http://stackoverflow.com/q/27630975
tags question: http://stackoverflow.com/q/27589914
tag name: ruby-on-rails-4
tags question: http://stackoverflow.com/q/27635686
tags question: http://stackoverflow.com/q/27555522
tags question: http://stackoverflow.com/q/27520053
tags question: http://stackoverflow.com/q/27596760
tags question: http://stackoverflow.com/q/27596247

http://stackoverflow.com/q/27623218
tagged with: canvas
has comment: http://stackoverflow.com/comment/43667620
answer count: 1
downvote count: 0
tagged with: javascript
has body: I am having troubles using Images for retina display. I use drawImage. I have a set of large images(canvas drawn) and I want to use them but just half the size and making them smaller increase image quality. How does one do this? This is an off screen canvas.
has title: I have a large Image, but i need to use that same image just half the size and retain image quality
favorite count: 0
has answer: http://stackoverflow.com/a/27625945
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43667149
upvote count: 1
type: Question
score: 1
tagged with: image

http://stackoverflow.com/q/27484858
upvote count: 31
accepted answer: http://stackoverflow.com/a/27517165
downvote count: 1
type: AnsweredQuestion
has title: CSS change color on scroll / cut text - overflow z-index
has answer: http://stackoverflow.com/a/27486483
type: Question
has comment: http://stackoverflow.com/comment/43403147
has answer: http://stackoverflow.com/a/44689791
has comment: http://stackoverflow.com/comment/43402393
has comment: http://stackoverflow.com/comment/43404151
tagged with: javascript
has body: I want to change the color of a position:fixed menu when scrolling. My first intention was to use two fixed menus and overflow:hidden but it doesn't work on fixed elements. My second try was using z-index. But it seems impossible. Maybe someone has an idea?
possible better answer: http://stackoverflow.com/a/27486483
has answer: http://stackoverflow.com/a/27488399
has answer: http://stackoverflow.com/a/27517165
linked to: http://stackoverflow.com/q/12463658
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 4
has comment: http://stackoverflow.com/comment/43403328
favorite count: 0
score: 30
has comment: http://stackoverflow.com/comment/43403510

http://stackoverflow.com/a/27576870
downvote count: 0
answers question: http://stackoverflow.com/q/27576576
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27576576
has body: You primarily need to consider boundaries. If you only use this array in the component that owns it, and optionally pass it down as props: it doesn't matter. You can modify it in any way, and unless the other components have some serious problems, they'll never know the difference because they get the new props when your component updates its state. If you pass this array to some kind of api, such as a flux action creator or a function passed to you as a prop, then you might run into some very serious and hard to track down bugs. This is where immutability is important. For example, in this case you might want to check some property of a person in the callback, however if it's possible for people[0].name to have changed, you have a race condition. function savePeople(people){ $.post('/people/update', people, function(resp){ if (people[0].name === ...) { // ... } }); }
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43579373
type: Answer
score: 2

http://stackoverflow.com/a/27607427
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27607393
type: Answer
downvote count: 0
has body: The statement: options || (options = {}); Is a shorthand for: if(!options) { options = {}; } And it is faster compared to the equivalent shorthand: options = options || {};

http://stackoverflow.com/a/63195837
has body: The accepted answer is perfect for digits only but I came across a scenario where the input can be any string (credit card numbers, phone numbers, secret questions etc) and if we want to achieve the same on that (i.e. masking all characters except the last 4) then you can use the following: str.replace(/.(?=\d{4})/g, &quot;#&quot;) My requirement was to replace it with # sign. The point is to use ., which is for any single character check. The explanation of accepted answer still holds, this just works for any characters and not only digits. Hope it will help someone
downvote count: 0
answers question: http://stackoverflow.com/q/27545202
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/comment/43555816
comment on: http://stackoverflow.com/a/27564355
type: Comment
has text: Hey it worked, I've been trying to use refetchEvents but in wrong places.. Thank you very much!! Good job )
type: AnswerComment
score: 0

http://stackoverflow.com/comment/43581403
comment on: http://stackoverflow.com/a/27578252
score: 0
type: AnswerComment
type: Comment
has text: Also, you might want to put the if statement in a callback for `slideUp()` so it only runs after the sliding animation for the last item completes.

http://stackoverflow.com/comment/43409395
has text: As everyone probably knows, doing it with mailto: opens the email address up to spammers, they have crawlers that look for these.
type: Comment
comment on: http://stackoverflow.com/a/27488618
score: 0
type: AnswerComment

http://stackoverflow.com/q/27578732
has comment: http://stackoverflow.com/comment/80425070
has answer: http://stackoverflow.com/a/46187932
has comment: http://stackoverflow.com/comment/43587517
has body: I'm trying to create vertical menu like this site . the thing i'm looking for is : when menu is collapse sub menus open with hover and when menu is open , sub menus open below the links . Here is my JSFiddle , what i've done is : i can open the menu after click the button . sub menu is working (last one) but i don't want to open submenu when menu is collapsed . Angular var app = angular.module('myApp', []); app.controller('mainCtrl', function ($scope) { $scope.noneStyle = false; $scope.bodyCon = false; $scope.sasd = "asd"; //Toggle the styles $scope.toggleStyle = function () { //If they are true, they will become false //and false will become true $scope.bodyCon = !$scope.bodyCon; $scope.noneStyle = !$scope.noneStyle; } }); UPDATE menu with submenu : submenu open with hover that's what i want !! thx in advance
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/43583861
tagged with: javascript
tagged with: jquery
has title: Vertical menu bootstrap and angular
has comment: http://stackoverflow.com/comment/43583874
has answer: http://stackoverflow.com/a/27579718
upvote count: 7
downvote count: 1
has comment: http://stackoverflow.com/comment/43583822
favorite count: 0
has comment: http://stackoverflow.com/comment/43583831
has comment: http://stackoverflow.com/comment/43584109
has comment: http://stackoverflow.com/comment/43583772
tagged with: angularjs
tagged with: twitter-bootstrap
type: UnansweredQuestion
score: 6
tagged with: css

http://stackoverflow.com/a/27621479
type: Answer
has comment: http://stackoverflow.com/comment/43743923
score: 2
has comment: http://stackoverflow.com/comment/43663622
accepted answer of: http://stackoverflow.com/q/27621426
answers question: http://stackoverflow.com/q/27621426
has comment: http://stackoverflow.com/comment/43664200
has body: Timezones are merely a presentation issue. The Date object will always be in UTC, but your browser will typically adjust the output when you convert it to a string into the local timezone. If you wish to present the variable jsDate as a string represented in a different timezone then you must also use something like moment to perform that conversion.
upvote count: 3
has comment: http://stackoverflow.com/comment/43663689
type: AcceptedAnswer
downvote count: 1
has comment: http://stackoverflow.com/comment/43663520

http://stackoverflow.com/comment/43414059
has text: Wait, that last statement is wrong, `System.module` has just been removed from ES6 and put in a different specification - this gives me a headache :S
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27488485
score: 1

http://stackoverflow.com/comment/117614353
type: Comment
score: 0
type: AnswerComment
has text: Video is not available now
comment on: http://stackoverflow.com/a/27638122

http://stackoverflow.com/comment/43448945
type: Comment
has text: Please checkout the updated version of my answer.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27504207

http://stackoverflow.com/comment/43459927
type: AnswerComment
comment on: http://stackoverflow.com/a/27514735
score: 0
type: Comment
has text: FelixKling, please take it easy on me? Where did I go wrong? As I stated, this code has been working for months. So, how did I screw it up? @devJunk, Sorry I miss your point because when I add response.message,now it says, undefined.

http://stackoverflow.com/comment/43586250
type: AnswerComment
score: 0
type: Comment
has text: No, still doesn't work. TypeError: Object function createServer() { function app(req, res, next){ app.handle(req, res, next); } merge(app, proto); merge(app, EventEmitter.prototype); app.route = '/'; app.stack = []; return app; } has no method 'logger' Express with share really seems to be like an issue
comment on: http://stackoverflow.com/a/27580772

http://stackoverflow.com/comment/43528503
has text: Or am I supposed to use angular-moment.js?
type: AnswerComment
comment on: http://stackoverflow.com/a/27540207
score: 0
type: Comment

webiopi
tags question: http://stackoverflow.com/q/27594453
tag name: webiopi
type: Tag

http://stackoverflow.com/a/27620079
score: 3
answers question: http://stackoverflow.com/q/27614113
has comment: http://stackoverflow.com/comment/43667288
accepted answer of: http://stackoverflow.com/q/27614113
upvote count: 3
type: AcceptedAnswer
type: Answer
downvote count: 0
has body: The popup is created from scratch every time the user opens it, so any javascript file you include using a &lt;script&gt; tag will be executed. You can include any logic you need there.

http://stackoverflow.com/comment/127411245
type: Comment
comment on: http://stackoverflow.com/a/27537742
score: 0
type: AnswerComment
has text: @dbkaplun Array.prototype.map must be returning it's own arguments to the callback. According to MDN: *The for...in statement iterates over all enumerable properties of an object that are keyed by strings (ignoring ones keyed by Symbols), including inherited enumerable properties.*

http://stackoverflow.com/q/27569354
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43564275
type: Question
has comment: http://stackoverflow.com/comment/43564118
has comment: http://stackoverflow.com/comment/43564627
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43564886
has comment: http://stackoverflow.com/comment/43564393
favorite count: 0
score: -1
upvote count: 2
has title: Show a Sub List of Social Icons onClick
has comment: http://stackoverflow.com/comment/43564316
tagged with: css
answer count: 1
has body: Having a nightmare ... I have a list of social icons three social account, Twitter, Facebook, Pinterest. However, as I have three twitter accounts I want it that when you click on the twitter icon you then see a sub menu of uls containing three li's for my other Twitter accounts. Twitter a a a Facebook Pinterest CSS to pistion the list of three Twitter Accounts above .socials ul li ul.subicons { position:absolute; top:-55px; padding:0; margin:0; width:152px; left:50%; margin-left:-57px; text-align:center; } .socials ul li ul.subicons li {display:block; margin:0 5px; width:40px; height:40px; text-indent:-9999px;} .socials ul li ul.subicons li a.twitter-one { background:red; width:40px; height:40px; display:block; } .socials ul li ul.subicons li a.twitter-two { background:blue; width:40px; height:40px; display:block; } .socials ul li ul.subicons li a.twitter-three { background:yellow; width:40px; height:40px; display:block; }
downvote count: 3
has answer: http://stackoverflow.com/a/27569710
linked to: http://stackoverflow.com/q/27567672
tagged with: javascript

http://stackoverflow.com/comment/43487292
type: QuestionComment
comment on: http://stackoverflow.com/q/27529343
has text: Maybe because php has normally 60secs of runtime so it will need more time the php code on destination to allow you store the file. With a 512Kb upload in 60 secs you normally can upload up to 5MB of data
score: 0
type: Comment

http://stackoverflow.com/q/27546216
tagged with: raphael
has title: In Raphael.js, controlling order of elements on hover
type: Question
tagged with: javascript
has body: I have the following code, and here's a fiddle. I'm trying to get the topmost circle to go to the front when it's animated last, i.e. when the user goes over the mouseover areas starting from the bottom. In my head, this code should work due to the moboxonoff variable, but it doesn't seem to have any effect. Edit for clarity: right now, the bottom circle is always on top of the top circle. I'd like this order to change depending on what order the circles' controlling mouseover areas are moused over. xValues = [50, 50]; yValues = [100, 120]; var mouseoverStarts = [70, 90, 130], mouseoverEnds = [90, 130, 150], mouseoverItems = [[0], [0, 1], [1]]; var p0 = Raphael("paper", 500, 500); var circles = [] for (i = 0; i &lt; 2; i++) { circles[i] = p0.circle(xValues[i], yValues[i], 10); circles[i].attr({"fill": "#c00", stroke: "#888", "stroke-width":1.5}); circles[i].id = "c"+i; }; animate_on = function(num, ignoreindex, ignorearray) { if (moboxonoff[num] === 0) { p0.getById("c"+num).stop().animate({r: 30}, 480, "bounce"); p0.getById("c"+num).toFront(); moboxonoff[num] = 1 }; }; animate_off = function(num, ignoreindex, ignorearray) { if (moboxonoff[num] == 1) { p0.getById("c"+num).stop().animate({r: 10}, 320, "bounce"); moboxonoff[num] = 0 }; }; moboxonoff = []; for (i=0; i&lt;2; i++) { moboxonoff[i] = 0; }; debugopacity = 0.2; // set to 0 for final moboxes = []; for (i=0; i&lt;mouseoverStarts.length; i++) { moboxes[i] = p0.rect(30, mouseoverStarts[i], 400, mouseoverEnds[i] - mouseoverStarts[i]); moboxes[i].attr({fill: "#00f", opacity: debugopacity}); moboxes[i].id = "mob" + i; moboxes[i].hover(function () { j = parseInt(this.id.slice(3)); mouseoverItems[j].forEach(animate_on); this.toFront(); }, function () { mouseoverItems[j].forEach(animate_off); }); };
score: 0
answer count: 1
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27576525
has comment: http://stackoverflow.com/comment/43530147

http://stackoverflow.com/q/27524567
has body: I need your help. I want to add an opening html tag before an element and it's closing tag after that element . this is my script $("#searchresult").append("&lt;span class='addRemoveTag'&gt;"); $("#searchresult").append(checkBoxes[index]); $("#searchresult").append($(element)); $("#searchresult").append("&lt;/span&gt;"); but unfortunately after I add the opening tag the browser close it immediately. so please could you help me to solve this problem.
upvote count: 1
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27524647
has answer: http://stackoverflow.com/a/27524647
accepted answer: http://stackoverflow.com/a/27524600
has comment: http://stackoverflow.com/comment/43477830
has title: how to add opening html tag using jquery?
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43477818
has answer: http://stackoverflow.com/a/27524600

http://stackoverflow.com/a/27626302
accepted answer of: http://stackoverflow.com/q/27626189
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27626189
type: Answer
downvote count: 0
score: 1
has body: If you want to fit the map to the bounds of the polyline on submit, extend an empty bounds object with the coordinates of the path of the polyline: google.maps.event.addDomListener(document.getElementById('submit'), 'click', function () { poly.setMap(map); var bounds = new google.maps.LatLngBounds(); bounds.extend(poly.getPath().getAt(0)); bounds.extend(poly.getPath().getAt(1)); map.fitBounds(bounds); }); jsfiddle

http://stackoverflow.com/comment/43630491
score: 1
type: AnswerComment
has text: Thanks for your answer! but for a clear code a use .unbind('click'). Thanks :)
type: Comment
comment on: http://stackoverflow.com/a/27599848

http://stackoverflow.com/comment/43475060
has text: We do not know what the OP knows so i think it always better to specify all the code needed ;)
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27523016
type: Comment

http://stackoverflow.com/comment/43542646
comment on: http://stackoverflow.com/q/27557888
has text: @RobG - See below for an implementation of a permutation subset.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27601221
accepted answer of: http://stackoverflow.com/q/27571715
type: AcceptedAnswer
score: 0
has body: Check this code: $('#container1').highcharts({ series: [{ point:{ events:{ click:function(){ location.href=this.url; e.preventDefault(); } } }, name: 'Tokyo', data: [{y:1,url:'#container2'},2,3] }] }); $('#container2').highcharts({ series: [{ name: 'Tokyo', data: [1,2,3] }] }); For me its working properly, after click on the first point, I am moved to the object with id "container2".
type: Answer
answers question: http://stackoverflow.com/q/27571715

http://stackoverflow.com/comment/43603677
type: QuestionComment
has text: on `mousedown` log the point where the mouse was clicked. On `mouseup` log the point where the mouse was up. The math becomes pretty simple to find the direct line between these 2 points - which is your circle radius
score: 0
comment on: http://stackoverflow.com/q/27542452
type: Comment

http://stackoverflow.com/comment/43692197
comment on: http://stackoverflow.com/a/27636595
type: AnswerComment
type: Comment
has text: I didn't know that. When it comes to coding, you never stop learning.
score: 1

http://stackoverflow.com/q/27639780
tagged with: jquery
possible better answer: http://stackoverflow.com/a/27639813
answer count: 2
has answer: http://stackoverflow.com/a/27639866
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27639813
favorite count: 0
tagged with: angularjs
score: 2
type: AnsweredQuestion
downvote count: 0
type: Question
upvote count: 2
tagged with: angularjs-directive
has body: I want to do a simple thing: I have an app, which has certain divs that in need to show (Only the specific one) and hide if clicked somewhere outside of it (All with the specific class for example). This is easy using jquery: $('some-class').style('display','none') //psuedo code here How should i do the same with angular js? A specific reason to do so: I want to build a simple select drop-down (I don't want to use one that exist, i want to understand this...), when i click one, it suppose to open a div right beneath the button, when i click outside of it, it suppose to close not only this one, but some other elements like it in the app. one point worth mentioning: Not all my select boxes are pre-rendered, some are dynamically added (inside directive), so not all of the are in the $scope, but inside them directives which has isolated scope.
accepted answer: http://stackoverflow.com/a/27639866
has title: What is the angular way of hiding all specific divs with the same class
tagged with: javascript

http://stackoverflow.com/q/27591227
favorite count: 0
has answer: http://stackoverflow.com/a/27592317
tagged with: angularjs
has comment: http://stackoverflow.com/comment/43607312
has body: This seems like a very simple question but being new to Javascript, Typescript and Angular I can't seem to find an answer (I have looked believe me). I just want to make a simple request to a server and handle a result. This is actually as part of an OAuth authentication process: https://developers.google.com/accounts/docs/OAuth2UserAgent#validatetoken I have found a lot of references to $http.get but I not sure how to call this from within Typescript. I also saw people talking about JQuery promises but I believe that I shouldn't need to use JQuery if I am already using Angular. I have had a look at my angular.d.ts file and it looks like I should be using the IHttpService but how do I instantiate one of these? How do I use the generics with the get method? An example of how to do this would be great. Many Thanks for your help.
possible better answer: http://stackoverflow.com/a/27592317
type: AnsweredQuestion
has title: How do I make an asynchronous call using AngularJs and Typescript
accepted answer: http://stackoverflow.com/a/27591337
downvote count: 1
type: Question
tagged with: typescript
score: -1
answer count: 2
upvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/27591337
tagged with: jquery

http://stackoverflow.com/comment/43680999
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27604469
has text: If the model is unreferenced (0 reference count), then it is being marked for garbage collection. I'm not sure why my answer was downvoted, but when working with Marionette, the answer I provided is pretty common practice and doesn't have any memory leaks.
score: 0

http://stackoverflow.com/comment/43442386
score: 0
comment on: http://stackoverflow.com/q/27504434
type: Comment
type: QuestionComment
has text: I wanted to understand why but also know the correct way of making this work, it currently feels like a hack :)

http://stackoverflow.com/comment/43720283
type: QuestionComment
has text: What I'm trying to do, is use this queue in $.ajax. I have an array that need to be send and treat on success. And every thing must be done in the same order of the array loop. I also have to consider the time of request, that could be diferent time for each item requested. What is happen is that sometimes the order goes crazy and not all items from array are send.
comment on: http://stackoverflow.com/q/27637488
score: 0
type: Comment

http://stackoverflow.com/comment/43691633
score: 0
comment on: http://stackoverflow.com/q/27636094
type: QuestionComment
type: Comment
has text: Can you provide your json, or similar, and create a [JSFiddle](http://jsfiddle.net/). It'll be much easier to help then.

http://stackoverflow.com/comment/43437317
type: Comment
comment on: http://stackoverflow.com/a/27502585
type: AnswerComment
has text: By the way, to the OP's question. This is a good way but I find it even better to have the constructor exposed by a separate module as one can then test it however they like whereas here, you can only test the one exported instance of it.
score: 0

http://stackoverflow.com/comment/43462645
has text: Thank you. I tried it but I want to animate slider back, not hide it.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27515761

http://stackoverflow.com/q/27563847
has answer: http://stackoverflow.com/a/27563938
upvote count: 1
possible better answer: http://stackoverflow.com/a/27564034
accepted answer: http://stackoverflow.com/a/27563938
has answer: http://stackoverflow.com/a/27564034
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery
has title: jQuery sum up the text values from the spans
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I need somehow to sum up the text values from the span, but I only can extract them and not to sum up. Is there a way to do this correctly? I got blocked about the code, I'm new to jQuery. Demo: http://jsfiddle.net/0L4s6g8p/1/ Html: Option 1 = $11.11 Option 2 = $22.22 Option 3 = $33.33 Subtotal = $0.00 Script: $('.prices').each(function(){ var sum = $('.sum').text(); $(this).each(function(){ sum += parseInt($('.sum').text()); }); $("#subtotal").text(sum); });
has answer: http://stackoverflow.com/a/27564026
favorite count: 0
type: Question
answer count: 3

http://stackoverflow.com/q/27577618
upvote count: 1
has title: Converting an array to a key-value object using a method similar to Array.prototype.map()?
type: Question
has comment: http://stackoverflow.com/comment/43580548
has comment: http://stackoverflow.com/comment/43580538
score: 1
has answer: http://stackoverflow.com/a/27577762
tagged with: arrays
downvote count: 0
has answer: http://stackoverflow.com/a/27577716
tagged with: javascript
has answer: http://stackoverflow.com/a/27577948
has body: Is there any Array method similar to Array.prototype.map that takes an array and converts it into a key-value object? Here's an example: var people = [{name: 'person1', tableId: 1}, {name: 'person2', tableId: 2}]; var table = [{id:1, shape:2, title: 'table1'}, {id:2, shape:4, title: 'table2'}]; I would like to create a table-people object where the key will be an id and the value would be all the people that have the relevant tableId. An example for the output will be: var output = { 1: [{name: 'person1', tableId: 1}, &lt;more people&gt;], 2: [{name: 'person2', tableId: 2}}, &lt;more people&gt;] }; output will be a key-value object. The key is the tableId and the value is an array of people. A person has some more information(other than name and tableId - this is just a simple example). Now the easy way to do it is: var output = {}; for(var i = 0 ; i &lt; table.length ; i++) { output[table.id] = getPeopleThatSitInTable(table.id); // will return an array } Is there any method like: table.keyValueMapObject(function(item){ return { key: item.id, value: getPeopleThatSitInTable(item.id) } }); This method will create an object behind the scenes, fill it based on key &amp; value and return the object? I'm not looking for something like: var obj = {}; // declaring an object // loop somehow and fill obj(for\foreach\map\reduce etc.) Since using for does the same thing in "the best way". I'm looking for something like: var obj = table.methodName(filterFunction)
has answer: http://stackoverflow.com/a/27577749
answer count: 4
favorite count: 0
has comment: http://stackoverflow.com/comment/43580633
has comment: http://stackoverflow.com/comment/43580302
type: UnansweredQuestion

http://stackoverflow.com/q/27550519
score: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/27551572
has answer: http://stackoverflow.com/a/27550818
has comment: http://stackoverflow.com/comment/43531336
tagged with: asp.net
has body: I'm writing up an online contract for an e-commerce/rental site and need to display the date of the first payment. The first payment is due the first occurrence of the 1st or the 15th of the month, beginning 30 days from the date of the contract. So if the contract was filled out on January 10th, the first payment would be due on February 15th. I'm lost on how to make this happen with JS, so your help is much appreciated. Thanks! Edit So let's say I'm using this code as recommended below: function calc() { var invoiceDate = moment(document.getElementById("contractDate").value, ["M-D-YYYY"]).add(30, 'days'); while (invoiceDate.date() != 1 &amp;&amp; invoiceDate.date() != 15) { invoiceDate = invoiceDate.add(1, 'days') } document.getElementById("invoiceDate").innerHTML = invoiceDate.format("MMMM Do, YYYY"); } calc() &lt;script type='text/javascript' src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.8.4/moment.js"&gt;&lt;/script&gt; &lt;input type="text" id="contractDate" onchange="calc()" value="12-18-2014"&gt; &lt;div id="invoiceDate"&gt;&lt;/div&gt; How would I set it to automatically update to the current date instead of requiring a text form to fill out? Getting rid of the text input would be best to keep people from fudging the contract. Any suggestions?
has answer: http://stackoverflow.com/a/27550895
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43528420
type: AnsweredQuestion
has title: How to calculate and display a specific date?
has comment: http://stackoverflow.com/comment/43527285
accepted answer: http://stackoverflow.com/a/27550895
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27551572
tagged with: date
has comment: http://stackoverflow.com/comment/43527226

http://stackoverflow.com/q/27555656
has answer: http://stackoverflow.com/a/27555711
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/27555711
tagged with: javascript
has title: Functions in loops - how does each function retain a reference to the same copy of i?
has comment: http://stackoverflow.com/comment/43537539
favorite count: 0
possible better answer: http://stackoverflow.com/a/27556275
has comment: http://stackoverflow.com/comment/43537558
downvote count: 2
has answer: http://stackoverflow.com/a/27556275
upvote count: 1
has comment: http://stackoverflow.com/comment/43537967
has body: I've searched around, and I know there are tons of duplicate questions about solving this problem, but I know how to solve the problem and am not asking about that. I'm trying to better understand WHY this happens. I'm trying to understand based off of this explanation var elems = document.getElementsByClassName("myClass"), i; for (i = 0; i &lt; elems.length; i++) { elems[i].addEventListener("click", function () { "use strict"; this.innerHTML = i; }); } I'm confused about how each functions retains a reference to the same copy of i because i is a number, which isn't passed around by reference, right? For example: &gt; a = 1 1 &gt; b = a 1 &gt; a = 2 2 &gt; b 1 That being the case, I don't understand why each function is given a reference to a number since, unless I'm mistaken, numbers aren't passed around by reference. I've read explanations of this in several places but none of them have been able click for me or give me one of those 'Aha!' moments, so any help is much appreciated.
linked to: http://stackoverflow.com/q/750486
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43538091
has comment: http://stackoverflow.com/comment/43538665
score: -1

http://stackoverflow.com/comment/43505795
comment on: http://stackoverflow.com/q/27538722
score: 0
type: Comment
type: QuestionComment
has text: If you have the solution you can answer your own question.

http://stackoverflow.com/q/27518167
type: AnsweredQuestion
score: 7
tagged with: methods
has comment: http://stackoverflow.com/comment/43495263
possible better answer: http://stackoverflow.com/a/27522177
answer count: 3
has answer: http://stackoverflow.com/a/27535326
has answer: http://stackoverflow.com/a/27522177
tagged with: arrays
has comment: http://stackoverflow.com/comment/43499188
tagged with: javascript
has comment: http://stackoverflow.com/comment/43466754
favorite count: 0
has comment: http://stackoverflow.com/comment/43466249
has answer: http://stackoverflow.com/a/27522680
upvote count: 8
has comment: http://stackoverflow.com/comment/43466464
has comment: http://stackoverflow.com/comment/43466308
has comment: http://stackoverflow.com/comment/43466400
has body: I am trying to push a value into an array and it is giving me this error in the developer tools. Uncaught TypeError: Cannot read property 'push' of null Here is the code that it seems to be sticking on, word and local word were defined earlier like this. var word = []; var localWord = []; function setLocalArray() { // first get words from text field and update word array. word = document.getElementById("words").value.split(','); // store word array in localStorage for(var i=0; word.length &gt; i; i++) { var key2 = "part"+i; localStorage.setItem(key2,word[i]); localWord.push(key2); } localStorage.setItem("localWord",JSON.stringify(localWord)); text2Array(); reveal(); } localWord.push(key2); Seems to be what it is getting stuck on. I have looked at everything I can find on the push method and I can't seem to find why it is giving me this error. Help? Here is the full code at jsfiddle http://jsfiddle.net/runningman24/jnLtpb6y/
accepted answer: http://stackoverflow.com/a/27535326
has title: JavaScript array push not working
downvote count: 1
type: Question

http://stackoverflow.com/comment/43591487
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27583329
has text: Hehe, yeah, I'm just paranoid about type coercion. I use the type-safe equality/inequality operators, and I have jshint nag me when I forget. I guess I'm hung over from C/C++. Especially C++, with a zillion different ways that implicit conversions with constructors can get you into trouble.

http://stackoverflow.com/comment/44698524
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27511648
has text: No need to use `object.hasOwnProperty()` anymore if you create your map with `Object.create(null)`. This creates a prototype-less object so it contains no properties other than what you put into it. I think this is new with ECMAScript 5?
score: 1

http://stackoverflow.com/a/27615222
type: Answer
has comment: http://stackoverflow.com/comment/43666017
score: 0
answers question: http://stackoverflow.com/q/27611944
has comment: http://stackoverflow.com/comment/43673388
has body: Try this HTML Code: &lt;span id="mName" &gt;&lt;/span&gt; Javascript Code: function curMonth(id) { var nD = new Date(); var months = ["Janurary", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; var month = months[nD.getMonth()]; id.innerHTML = month; } var mName=document.getElementById("mName"); mName.onload = curMonth(mName);

http://stackoverflow.com/q/27535407
type: Question
accepted answer: http://stackoverflow.com/a/27535640
tagged with: angularjs-service
tagged with: javascript
score: 0
answer count: 1
tagged with: angularjs
has title: Injecting an Angular factory into another factory
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43499509
has answer: http://stackoverflow.com/a/27535640
has body: I'm having a bit of trouble getting a factory injected into another factory. The error is: `ReferenceError: testDataService is not defined` I thought it should be pretty easy to solve, but it's giving me a headache. I seem to have issues with the various syntax involved in dependency injection. In my main factory, I'm making the initial service call like this : this.treeGridOptions = gadgetInitService.initTreeGridTEST(); Good so far. However, further below it blows up in initTreeGridTEST Here's my testDataService factory, which just returns some hard-coded options: (function () { 'use strict'; angular.module('rage').factory('testDataService', [testData ]); function testData() { var service = { treegridData: treegridData }; return service; } function treegridData() { return { "altrows": true, "sortable": true, "columnsResize": true, "editable": true, "showToolbar": false, "width": "100%", "height": 400, "source": {} }; } })(); and trying to inject 'testDataService' here: (function () { 'use strict'; angular.module('rage').factory('gadgetInitService', ['testDataService', gridHierarchyService]); function gridHierarchyService(testDataService) { var service = { initTreeGrid: initTreeGrid, initColumnChart: initColumnChart, initTreeGridTEST: initTreeGridTEST } return service; } function initTreeGridTEST() { var myData = testDataService.treegridData(); return myData; } })(); Your help appreciated, Bob

http://stackoverflow.com/comment/43560074
has text: @OneWay I looked into the splice function, but this didn't seem to work. I'll edit my post so you can see what I tried
type: Comment
score: 0
comment on: http://stackoverflow.com/q/27567505
type: QuestionComment

http://stackoverflow.com/q/27619034
score: -1
has comment: http://stackoverflow.com/comment/43659029
upvote count: 0
has body: I have created a table with scrollable bar in X &amp; Y direction having fixed table header. More over, i have given text boxes randomly in both Table Header and Table rows. On pressing the tab Key, only the header part is moving and the body remains static and vice verse. I need to move the entire table(both header and rows) when we enter tab function.
answer count: 1
has comment: http://stackoverflow.com/comment/43659401
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43659336
tagged with: http://stackoverflow.com/tag/html
tagged with: css
favorite count: 0
has answer: http://stackoverflow.com/a/27619260
type: UnansweredQuestion
downvote count: 1
type: Question
has title: Tab function is not working Properly if we have editable text in the table header

http://stackoverflow.com/comment/43612814
score: 1
comment on: http://stackoverflow.com/a/27594546
has text: If anyone stumbling upon this answer I going to use this on a production website this can create security issues. Your answer is perfectly right, I just wanted to mention [the problem of `eval()`](https://jslinterrors.com/eval-is-evil)
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/62278633
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27479841
score: 0
has text: @jones no , i can't solve that

http://stackoverflow.com/comment/43674853
comment on: http://stackoverflow.com/q/27626330
score: 0
has text: @Fedor added a MCVE!
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27589914
has comment: http://stackoverflow.com/comment/43608597
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/43605803
has comment: http://stackoverflow.com/comment/43604132
tagged with: javascript
type: Question
tagged with: ruby-on-rails-4
has body: My Rails application uses Turbolinks. Turbolinks is definitely active, but when I navigate between pages the title tag is not replaced. If I turn off JavaScript, each page displays its unique page title correctly. My title tag is the first item in my page head: &lt;head&gt; &lt;%= page_title_tag %&gt; ... &lt;%= javascript_include_tag 'public/public', 'data-turbolinks-track' =&gt; true %&gt; ... &lt;/head&gt; The only documentation I can find regarding the title tag is this from the Turbbolinks README: Instead of letting the browser recompile the JavaScript and CSS between each page change, it keeps the current page instance alive and replaces only the body and the title in the head. Update: This appears to be Chrome-specific. Works fine in Firefox and Safari. Digging into the turbolinks JavaScript I can see that Turbolinks is definitely setting document.title with the correct value, however the title tag is not updating. I have also ripped out every piece of JavaScript in my application other than JQuery and Turbolinks, so this appears not to be app-specific. I'd be interested if anyone with a Turbolinks-enabled app in production could take a look in Chrome (OSX) and see if the &lt;title&gt; tag changes. Versions: Turbolinks 2.5.2 Rails 4.1.5
tagged with: turbolinks
has comment: http://stackoverflow.com/comment/43607604
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/43604312
has comment: http://stackoverflow.com/comment/43604219
has comment: http://stackoverflow.com/comment/43608776
has comment: http://stackoverflow.com/comment/43604783
has comment: http://stackoverflow.com/comment/43608605
has comment: http://stackoverflow.com/comment/43605037
has title: Turbolinks Doesn't Replace Title Tag In Chrome
score: 2
has comment: http://stackoverflow.com/comment/43605445
answer count: 0
has comment: http://stackoverflow.com/comment/43604293
upvote count: 2
type: UnansweredQuestion

http://stackoverflow.com/comment/43634676
has text: Sorry, but I can't get any output from this, not even -1. I have rewritten the html as:
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27594554

modal-dialog
tags question: http://stackoverflow.com/q/27483307
tag name: modal-dialog
tags question: http://stackoverflow.com/q/27513626
type: Tag
tags question: http://stackoverflow.com/q/27544575
tags question: http://stackoverflow.com/q/27509377
tags question: http://stackoverflow.com/q/27484668
tags question: http://stackoverflow.com/q/27533405

http://stackoverflow.com/q/27552456
favorite count: 0
score: 2
tagged with: cordova
tagged with: parse-platform
downvote count: 0
type: UnansweredQuestion
has title: Handling a parse push notification with cordova push plugin
has answer: http://stackoverflow.com/a/29804479
type: Question
upvote count: 2
answer count: 1
has body: I'm trying to build an app that will be available to get Push notification data and process it in angularJS scope. Pushes are coming to device and I have them displayed on tray. When I click push - app opens. But I can't recieve a data in JS. These plugins are installed: https://github.com/phonegap-build/PushPlugin and https://github.com/avivais/phonegap-parse-plugin parsePlugin.initialize('xxxxxxxxxxxxxxx', 'xxxxxxxxxxxxx', function() { //okay, we are registered! parsePlugin.getInstallationObjectId(function(data) { alert('Okay!'); }, function(e) { alert('error'); }); }, function(e) { alert('error while authenticating!'); }); Well, it's registering. Also I have an onNotification function there, called by PushPlugin var onNotification = function(e) // This never happens :( { alert("Push came!"); angular.element(document.getElementById('pushCtrl')).scope().getMessage(e); angular.element(document.getElementById('pushCtrl')).scope().$apply(); }; And nothing happens. Typical app behavior is 'Okay!' and after push sending it gets to the device only. Also, if I insert PushPlugin registration function, app crashes while trying to resolve regid: $cordovaPush.register({"senderID": "xxxxxxxxxx","ecb": "onNotificationGCM"}).then(function(token) { if(token="OK"){ $scope.net=true; //show a net icon in the top of the screen } }, function(err) { $scope.token = err; }); } What's wrong with this? Am I able to get push data to app?
tagged with: javascript
tagged with: android

http://stackoverflow.com/a/27481354
type: Answer
has comment: http://stackoverflow.com/comment/43396103
downvote count: 1
score: 3
answers question: http://stackoverflow.com/q/27481310
upvote count: 4
has comment: http://stackoverflow.com/comment/43395719
has body: You're using visibility instead of display: if (myClasses[i].style.visibility === 'hidden') Change that to: if (myClasses[i].style.display === 'none') { Further more, since you're already using jQuery, your whole loop can change to the following: $(document).ready(function() { $('th:hidden').each(function() { alert($(this).attr('class')); }); }); $(document).ready(function() { $('th:hidden').each(function() { alert($(this).attr('class')); }); }); Apple Orange Banana Ananas This loop will run over all the hidden ths (you can of course change the selector to be more specific if you need it to) and alert the class.
has comment: http://stackoverflow.com/comment/43395641

http://stackoverflow.com/q/27484613
type: Question
has comment: http://stackoverflow.com/comment/43431861
linked to: http://stackoverflow.com/q/22078356
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/43402468
tagged with: carousel
has comment: http://stackoverflow.com/comment/43415104
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43402332
has body: I try to make jQuery scrolling carousel with Previous and Next buttons without any plugin. My code in jQuery has two parts- first one for scrolling and second one for a buttons. Maybe that is completely wrong. Now I want to set an interval for scrolling, but I have no idea how. Here is Demo : http://jsfiddle.net/lilivasileva/rGLsG/116/ $(function(){ var scroller = $('#carousel_container div.carousel'); var scrollerContent = scroller.children('ul'); scrollerContent.children().clone().appendTo(scrollerContent); var curX = 0; scrollerContent.children().each(function(){ var $this = $(this); $this.css('left', curX); curX += $this.outerWidth(true); }); var fullW = curX / 2; var viewportW = scroller.width(); var controller = {curSpeed:0, fullSpeed:1,}; var $controller = $(controller); var tweenToNewSpeed = function(newSpeed, duration) { if (duration === undefined) duration = 800; $controller.stop(true).animate({curSpeed:newSpeed}, duration); }; // Pause on hover scroller.hover(function(){ tweenToNewSpeed(0); }, function(){ tweenToNewSpeed(controller.fullSpeed); }); // Scrolling management; start the automatical scrolling var doScroll = function() { var curX = scroller.scrollLeft(); var newX = curX + controller.curSpeed; if (newX &gt; fullW*2 - viewportW) newX -= fullW; scroller.scrollLeft(newX); }; setInterval(doScroll, 80); tweenToNewSpeed(controller.fullSpeed); }); $(function(){ var carousel = $('.carousel ul'); var carouselChild = carousel.find('li'); var clickCount = 0; var canClick = true; itemWidth = carousel.find('li:first').width()+1; //Including margin //Set Carousel width so it won't wrap carousel.width(itemWidth*carouselChild.length); //Place the child elements to their original locations. refreshChildPosition(); //Set the event handlers for buttons. $('.btnNext').click(function(e){ if($(".carousel").find("li:eq(6)").text()!=20) { if(canClick) { canClick = false; clickCount++; //Animate the slider to left as item width carousel.stop(false, true).animate({ left :…
has title: Scrolling/carousel with interval

http://stackoverflow.com/comment/43433061
has text: I did an inspect element on the table definition and it shows all the files in the sql table, but they are not getting dislayed on the web. Here is the inspect element view
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27499416

http://stackoverflow.com/q/27594711
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/43613666
has body: I have a problem with toogling the class. Here´s my code: http://jsfiddle.net/h1x52v5b/2/ I need remove class in first child of Ul. So, i set up: var len=titles.length, currentItem=0; (fifth line) to var len=titles.length, currentItem=-1; . Toogling of class works well, but my next code: jQuery('.feauture_picture_obor').each(function(i,ele){ if (jQuery(this).attr("data-id") == data) { jQuery(this).addClass("activeimg"); } }) don´t work anymore and if I alert the var "data", it shows style "undefined". In first case, with currentItem=0 works alerting fine (but showing still first "data"). Have someone any fixes of this, please? :).
has answer: http://stackoverflow.com/a/27681550
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43613456
has title: Toggle class and slider photos
has comment: http://stackoverflow.com/comment/43613070
has comment: http://stackoverflow.com/comment/43613153
has comment: http://stackoverflow.com/comment/43613324
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27681550
tagged with: jquery
has comment: http://stackoverflow.com/comment/43613497

http://stackoverflow.com/q/27580389
has comment: http://stackoverflow.com/comment/43585145
accepted answer: http://stackoverflow.com/a/27580549
type: Question
has answer: http://stackoverflow.com/a/27580618
downvote count: 4
answer count: 3
upvote count: 0
has body: html code &lt;div class="up_arrow"&gt;&lt;/div&gt; &lt;div class="content"&gt; &lt;img src="image_one"&gt; &lt;img src="image_two"&gt; &lt;img src="image_three"&gt; &lt;/div&gt; &lt;div class="down_arrow"&gt;&lt;/div&gt; Here "image_two" and "image_three" are hidden. What I want is, when I click on "down_arrow" div, "image_one" changes to "image_two" and again when I click on "down_arrow" div, "image_two" changes to "image_three". Similarly for "up_arrow", image changes from "image_three" to "image_two" just like an image slider. Does anyone know how to do it?
tagged with: javascript
tagged with: jquery
score: -4
has comment: http://stackoverflow.com/comment/43585227
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has title: How to slide images in div up and down with jquery?
tagged with: css
possible better answer: http://stackoverflow.com/a/27580519
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27580519
has answer: http://stackoverflow.com/a/27580549
has comment: http://stackoverflow.com/comment/43585202

http://stackoverflow.com/comment/43564122
type: AnswerComment
score: 0
has text: Thanks sahibathla for posting your code, btw why you're fetching all recipients into the form "Recipients.all.each"? I edited the body post, actually I want that I can select (all, none, one or some)companies, the same for departments and employees. But if I select one company I cannot select their departments and their employees. And if I select one department I cannot select their employees.
type: Comment
comment on: http://stackoverflow.com/a/27555749

http://stackoverflow.com/comment/43603287
score: 0
type: QuestionComment
type: Comment
has text: @YuryTarabanko Even if I keep the div outside it is not working. Here is a simple fiddle http://jsfiddle.net/g5kjghcp/
comment on: http://stackoverflow.com/q/27589609

http://stackoverflow.com/comment/43405313
score: 0
type: AnswerComment
type: Comment
has text: it subtracts until you have 4 digits, if you have four it doesn't work anymore
comment on: http://stackoverflow.com/a/27485386

http://stackoverflow.com/a/27523201
score: 1
has body: This code example goes from Controller Basics Tutorial by Scot Allen and it will throw exception like "Error: [ng:areq] Argument 'MainController' is not a function, got undefined So the reason of this that since v1.3 you can't have global controllers index.html {{ 55 * 2}} {{message}} script.js before v1.3 var MainController = function($scope){ $scope.message = "Hello I am Angular"; }; script.js after v1.3 angular.module('controllerExample', []) .controller('MainController', ['$scope', MainController]); function MainController($scope){ $scope.message = "Hello I am Angular"; } and in your index.html see Plunker with solved example
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/27521934
downvote count: 0

http://stackoverflow.com/q/27516307
downvote count: 1
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27516502
score: 0
has answer: http://stackoverflow.com/a/27516392
answer count: 3
tagged with: jquery
has body: So I have created a Web Portfolio, but am trying to make it so that when I hover over the images of the websites I have created a border goes around it using js, css, and html 5. For some reason it still is not functioning though. Javascript: $(document).ready(function(){ $('a.link_border').hover( function () { $(this).addClass("img_wrap"); }, function () { $(this).removeClass("img_wrap"); }); }); CSS: .img_wrap { border: thick solid #FFFF00; } .wrapper { height: 210px; margin: 5px auto 5px auto; padding: 8px auto 3px auto; float: left; border: thin groove rgba(0,0,0,.2); background: rgba(0,0,0,.1); clear: right; } HTML: Project: Beatrice Spa and Salon Type: School Project Skills Used: HTML, CSS, Javascript/Jquery, Adobe Photoshop CS6/Illustrator CS6
favorite count: 0
possible better answer: http://stackoverflow.com/a/27516392
has answer: http://stackoverflow.com/a/27516321
has title: mouseover toggleClass not function
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43462965
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27516502
upvote count: 1

http://stackoverflow.com/comment/43548223
comment on: http://stackoverflow.com/q/27561097
type: Comment
has text: use the methods that are shown in the documentation. Adding your own event handler doesn't make any sense
score: 0
type: QuestionComment

http://stackoverflow.com/a/27498751
type: Answer
has body: This is solely JavaScript solution: function add_ul() { var li = document.getElementById("li"); var ul = document.createElement("ul"); ul.appendChild(document.createTextNode("Another UL Element")); li.appendChild(ul); }
downvote count: 0
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27498367

http://stackoverflow.com/q/27532565
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27534716
has comment: http://stackoverflow.com/comment/43494393
score: 2
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: Jquery color on hover randomize
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/27533262
answer count: 2
tagged with: css
possible better answer: http://stackoverflow.com/a/27533262
has comment: http://stackoverflow.com/comment/43494485
has comment: http://stackoverflow.com/comment/43493898
upvote count: 3
has comment: http://stackoverflow.com/comment/43493688
downvote count: 1
has answer: http://stackoverflow.com/a/27534716
has body: I have a 5x5 div matrix with the starting color brown.On every refresh it should make 7 random colors like the code below.My question is how can i make it so on every refresh it places 4 of each 6 diferent colors in the hover function and the 7th color in the last free div? full code here->http://pastebin.com/tUxB5usi &lt;script&gt; $(document).ready(function() { var b = 15; var Otv = "Отворени: "; var c = 3; var Prom = "Промени: "; document.getElementById('otvoreni').innerHTML = Otv + b; document.getElementById('promeni').innerHTML = Prom + c; var f="#B"+Math.floor(Math.random() * 99999); var f1="#B"+Math.floor(Math.random() * 99999); var f2="#B"+Math.floor(Math.random() * 99999); var f3="#B"+Math.floor(Math.random() * 99999); var f4="#B"+Math.floor(Math.random() * 99999); var f5="#B"+Math.floor(Math.random() * 99999); var f6="#B"+Math.floor(Math.random() * 99999); $(".inner").hover(function() { if (b &gt; 0) { $(this).css("background-color", f); b--; document.getElementById('otvoreni').innerHTML = Otv + b; }; }, function() { $(this).css("background-color", "#B87333"); }); }); &lt;/script&gt;

http://stackoverflow.com/comment/43640260
comment on: http://stackoverflow.com/q/27574546
score: 0
type: Comment
has text: I found the error. I can not pass the `mapView` into `ev.views.Home_Eventos` because as you said like you said, when the changing of the home view is initialized would do the append the $el `shell` instead of `rightcolumn`. As I just need variable that contains the map just spent this `mapView.map`
type: QuestionComment

http://stackoverflow.com/comment/43695852
type: Comment
comment on: http://stackoverflow.com/a/27638160
has text: Oh okay. Woops (reference the edit). I'm new to StackExchange. I'll accept his as the answer, then.
type: AnswerComment
score: 0

http://stackoverflow.com/a/27480082
score: 5
upvote count: 5
has comment: http://stackoverflow.com/comment/77715986
has body: You can do it with Alasql JavaScript library. It download json file, parse it, and run SQL statement on it. This is a sample how to take top 10 directly from JSON file: &lt;script src="alasql.min.js&gt;&lt;/script&gt; &lt;script&gt; alasql("SELECT TOP 10 * FROM JSON('mydata.json') ORDER BY Variable1 DESC",[], function(top10){ console.log(top10); }); &lt;/script&gt; Or if you already have data in memory: var data = [{"Variable":"Hello","Variable1":20},{"Variable":"Hi","Variable1":30}]; var res = alasql("SELECT TOP 10 * FROM ? ORDER BY Variable1 DESC",[data]); Try this sample in jsFiddle.
downvote count: 0
answers question: http://stackoverflow.com/q/27479750
type: Answer

http://stackoverflow.com/comment/43495520
comment on: http://stackoverflow.com/q/27533441
has text: Ok. Aweary is already on the case for that. Looking good so far.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43526506
has text: the href isn't displayed anywhere, except when you hover on it with the mouse. but even then that's not part of your page.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27550061
score: 0

http://stackoverflow.com/comment/43566230
type: QuestionComment
has text: Your goal isn't clear but you might want to use appendTo instead of append. Now you're appending (moving) #paste to a clone you don't put in the page, this can't achieve anything useful.
score: 1
comment on: http://stackoverflow.com/q/27570438
type: Comment

http://stackoverflow.com/comment/43444965
score: 0
has text: Ah yes, that's confusing in my comment, I meant to say that in stead of having property `a`, you could say _"a is the first letter of the alphabet, therefor I will store whatever value it has in the array at index 1"_ and make a function like `alphabetIndexFor(letter)`.
type: QuestionComment
comment on: http://stackoverflow.com/q/27507246
type: Comment

http://stackoverflow.com/comment/43557887
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27565523
has text: Hello pls, how can i show the number count of the checkboxes. When i check one and all.

http://stackoverflow.com/comment/43519576
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27546587
score: 0

http://stackoverflow.com/q/27489343
has title: JavaScript function performed on 6 id's at a time (return after 6 calls ?)
tagged with: javascript
answer count: 2
has answer: http://stackoverflow.com/a/27490176
tagged with: jquery
has comment: http://stackoverflow.com/comment/43411608
favorite count: 0
tagged with: ajax
has body: I am wondering if there is a function I can use so that I can seperate data being called into groups of 6. here is the long form of the code var currentResults; function init() { getProducts(); } function getProducts() { $.ajax({ url:"php/products.php", dataType: "json", data: { public: true }, success:function(result){ processResults(result); } }); } function processResults(results) { currentResults = null; if (!results &amp;&amp; !results.products) return; currentResults = results.products; for (var i = 0; i &lt; results.products.length; i++) { processResult(results.products[i]); } $(".galleryitem").click(handleThumbnailClick); } function processResult(result) { var newDiv = '&lt;div id="galleryitem' + result.id + '" class="galleryitem"&gt;'; newDiv += '&lt;div class="imageHover" style="background: ' + result.color + '"&gt;&amp;nbsp;&lt;/div&gt;'; newDiv += '&lt;img class="galleryImage" src="' + encodeImagePath(result.thumbnail) + '" /&gt;'; if (result.artist) newDiv += '&lt;div class="imageArtist"&gt;' + result.artist + '&lt;/div&gt;'; newDiv += '&lt; /div&gt;'; $('#gallery').append(newDiv); } i would like the function to be able to sort the images to groups of 6, something like this... (see areas at bottom with ***'s) function processResult(result) { var newDiv = '&lt;div id="galleryitem' + result.id + '" class="galleryitem"&gt;'; newDiv += '&lt;div class="imageHover" style="background: ' + result.color + '"&gt;&amp;nbsp;&lt;/div&gt;'; newDiv += '&lt;img class="galleryImage" src="' + encodeImagePath(result.thumbnail) + '" /&gt;'; if ***(!!first 6 called!!)*** newDiv += '&lt;div class="imageArtist"&gt;' + result.artist + '&lt;/div&gt;'; newDiv += '&lt; /div&gt;'; $('#galleryfirst').append(newDiv); if ***(!!second 6 called!!)*** newDiv += '&lt;div class="imageArtist"&gt;' + result.artist + '&lt;/div&gt;'; newDiv += '&lt; /div&gt;'; $('#gallerysecond').append(newDiv); } Is doing something like this possible? Or does this whole code need an overhaul?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43412852
score: 2
upvote count: 3
has answer: http://stackoverflow.com/a/27490055
tagged with: dom
downvote count: 1
has comment: http://stackoverflow.com/comment/43411452
type: Question

http://stackoverflow.com/q/27483025
linked to: http://stackoverflow.com/q/3337587
has body: I want to add a main DIV outside the individual many DIVs by CSS, so I can control the whole DIV by an ID. div 1 div 2 div 3 div 4 div 5 I want to like this way: div 1 div 2 div 3 div 4 div 5 But I want to do this by CSS only because the html part is coming from third party, so I can't edit or add anything in the html. But I can edit by CSS. Thanks in advance, :) taps
has comment: http://stackoverflow.com/comment/43399064
type: Question
has comment: http://stackoverflow.com/comment/43398539
has comment: http://stackoverflow.com/comment/43398985
tagged with: javascript
has comment: http://stackoverflow.com/comment/43398513
has comment: http://stackoverflow.com/comment/43398557
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/27483810
favorite count: 0
type: UnansweredQuestion
upvote count: 1
downvote count: 6
has comment: http://stackoverflow.com/comment/43398505
has title: How can I insert existing elements into a dynamically created element using JavaScript?
score: -5
has comment: http://stackoverflow.com/comment/43399142

http://stackoverflow.com/q/27512706
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/27533481
upvote count: 1
tagged with: jqgrid
has title: JQGrid with two vertical scrollbars (left and right)
accepted answer: http://stackoverflow.com/a/27533481
downvote count: 0
tagged with: javascript
tagged with: jquery
type: AnsweredQuestion
has body: Using JQGrid 4.5.4 I have a requirement to have both vertical scrollbar on my JQGrid on both the left and right. Sample mockup: Is this possible? I have searched extensively and found an example of two horizontal scrollbars, but I was unable to find an example of two vertical scrollbars on both left and right sides of the JQGrid.
possible better answer: http://stackoverflow.com/a/27525249
score: 1
has answer: http://stackoverflow.com/a/27525249
favorite count: 0

http://stackoverflow.com/a/27575870
type: Answer
answers question: http://stackoverflow.com/q/27575699
has body: 1) Since you're using jquery, you might as well use it for everything... 2) It's better to call a function in the onclick event that to try and code a whole function 3) attributes use camelCase within HTML tags I didn't test this, but it should get you what you need.
score: 0

http://stackoverflow.com/a/27580950
has body: You need to use value. It will "change" the inner HTML on the input element, but that's not displayed on the screen since it's a void element. It does not technically have innerHMTL but browsers will do something like Hello! . The text for an input element uses value other than innerHTML that for example an or would use. function changeMe() { document.getElementById("hola").value="Hello!"; }
has comment: http://stackoverflow.com/comment/43586332
upvote count: 2
has comment: http://stackoverflow.com/comment/43586363
has comment: http://stackoverflow.com/comment/43586634
has comment: http://stackoverflow.com/comment/43586515
has comment: http://stackoverflow.com/comment/43586394
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/27580933

http://stackoverflow.com/a/27622993
has body: There's no standards recommendation for this feature (the "directory" attribute) and so Firefox hasn't implemented it: https://bugzilla.mozilla.org/show_bug.cgi?id=782233 I think the general feeling is that being able to select multiple files will often give you what you need here, and all modern desktop browsers support that: http://caniuse.com/#feat=input-file-multiple You have also consider - even if you could choose a directory from the picker, how would that look in the form post and server-side processing? So the conclusion is that if you need Firefox support you're pretty much out of luck, and there are multiple reasons why that seems unlikely to change.
type: Answer
score: 0
answers question: http://stackoverflow.com/q/27621819

http://stackoverflow.com/q/27539335
favorite count: 0
has comment: http://stackoverflow.com/comment/43506614
has comment: http://stackoverflow.com/comment/43506646
type: Question
has comment: http://stackoverflow.com/comment/43506522
has answer: http://stackoverflow.com/a/27539520
upvote count: 1
has title: Strange Behaviour of Linkbutton
answer count: 1
tagged with: c#
has body: Whenever I am clicking on Linkbutton I am getting error that in Screen shot below. Note: I Have not used any update panel with page. HTML <asp:LinkButton ID="btnSend" runat="server" CssClass="button submitButton" ValidationGroup="SurveyQuestion" CausesValidation="true" OnClick="SendQuestion_Click"></asp:LinkButton> Submit</asp:LinkButton> Any one can help me with this?
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43506488
has comment: http://stackoverflow.com/comment/43506540
has comment: http://stackoverflow.com/comment/43506573
downvote count: 0
has comment: http://stackoverflow.com/comment/43506664
score: 1
tagged with: asp.net

http://stackoverflow.com/q/27536537
has title: Knockout Components Select Options
has body: I've been ripping my hair out, can someone please save me... I want to create a simple knockout component that renders a select list based on JSON object. This works when I use a simple string array, but when I use the JSON object, with id and name attributes that are being bound using optionsText and optionsValue, I get a drop down list with [object object]. Any help would be greatly appreciated. ko.components.register("organization-select", { viewModel: function (params) { var self = this; self.organizationList = ko.observableArray([]); self.organizationList(["foo", "bar"]); //this works //this doesn't work Result =&gt; [Object Object],[Object Object] self.organizationList([{ "id": 1, "name": "foo" }, { "id": 2, "name": "bar" }]); }, template: 'Organizations: &lt;select data-bind="options: organizationList, optionsText: "name", optionsValue: "id""&gt;&lt;/options&gt;' //this works with simple array of strings //template: 'Organizations: &lt;select data-bind="options: organizationList"&gt;&lt;/options&gt;' }); ko.applyBindings(); });
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27536570
accepted answer: http://stackoverflow.com/a/27536570
tagged with: knockout-components
tagged with: knockout.js
type: Question
score: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/27595817
has answer: http://stackoverflow.com/a/27595859
type: Question
has comment: http://stackoverflow.com/comment/43615564
has body: I'm trying to write a library for Riot (League of legends API) in NodeJS and I have the following problem. I'm doing: function getSummonerProfile(sum) { var summoner = sum.replace(/\s+/g, ''); request("https://na.api.pvp.net/api/lol/na/v1.4/summoner/by-name/" + summoner + "?api_key=" + api_key, function(error, response, body) { console.log(body); }); } getSummonerProfile("some player"); the console shows: { "player": { "id": 37842773, "name": "player", "profileIconId": 548, "summonerLevel": 30, "revisionDate": 1368783726000 } } Now "player" is a variable (function parameter); how can I access the data? to get for example, only the id. body.summonner and body["player"] throw undefined. EDIT 1 (complete code): var request = require("request"); var api_key = 'example'; function getSummonerProfile(sum) { var summoner = sum.replace(/\s+/g, ''); request("https://na.api.pvp.net/api/lol/na/v1.4/summoner/by-name/" + summoner + "?api_key=" + api_key, function(error, response, body) { console.log(body.summoner.id); }); } getSummonerProfile("some player");
upvote count: 0
has comment: http://stackoverflow.com/comment/43615521
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27595879
has answer: http://stackoverflow.com/a/27595991
favorite count: 0
has comment: http://stackoverflow.com/comment/43615519
has comment: http://stackoverflow.com/comment/43615474
linked to: http://stackoverflow.com/q/4244896
answer count: 5
has answer: http://stackoverflow.com/a/27595875
has comment: http://stackoverflow.com/comment/43615563
tagged with: node.js
has answer: http://stackoverflow.com/a/27595848
possible better answer: http://stackoverflow.com/a/27595875
has title: JSON access variable field
downvote count: 1
has answer: http://stackoverflow.com/a/27595879
linked to: http://stackoverflow.com/q/6487167
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43615490
tagged with: http://stackoverflow.com/tag/json
score: -1
has comment: http://stackoverflow.com/comment/43615501

http://stackoverflow.com/a/27709968
answers question: http://stackoverflow.com/q/27629653
has body: unistd.h is a UNIX header file, not found by default on windows. Either replace unistd.h with io.h for almost the same coverage, or use the GNU windows port found here Related: Is there a replacement for unistd.h for Windows (Visual C)? Edit: I just compiled the module with #include &lt;unistd.h&gt; commented out successfully in file src/talib.cpp line 31
accepted answer of: http://stackoverflow.com/q/27629653
score: 2
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/50959406
type: Answer
upvote count: 2

http://stackoverflow.com/a/27552881
type: Answer
upvote count: 0
has comment: http://stackoverflow.com/comment/43532007
answers question: http://stackoverflow.com/q/27552806
score: -1
has body: The best way to check if something is a jQuery object (so you don't get any undefined errors) is like this: var user_role = $('#user_role option:selected').attr('id'); if (!user_role) { alert(intval(jQuery('#selected_role').val())); user_role = intval(jQuery('#selected_role').val()); }
has comment: http://stackoverflow.com/comment/43532047
downvote count: 1

http://stackoverflow.com/q/27603081
tagged with: javascript
has answer: http://stackoverflow.com/a/27603408
accepted answer: http://stackoverflow.com/a/27603408
score: 0
has title: Forcing to download files on all tags using jquery
has comment: http://stackoverflow.com/comment/43628444
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/43628390
tagged with: http://stackoverflow.com/tag/html
tagged with: php
type: AnsweredQuestion
type: Question
has body: I'm implementing a checkout process on digital content. When the user places the order, then I show him all the products that he has purchased along with the download link of each next to the product. My client wants that when success page is loaded then all the products should download automatically. Here are the code snippets: HTML code snippet of the page where there is download link of the product Some digital product name <a class='digital-download' href="<?php echo Yii::app()->request->getBaseUrl('true'); ?>/site/downloadfile/filename/<?php echo $digital_download['filename']; ?>">Click here download My PHP code for the action that initiates the download of file(downloadfile action): public function actionDownloadFile($filename) { $file = Yii::app()->request->getBaseUrl(true) . '/upload/digitaluploads/' . $filename; //file location header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="' . basename($file) . '"'); readfile($file); } Now since my client wants that all the files should download automatically when the page is loaded, I tried following using jQuery: $(document).ready(function() { $('.digital-download').each(function() { var download_link = $(this).attr("href"); window.location = download_link; }); }); The problem: It only initiates the download of first file and download of other files is not initiated. Moreover following jQuery event does not work at all: $(document).ready(function() { $('.digital-download').each(function() { $(this).click(); }); }); Any solutions?

http://stackoverflow.com/q/27602797
has comment: http://stackoverflow.com/comment/43628018
score: 0
has comment: http://stackoverflow.com/comment/43628232
answer count: 2
has title: Executing JavaScript code retrieved via AJAX?
tagged with: ajax
has answer: http://stackoverflow.com/a/27602882
has answer: http://stackoverflow.com/a/27602917
possible better answer: http://stackoverflow.com/a/27602882
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43628074
linked to: http://stackoverflow.com/q/13167403
accepted answer: http://stackoverflow.com/a/27602917
type: Question
has body: I've condensed my problem into the following sample code: <?php if($_GET['ajax']){ echo ' '; exit(); } ?> test What I'm trying to do is load in the JS script located at the top of the code into the web page and have it execute. The alert() executes fine, but I cannot get Hello Again! to show up. It is not executing that part of the script. Can someone help to explain why? Note that the use of a reference defined earlier (container) is vital to my problem, and a workaround involving a direct reference does not solve things for me. Thanks!
has comment: http://stackoverflow.com/comment/43627915
tagged with: javascript

http://stackoverflow.com/q/27549947
has title: Background-size:cover makes background image full-size instead of fitting to div
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/27550009
type: AnsweredQuestion
score: 2
downvote count: 0
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
has body: . Hello, I'm trying to figure out why when I use background-size: cover on an image that is placed as a div's background by javascript that the image does not shrink to the div's size but instead remains full-sized where only the part that is in the div is visible. I have thought about using the javascript to set the images attributes when it is set as the background image but that seems to be a hacky solution and not addressing the problem I am obviously making somewhere. Any help or insight as to where I'm going wrong would be greatly appreciated! Thank you so much! CSS: #module-background { text-align: center; height: 400px; width: 400px; margin: 0; padding: 0; font-size: 2em; color: #fff; background: #888; background-size: cover; background-repeat: no-repeat; background-attachment: fixed; } #module-background a { color: #fff; } #module-background h1 { font-size: 2em; padding: 0 0.3em; line-height: 1em; } #module-background p { padding: 0 1em; } #module-background section { min-height: 100%; text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; } HTML Dummy Text Current temperature and weather conditions
tagged with: css
accepted answer: http://stackoverflow.com/a/27550009
upvote count: 2
has comment: http://stackoverflow.com/comment/43526068
tagged with: background-image
tagged with: background

http://stackoverflow.com/a/27618317
score: 4
type: Answer
accepted answer of: http://stackoverflow.com/q/27618279
upvote count: 4
answers question: http://stackoverflow.com/q/27618279
has body: seconds = document.getElementById('countdown') You can't get an element from the DOM before you put the element in the DOM. The script runs before the body is loaded. Nothing that is added to the DOM in the body will be available to the script. Running the script when the document has finished loading avoids that issue.
downvote count: 0
type: AcceptedAnswer

http://stackoverflow.com/q/27526798
has comment: http://stackoverflow.com/comment/43483148
tagged with: css
has comment: http://stackoverflow.com/comment/43482813
has comment: http://stackoverflow.com/comment/43482111
score: 3
tagged with: internet-explorer
has comment: http://stackoverflow.com/comment/43500335
tagged with: internet-explorer-11
upvote count: 3
has title: css zoom not working in ie11
type: Question
has comment: http://stackoverflow.com/comment/43482331
has comment: http://stackoverflow.com/comment/43482416
tagged with: javascript
has comment: http://stackoverflow.com/comment/43483378
has comment: http://stackoverflow.com/comment/43483261
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/43483111
downvote count: 0
has answer: http://stackoverflow.com/a/27536445
favorite count: 0
has body: I'm building an app using angular. It is supposed to run on tablets and touch-enabled devices. I want to give the user the ability to zoom/scale up the app, for those with bad eyesight and clumsy fingers. To do this I'm using this script, which is executed when the user clicks a zoom-button: Here is the code &lt;!--code start --&gt; $scope.zoomLevel+= 0.1; $('body').css({ zoom: $scope.zoomLevel }); This works perfectly in chrome, but does nothing at all in IE11. I'm using twitter bootstrap, angular and jquery. When testing it in jsFiddle I'm perfectly able to use zoom in IE, so I'm guessing that me, or some third party library is setting a property that affects the zoom property in IE. What could this be? PS: I don't mind it not working in firefox. This app will always be run in IE11.
type: UnansweredQuestion

http://stackoverflow.com/comment/43396128
type: Comment
has text: If i toggle it (simply show / hide the shadow when i scroll) i won't have a progressive effect. I need the shadow to go from light grey to dark grey based on how much you have scrolled
comment on: http://stackoverflow.com/a/27481632
type: AnswerComment
score: 0

http://stackoverflow.com/q/27606055
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: asp.net
favorite count: 0
accepted answer: http://stackoverflow.com/a/27606647
has title: How to get all latitudes and longitudes from source place to destination place
score: 2
has comment: http://stackoverflow.com/comment/43634404
has answer: http://stackoverflow.com/a/27606647
upvote count: 2
has comment: http://stackoverflow.com/comment/43634309
has comment: http://stackoverflow.com/comment/43634434
has comment: http://stackoverflow.com/comment/43634285
has body: I want to get all the latitudes and longitudes from google map. For Example : suppose i have enter lat and lon of source and destination and the path is drawn on the map as below: so now i want all the lat and lon between this A source and B destination. and that all lat and lon have to store in the database. so when i track my car and that car are not moving on this path/way then at that it will fire some action like send me email etc. i am developing with asp.net c#. so how can i get the all the lat and lon ? i am using below script &lt;script&gt; function initialize() { var map = new google.maps.Map(document.getElementById('map_canvas'), { zoom: 8, center: new google.maps.LatLng(22.304634, 73.161070), mapTypeId: google.maps.MapTypeId.ROADMAP }), directions = new google.maps.DirectionsService(), displayer = new google.maps.DirectionsRenderer({ draggable: true }); displayer.setMap(map); directions.route({ origin: new google.maps.LatLng(22.304634, 73.161070), destination: new google.maps.LatLng(23.022242, 72.548844), travelMode: google.maps.DirectionsTravelMode.DRIVING }, function (result) { displayer.setDirections(result); }); } google.maps.event.addDomListener(window, 'load', initialize); google.maps.event.addListener(displayer, 'directions_changed', some_method); &lt;/script&gt;
type: AnsweredQuestion
tagged with: c#
has comment: http://stackoverflow.com/comment/43635656
linked to: http://stackoverflow.com/q/27619285
has comment: http://stackoverflow.com/comment/43634421
type: Question
has comment: http://stackoverflow.com/comment/43634771
tagged with: google-maps
has comment: http://stackoverflow.com/comment/43634365

http://stackoverflow.com/comment/43657867
has text: `load can be called on Body,iframe,img etc. but certainly not on div.` ***As a side note:*** you can bind onload event to the DIV if you wish to **capture onload event** of any of its children
type: Comment
score: 2
type: AnswerComment
comment on: http://stackoverflow.com/a/27618429

http://stackoverflow.com/comment/43569310
type: Comment
type: QuestionComment
has text: would you consider using `nth-child` everywhere?
score: 0
comment on: http://stackoverflow.com/q/27571808

http://stackoverflow.com/q/27590637
linked to: http://stackoverflow.com/q/27580106
has comment: http://stackoverflow.com/comment/43621157
linked to: http://stackoverflow.com/q/21394607
tagged with: php
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27599704
has body: I've posted some questions about Masonry on de Woocommerce shop page. Bottom line I had an image overlap issue. I found a solution at masonry desandro. I needed the imagesLoaded script. OK that works. The second problem I encountered was that the shopping cart was not visible on my pages, just the widget title. You can see here the post about that topic. I found with help that the issue was in the Masonry script as I had implement it. The way I did it came from a course on lynda.com. Here is the code: function twentytwelve_child_masonry() { if (!is_admin()) { wp_enqueue_script('masonry'); add_action('wp_footer', 'twentytwelve_child_add_masonry'); function twentytwelve_child_add_masonry() { ?&gt; &lt;script&gt; (function( $ ) { "use strict"; $(function() { //set the container that Masonry will be inside of in a var var container = document.querySelector('.products'); //create empty var msnry var msnry; // initialize Masonry after all images have loaded //-&gt; imagesLoaded( container, function() { msnry = new Masonry( container, { itemSelector: '.product', isAnimated: true }); }); //-&gt; }); }(jQuery)); &lt;/script&gt; &lt;?php } } } add_action('init', 'twentytwelve_child_masonry'); The two lines marked with //-> are responsiple for running or not running the imagesLoaded script. However when this imagesLoaded script runs the masonry works perfect, the woocommorce cart widget is not. When the imagesLoaded script is commented out, de masonry is a mess (overlapping images) but the woocommerce cart widget works lik a charm. Anyone an idea? I'm e bit of a newbie so any help is much appreciated. EDIT See updated code below. function script_imagesLoaded (){ wp_register_script ('images_loaded' , get_stylesheet_directory_uri() . '/js/imagesloaded.js' , Array() , '3.1.8' ,true); wp_enqueue_script ('images_loaded'); } add_action('init' , 'script_imagesLoaded'); function twentytwelve_child_masonry() { if (!is_admin()) { wp_enqueue_script('masonry'); add_action('wp_footer', 'tw…
has title: Masonry an Woocommerce Cart widget conflict?
has comment: http://stackoverflow.com/comment/43612238
has answer: http://stackoverflow.com/a/27599704
has comment: http://stackoverflow.com/comment/43612199
has answer: http://stackoverflow.com/a/27615971
type: Question
tagged with: masonry
tagged with: woocommerce
has comment: http://stackoverflow.com/comment/43621044
tagged with: javascript
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/27615971
tagged with: jquery

http://stackoverflow.com/comment/43898243
score: 0
type: Comment
has text: @ceadreak I am using the same code and its successfully running on my local and server.
comment on: http://stackoverflow.com/a/27636743
type: AnswerComment

http://stackoverflow.com/q/27548498
has comment: http://stackoverflow.com/comment/43523440
answer count: 2
has answer: http://stackoverflow.com/a/27552858
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: jquery-events
possible better answer: http://stackoverflow.com/a/27548688
has body: I have a &lt;div&gt; with id="modal" generated dynamically with the jQuery load() method: $(".show-product").click(function(){ $("#modal").load($(this).attr("href"), function(e){ $(".details").click(function(){ I had to put the code in the click event of the class '. detail' within this code, because if what I had was not running. I have the code in both places, since I also use it outside of the modal, being doubled. Something similar happens to me with a table that I build dynamically, thanks to an example that I saw here, Stack Overflow. It does not capture the click event, the window darkens as when it opens the modal, but it does not call the url or load. This code: $.ajax({ url : form, type: "POST", data : postData, success:function(data, textStatus, jqXHR){ $("#dynamicTable&gt;tbody&gt;tr").remove(); var x = []; $.each(dataSet, function(i, item) { x.push('&lt;tr&gt;&lt;td&gt;&lt;a href="/product/' + item.product.id + '" class="details" data-toggle="modal" data-target="#modal"&gt;' + item.product.name + '&lt;/a&gt;&lt;/td&gt;'); x.push('&lt;td&gt;' + item.product.name + '&lt;/td&gt;&lt;/tr&gt;'); }); $("#dynamicTable&gt;tbody").html(x.join("")); }, error: function(jqXHR, textStatus, errorThrown){ alert('Not product found!'); } }); event.preventDefault() I think that in both cases events is not working because they are loaded dynamically. I was looking for here and on Google and try to make changes but it does not work without having to duplicate code (in the event $(document).ready and at each event that loads data dynamic, the modal window and load table). Changes: $(document).ready(function() { //$(".show-product").click(function(){ $(".show-product").on("click", function(e){ $("#modal").load($(this).attr("href"), function(e){ //$('.details').click(function(e){ // ........ }); }); // Added $(".details").on("click", function(e){ .......... .......... }); }); With these changes still do not work, only works in pages with static content, when I get to have the …
has answer: http://stackoverflow.com/a/27548688
has title: Events triggered by dynamically generated element are not working
accepted answer: http://stackoverflow.com/a/27552858
tagged with: twitter-bootstrap
upvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43532052
score: 1
type: Question

http://stackoverflow.com/q/27537927
tagged with: mysql
has answer: http://stackoverflow.com/a/27537980
accepted answer: http://stackoverflow.com/a/27537980
type: Question
score: 0
has comment: http://stackoverflow.com/comment/43504159
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/43504143
has title: JavaScript Variable Passed onClick to Function is Undefined
has body: I am trying to write a simple vote script with PHP, JavaScript, and MySQL. When passing the variable from the href onclick paramenter to the javascript function I get an 'undefined' error, I believe referring to the variable. My PHP looks like this: echo "&lt;td class=\"uparrow\"&gt;&lt;a href=\"javascript:void(0);\" onclick=\"upVote.call(". $row['serial'] ."); return false;\"&gt;&amp;#8689;&lt;/a&gt;&lt;/td&gt;"; Which generates HTML like this: &lt;td class="uparrow"&gt;&lt;a href="javascript:void(0);" onclick="upVote.call(16); return false;"&gt;&amp;#8689;&lt;/a&gt; And the function looks like this: function upVote(str) { if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200) { document.getElementById("report_status").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","up_vote.php?serial="+str,true); xmlhttp.send(); } When the upVote(str) function calls the up_vote.php, the variable is not being passed to PHP for some reason. The upVote PHP looks like this and functions fine when access directly through a URL: &lt;?php // Create Connection $dbconnect=mysqli_connect("127.0.0.1","user","pass","table"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } else { // echo "Connection Sucessful&lt;BR&gt;&lt;BR&gt;"; } // escape variables for security if (isset($_GET['serial'])) { $serial = mysqli_real_escape_string($dbconnect, $_GET['serial']); } // define SQL call and fetch the result $sql = "SELECT vote FROM urls WHERE serial = $serial"; $result = mysqli_query($dbconnect,$sql); if (!$result) { die('Select Error: ' . mysqli_error($dbconnect)); } //echo $sql . "&lt;BR&gt;"; // for error checking the SQL call while($row = mysqli_fetch_array($result)) { $return = $row['vote']+1; } ec…
tagged with: php
type: AnsweredQuestion

http://stackoverflow.com/a/27633828
score: 0
answers question: http://stackoverflow.com/q/27633639
has body: The difference is important at the prototype level. An object in javascript has a prototype chain. In this way you can see an object as an inheritor of each of its prototype. In the first case you have no prototype chain so no possible inheritance. Take a look at: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Introduction_to_Object-Oriented_JavaScript
type: Answer
has comment: http://stackoverflow.com/comment/43687362
has comment: http://stackoverflow.com/comment/43687260

mongoose
tags question: http://stackoverflow.com/q/27567786
type: Tag
tags question: http://stackoverflow.com/q/27609414
tag name: mongoose
tags question: http://stackoverflow.com/q/27619435
tags question: http://stackoverflow.com/q/27636364
tags question: http://stackoverflow.com/q/27583681
tags question: http://stackoverflow.com/q/27570708
tags question: http://stackoverflow.com/q/27527391
tags question: http://stackoverflow.com/q/27595602
tags question: http://stackoverflow.com/q/27609144
tags question: http://stackoverflow.com/q/27553941
tags question: http://stackoverflow.com/q/27566647
tags question: http://stackoverflow.com/q/27584564
tags question: http://stackoverflow.com/q/27582112
tags question: http://stackoverflow.com/q/27538428
tags question: http://stackoverflow.com/q/27577099
tags question: http://stackoverflow.com/q/27497432
tags question: http://stackoverflow.com/q/27476835
tags question: http://stackoverflow.com/q/27477321

http://stackoverflow.com/a/27535621
score: 3
downvote count: 0
has body: When constructing the child (Piece) pass it the current Board (this) so that it has a reference to the board it is part of. function Board(){ ... this.allPieces.push(new Piece(this, i)); ... } // You will also need to store this reference function Piece(parentBoard, index) { ... this.board = parentBoard; ... } // Now you can use the reference to your parent to make calls Piece.prototype.pieceClicked = function(){ this.board.makeSelection(this); }
type: Answer
answers question: http://stackoverflow.com/q/27535520
upvote count: 3

http://stackoverflow.com/q/27594962
score: 0
type: Question
accepted answer: http://stackoverflow.com/a/27653571
tagged with: javascript
tagged with: dc.js
tagged with: crossfilter
answer count: 1
has title: Grouping samples based on value dependent on one field
has answer: http://stackoverflow.com/a/27653571
type: AnsweredQuestion
has body: I'm having problems with grouping samples based on computation done against the value of one field. The samples are in the form of { "dataset": "DATASET2", "sampleid": "ID2653", "variables": { // several variables, key: val }, "bmus": { "x": 3, "y": 7 } } The samples belong to a cell in a static 9x7 grid and bmus field maps the location of a sample in the grid. Circle-shaped filters can be moved on top of the grid, and after moving the circle filters I want to be able to group together samples that are located inside the circle. The grouping would be in the form of { "key": { "circles": ["circle1", "circle2"] // or [], ['circle1'], ['circle2'] }, "value": 282 } and after that a custom reduce function would be applied to compute values based on the values of some variables. My current setup for creating the dimension and grouping is the following: $scope.dimension = crossfilterInst.dimension( function(d) { return { bmu: d.bmus, valueOf: function() { var ret = _.isUndefined(d.bmus) ? String(constants.nanValue) + "|" + String(constants.nanValue) : d.bmus.x + "|" + d.bmus.y; // for NaN's the result is "-100|-100", otherwise in the form of "5|4" return ret; } }; }); var group = $scope.dimension.group( function(d) { return { circles: function() { return FilterService.inWhatCircles(d.bmu); }, valueOf: function() { return String(this.circles()); } }; }); At first, the groupings of group.all() are correct. Later, when the circle filters are moved on the grid, thus affecting the selected amount of samples by applying a filterFunction to another dimension of the crossfilterInst and thereby affecting the return value from FilterService.inWhatCircles(), the groups returned from group.all() have increasingly incorrect sample counts. Initially I thought that the return value of FilterService.inWhatCircles() would be incorrect at some cases. After a long debug I noticed that if I recreate the dimension (dispose the old one + run the same code that creates $scope.dimension) and then…

http://stackoverflow.com/a/27481474
answers question: http://stackoverflow.com/q/27481241
type: Answer
has body: You can use both according to your requirement. look into this post for what exactly the difference between the two What is the difference between null and undefined in JavaScript?. Undefined means a variable has been declared but has no value: var item; alert(item); //undefined alert(typeof item); //undefined Null is an assignment: var item= null; alert(item); //null alert(typeof item); //object
score: 0

http://stackoverflow.com/comment/118009979
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27490168
type: Comment
has text: You can't do recursion forever.

http://stackoverflow.com/q/27521784
has comment: http://stackoverflow.com/comment/43472923
tagged with: javascript
tagged with: post
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/43472941
has comment: http://stackoverflow.com/comment/43473038
has answer: http://stackoverflow.com/a/27521949
has title: Javascript Post error
has comment: http://stackoverflow.com/comment/43472927
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27521874
has answer: http://stackoverflow.com/a/27521874
has answer: http://stackoverflow.com/a/27521880
accepted answer: http://stackoverflow.com/a/27521880
has body: Hello guys i have a weird problem with my javascript code. $.ajax({ url : "http://requestb.in/1k8rvk71", type: "POST", data : formData, success: function(){ alert('success'); }, error: function(kl){ alert(kl); } }); First of all it is succesfully posting the formData but i dont why its executing the error function and it alerts "[object Object]"
type: Question
linked to: http://stackoverflow.com/q/20034352

http://stackoverflow.com/q/27596005
linked to: http://stackoverflow.com/q/2860394
tagged with: javascript
has comment: http://stackoverflow.com/comment/43615882
downvote count: 4
answer count: 3
duplicate of: http://stackoverflow.com/q/2860394
has answer: http://stackoverflow.com/a/27596017
has title: jQuery - difference between '.' and '#'
tagged with: jquery
has body: This is hard to Google so I figure someone has got to ask it on here: What is the difference between $('.sportText').text('new text added'); $('#sportText2').text('new text added2'); I don't understand what the difference is between the . notation and the # notation ?
favorite count: 0
has comment: http://stackoverflow.com/comment/43615898
has comment: http://stackoverflow.com/comment/43616911
has answer: http://stackoverflow.com/a/27596033
score: -3
has comment: http://stackoverflow.com/comment/43615884
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43616569
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/27596033
possible better answer: http://stackoverflow.com/a/27596015
has answer: http://stackoverflow.com/a/27596015
has comment: http://stackoverflow.com/comment/43615888

http://stackoverflow.com/comment/43650166
has text: sounds like form is submitting which would cause redirect. Show your form submit code. Actually don't see why it submits since only button shown in form is a type=button.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27614072
type: Comment

http://stackoverflow.com/q/27532922
has body: I am trying this code on the Firefox console, and I don't know how to get the correct answer(0.11). I would like to understand why this code doesn't work as I expected. Can someone help me understand. Thanks! var a = "12,25"; var b = "12,14"; console.log("A: " + a); console.log("B: " + b); var parsedA = parseFloat(a.replace(',', '.')); var parsedB = parseFloat(b.replace(',', '.')); console.log('Parsed A: ' + parsedA); console.log('Parsed B: ' + parsedB); console.log("Dif Parsed Float: " + (parsedA - parsedB)); var numberA = Number(a.replace(',', '.')); var numberB = Number(b.replace(',', '.')); console.log('Number A: ' + numberA); console.log('Number B: ' + numberB); console.log("Dif Number: " + (parsedA - parsedB));
duplicate of: http://stackoverflow.com/q/588004
type: AnsweredQuestion
type: Question
has title: Javascript Decimal Subtract
tagged with: javascript
linked to: http://stackoverflow.com/q/588004
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/27532968
accepted answer: http://stackoverflow.com/a/27532968
has comment: http://stackoverflow.com/comment/43494320
has comment: http://stackoverflow.com/comment/43494357

http://stackoverflow.com/q/27567699
score: 0
has body: I am trying to code a game which calls an external .js script when the button is clicked. The code works the way I want it to, but I am a little confused about how to get the output into HTML so that it can be formatted properly. The button should restart the process whenever it is clicked (i.e. without having to reload the page), so that there is a new random selection made. I eventually want to also include a button to remove the last-displayed item, but that is for later.... Javascript: var basket = ['apple', 'banana', 'cherry', 'durian', 'eggplant', 'fig', 'grapes', 'huckleberry', 'kiwi', 'lemon', 'mango']; function randOrd(){ return (Math.round(Math.random())-0.5); } mixedBasket = basket.sort( randOrd ); //randomize the array var i = 0; // the index of the current item to show fruitDisplay = setInterval(function() { document .getElementById('fruit') .innerHTML = mixedBasket[i++]; // get the item and increment if (i == mixedBasket.length) i = 0; // reset to first element if you've reached the end }, 70); //speed to display items var endFruitDisplay = setTimeout(function( ) { clearInterval(fruitDisplay); }, 3000); //stop display after x milliseconds The current HTML obviously runs the code, but it starts before the button is clicked. HTML: &lt;head&gt;&lt;script type="text/javascript" src="Fruitpicker3.js"&gt;&lt;/script&gt;&lt;/head&gt; &lt;body&gt; &lt;span id = "fruit"&gt; &lt;/span&gt; &lt;input type="button" onclick="fruit" value="Start"/&gt; &lt;/body&gt; &lt;/html&gt; Thanks in advance for your help!
has answer: http://stackoverflow.com/a/27567813
accepted answer: http://stackoverflow.com/a/27567813
type: AnsweredQuestion
type: Question
has title: Button calling ID from External Script
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/27589030
type: Answer
answers question: http://stackoverflow.com/q/27589013
score: 0
has body: I suppose you're wanting to wrap words with tag. You can do the below using html with function overload and replacing words with regex. $0 means the matched word. jQuery('.product').each(function() { $(this).html(function() { return $(this).text().replace(/\w+/g, "$0"); }); });

http://stackoverflow.com/q/27522537
downvote count: 0
tagged with: javascript
has title: How to add a relationship or reference with AutoForm in Meteor?
answer count: 3
has answer: http://stackoverflow.com/a/27522986
has answer: http://stackoverflow.com/a/33020991
tagged with: meteor
favorite count: 0
tagged with: simple-schema
has body: I use meteor-autoform to insert documents in a collection. My Items has a field groupId. How can I insert this group id when I'm submitting my item form. {{#autoForm type="insert" collection=Collections.Items}} {{> afQuickField name="name"}} Add item Reset Form {{/autoForm}} I could create another field containing my group id but I don't want the user to see this field. How can I set the groupId "behind the scenes"?
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/27523045
tagged with: meteor-autoform
score: 1
has comment: http://stackoverflow.com/comment/46815923
type: Question

http://stackoverflow.com/a/27490172
upvote count: 0
has body: You should use getElementById and give an ID to your element, like &lt;form method="post" action="sorteo.php" name="form" id="form1"&gt; then use document.getElementById("form1");
type: Answer
downvote count: 1
answers question: http://stackoverflow.com/q/27490053
score: -1

http://stackoverflow.com/a/27543803
type: AcceptedAnswer
upvote count: 3
has comment: http://stackoverflow.com/comment/43515355
type: Answer
has body: You can do this using javascript trim() function. First name:
accepted answer of: http://stackoverflow.com/q/27543671
score: 3
downvote count: 0
answers question: http://stackoverflow.com/q/27543671

http://stackoverflow.com/q/27482472
type: AnsweredQuestion
score: 3
type: Question
has title: css :after not appearing in firefox
tagged with: firefox
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I have a tabbed paged in which there is an arrow after the selected tab. In chrome and ie this works fine. But in Firefox the element does not appear. Is some reason why firefox does not render this css? How would i fix the issue with firefox? li.current::after { color: transparent; content: ""; position: absolute; bottom: -15px; left: 0; right: 0; margin: auto; border-width: 15px 15px 0px; /* background-position-y: -100px; */ border-style: solid; /* border-color: #30B3EE transparent; */ background-image: url('[binary]')!important; background-position-x: -49px; width: 0; } My jsfiddle: http://jsfiddle.net/okwhyrpc/10/
has answer: http://stackoverflow.com/a/27482608
accepted answer: http://stackoverflow.com/a/27482608
tagged with: css
upvote count: 3

angularjs-ng-click
tags question: http://stackoverflow.com/q/27605863
type: Tag
tag name: angularjs-ng-click

http://stackoverflow.com/comment/43437211
comment on: http://stackoverflow.com/a/27502986
has text: @saru now it should work(I have tested it on localhost)
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27542186
answer count: 0
upvote count: 2
type: UnansweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/43514230
tagged with: google-chrome
downvote count: 1
has comment: http://stackoverflow.com/comment/43512377
type: Question
has comment: http://stackoverflow.com/comment/43512044
has comment: http://stackoverflow.com/comment/43512001
tagged with: google-chrome-devtools
has comment: http://stackoverflow.com/comment/43514157
has comment: http://stackoverflow.com/comment/43513741
has title: Connect external js lib to chrome event page
has body: EDIT - problem solved. I just not reloaded extension properly after changing my manifest. Shame on me. I'm trying to connect some libs like JQuery to my background.js in chrome extension. Well, I found lots of tips how to do it, but I receive an error. My manifest.json: { "manifest_version": 2, "name": "Chrome WM", "version": "0.1", "content_scripts": [{ "matches": ["http://*/*","https://*/*"], "js": [ "s/jquery-1.11.1.min.js", "s/jquery.soap.js" ] }], "background": { "scripts": ["s/jquery-1.11.1.min.js", "s/jquery.soap.js", "background.js"], "persistent": false }, "permissions": [ "tabs", "activeTab", "http://192.168.10.150:801/*" ] } I probably don't need "content_scripts" section, but just in case. My background.js: function siteChanged(activeInfo) { if (jQuery) { console.log("Jquery on"); } else { console.log("Jquery off"); } // Lots of things here } chrome.tabs.onActivated.addListener(siteChanged); Okay, if I remove this "if (JQuery)" thing whole script works fine, but if not I'm receive such error when event occured: Error in event handler for tabs.onActivated: ReferenceError: jQuery is not defined at siteChanged (chrome-extension://flhbfgingimkoknegkcnchnhjdmnhcji/background.js:6:6) There IS jquery-1.11.1.min.js script in s folder relatively background.js file, and if I create html page beside this background script, grab this jquery-1.11.1.min.js and check if it connected properly - all fine. What I doing wrong?
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/43511760
has comment: http://stackoverflow.com/comment/43516453
tagged with: google-chrome-extension

http://stackoverflow.com/comment/43693217
comment on: http://stackoverflow.com/a/27636888
type: AnswerComment
has text: This is working. But select box is taking 2 empty value.
score: 0
type: Comment

http://stackoverflow.com/q/27493713
has comment: http://stackoverflow.com/comment/43419444
has answer: http://stackoverflow.com/a/27493946
tagged with: angularjs
has answer: http://stackoverflow.com/a/27493887
possible better answer: http://stackoverflow.com/a/27493946
has title: Angular $scope values set in reverse order
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27493954
type: Question
tagged with: javascript
has body: I have been working on Angular for one month now. I have been struggling with scoping and keeping state between views. I don't know how to debug in angular, so I use the console to track the values of the scope when a view is loaded. This is one of my controllers: .controller('LegDetailCtrl',function($scope,$stateParams, LegService,ControllerService){ $scope.reservation = ControllerService.getReservation(); LegService.getLeg($stateParams.legId).then(function(data){ ControllerService.setLeg(data.data); $scope.leg = data.data; console.log('Check leg',angular.toJson($scope.leg)); }); $scope.seats = LegService.getSeats(); $scope.pax = LegService.getPax(); $scope.user = ControllerService.getUser(); $scope.reservation.leg = $scope.leg; $scope.reservation.client = $scope.user; $scope.reservation.pax = $scope.pax; console.log('Check scope leg', angular.toJson($scope.leg)); }) As I understand, in JS the execution is made in order from top to bottom (not sure of this). I think this way, I am processing and then setting the $scope.leg value, then I use it to feed the $scope.reservation object. To me, the correct console output would be: log Check leg, {aJsonObject} log Check scope leg, {anotherJsonObject} But what I get is this: log Check scope leg, log Check leg, {aJsonObject} So, it looks like it sets all the values to the scope and then, executes the LegService.getLeg() method. How do I make this to run in the correct order? Thanks in advance.
score: 0
has comment: http://stackoverflow.com/comment/43419959
answer count: 3
accepted answer: http://stackoverflow.com/a/27493954

http://stackoverflow.com/a/27489505
accepted answer of: http://stackoverflow.com/q/27487937
answers question: http://stackoverflow.com/q/27487937
score: 1
upvote count: 1
has body: The solution in this thread works for me. Here is the updated code of the plugin: Line 888 and 895 in boostrapt-select.js selectAll: function () { this.findLis(); this.$lis.not('.divider').not('.disabled').not('.selected').not('.hide').find('a').click(); }, deselectAll: function () { this.findLis(); this.$lis.not('.divider').not('.disabled').filter('.selected').not('.hide').find('a').click(); }, Note the change .filter(':visible') is now .not('.hide')
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/43588728
type: Comment
type: QuestionComment
has text: Nope, I just went straight to the array... I haven't thought of a counter. And I'm overall new to programming and to javascript.
score: 0
comment on: http://stackoverflow.com/q/27582160

http://stackoverflow.com/q/27537677
has answer: http://stackoverflow.com/a/27537686
answer count: 5
upvote count: 23
tagged with: indices
type: AnsweredQuestion
score: 23
linked to: http://stackoverflow.com/q/12766422
accepted answer: http://stackoverflow.com/a/27537742
type: Question
has answer: http://stackoverflow.com/a/27537765
has body: I had a generic question about JavaScript arrays. Are array indices in JavaScript internally handled as strings? I read somewhere that because arrays are objects in JavaScript, the index is actually a string. I am a bit confused about this, and would be glad for any explanation.
tagged with: arrays
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/27538227
has title: Is a JavaScript array index a string or an integer?
has answer: http://stackoverflow.com/a/27537702
possible better answer: http://stackoverflow.com/a/27537686
has answer: http://stackoverflow.com/a/27537742

http://stackoverflow.com/comment/43594191
score: 0
comment on: http://stackoverflow.com/q/27584439
type: Comment
type: QuestionComment
has text: @JaredSmith: Kinda. More magic is involved, as arrays are actual objects that can hold other (non-numeric) properties that would need to be stored somewhere as well - in contrast to immutable primitives.

http://stackoverflow.com/a/27550462
type: Answer
answers question: http://stackoverflow.com/q/27550416
score: 0
has body: %5B%5D is [] when decoded, its your square brackets try: $.get("getdataforcharts", {q: "test"}, function (response) { alert( "success" ); }).done(function() { alert( "second success" ); });

http://stackoverflow.com/q/27497718
linked to: http://stackoverflow.com/q/7237865
type: Question
answer count: 2
has body: This existing answer is an excellent piece of code that very nearly does what I want. Like the OP in that questions I want HTML tags to be split, but based on a tag rather than an offset, and bounded by an item that should not be split. That is, I want to turn this: hi there, how are y ou doing today? into this: hi there, how are y ou doing today? I'm still getting my head around javascript so while I had a play with the jsbin provided by @Hemlock I couldn't get it to do what I intended. The given answer was: function splitNode(node, offset, limit) { var parent = limit.parentNode; var parentOffset = getNodeIndex(parent, limit); var doc = node.ownerDocument; var leftRange = doc.createRange(); leftRange.setStart(parent, parentOffset); leftRange.setEnd(node, offset); var left = leftRange.extractContents(); parent.insertBefore(left, limit); } function getNodeIndex(parent, node) { var index = parent.childNodes.length; while (index--) { if (node === parent.childNodes[index]) { break; } } return index; }
downvote count: 0
tagged with: javascript
has title: Splitting node content in JavaScript DOM -
has answer: http://stackoverflow.com/a/27498178
upvote count: 3
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/27498967
favorite count: 0
has answer: http://stackoverflow.com/a/27498967
type: AnsweredQuestion
score: 3
accepted answer: http://stackoverflow.com/a/27498178

requirejs
tags question: http://stackoverflow.com/q/27491195
tag name: requirejs
tags question: http://stackoverflow.com/q/27503293
type: Tag
tags question: http://stackoverflow.com/q/27492343
tags question: http://stackoverflow.com/q/27491841
tags question: http://stackoverflow.com/q/27489157
tags question: http://stackoverflow.com/q/27568461
tags question: http://stackoverflow.com/q/27592998
tags question: http://stackoverflow.com/q/27606879
tags question: http://stackoverflow.com/q/27593123
tags question: http://stackoverflow.com/q/27477885
tags question: http://stackoverflow.com/q/27494544
tags question: http://stackoverflow.com/q/27482394
tags question: http://stackoverflow.com/q/27499642
tags question: http://stackoverflow.com/q/27574328
tags question: http://stackoverflow.com/q/27631022
tags question: http://stackoverflow.com/q/27475903
tags question: http://stackoverflow.com/q/27557674
tags question: http://stackoverflow.com/q/27516505
tags question: http://stackoverflow.com/q/27621187
tags question: http://stackoverflow.com/q/27573073
tags question: http://stackoverflow.com/q/27537588
tags question: http://stackoverflow.com/q/27545645
tags question: http://stackoverflow.com/q/27533392
tags question: http://stackoverflow.com/q/27547784

http://stackoverflow.com/q/27486757
score: 0
answer count: 2
tagged with: javascript
favorite count: 0
has body: I have the following text text(-) 3 Which I want to change into: -3 So I wrote the following regular expression: 'text(-) 3'.replace(/text\((?:[^\)]+)\)/g, RegExp.$1); DEMO - which doesn't work. However, when I do the following var output = 'text(-) 3'.replace(/text\(([^\)]+)\)/g, RegExp.$1); output = 'text(-) 3'.replace(/text\((?:[^\)]+)\)/g, RegExp.$1); (So in the first I've removed the ?:) it works DEMO So there must be something I've missed with grouping matches with regular expressions (or just something stupid). Any help would be appreciated!?
has answer: http://stackoverflow.com/a/27487300
tagged with: regex
possible better answer: http://stackoverflow.com/a/27487189
has comment: http://stackoverflow.com/comment/43405424
has answer: http://stackoverflow.com/a/27487189
upvote count: 1
has comment: http://stackoverflow.com/comment/43405354
downvote count: 1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27487300
has title: Weird javascript regexp replace issue
type: Question

http://stackoverflow.com/q/27604956
upvote count: 0
type: Question
tagged with: laravel-4
tagged with: javascript
score: -1
has title: Show alert popup 5 mins before a specific time
has comment: http://stackoverflow.com/comment/43632081
has answer: http://stackoverflow.com/a/27605210
has body: Currently i am developing and an Schedule appointment module and in that there is an feature to show an alert to the user 5 mins before appointment time , for example the appointment is scheduled @5pm today then the user should be notified with the alert or popup @4:55 pm that the meeting is due in 5 mins. I am using PHP and javascript for this project and True Vault to save the data in database which is in No - Sql , So just needed to know what is the best way to achieve this without using the cronjobs or features similar to that. Thanks for any kind of help...
downvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/43632131
favorite count: 0
type: UnansweredQuestion
tagged with: php
tagged with: nosql

http://stackoverflow.com/q/27581031
tagged with: facebook
has title: facebook picture displayed by angularjs but warning error in console
downvote count: 1
type: Question
has body: I made a angularjs app where i displayed facebook profile picture, like this : &lt;div class="avatar"&gt; &lt;img src="http://graph.facebook.com/{{comment.from.id}}/picture" /&gt; &lt;/div&gt; Picture is correctly displayed: like http://graph.facebook.com/4/picture But in console there is a error : GET http://graph.facebook.com/%7B%7Bcomment.from.id%7D%7D/picture 404 (Not Found) So, because the picture have a redirection, this error is normal ?
has comment: http://stackoverflow.com/comment/43586451
tagged with: javascript
score: -1
linked to: http://stackoverflow.com/q/26243057
upvote count: 0
answer count: 1
tagged with: facebook-graph-api
duplicate of: http://stackoverflow.com/q/26243057
favorite count: 0
has answer: http://stackoverflow.com/a/27581058
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/comment/43558490
type: AnswerComment
score: 0
type: Comment
has text: thank you :) i moved on before your update and did almost same think as shown in your update (by the way converting complex javascript array to string and pass it to server is really good idea :) ).
comment on: http://stackoverflow.com/a/27566420

http://stackoverflow.com/comment/43573362
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27573417
type: Comment
has text: var names = ""; getJSONP('https://api.angel.co/1/search?query=barack&type=User&callback=?', function(data){ for (var ii = 0; ii < data.length; ii++) { names += data[ii].name;document.write('append'); } document.write(names); });

http://stackoverflow.com/q/27630408
type: UnansweredQuestion
tagged with: regex
has comment: http://stackoverflow.com/comment/43686320
linked to: http://stackoverflow.com/q/18914629
has answer: http://stackoverflow.com/a/27633223
duplicate of: http://stackoverflow.com/q/18914629
upvote count: 1
has body: I'm having a little difficulty with a regex for javascript; Heres my fiddle: http://jsfiddle.net/6yhwzap0/ The function I have created is: var splitSentences = function(text) { var messy = text.match(/\(?[^\.\?\!]+[\.!\?]\)?/g); var clean = []; for(var i = 0; i &lt; messy.length; i++) { var s = messy[i]; var sTrimmed = s.trim(); if(sTrimmed.length &gt; 0) { if(sTrimmed.indexOf(' ') &gt;= 0) { clean.push(sTrimmed); } else { var d = clean[clean.length - 1]; d = d + s; var e = messy[i + 1]; if(e.trim().indexOf(' ') &gt;= 0) { d = d + e; i++; } clean[clean.length - 1] = d; } } } return clean; }; I get really good results with text.match(/\(?[^\.\?\!]+[\.!\?]\)?/g); my big issue is that if a string has a quote after the period it is added to the next sentence. So for example the following: "Hello friend. My name is Mud." Said Mud. Should be split into the following array: ['"Hello friend.', 'My name is Mud."', 'Said Mud.'] But instead it is the following: ['"Hello friend.', 'My name is Mud.', '" Said Mud.'] (See the quote in the 'Said Mud' string) Can anyone help me with this OR point me to a good JavaScript library that can split text into Paragraphs, Sentences and Words? I found blast.js but I am using Angular.js and it did not integrate well at all.
has answer: http://stackoverflow.com/a/27630490
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27633315
tagged with: javascript
linked to: http://stackoverflow.com/q/11761563
score: 0
answer count: 3
has title: JS RegEx to split text into sentences
favorite count: 0

http://stackoverflow.com/comment/138051141
has text: Do you mean "meters" in the context of the Mercator Projection, or do you mean "meters" in the context of a spherical Earth?
comment on: http://stackoverflow.com/q/27545098
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27533703
tagged with: asynchronous
answer count: 0
type: UnansweredQuestion
tagged with: sockets
upvote count: 1
has comment: http://stackoverflow.com/comment/43496531
score: 1
has title: How to read all the available data from a WinRT StreamSocket and empty the inputStream?
has comment: http://stackoverflow.com/comment/43525939
type: Question
has comment: http://stackoverflow.com/comment/43496033
has body: I want to read all the data that is currently waiting on a socket before writing new data to it. The reading methods in WinRT are all async so I cannot simply while until the socket is empty. Since I do want to discard the data on the socket, I do not want to use a reader, but straight read the data from the IInputStream of the socket. Something like this pseudo code: function emptySocket(inputStream, timeout, buffer) { if (!buffer) { buffer = new Windows.Storage.Streams.Buffer(4096); } WinJS.Promise.timeout(timeout, inputStream.readAsync(buffer, 4096, Windows.Storage.Streams.InputStreamOptions.partial) .then(function(buffer) { if (buffer.length === 0) return; emptySocket(inputStream, timeout, buffer); }), function (error) { return; }); } The timeout is there to break the wait operation when nothing is on the socket any more. Windows.Storage.Streams.InputStreamOptions.partial does not seem to return if nothing is on the socket. btw: Whats the difference between Windows.Storage.Streams.InputStreamOptions.partial and Windows.Storage.Streams.InputStreamOptions.readAhead?
downvote count: 0
tagged with: javascript
tagged with: windows-runtime
favorite count: 0
has comment: http://stackoverflow.com/comment/43498921
has comment: http://stackoverflow.com/comment/43534078
has comment: http://stackoverflow.com/comment/43502656

http://stackoverflow.com/comment/43631314
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27604419
type: AnswerComment
has text: btw, it works if the id value is very small like 1,2,3... But it was showing error in inspect element as uncaught error, coz my id is system-uuid which is like this - 402837814a720bb2014a72644e3f0001. I assume this is due to large size of id, is there any way to increate the size of id in script?

http://stackoverflow.com/comment/44016123
type: AnswerComment
has text: Have you seen http://stackoverflow.com/questions/15905652/workaround-for-ie10-setinterval-memory-leak/15919452#15919452?
type: Comment
score: 2
comment on: http://stackoverflow.com/a/27585754

http://stackoverflow.com/comment/43616035
type: QuestionComment
score: 3
has text: Can I just say: best title ever.
comment on: http://stackoverflow.com/q/27596098
type: Comment

http://stackoverflow.com/q/27500837
has answer: http://stackoverflow.com/a/27500982
tagged with: javascript
score: 0
answer count: 2
linked to: http://stackoverflow.com/q/10411833
has body: I have requirement to get the decimal values from string if it exists otherwise null, how can do that in javascript, the below are possibilities values i want to get the decimal value. 6Pay-30D 3Pay-30D 19.95-1st Pay Amount 3Pay-30D SH3Pay
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27501097
has comment: http://stackoverflow.com/comment/43432370
has title: javascript regular expression find decimal values
type: Question

http://stackoverflow.com/a/27619278
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/27619242
answers question: http://stackoverflow.com/q/27619242
has body: you can simply do parseInt(325.6899);

http://stackoverflow.com/q/27581199
has title: Real-time basic web analytics with Javascript
has comment: http://stackoverflow.com/comment/44738629
has body: I need to develop an in-house real-time analytics solution (similar to GA or mixpanel for example) that collects: Information from the website itself ­­(URL) Information from the user’s browser ­­(lang, device, OS etc..) Information from the referring source etc.. .. and sends this data to the server with a single-pixel image request. Similar to how GA and other solutions work: Google Analytics works by the inclusion of a block of JavaScript code on pages in your website. When users to your website view a page, this JavaScript code references a JavaScript file which then executes the tracking operation for Analytics. The tracking operation retrieves data about the page request through various means and sends this information to the Analytics server via a list of parameters attached to a single-pixel image request. I wonder if there's any open source project available that does this part which I could use as base to build further. There's Piwik but its too feature-packed and too heavy for my requirement. Edited to add: I'm doing something specific with the data, otherwise I'd just use the existing solutions.
has comment: http://stackoverflow.com/comment/43589284
has comment: http://stackoverflow.com/comment/43590636
has answer: http://stackoverflow.com/a/28121421
has answer: http://stackoverflow.com/a/27582073
accepted answer: http://stackoverflow.com/a/27582073
type: Question
tagged with: google-analytics
tagged with: javascript
tagged with: analytics
has comment: http://stackoverflow.com/comment/44733962
has comment: http://stackoverflow.com/comment/43590589
answer count: 2
downvote count: 1
possible better answer: http://stackoverflow.com/a/28121421
favorite count: 0
has comment: http://stackoverflow.com/comment/43587282
upvote count: 4
has comment: http://stackoverflow.com/comment/44735391
has comment: http://stackoverflow.com/comment/43589303
type: AnsweredQuestion
score: 3

http://stackoverflow.com/a/28240169
score: 0
type: Answer
has body: That will work and output the right results, but what they are looking for is something like this: module.exports = function() {}; Because they only want one function total in the exports. You could also do something like this: module.exports = FindFilesByExtension; function FindFilesByExtension(path, ext, callback) { //your code }
answers question: http://stackoverflow.com/q/27550104

http://stackoverflow.com/q/27633108
tagged with: jquery
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/43686171
type: UnansweredQuestion
tagged with: php
has title: Based on a forms input value, how 2 generate selections 4 a drop down menu w row/record data from a database that will prefill a form when selected?
tagged with: mysql
tagged with: forms
type: Question
has answer: http://stackoverflow.com/a/27633407
has body: I'm trying to figure out a way to pre fill a form with data with past form information submitted in the past. I have a form and a database. In my form I have a input named email that holds the pre-loaded default value of logged in member's email address that is read-only. PIC http://oi57.tinypic.com/2iubb4j.jpg How can I generate a selection under a drop down menu that when selected will pre-fill the form with row/record data from my database? and how can I generate only the records that match the forms input value 'email' to the records with the same value under the 'email' column in the database? I've been at it for weeks now and can not seem to find any sense of direction on how to achieve this. Can't really find any tutorials site, video, sample code or anything close on how to make this possible. Any help would be great...thanks for your help in advance. FORM LOAD PAST ORDERS: Please select... SAMPLE SELECTION Submit PHP FILE <?php define('DB_NAME', 'xxx'); define('DB_USER', 'xxx'); define('DB_PASSWORD', 'xxx'); define('DB_HOST', 'xxx'); $connection = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD); if(!$connection){ die('Database connection failed: ' . mysqli_connect_error()); } $db_selected = mysqli_select_db($connection, DB_NAME); if(!$db_selected){ die('Can\'t use ' .DB_NAME . ' : ' . mysqli_connect_error()); } echo 'Connected successfully'; if (isset($_POST['itemname'])){ $itm = $_POST['itemname']; } else { $itm = ''; } if($_POST['mile']){ $mi = $_POST['mile']; }else{ echo "Miles not received"; exit; } if($_POST['email']){ $email = $_POST['email']; }else{ echo "email not received"; exit; } $sql = "INSERT INTO seguin_orders (itemname, mile, email) VALUES ('$itm', '$mi', '$email')"; if (!mysqli_query($connection, $sql)){ die('Error: ' . mysqli_connect_error($connection)); } UPDATE: closest thing below so far...but wont work...not sure it covers the matching the email values portion...thanks anyways 'edcoder' Please select... <?php $query='select * from tablena…
tagged with: javascript

http://stackoverflow.com/comment/43671417
has text: I think that your script is very aggresive. You are doing 85 calls to updateBar very fast. You should move your loop logic to the ajax call.
comment on: http://stackoverflow.com/q/27625455
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43503926
type: AnswerComment
has text: 'real' indexes are what are 'real' array's (to javascript). Everything else are thus properties added to the object (that links to the array). At least, that was my understanding.
score: 0
comment on: http://stackoverflow.com/a/27537686
type: Comment

http://stackoverflow.com/q/27555791
type: UnansweredQuestion
tagged with: php
has body: I want to grab all the images from my website using PHP Simple HTML DOM Parser and export all of them to my Desktop ALL at once. ( Not right click save OR Screenshot ) OPTIONAL - save all the hyperlinks into one nice text-file. Here is what I have tried, <?php include_once('/php/simple_html_dom.php'); ?> HTML DOM Parser <?php $html = file_get_html('http://my-website.com'); ?> @foreach($html->find('img') as $img) {{$img}} @endforeach I get the images to load, but I am not sure how to save them into my computer. I am not sure even if it is possible. Is there any php function or JS function that can do that ?
has comment: http://stackoverflow.com/comment/43537794
score: 2
downvote count: 0
has answer: http://stackoverflow.com/a/27555869
has title: How to export all images that got retrieve from HTML DOM Parser?
type: Question
tagged with: javascript
upvote count: 2
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/43537948
favorite count: 0
linked to: http://stackoverflow.com/q/12238545

http://stackoverflow.com/comment/43615635
type: QuestionComment
comment on: http://stackoverflow.com/q/27595703
type: Comment
has text: something like jquery tabs maybe - http://jqueryui.com/tabs/? run different task in separate tab...
score: 0

http://stackoverflow.com/comment/43675935
comment on: http://stackoverflow.com/q/27607079
score: 0
type: Comment
type: QuestionComment
has text: It's not a final product, just stuff I'm testing with/learning. Plus it's similar to http://learn.jquery.com/using-jquery-core/understanding-index/ . But thanks for the info anyway.

http://stackoverflow.com/q/27497527
answer count: 1
favorite count: 0
type: UnansweredQuestion
score: -4
has body: So my problem in the code below is in the following if else if statement at the bottom: 1. the code in both of the if statements work perfect. 2. the issue is that when i run the code on one can be use. if i do 2 separate if statements only the second one works. if i do 1 if and one else if only the if statement works and the else if does nothing. a little more info: what I'm trying to do is every time the function times out and loops through again it will check the if statements and if something changed to run the appropriate if clause. PLEASE LET ME KNOW IF MORE INFO IS NEEDED. var xmlHttp = createXmlHttpRequestObject(); function createXmlHttpRequestObject() { var xmlHttp; if(window.ActiveXObject) { try { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); }catch(e) { xmlHttp = false; } } else { try { xmlHttp = new XMLHttpRequest(); }catch(e) { xmlHttp = false; } } if(!xmlHttp) alert("cant create object"); else return xmlHttp; } function process_search() { if(xmlHttp.readyState==0 || xmlHttp.readyState==4) { search_parameter = encodeURIComponent(document.getElementById("userInput").value); search_type = encodeURIComponent(document.getElementById("userOptions").value); xmlHttp.open("GET", "../pages/search_xml.php?search_parameter=" + search_parameter + "&amp;search_type=" + search_type, true); xmlHttp.onreadystatechange = handleServerResponse; xmlHttp.send(null); } else { setTimeout('process_search()',5000); } } function handleServerResponse() { if(xmlHttp.readyState==4) { if(xmlHttp.status==200) { xmlResponse = xmlHttp.responseXML; root = xmlResponse.documentElement; if(document.getElementsByTagName('find_users')) // FIND USERS { first_name = root.getElementsByTagName('first'); last_name = root.getElementsByTagName('last'); users = document.createElement('ul'); users.setAttribute("id", "usersFound"); document.getElementById("underInput").innerHTML = ""; //RESETS THE DIV BEFORE INSERTING DATA for(var i=0; i&lt; first_name.length; i++) { usersList = document.createEle…
has answer: http://stackoverflow.com/a/27497637
type: Question
upvote count: 0
tagged with: javascript
tagged with: ajax
has title: JavaScript extracting data from XML (if else statement not working)
downvote count: 4
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/46082635
has text: I am no longer working on that project, but I somehow got it workng. I think it was when I returned a proper HTML document that wrapped the JSON, not just JSON. Ironically, the client was Microsoft SA that insisted on keeping compatibility as far back as IE9.
comment on: http://stackoverflow.com/a/27508358
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/82390998
type: Comment
comment on: http://stackoverflow.com/a/27571871
type: AnswerComment
has text: Added useful content from @pete's answer
score: 0

http://stackoverflow.com/a/27515258
has body: alert() cannot print an {} object [object Object] unless you JSON.stringify it. If you usually returned from your success this object: {"Value":null,"Status":2,"Message":"Greetings."} from your response argument, than you need to access a desired Object property like: alert( response.Message ); otherwise, if you want to read fully the object do something like: alert( JSON.stringify( response, null, "\t") ); Furthermore, to simplify your code I made some changes: function v(id){ return $("#"+id).val(); } // Get value function CallService() { var myToken = v("token"); var myData = { Token : v("token"), Address : v("Address"), CallerAcctNum : v("CallerAcctNum"), CallerAddress : v("CallerAddress"), CallerCellPhone : v("CallerCellPhone"), CallerCity : v("CallerCity"), CallerComments : v("secondarysitecontact"), CallerDistrict : v("CallerDistrict"), CallerEmail : v("CallerEmail"), CallerFax : v("CallerFax"), CallerFirstName : v("CallerFirstName"), CallerHomePhone : v("CallerHomePhone"), CallerLastName : v("CallerLastName"), CallerMiddleInitial : v("CallerMiddleInitial"), CallerState : v("CallerState"), CallerWorkPhone : v("CallerWorkPhone"), CallerZip : v("CallerZip"), City : v("City"), Details : v("comments"), District : v("District"), Location : v("Location"), ProblemSid : v("RequestID"), State : v("State"), StreetName : v("StreetName"), X : v("X"), Y : v("Y"), SiteContactDisplay : v("sitecontact"), Comments : v("comments"), Text1 : v("deptId") }; $.ajax({ type: "POST", url: "proxyCreate.php", data: { data: JSON.stringify(myData), token: myToken }, dataType: "json", async: false, success: function (response) { console.log( response ); // open console and take a look. alert("Record has been added successfully." + response ); // Nest with "." like response.something to print property you need // window.location.reload(); // Do this later after you fix the bug } }); return false; }
type: AcceptedAnswer
downvote count: 0
upvote count: 2
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/43464872
accepted answer of: http://stackoverflow.com/q/27514685
answers question: http://stackoverflow.com/q/27514685

http://stackoverflow.com/a/27496614
answers question: http://stackoverflow.com/q/27496419
has comment: http://stackoverflow.com/comment/43424859
has body: Such languages are languages in which functions are first-class objects. When a function is defined inside another function, the nested function is called higher-order function. Functions being first-class objects means that functions do not differ from other objects such as numbers, strings, classes etc. Thus, you can pass them as arguments, or return them, just like any other object, without calling them. For instance in Python, you can return the function in itself without calling it, by omitting the parenthesis. Being able to write a higher-order function which another wrapping function can return is precisely the definition of a closure, and is a consequence of having functions as first-class objects. Thus, the answer to your question is: yes, closures are a necessity for having functions as first-class objects, in the sense that they are a consequence of that. To put it more directly, you can't have first-class functions and not be able to write closures. Note that some languages without first-class functions (Pascal, Algol) have sort of closures which are called lexical closures. But they are far less powerful than actual closures.
downvote count: 1
upvote count: 4
score: 3
has comment: http://stackoverflow.com/comment/43424804
type: Answer

http://stackoverflow.com/q/27602457
tagged with: javascript
linked to: http://stackoverflow.com/q/16345256
has title: Highcharts chart resize on window resize event after setting a specific size
answer count: 3
tagged with: highcharts
downvote count: 0
has answer: http://stackoverflow.com/a/27603079
accepted answer: http://stackoverflow.com/a/27603079
favorite count: 0
has answer: http://stackoverflow.com/a/42650020
type: AnsweredQuestion
score: 1
has body: In an app that I work I have this scenario: In a responsive container I have a chart. This container is resized at a point and I need to change the chart size by calling the setSize method. But after that I want to make the chart responsive again - to resize on window resize event. I made a fiddle to demo this: http://jsfiddle.net/7ka4qaef/ First click on the red button, then try to resize the window. Is there anyway to 'forget' that I've used setSize method?
has answer: http://stackoverflow.com/a/44353991
upvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/42650020

http://stackoverflow.com/comment/43570714
comment on: http://stackoverflow.com/q/27572523
has text: You've read the page? Did you miss the [`popstate` event](https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Manipulating_the_browser_history#The_popstate_event)?
type: Comment
type: QuestionComment
score: 1

timer
tag name: timer
tags question: http://stackoverflow.com/q/27525870
type: Tag
tags question: http://stackoverflow.com/q/27504707
tags question: http://stackoverflow.com/q/27518156
tags question: http://stackoverflow.com/q/27586977
tags question: http://stackoverflow.com/q/27609487

http://stackoverflow.com/q/27527618
has comment: http://stackoverflow.com/comment/43483880
tagged with: javascript
has title: Deep setting of object key-values in JavaScript
linked to: http://stackoverflow.com/q/20380504
downvote count: 0
favorite count: 0
linked to: http://stackoverflow.com/q/6842795
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43511174
duplicate of: http://stackoverflow.com/q/6842795
linked to: http://stackoverflow.com/q/13719593
answer count: 0
score: 1
upvote count: 1
has body: Consider the following code: var obj = {}; obj.bar = 'w00p!'; //works obj.foo.bar = 'there it is'; //throws error because bar is not set Could you ever make obj.foo.bar = work if obj.foo is not set? Is there an elegant way to set a deep variable in an object in JavaScript? In the same spirit as mkdir's -p option: mkdir -p a/deep/dir
duplicate of: http://stackoverflow.com/q/13719593
type: Question

http://stackoverflow.com/a/27547190
has comment: http://stackoverflow.com/comment/43521123
has comment: http://stackoverflow.com/comment/43521013
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27546762
has body: You can try like below: var a = "https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=2&amp;cad=rja&amp;uact=8&amp;ved=0CCkQFjAB&amp;url=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FHI&amp;ei=y8mSVJb3HYqlNqvBgIgM&amp;usg=AFQjCNEWA_V3hjoVAu_W7mu3fbN6Q4n0Lw&amp;sig2=dDRuO4YH9VIDXgQoZJH4tQ&amp;bvm=bv.82001339,d.eXY"; var b = decodeURIComponent(a); var p1 = b.indexOf("&amp;url"); var p2 = b.indexOf("&amp;ei"); var res = b.substring(p1+5, p2); alert(res); DEMO FIDDLE
has comment: http://stackoverflow.com/comment/43520653

http://stackoverflow.com/q/27566252
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has body: I'm just new in front-end so I have may be a silly question. I have a button <asp:Button runat="server" CssClass="bt_stop" ID="bt_Stop" OnClick="bt_Stop_Click"></asp:Button> I want to ask user if he wants to proceed this event. Are you sure? Like in common confirm form, but I need my own interface for confirmation window. I dont want to use any plugins or ajax.
has title: custom confirm using jQuery and asp.net web forms
tagged with: asp.net
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27566426

http://stackoverflow.com/q/27559549
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/43545325
has comment: http://stackoverflow.com/comment/43545336
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/27559611
has comment: http://stackoverflow.com/comment/43545248
tagged with: ajax
has comment: http://stackoverflow.com/comment/43545406
has comment: http://stackoverflow.com/comment/43545422
has comment: http://stackoverflow.com/comment/43545265
has title: Javascript not proceeding aynchronously beyond AJAX call
has body: When the user presses the 'Process' button on my application, I would like the application to trigger an AJAX request and then immediately redirect the user to another screen without waiting for the results of the AJAX request. I believe I have coded it appropriately but I notice that the screen is waiting for the AJAX to finish before redirecting. Am I missing something below? $('#process-btn').on('click', function() { // disable the process &amp; cancel buttons to prevent // double submission or interruption $('#cancel-btn').addClass('disabled'); $(this).addClass('disabled'); // trigger the AJAX require to process the uploaded file on the server side $.ajax({ url: $('#form').attr('action'), type: 'post', data: $('#form').serialize(), success: function() { //on success } }); // redirect the user to view list // this line is not being called immediately - // this is being called only after AJAX returns window.location.replace( www_root + 'Home/index' ); });
has comment: http://stackoverflow.com/comment/43545264
has comment: http://stackoverflow.com/comment/43545296
has comment: http://stackoverflow.com/comment/43545434
has comment: http://stackoverflow.com/comment/43545538
has comment: http://stackoverflow.com/comment/43545469
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43545518
has comment: http://stackoverflow.com/comment/43545623
has answer: http://stackoverflow.com/a/27559675
accepted answer: http://stackoverflow.com/a/27559675
has comment: http://stackoverflow.com/comment/43545305
has answer: http://stackoverflow.com/a/27559611
type: Question

http://stackoverflow.com/comment/43606154
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27591160
has text: @JameyD have a look at the edit

http://stackoverflow.com/comment/43414957
comment on: http://stackoverflow.com/a/27491534
type: AnswerComment
score: 0
type: Comment
has text: Since you are looking to have label and the input/select display in a single line and the BR is not removable from the code we are just hiding it with display:none;

http://stackoverflow.com/a/27564658
has body: How about making a function that return an object that you can use in every handler? var calcVars = function(){ var $this = $(this), $options = $this.find('div.options'), $optionsBox = $this.find('div.options-box'); var boxHeight = $this.height(), boxWidth = $this.width(), optionsBoxHeight = $optionsBox.outerHeight(); return { boxHeight: boxHeight, //every other variable you need outside } $boxModule.on({ firstEvent: function() { var object = calcVars.call(this); object.calculatedProperty.doSomething(); //other code }, secondEvent: function() { var object = calcVars.call(this); object.anotherCalculatedProperty.doSomething(); //other code } }) or you can do: $boxModule.on("anEvent anotherEvent", function(event) { /* var declarations */ var $this = $(this), //etc.. if(event.type == "anEvent"){ doStuff(); else if(event.type == "anotherEvent"){ doOtherStuff(); } })
score: 0
answers question: http://stackoverflow.com/q/27564513
type: Answer

http://stackoverflow.com/comment/43458226
type: Comment
comment on: http://stackoverflow.com/a/27511962
score: 0
type: AnswerComment
has text: "The problem with the Python solution" is also a problem with the Haskell solution, so if you use bheklilr's comment using the classic fibs list:`sum $ filter even $ takeWhile (<= 4000000) fibs where fibs = 1 : 1 : zipWith (+) fibs (tail fibs)` you'll get a performance improvement.

http://stackoverflow.com/comment/43439378
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27504523
has text: If I used focus the pop up is not opening itself
type: Comment

http://stackoverflow.com/q/27498518
tagged with: arrays
duplicate of: http://stackoverflow.com/q/1584370
tagged with: javascript
type: UnansweredQuestion
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/27498793
tagged with: merge
has body: [["510", "511", "512", "513"], ["514", "515"]] I need to merge this into one. It should look like this: ["510", "511", "512", "513", "514", "515"] Can anyone help me with this using javascript ?
linked to: http://stackoverflow.com/q/10865025
has comment: http://stackoverflow.com/comment/43428165
score: 0
upvote count: 1
has title: merging arrays into one [["510", "511", "512", "513"], ["514", "515"]]
answer count: 1
downvote count: 1
duplicate of: http://stackoverflow.com/q/10865025
has comment: http://stackoverflow.com/comment/43428096
has comment: http://stackoverflow.com/comment/43428066
linked to: http://stackoverflow.com/q/1584370

http://stackoverflow.com/q/27612066
has title: Enhanced ecommerce not showing product performance revenue
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/61861622
tagged with: google-analytics-firebase
has body: So I have an implementation of enhanced ecommerce for google analytics. On the complete page it fires: function transactionComplete(products, transaction){ for(var i = 0; i &lt; products.length; i++) { var product = products[i]; ga('ec:addProduct', { 'id': product.productId, 'name': product.productName, 'category': product.productCategory, 'price': product.productPrice, 'quantity': Number(product.productQuantity) }); } ga('ec:setAction', 'purchase', { 'id': transaction.id, 'affiliation': transaction.name, 'revenue': transaction.total, 'tax': '0', 'shipping': transaction.shipping }); ga('send', 'pageview'); } Fairly simple right? Well when I look at the dashboard, Product performance does not show any revenue. However sales performance does. Am I doing something wrong? Screenshots: Sales Performance Product Performance
type: UnansweredQuestion
upvote count: 1
score: 1
has answer: http://stackoverflow.com/a/39627688
type: Question
tagged with: google-analytics
has answer: http://stackoverflow.com/a/32131394
tagged with: javascript
answer count: 3

http://stackoverflow.com/comment/43501160
type: AnswerComment
has text: This is the correct answer. As for the explanation: You can access attributes of javascript objects in two ways, either with `object['key']` or with `object.key`. When you use `terms.currentTerm` is assumes 'currentTerm' is the key, which is undefined. By using `terms[currentTerm]` instead, it uses the variable currentTerm wich resolves to the correct key string and returns the array you are expecting.
type: Comment
comment on: http://stackoverflow.com/a/27536301
score: 1

http://stackoverflow.com/a/27617648
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27616070
answers question: http://stackoverflow.com/q/27616070
has comment: http://stackoverflow.com/comment/43656861
has comment: http://stackoverflow.com/comment/43657972
type: Answer
has body: Here is the easiest thing you can do: var image_preview = { on_change: function(wrap_dom, input_dom) { $(wrap_dom).on('change', input_dom, function(event) { var el_obj = $(this)[0]; var form_data = new FormData(); var file_length = el_obj.files.length; for (var i = 0; i &lt; file_length; i++) { form_data.append("file[]", el_obj.files[i]); } image_preview.model(form_data).done(function(response) { app_thumbnail.preview_controller(response); }); }); }, model: function(form_data) { return $.ajax({ url: uri_public+'/admin/ajax/preview_file', type: 'POST', data: form_data, processData: false, contentType: false, // async: false }); } } var app_thumbnail = { preview_controller: function(response) { var wrap_dom = '.thumbnail'; var input_dom = '.upload-form input'; var result = response; } } // If you want to initialize it. // image_preview.on_change(..., ...);
has comment: http://stackoverflow.com/comment/43657128
has comment: http://stackoverflow.com/comment/43656753
has comment: http://stackoverflow.com/comment/43657521
score: 0

http://stackoverflow.com/a/27551720
has comment: http://stackoverflow.com/comment/43530350
type: Answer
score: 0
answers question: http://stackoverflow.com/q/27551559
accepted answer of: http://stackoverflow.com/q/27551559
has body: Its much easier to see where the syntax errors are when the code is properly formatted: function submitForm(formID) { $('#productFrom' + formID).submit(function () { var str = $(this).serialize(); $.ajax('getCartItems.php', str, function (result) { // the result variable will contain any text echoed by getCartItems.php $('#CART').html(result); }); return false; }); }
type: AcceptedAnswer

http://stackoverflow.com/comment/43656778
has text: I am not sure what actually you want to do similar to gmail, if you want to delete the "transparent text" once start typing, why not just use placeholder attribute like [this](http://jsfiddle.net/t36xf6cm/)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27617782
score: 0

http://stackoverflow.com/a/27550018
score: 1
has comment: http://stackoverflow.com/comment/43526445
has comment: http://stackoverflow.com/comment/43526331
has comment: http://stackoverflow.com/comment/43526243
upvote count: 1
has comment: http://stackoverflow.com/comment/43526294
answers question: http://stackoverflow.com/q/27549863
type: Answer
has body: Though essentially considered bad practice, (but as a beginner you're more than welcome to use this) you can use document.writeln('Hello, World!'); to actually write text onto the page. You can also, in your HTML, define a container with an id: &lt;div id="my-text-box"&gt; &lt;/div&gt; and in your JavaScript, window.onload = function(){ document.getElementById('my-text-box').innerHTML = "Hello, World!"; };
downvote count: 0

http://stackoverflow.com/q/27480513
answer count: 0
has comment: http://stackoverflow.com/comment/43394097
has comment: http://stackoverflow.com/comment/43394348
tagged with: ruby-on-rails
type: Question
tagged with: devise
tagged with: javascript
score: 0
has title: undefined method `model_name' for NilClass:Class using Devise
has comment: http://stackoverflow.com/comment/43393995
has comment: http://stackoverflow.com/comment/46416777
has body: I have a User model. I use devise for authentication. Now there is another Model Categories. User has many preferred Categories. I want to display Sign up Modal followed by Choose category modal. This is how my code looks like _signup_modal.html.slim .modal.fade#signupModal tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" .modal-dialog .modal-content .modal-header.text-center strong.logo a = render partial: 'shared/signup_form' signup_form.html.slim: - resource = User.new unless resource - resource_name = 'user' unless resource_name h5.text-center Sign up = form_for resource, url: registration_path(resource_name), remote: true, html: { id: 'signup', role: 'form' } do |f| .row .form-group.col-sm-12 = f.text_field :email, type: 'email', class: 'form-control', placeholder: "Email Address" .row .form-group.col-sm-12 = f.password_field :password, value: (params[:user][:password] if params[:user]), class: 'form-control', placeholder: "Password" .form-group.form-actions button.submit-btn.btn type="submit" Sign Up signup_form.js.erb: $("body").prepend("&lt;%= escape_javascript(render "shared/subscribe_modal", :formats =&gt; [:html]) %&gt;"); $("#signupModal").modal("hide"); $("#subscribeModal").modal(); RegistrationsController: class RegistrationsController &lt; Devise::RegistrationsController def create build_resource(sign_up_params) if resource.save if resource.active_for_authentication? set_flash_message :notice, :signed_up if is_navigational_format? sign_up(resource_name, resource) return render 'shared/signup_form' else set_flash_message :notice, :"signed_up_but_#{resource.inactive_message}" if is_navigational_format? expire_session_data_after_sign_in! return render 'shared/signup_form' end else clean_up_passwords resource return render user_path end end def edit @user=current_user end def update @user=current_user puts "#{params[:user_category_ids]}" end end subscribe_modal.html.slim .modal.fade#subscribeModal tabindex="-1" role="dialog" a…
type: UnansweredQuestion

http://stackoverflow.com/a/27571607
type: Answer
answers question: http://stackoverflow.com/q/27566478
has body: The up, down, and enter keys work in the code sample for Google Maps Place Autocomplete. You can examine the code here.
score: 0

http://stackoverflow.com/comment/43607895
has text: @fonix232 : Question is not clear enough it would be good if you add some examples
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27592020

http://stackoverflow.com/comment/43698273
comment on: http://stackoverflow.com/a/27638953
score: 0
type: AnswerComment
type: Comment
has text: Faster than a speeding bullet -- thanks for your help!

http://stackoverflow.com/comment/43689428
type: Comment
has text: Thanks @gehleh, and how can i add .info as parent to some div.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27634936

http://stackoverflow.com/a/27514501
has comment: http://stackoverflow.com/comment/44612596
upvote count: 7
has comment: http://stackoverflow.com/comment/43460883
answers question: http://stackoverflow.com/q/27514394
has comment: http://stackoverflow.com/comment/43484324
score: 7
accepted answer of: http://stackoverflow.com/q/27514394
has comment: http://stackoverflow.com/comment/43483538
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43470706
type: Answer
has body: The problem in your setup mostly stems from the fact that you have pointer-events: none for certain elements, such as the leaves (smallest circles). If you correct that and define the click event such that it directs to the url instead of triggering a zoom event for the leaves, you get the desired behavior. I put together a small fiddle for you, see here: http://jsfiddle.net/chroth/fkxcvtu9/3/ The core of the idea is in here (click function): function clickFct(d,i) { if (d3.select(this).classed("node--leaf")) { alert(d.url); //open URL here } else { if (focus !== d) { zoom(d); d3.event.stopPropagation(); } } } and in this change in the style: .node--root, .node--leaf { pointer-events: all; } TODOs As you can see, currently I am just shooting an alert. Also, you might want to disable certain click events when not zoomed in etc. Plus work on the colors. Also, note that you need to fix the visibility of the labels etc. But I leave that to you :) Hope that helps.

http://stackoverflow.com/comment/43641289
score: 0
type: Comment
type: QuestionComment
has text: I mean where do you declare `articles` module? like `angular.module('articles', [])`?
comment on: http://stackoverflow.com/q/27609359

http://stackoverflow.com/q/27512137
answer count: 2
has answer: http://stackoverflow.com/a/27512175
downvote count: 0
has comment: http://stackoverflow.com/comment/43454565
favorite count: 0
accepted answer: http://stackoverflow.com/a/27512220
has title: How do I put these 2 dates next to each other?
has body: Ok, what i want to do is to to put the month and day next to each other. So, the variables m and dd var meps = 14; var boot = 15; var d = new Date('December 16, 2014'); var m = d.getMonth(); var dd = d.getDate(); document.getElementById('days').innerHTML = m; But, when I do m + dd, it adds them, instead of sticking them right next to each other. How could I do this??
score: 1
upvote count: 1
type: Question
type: AnsweredQuestion
tagged with: javascript
has answer: http://stackoverflow.com/a/27512220
possible better answer: http://stackoverflow.com/a/27512175

http://stackoverflow.com/q/27604366
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43631026
has comment: http://stackoverflow.com/comment/43630866
has answer: http://stackoverflow.com/a/27604728
tagged with: php
has comment: http://stackoverflow.com/comment/43632454
has comment: http://stackoverflow.com/comment/43631292
has title: How do I stop the response message of a PHP script appearing as the only content of the page
has comment: http://stackoverflow.com/comment/43630972
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43632210
has answer: http://stackoverflow.com/a/27604601
score: 0
has comment: http://stackoverflow.com/comment/43630950
has body: So I have a simple Registration page, and the Javascript request works okay, but when the response is sent back in changes the page location to /RegisterNewUser.php?Name=Andrew&Surname=Too&userID=0014&passWD=pass and there is nothing displayed on the page but the response. I have tried changing page location manually but that doesn't seem to work Email Client Log in New User Registration First Name: Surname: User ID: Password: Re-enter password:
has comment: http://stackoverflow.com/comment/43632064
has comment: http://stackoverflow.com/comment/43630931
has comment: http://stackoverflow.com/comment/43631051

http://stackoverflow.com/a/27536769
type: Answer
has body: This is a timing bug since the variable is not assigned until the async call returns. You can't access email right away.
score: 1
upvote count: 2
answers question: http://stackoverflow.com/q/27536739
downvote count: 1

http://stackoverflow.com/a/27478187
upvote count: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27477868
answers question: http://stackoverflow.com/q/27477868
type: Answer
has comment: http://stackoverflow.com/comment/43394892
has comment: http://stackoverflow.com/comment/43423629
has body: From my quick testing, I believe the button redirects to http://njit.edu/ instead of http://www.njit.edu/ and that's why you are receiving that error. Then there is an automatic from http://njit.edu/ to http://www.njit.edu/, but PhantomJS is not able to perform this redirect for some reason.
score: 1

http://stackoverflow.com/q/27539065
tagged with: controller
score: 0
has title: Async function in angular.run() method has not been executed before controller
has body: Currently i've been playing around with angular and I am finding a hard time in how to figure it out.The problem is that I am running a $http method on app.run(). $http method get rooms from server and initialize it in $rootScope.rooms var. In controller I used this rooms variable . Since the $http method is async and sometimes it got null because the controller loaded before the method is finished . I am trying to handle it in other way . game.js angular.module('GameModule', []) .run([function ("injectors...") { $http.get("/rooms").success(function(result){ $rootScope.rooms = result; }).error(function(error){ console.log('Error fetching rooms'); }); }]) .controller('GameCtrl', ['$scope', function ($scope) { console.log($rootScope.rooms); }]); Since rooms variable will be used in others files too , i don't probably want to put $http method inside every controller unless there are no other ways. If would be nice if i could use sort of angular's service
tagged with: asynchronous
tagged with: service
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43510641
has comment: http://stackoverflow.com/comment/43507530
linked to: http://stackoverflow.com/q/16286605
type: Question
has answer: http://stackoverflow.com/a/27539504
has comment: http://stackoverflow.com/comment/43506091
answer count: 1
has comment: http://stackoverflow.com/comment/43506164
tagged with: javascript

http://stackoverflow.com/q/27599734
has body: I'm using PhotoSwipe for an architectural blog. My goal is to set up PS in such as a way that if the user taps any image in an entry, they can easily swipe to the next one. The issue is that the structure of my images displayed on the page (though each triggers PS currently and individually) are not set up using the below structure as prescribed by the PS documentation: Image caption Image caption Mine looks like the below. All images are always displayed inside of .wrapper but .wrapper will have variable amounts of .row elements with a div then an img. The developer of PS, said on Twitter that I should look into `parseThumbnailElements' however after hours of trying, it's still totally unclear to me what I need to do. Any help?
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27641180
score: 0
answer count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/38642465
tagged with: photoswipe
has title: How to allow PhotoSwipe to group images with varying structure into one viewable group
tagged with: css

http://stackoverflow.com/a/27507344
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27507293
score: 4
type: Answer
upvote count: 4
has body: Try using input[type=text] instead $('.greenDiv&gt;input[type=text]').blur(function () { if (!$.trim($(this).val())) { alert("fill this field"); } });
has comment: http://stackoverflow.com/comment/43445144
has comment: http://stackoverflow.com/comment/43445035
has comment: http://stackoverflow.com/comment/43446651
answers question: http://stackoverflow.com/q/27507293
has comment: http://stackoverflow.com/comment/43445403

http://stackoverflow.com/a/36182083
upvote count: 4
downvote count: 0
answers question: http://stackoverflow.com/q/27543719
score: 4
has body: Use the setMode method: editor.setMode('readonly');
type: Answer

http://stackoverflow.com/a/27530393
accepted answer of: http://stackoverflow.com/q/27530229
score: 2
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27530229
has body: Usually your best bet there is to make the inner stuff a property of your outer stuff and then just bind normally (possibly with with). E.g.: var innerModel = function() { this.innerText = ko.observable("Inner Model - Inner Text"); }; var outerModel = function() { this.outerText = ko.observable("Outer Model - Outer Text"); this.inner = ko.observable(new innerModel()); }; ko.applyBindings(new outerModel(), document.getElementById('id1')); ...and then: Example: var innerModel = function() { this.innerText = ko.observable("Inner Model - Inner Text"); }; var outerModel = function() { this.outerText = ko.observable("Outer Model - Outer Text"); this.inner = ko.observable(new innerModel()); }; ko.applyBindings(new outerModel(), document.getElementById('id1')); But in cases where that's not possible, you can add a new binding to KO that says "don't bind within this element" as described here: ko.bindingHandlers.stopBinding = { init: function () { return { controlsDescendantBindings: true }; } }; Usage: ...and then do the two applyBindings in your question. (Note that I added a div around your id2 div. If you want to use a "virtual element" instead, add this line after the binding handler: ko.virtualElements.allowedBindings.stopBinding = true; ...to enable using it with virtual elements.) Example: // Somewhere where you'll only do it once ko.bindingHandlers.stopBinding = { init: function () { return { controlsDescendantBindings: true }; } }; // Then: var outerModel = function() { this.outerText = ko.observable("Outer Model - Outer Text"); }; var innerModel = function() { this.innerText = ko.observable("Inner Model - Inner Text"); }; ko.applyBindings(new outerModel(), document.getElementById('id1')); ko.applyBindings(new innerModel(), document.getElementById('id2'));
upvote count: 2

http://stackoverflow.com/a/27534915
type: Answer
has body: I think the best way to see if something works is to just try it. Like so: $(function() { $("li").filter(function(index) { return index % 3 === 2; }) .css("background-color", "red"); }); list item 1 - one strong tag list item 2 - two strong tags list item 3 list item 4 list item 5 list item 6
accepted answer of: http://stackoverflow.com/q/27534860
score: 1
answers question: http://stackoverflow.com/q/27534860
upvote count: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/27596825
has body: I am having small application with some javascript functions on divs. Previously started changes in chrome and all goes well with chrome. But when I tested the application in IE, the functions are not excuting and then finally realised div positioning and styling changed in IE, in fact normal style "cursor : pointer" is also not working for the same div( which is working in chrome) in IE, Can anyone please help me to fix this condition. Here is the code i used: <image path which display Next Shape and Name/> Nxt <dummy image/> Thanks in advance.
has comment: http://stackoverflow.com/comment/43618175
has comment: http://stackoverflow.com/comment/43617390
has title: Div positioning and css styling changes in IE and Chrome
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43618214
tagged with: css
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27634606
tagged with: google-chrome
type: Question
tagged with: internet-explorer
tagged with: javascript
score: 0
answer count: 1

http://stackoverflow.com/comment/43662040
type: Comment
type: QuestionComment
has text: We need more info to help you. How are the `HTML` code? Are you using jQuery datatables?
comment on: http://stackoverflow.com/q/27620684
score: 0

http://stackoverflow.com/comment/125558357
has text: Seems to work OK with manifest v3 in a content script.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27496510

http://stackoverflow.com/a/27492331
has comment: http://stackoverflow.com/comment/43418033
has comment: http://stackoverflow.com/comment/43418245
answers question: http://stackoverflow.com/q/27492271
accepted answer of: http://stackoverflow.com/q/27492271
has comment: http://stackoverflow.com/comment/43418127
type: AcceptedAnswer
has body: Accessing the current URL can be done with window.location.href. Setting the URL can be done in a similar manner. Given your situation, the following can be done: yourForm.onsubmit = function() { var URLtext = document.getElementById("inputbox").value; window.location.href = window.location.href + URLtext; // this is for your current URL } Any well-formed URL wouldn't require the filetype unless you're accessing specific files in which case it's bad UI to programmatically find out what type of file it is. I'd leave it up to the user to determine filetype.
score: 0
has comment: http://stackoverflow.com/comment/43416522
type: Answer
has comment: http://stackoverflow.com/comment/43416867

http://stackoverflow.com/a/27594379
type: Answer
has body: Create a .js file and use a variable mydb to get db.getSisterDB("MyDB"). Then you will be able to create indexes for collection in MyDB using mydb.MyCollection1.ensureIndex. Run .js file in mongo shell by command: mongo localhost:27017 filename.js var mydb = db.getSisterDB("MyDB"); mydb.MyCollection1.ensureIndex({ "Thing1" : 1, "Thing2" : -1 }); mydb.MyCollection2.ensureIndex({ "Thing3" : 1, "Thing4" : -1 });
has comment: http://stackoverflow.com/comment/93278587
has comment: http://stackoverflow.com/comment/93278383
answers question: http://stackoverflow.com/q/27569970
score: 0

http://stackoverflow.com/a/27487720
has comment: http://stackoverflow.com/comment/43407415
answers question: http://stackoverflow.com/q/27487563
score: 0
has body: You can build something like [0-9a-zA-Z]*\.(example|document|service)\.txt However, I don't think this will look very readable. I would consider avoiding regex in this case in order to make the code more straighforward.
type: Answer

http://stackoverflow.com/comment/43429239
score: 0
comment on: http://stackoverflow.com/a/27499130
type: AnswerComment
type: Comment
has text: it is not supported in IE and Safari

http://stackoverflow.com/comment/43573194
type: Comment
comment on: http://stackoverflow.com/a/27573417
has text: So the code that I posted wudnot be working. So any help with json url request?
type: AnswerComment
score: 0

http://stackoverflow.com/a/28455249
has comment: http://stackoverflow.com/comment/55918788
type: Answer
score: 8
answers question: http://stackoverflow.com/q/27613314
has body: Question 1 is not actually a question, but it's best to create a canvas that is the size of your screen, translate the canvas and redraw PART OF the map with each movement. Do not redraw the whole map, but add methods to redraw a portion of the map that is slightly larger than the viewport, possibly excluding part of the map that is already drawn. Otherwise your browser might crash from memory stress. Question 2: Right. There will be no difference at all. The browser will simply move the already drawn canvas about behind the viewport. Question 3: Play around with the element inspector of Chrome on a google map. This is a very good example of a huge map that runs on a tiny phone. You will see that it uses a grid of images (you could uses canvasses). You could cache these blocks outside the viewport for if the user returns back. Play with the cache size to keep the memory usage sane.
downvote count: 0
upvote count: 8

http://stackoverflow.com/q/27554586
upvote count: 0
tagged with: jquery
favorite count: 0
has body: Guys I am new to jQuery...please help me to learn this. I want to expand the div(#center) taking width:100% on click that in turn closes the other 2 divs (#left and #right) in my case. Please someone help me to solve this. And the most imp thing is that the transition should be swift nd not at once. Reply is appreciated. And its not lyk i dint try it first. I tried using click function to make it happen..bt dint work as desired body { width: 100%; height: auto; } #taskDetails { width: 900px; height: 200px; border: 2px solid #a1a1a1; background: #dddddd; } #description { width: 900px; height: 200px; border: 2px solid #a1a1a1; background: #dddddd; } #details { float: left; width: 900px; margin: 0 auto; height: auto; border: 2px solid #a1a1a1; display: inline-block; } #left { float: left; width: 250px; margin: 0 auto; height: 200px; border: 2px solid #a1a1a1; background: #dddddd; } #center { width: 370px; float: left; height: 200px; border: 2px solid #a1a1a1; background: #dddddd; margin-left: 9px; } #right { float: right; width: 250px; height: 200px; border: 2px solid #a1a1a1; background: #dddddd; } #head { top: 0; width: 100%; height: 30px; background: #8CBF26; border-radius: 2px; } ul { list-style-type: none; margin: 0; padding: 0; overflow: hidden; } li { float: left; } a { padding: 0 10px; border-radius: 8px; display: block; width: 60px; height: 25px; border: 2px solid #a1a1a1; background-color: #00ABA9; text-decoration: none; } .heading { padding: 5px; } FORM Tab 1 Tab 2 Tab 3 Projects Details Tab 3
has comment: http://stackoverflow.com/comment/43538138
has comment: http://stackoverflow.com/comment/43535790
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/27554821
downvote count: 1
has comment: http://stackoverflow.com/comment/43535603
type: Question
has answer: http://stackoverflow.com/a/27555695
tagged with: jquery-ui
tagged with: javascript
has answer: http://stackoverflow.com/a/27570225
score: -1
has title: Click button expands the div horizontally by closing other two divs
answer count: 3

http://stackoverflow.com/q/27493217
has comment: http://stackoverflow.com/comment/43418241
has comment: http://stackoverflow.com/comment/43418346
tagged with: javascript
answer count: 2
has comment: http://stackoverflow.com/comment/43418171
has comment: http://stackoverflow.com/comment/43420541
downvote count: 0
has body: I have a nodejs program that requests a series of XML files, parses them and then puts the output in an array which is written to disk as a CSV file. The program mostly works, however occasionally the files end up in the wrong order in the array. I want the order of the results to be in the same as the order as the URLs. The URLs are stored in an array, so when I get the XML file I check what the index of the URL was in the source array and insert the results at the same index in the destination URL. can anyone see the flaw that is allowing the results to end up in the wrong order? addResult = function (url, value, timestamp) { data[config.sources.indexOf(url)] = { value : value, timestamp : timestamp, url : url }; numResults++; if (numResults === config.sources.length) { //once all results are in build the output file createOutputData(); } } fs.readFile("config.json", function (fileError, data) { var eachSource, processResponse = function (responseError, response, body) { if (responseError) { console.log(responseError); } else { parseXML(body, { explicitArray : false }, function (xmlError, result) { if (xmlError) { console.log(xmlError); } addResult(response.request.uri.href, result.Hilltop.Measurement.Data.E.I1, moment(result.Hilltop.Measurement.Data.E.T)); }); } }; if (fileError) { console.log(fileError); } else { config = JSON.parse(data); //read in config file for (eachSource = 0; eachSource &lt; config.sources.length; eachSource++) { config.sources[eachSource] = config.sources[eachSource].replace(/ /g, "%20"); //replace all %20 with " " request(config.sources[eachSource], processResponse); //request each source } } }); var writeOutputData, createOutputData, numResults = 0, data = [], eachDataPoint, multipliedFlow = 0; writeOutputData = function (output, attempts) { csv.writeToPath(config.outputFile, [ output ], { headers : false }).on("finish", function () { console.log("successfully wrote data to: ", config.outputFile); }).on("error", function (err) { //on wr…
favorite count: 0
has comment: http://stackoverflow.com/comment/43418369
has answer: http://stackoverflow.com/a/27493456
tagged with: asynchronous
tagged with: node.js
has answer: http://stackoverflow.com/a/27494299
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43418381
has title: How to correct structure an asynchronous program to ensure correct results?
has comment: http://stackoverflow.com/comment/43418379
upvote count: 1
possible better answer: http://stackoverflow.com/a/27494299
type: Question
has comment: http://stackoverflow.com/comment/43420082
accepted answer: http://stackoverflow.com/a/27493456
score: 1

http://stackoverflow.com/a/27498564
accepted answer of: http://stackoverflow.com/q/27498488
type: Answer
answers question: http://stackoverflow.com/q/27498488
has body: You are setting opacity to zero picker.style.opacity = "0"; pickerTwo.style.opacity = "0"; so you are hiding the elements. I think you want a number greater than zero.
score: 0
type: AcceptedAnswer

http://stackoverflow.com/q/27490188
tagged with: web-audio-api
favorite count: 0
tagged with: audio
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/27490724
has body: So I recently posted this question: CLICK HERE And I have come to the conclusion, that I just don't have the time to make this work for Firefox. It would be nice, but I have other projects that I need to work on. So I have decided to just perform a simple functionality check on this, so that it will still play in Firefox, but not attempt to load the visualizer, which is causing the entire player to seize up and not play at all. But I'm not sure at all with functionality to check for? The Web API works when it's just the Web API, and the Custom Controls work, when it's just the Custom Controls, so what exactly would I check for, so that if(functionality not supported){ //Don't load Visualizer at all(); } My Original jFiddle is here: http://jsfiddle.net/murphy1976/yqqf7uL1/1/
upvote count: 1
type: Question
has title: HTML5 Audio, with Web Audio API - Not Working in Firefox
linked to: http://stackoverflow.com/q/27429123
tagged with: firefox
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27490724
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/q/27584564
has title: Concurrent editing with nonce in MongoDB
tagged with: node.js
score: 1
has answer: http://stackoverflow.com/a/30822170
tagged with: concurrency
type: Question
tagged with: mongodb
upvote count: 1
answer count: 1
tagged with: mongoose
tagged with: javascript
favorite count: 0
downvote count: 0
type: UnansweredQuestion
has body: I am making a multiplayer game using Expressjs, Socket.io, and Mongoose. Players join the game, and it starts when there are enough players to play. I alert all the players in the game at the same time that the game can start, so I'm running into concurrency issues for changing the state of the game to "playing" and initializing the characters. Sometimes the characters will be assigned twice, which messes up gameplay. I tried to add a nonce as recommended here and here, but I couldn't get it to work and I didn't really understand it. Does MongoDB treat it as a special value with special properties? Or is the nonce depending on some existing properties of MongoDB? Here's the relevant parts of the Game model: GameSchema = mongoose.Schema nonce: type: mongoose.Schema.Types.ObjectId required: true default: mongoose.Types.ObjectId name: type: String required: true unique: true state: type: String enum: ["setup", "unstarted", "playing", "assassinating", "good_won", "bad_won", "discontinued"] default: "setup" required: true characters: [String] players: [{ type: mongoose.Schema.Types.ObjectId, ref: "Player" }] GameSchema.statics.findByIdAndStart = (id, done) -&gt; Game = this Game.findById id, (err, game) -&gt; return done err, game if err or game.state is "playing" changes = state: "playing" nonce: mongoose.Types.ObjectId() Game.update { id: id, nonce: game.nonce }, changes, (err) -&gt; return done err if err Game.findById(id).populate("players").exec (err, game) -&gt; return done err if err characterSelection = new CharacterSelection game.characters async.eachSeries game.players, ((player, next) -&gt; player.character = characterSelection.assignCharacter() player.save next ), (err) -&gt; done err, game How do I prevent concurrent editing of my model?

http://stackoverflow.com/q/27480262
accepted answer: http://stackoverflow.com/a/27480352
has answer: http://stackoverflow.com/a/70409913
has answer: http://stackoverflow.com/a/27480319
has answer: http://stackoverflow.com/a/61038950
favorite count: 0
has answer: http://stackoverflow.com/a/27480397
possible better answer: http://stackoverflow.com/a/27480577
has answer: http://stackoverflow.com/a/76194091
has answer: http://stackoverflow.com/a/51012427
tagged with: datetime
has answer: http://stackoverflow.com/a/27480577
answer count: 18
has answer: http://stackoverflow.com/a/56881235
has answer: http://stackoverflow.com/a/59161091
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/70588501
has body: I need to get the date format as 'DD-Mon-YYYY' in javascript. I had asked a question, and it got marked duplicate to jQuery date formatting But, the answers provided in the question are to get the current date in "DD-MM-YYYY" format and not "DD-MON-YYYY". Secondly, I am not using datepicker plugin. Can you please help me as if how to get the current date in "DD-Mon-YYYY" format.
has answer: http://stackoverflow.com/a/27480352
has answer: http://stackoverflow.com/a/27480433
has answer: http://stackoverflow.com/a/44129371
type: Question
has answer: http://stackoverflow.com/a/56889519
has answer: http://stackoverflow.com/a/64198686
linked to: http://stackoverflow.com/q/27479790
has answer: http://stackoverflow.com/a/39566624
score: 60
linked to: http://stackoverflow.com/q/3552461
downvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/5250244
tagged with: jquery
has answer: http://stackoverflow.com/a/27480349
tagged with: date
upvote count: 60
has answer: http://stackoverflow.com/a/37229443
has title: Get current date in DD-Mon-YYY format in JavaScript/Jquery
has comment: http://stackoverflow.com/comment/91995478

knockout.js
tags question: http://stackoverflow.com/q/27581079
tags question: http://stackoverflow.com/q/27491913
tags question: http://stackoverflow.com/q/27542479
tags question: http://stackoverflow.com/q/27536537
tags question: http://stackoverflow.com/q/27495232
tags question: http://stackoverflow.com/q/27630678
tags question: http://stackoverflow.com/q/27543607
tags question: http://stackoverflow.com/q/27492447
tags question: http://stackoverflow.com/q/27528091
tags question: http://stackoverflow.com/q/27570712
tags question: http://stackoverflow.com/q/27533592
tags question: http://stackoverflow.com/q/27534712
tags question: http://stackoverflow.com/q/27593239
tag name: knockout.js
tags question: http://stackoverflow.com/q/27486520
tags question: http://stackoverflow.com/q/27507117
tags question: http://stackoverflow.com/q/27549830
tags question: http://stackoverflow.com/q/27489467
tags question: http://stackoverflow.com/q/27573537
tags question: http://stackoverflow.com/q/27594607
tags question: http://stackoverflow.com/q/27601924
tags question: http://stackoverflow.com/q/27490439
tags question: http://stackoverflow.com/q/27623560
tags question: http://stackoverflow.com/q/27571040
tags question: http://stackoverflow.com/q/27530229
type: Tag
tags question: http://stackoverflow.com/q/27481036
tags question: http://stackoverflow.com/q/27496418
tags question: http://stackoverflow.com/q/27607789
tags question: http://stackoverflow.com/q/27506181
tags question: http://stackoverflow.com/q/27515830
tags question: http://stackoverflow.com/q/27529011
tags question: http://stackoverflow.com/q/27509948
tags question: http://stackoverflow.com/q/27529913
tags question: http://stackoverflow.com/q/27525535
tags question: http://stackoverflow.com/q/27570394
tags question: http://stackoverflow.com/q/27475903
tags question: http://stackoverflow.com/q/27500028

http://stackoverflow.com/q/27535780
accepted answer: http://stackoverflow.com/a/27536755
has comment: http://stackoverflow.com/comment/43500953
linked to: http://stackoverflow.com/q/1295584
tagged with: javascript
type: AnsweredQuestion
score: 3
tagged with: arrays
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/43500267
has comment: http://stackoverflow.com/comment/43500026
tagged with: idioms
type: Question
has answer: http://stackoverflow.com/a/27536755
has title: Better way of filling javascript array
upvote count: 3
has body: I'm trying to find a better way to fill an array using JavaScript. Currently I have a function that looks like this to generate a fixed size array of sample data. I need the sample data to be not the same (non-homogenous) and preferably pseudo-random. function () { var arraySize = (1024 * 10) / 4; // Get size for 10k buffer var testdata = new Uint32Array(arraySize); for (var i = 0; i &lt; arraySize; i++) { testdata[i] = Math.random() * 0xFFFFFFFF; }; //... }; And it works, but I suspect it's not very idiomatic for JavaScript. My broader concern is that for the tests I'm running, I'm going to need larger (and larger!) arrays so I'm concerned about saturating the system for an otherwise temporary object. Is there a more efficient / idiomatic approach to filling an array?
has comment: http://stackoverflow.com/comment/43500300
answer count: 1

http://stackoverflow.com/q/27623560
tagged with: javascript
has title: How to get the Id of current row using knockout Js for hiding the remove button
has comment: http://stackoverflow.com/comment/43684296
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/43674041
has answer: http://stackoverflow.com/a/27657960
favorite count: 0
has comment: http://stackoverflow.com/comment/43676781
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43692856
upvote count: 1
has comment: http://stackoverflow.com/comment/43667642
has comment: http://stackoverflow.com/comment/43667639
score: 1
tagged with: knockout.js
type: Question
has body: Is there any way to hide the delete button/div only for first row in knockout js. i have nested templates. and if use $index it hides the remove button but also does the same for nested templates as they will have again the same index. I had tried many thing but nothing works. I only want to hide the content of logical-div only if is the first row. and this template is repeating with same attributes/values. below is the HTML part. Thanks in advance for any help. Some of JS Part. function ItemModel(id, parent_id, initialLogicalVal,initialTagVal,initialIsNotVal,initialAliasVal) { var self = this; self.id = ko.observable(id); self.parentId = ko.observable(parent_id); self.logicalConditionSelected = ko.observable([initialLogicalVal]); self.tagSelected = ko.observable([initialTagVal]); self.isNotSelected = ko.observable([initialIsNotVal]); self.aliasSelected = ko.observable([initialAliasVal]); } var viewModel = function RecursiveListViewModel(tasks) { var self = this; // Knock out function for checking the parents self.subitemsOf = function (item) { var children = ko.utils.arrayFilter(self.items(), function (arrayItem) { var parentItemId = (null === item) ? null : item.id(); return arrayItem.parentId() == parentItemId; }); return children; }; // Knock out function for checking if there are child for this record for populating nested records self.hasSubitems = function (item) { var firstMatch = ko.utils.arrayFirst(self.items(), function (arrayItem) { return (arrayItem.parentId() == item.id()); }); return (null !== firstMatch); // At least one item found in array }; // Knock out function for Adding the nested/child segment self.addNestedSegment = function(item) { self.items.push(new ItemModel(++ChildId, item.id(),'and','Tag','Is Not',firstAlias)); } // Knock out function for Adding the Main/Parent segment self.addMainSegment = function(data, event) { self.items.push(new ItemModel(++ChildId, null,'and','Tag','Is Not',firstAlias)); } // Knock out function for Deleting the se…
has comment: http://stackoverflow.com/comment/43688217

http://stackoverflow.com/comment/43592949
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27583664
has text: Thanks for the idea Sir, ahhm sir can i ask some question? Would you like to see this http://stackoverflow.com/questions/27584116/how-to-use-database-data-to-call-an-image-and-use-it-as-leaflet-marker-image?noredirect=1#comment43592905_27584116
type: AnswerComment

http://stackoverflow.com/q/27612749
has body: I want to know which Dom event is fired when alert message is called. I want to call start_tracking method when alert message is called. I am able to call methods on page resize but how can i know which method is called when the alert message is fired. win.addEventListener("click", function(event) { start_tracking (); }); Click event is working when i am clicking anywhere on the page but when i click the alert message content then it does not fire the click listener. Nothing seems to be fired on the alert() function.
tagged with: addeventlistener
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43647684
has comment: http://stackoverflow.com/comment/43647720
has comment: http://stackoverflow.com/comment/43647991
answer count: 2
has comment: http://stackoverflow.com/comment/43647675
score: 2
has comment: http://stackoverflow.com/comment/43647838
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/27613988
has comment: http://stackoverflow.com/comment/43647727
has title: Call function when alert message is fired
has comment: http://stackoverflow.com/comment/43647702
has answer: http://stackoverflow.com/a/27614062
has comment: http://stackoverflow.com/comment/43647782
type: AnsweredQuestion
upvote count: 2
possible better answer: http://stackoverflow.com/a/27614062
has comment: http://stackoverflow.com/comment/43647940
type: Question
accepted answer: http://stackoverflow.com/a/27613988
has comment: http://stackoverflow.com/comment/43648342

http://stackoverflow.com/comment/43572024
score: 0
type: Comment
has text: @FelixKling thanks for that correction. I've changed it accordingly in my post.
type: AnswerComment
comment on: http://stackoverflow.com/a/27573094

http://stackoverflow.com/comment/43594278
score: 0
comment on: http://stackoverflow.com/q/27584439
type: Comment
has text: @Bergi Thanks for the info. I still long for an elegant way to iterate objects-as-hashes, I hear we're getting the ability to extend the built ins soon. Still won't have the perf of native implementation though :(
type: QuestionComment

http://stackoverflow.com/q/27613420
tagged with: rickshaw
type: AnsweredQuestion
score: 1
type: Question
tagged with: charts
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/27750224
downvote count: 0
has title: Rickshaw - Incompatibility between HoverDetail and RangeSlider
favorite count: 0
upvote count: 1
accepted answer: http://stackoverflow.com/a/27750224
has body: I have a rickshaw graph with multiple data series on it (line graph) I decided to have the hover detail and also a range slider preview at the bottom of the graph - however when I hover over the lines the detail always "snaps" to one line only. If I take the range slider preview away it the hover detail works fine. Anyone know whats wrong? Thanks in advance. Code snippet: var graph = new Rickshaw.Graph( { element: document.querySelector('#timeSeriesPlot_'+index), series: chartData, renderer: 'multi', width: jQuery('.chartAndLegend').width()-100, height: 500, dotSize: 2 }); var xAxis = new Rickshaw.Graph.Axis.Time( { graph: graph } ); var yAxis = new Rickshaw.Graph.Axis.Y( { graph: graph, orientation: 'left', element: document.querySelector('#y_axis_'+index) } ); var hoverDetail = new Rickshaw.Graph.HoverDetail( { graph: graph } ); var slider = new Rickshaw.Graph.RangeSlider.Preview({ graph: graph, element: document.querySelector('#slider_'+index) }); var legend = new Rickshaw.Graph.Legend({ graph: graph, element: document.querySelector('#legend_'+index) }); var toggle = new Rickshaw.Graph.Behavior.Series.Toggle({ graph: graph, legend: legend }); graph.render(); Screenshot - my mouse is actually above the top green line

http://stackoverflow.com/q/27626189
favorite count: 0
tagged with: polyline
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27626302
has title: automatic set center and zoom in google maps api
downvote count: 1
type: Question
upvote count: 0
tagged with: javascript
score: -1
has body: When I autocomplete these 2 locations in the input boxes and click submit a polyline is drawn between the 2 locations. I want the map to center and zoom accordingly so that the line is completely visible at max zoom. I am not able to figure out the automatic center and zoom. Kindly help. ">
tagged with: google-maps-api-3
has answer: http://stackoverflow.com/a/27626302
answer count: 1

http://stackoverflow.com/a/27497332
answers question: http://stackoverflow.com/q/27497267
has comment: http://stackoverflow.com/comment/43426061
has body: You could do it with eval() function var test1 = { start: function() { } }; var fn = 'test1'; eval(fn).start() DEMO
upvote count: 1
has comment: http://stackoverflow.com/comment/43426056
downvote count: 1
has comment: http://stackoverflow.com/comment/43426207
has comment: http://stackoverflow.com/comment/43426053
score: 0
type: Answer

http://stackoverflow.com/q/27610400
has title: JQuery Custom Plugin Function not recognized
accepted answer: http://stackoverflow.com/a/27610499
has answer: http://stackoverflow.com/a/27610999
answer count: 2
has comment: http://stackoverflow.com/comment/43666191
downvote count: 0
tagged with: jquery
has body: I am working on a plugin to replace window.showmodalDialog. However, whenever I try to call my plugin function I am receiving the typical and dreaded "Object does not support this method". I've boiled down my plugin to show a simple alert box. ( function ( $ ) { $.fn.showAlert = function () { alert( "Hello There" ); } } )( jQuery ); This is placed in a separate JavaScript file, included on the page from which I want to call the function and I call the function as such: $.showAlert(); The execution of that line causes the error. If I boil the code down even further and make it an immediate function, ( function ( $ ) { alert( "Hello There" ); } )( jQuery ); the alert box pops up as soon as the page loads. I am certain I am doing something wrong, but I cannot figure out what it is. I have googled this error and looked through SO and everything I can determine is I am constructing my plugin correctly. EDIT In an effort to provide full disclosure. In our application, we have a JavaScript file, optionActions.js, that provides several different ways to open new windows. One of the functions is to open a modal dialog, openModal. This function takes several parameters used to define the modal window. The basic structure of this function is function openModal(strCategory, objParam, strFeatures, strModule) { //Various code and function calls to format the incoming data for the modal window //Provides a single object containing the necessary parameters and data for the modal window var objDialogIn = new OBJDIALOGIN( objParam ); return window.showModalDialog(strUrl, objDialogIn, strFeatures); } So modifying this function to use what should be my new plugin would look like this. //Include the JS file containing the definition for "showAlert" document.write( " " ); function openModal(strCategory, objParam, strFeatures, strModule) { //Various code and function calls to format the incoming data for the modal window //Provides a single object containing the necessary parameters and d…
favorite count: 0
has comment: http://stackoverflow.com/comment/43666086
has comment: http://stackoverflow.com/comment/43665482
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43697705
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27610499
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27610999

http://stackoverflow.com/comment/43562306
has text: I tried to include the script in my main view and it got me nowhere. So how do I do the second thing you suggested?
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27568533

http://stackoverflow.com/comment/43625791
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27601264
has text: This is flawed, if you keep pressing the update button the price will become cheaper and cheaper
score: 0

http://stackoverflow.com/q/27581018
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/27581315
type: Question
type: AnsweredQuestion
tagged with: javascript
answer count: 1
accepted answer: http://stackoverflow.com/a/27581315
tagged with: highcharts
downvote count: 0
has body: I have an HighCharts line plot in which the user can click points using this code: plotOptions: { series: { point: { events: { click: function(event) { // some processing } ... I want to change the color of the selected point. I know that I could write : marker: { states: { select: { fillColor: 'red', ... But, in my case, I really need to do this inside click, How can I do it ?
favorite count: 0
has title: How can I change the color of the selected point in Highcharts?
has comment: http://stackoverflow.com/comment/43588030

acrobat
type: Tag
tags question: http://stackoverflow.com/q/27512629
tag name: acrobat

http://stackoverflow.com/comment/43544367
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27538380
has text: var element = $scope.art.filter(function (el) {return el.sub === $rootScope.classification;})[0]; if (element.third && element.third.length) { // Hide console.log('hide'); } else { // Show console.log('show'); }

http://stackoverflow.com/a/27475640
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27474920
type: Answer
has comment: http://stackoverflow.com/comment/43424018
downvote count: 0
score: 1
has body: Essentially you never connected to the database. The Db object needs the .open() method to be called and all interaction to occur within the provided callback of that method or otherwise within the "connection" event handler. There are also a few concepts where you are a little off the mark here that I'd like to set you straight on. First a revised listing: var async = require('async'), MongoClient = require('mongodb').MongoClient; MongoClient.connect('mongodb://localhost/test',function(err,db) { var a1 = { "_id": "Travel", "name": "Travel", "title": "Travelogues", "description": "This was great", "date": new Date("2014/01/01") }, a2 = { "_id": "friends", "name": "friends", "title": "Friends", "description": "Random Pics", "date": new Date("2014/01/02") }; var albums; async.waterfall( [ function(cb) { db.collection("albums",cb); }, function(albums_col,cb) { albums = albums_col; albums.insert(a1,cb); }, function(doc,cb) { console.log("1. Successfully wrote"); console.log(doc); albums.insert(a2,cb); }, function(doc,cb) { console.log("2. Successfully wrote"); console.log(doc); cb(); } ], function(err,results) { if (err) throw err; db.close(); } ); }); First, you should be using MongoClient in new code. It's a standard implementation across all langauges. You can still use a Server object if you want, but the connection string should suffice normally. Alternately: MongoClient.connect( new Server( "localhost", Connection.DEFAULT_PORT, { "auto_reconnect": true } { w: 1 } ),function(err,db) { {...} }); Another part is that I am dropping options that are already set by default. Changing connection pool options doesn't really make sense for a listing such as this, but there is already a default 5 connections built into the driver without specifying this. Also the "WriteConcern" or { w: 1 } is the default. Secondly in the structures specified for the documents, use real date objects. These will serialize into MongoDB as "date" types for BSON storage, and they come back into y…
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27474920

google-visualization
tags question: http://stackoverflow.com/q/27524670
tags question: http://stackoverflow.com/q/27636212
tags question: http://stackoverflow.com/q/27605081
type: Tag
tags question: http://stackoverflow.com/q/27523889
tags question: http://stackoverflow.com/q/27556273
tags question: http://stackoverflow.com/q/27611303
tag name: google-visualization
tags question: http://stackoverflow.com/q/27577251
tags question: http://stackoverflow.com/q/27480196
tags question: http://stackoverflow.com/q/27578593
tags question: http://stackoverflow.com/q/27553594

http://stackoverflow.com/comment/43663202
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27621155
has text: Please review your grammar and code formatting, both can be improved. When you say "it doesn't work" try to explain what you expect to happen and what is happening.
score: 0

http://stackoverflow.com/a/43722549
downvote count: 0
type: Answer
has body: Use Ajax Chimp. This will (1) prevent redirecting your subscribers away from your page and (2) allow multiple forms. https://github.com/scdoshi/jquery-ajaxchimp
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/27638972

http://stackoverflow.com/q/27502601
tagged with: angularjs-directive
type: AnsweredQuestion
tagged with: angularjs-controller
has title: Angular custom directive: a strange error occurs when set controller attribute to `function(scope){}`
type: Question
has comment: http://stackoverflow.com/comment/43435745
accepted answer: http://stackoverflow.com/a/27503056
upvote count: 0
score: -2
tagged with: javascript
favorite count: 0
answer count: 1
has body: When I wrote a custom directive, a strange error blocks me. angular.module('app.directives', []) .directive('cyMenu', ['RecursionHelper', function(RecursionHelper) { function postLink(){}; return { restrict: 'E', templateUrl: 'views/component/cy-menu.html', replace: true, transclude: false, require: '?^cyMenu', controller: function ($scope) { // when set this argument($scope) to scope, error occurs. this.getList = function() { return $scope.list; } }, scope: { list: '=', isSubmenu: '@' }, compile: function(tElement) { return RecursionHelper.compile(tElement, postLink); } } } As I pointed out(see comment), when I set controller attribute to controller: function (scope) {}, the error occurs: Error: [$injector:unpr] Unknown provider: scopeProvider &lt;- scope http://errors.angularjs.org/1.3.6/$injector/unpr?p0=scopeProvider%20%3C-%20scope ... I don't know why. Any help will be appreciated. update Here is angular's official demo, it looks similar to my directivehttps://code.angularjs.org/1.3.6/docs/guide/directive: angular.module('docsTabsExample', []) .directive('myTabs', function() { return { restrict: 'E', transclude: true, scope: {}, controller: function($scope) { ... }, templateUrl: 'my-tabs.html' }; })
tagged with: angularjs
has answer: http://stackoverflow.com/a/27503056
downvote count: 2
has comment: http://stackoverflow.com/comment/43435488

http://stackoverflow.com/comment/43558670
has text: Just remove the text between the first and last parentheses. It's debatable whether or not the regex or calling `indexOf` inside a loop would be more efficient.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27556187
type: Comment

http://stackoverflow.com/comment/43582509
type: QuestionComment
has text: are you trying on android 4.4?
type: Comment
comment on: http://stackoverflow.com/q/27578574
score: 0

http://stackoverflow.com/q/27510339
score: 1
has comment: http://stackoverflow.com/comment/43462613
upvote count: 2
linked to: http://stackoverflow.com/q/3952009
downvote count: 1
answer count: 1
tagged with: javascript
has title: JS error only in Opera - Cannot convert x to object
favorite count: 0
linked to: http://stackoverflow.com/q/14028959
tagged with: runtime-error
tagged with: opera
has body: This error only occurs in the Opera browser. I've seen a few posts with a similar error, but i don't think the suggested solutions apply to my example. Most solutions say x is undefined. I don't think that applies, since i defer my script. My html file: ... media.match.min.js is a polyfill for window.matchMedia() for old browsers. bgimg.js is my own script which updates the background image according to media queries. I'll just post the entire first part of bgimg.js since it's in such an early phase (media queries omitted): var container = document.getElementById("container"); // declare all media queries var mqXS = window.matchMedia("..."); var mqS = window.matchMedia("..."); var mqM = window.matchMedia("..."); var mqL = window.matchMedia("..."); var mqXL = window.matchMedia("..."); var mqXXL = window.matchMedia("..."); var mqXXXL = window.matchMedia("..."); // create matching arrays to iterate var queryLists = [mqXS, mqS, mqM, mqL, mqXL, mqXXL, mqXXXL]; var fileNames = ["_xs", "_s", "_m", "_l", "_xl", "_xxl", "_xxxl"]; // function to check media queries and load matching image var checkQueries = function() { for (var i = 0; i < queryLists.length; i++) { if (queryLists[i].matches) { var fileName = "url(images/ls/01" + fileNames[i] + ".jpg)"; container.style.backgroundImage = fileName; break; } else { console.log("no match"); } } }; // run once checkQueries(); So this works in all modern browsers, but throws this error in Opera: Unhandled Error: Cannot convert 'container' to object on line 27: container.style.backgroundImage = fileName; So maybe Opera has a bug up its butt about how i created fileName? Or is something else wrong with my script? Again, no errors are thrown in any other browser.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43451646
type: Question
has answer: http://stackoverflow.com/a/27511169
accepted answer: http://stackoverflow.com/a/27511169

undefined
tags question: http://stackoverflow.com/q/27552806
tags question: http://stackoverflow.com/q/27520495
tag name: undefined
tags question: http://stackoverflow.com/q/27518568
type: Tag

http://stackoverflow.com/comment/43584539
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27574769
has text: Close iself = close the popup? Close the tab you opened? Both?
score: 0

http://stackoverflow.com/q/27546598
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
type: UnansweredQuestion
tagged with: selenium-webdriver
answer count: 0
upvote count: 3
has comment: http://stackoverflow.com/comment/43520658
type: Question
score: 3
tagged with: protractor
tagged with: firefox
tagged with: javascript
has comment: http://stackoverflow.com/comment/43519800
has title: Protractor click svg element breaks on latest firefox(v.34)
has body: I am testing with the latest version of Protractor on different browsers. In this test spec, i want to right click on a svg element to trigger a specific event on a given point within the svg. To click on this element, I'm using this function function rightClick(svgElement) { scrollToElement(svgElement).then(function () { browser.actions() .mouseMove(svgElement) .click(protractor.Button.RIGHT) .perform(); }); } I running the test on different selenium hubs with different browsers. The test passes for all browsers (chrome, firefox27, ie11+10) except for firefox34. When I watch the test, I can recognize that the mouse hovers the svg element(because the element is highlighted), but after the right click, it opens the firefox context menu instead of calling the eventlistener. Another important point is, that the test fails irregular. I tried different workarounds like performing the right click with two different browser.actions() (the first one to move on the element, and the second one to perform a right click). I also tried to click through the element coordinates... but nothing worked To prevent errors caused by resolutions, I maximize the windows and scroll to the element with an offset of 75px to prevent browser pop ups of breaking the tests.
downvote count: 0

http://stackoverflow.com/q/27604233
score: 2
answer count: 0
upvote count: 2
type: UnansweredQuestion
type: Question
has title: Deferred validation with Backbone
tagged with: validation
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: deferred
tagged with: backbone.js
has comment: http://stackoverflow.com/comment/43679801
has body: I'm using the backbone validation library for validating my backbone model. I want to create a custom validation that will go to the server and check to see if an id is unique. My problem is that I'm having trouble handling the deferred response correctly. validation: { 'userId': { required : true, fn : function(val, attr, computedState){ this.validateUniqueUserId(val, attr, computedState).done(function(data, textStatus, jqXHR){ console.log('got response'); if (data.metadata.totalCount) { return 'User Id must be unique' } }); } } }, validateUniqueUserId: function(val, attr, computedState){ return this.validateOnServer({ url : 'myurl/?userId=' + val, attr : 'userId', val : val }); }, validateOnServer: function(options){ this.trigger('validating', { attr: options.attr }); return Backbone.ajax({ url : options.url, type : 'GET', ignoreErrorGlobally : false }); } So my call goes to the server and correctly validates the required attribute and returns the response I expect. The problem, I believe, is the context of the line return 'User Id must be unique'. I hit this line, as expected, when a userId already exists but it looks like this line needs to be outside the done callback. For example, the following works as expected: validation: { 'userId': { required : true, fn : function(val, attr, computedState){ return 'User Id must be unique' } } }, Can anyone point me in the right direction?

http://stackoverflow.com/comment/43646851
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27612261
type: AnswerComment
has text: @Christoph I'm obviously calling it on an instance of food.

http://stackoverflow.com/q/27485848
answer count: 3
has answer: http://stackoverflow.com/a/27563363
downvote count: 0
has body: If Angularjs - Multiple directives on element with one being isolate scope is right, the isolated scope is bound to the directive, so why would there be any clashes? The documentation for this error states that processing them would result in a collision or an unsupported configuration. I don't buy this. Multiple directives already share the element's scope, which is surely where clashes/unsupported configurations would come in. I've tried looking for the "why" on this, but have come up empty handed. Can someone explain / give an example where this would indeed create a collision or an unsupported configuration?
favorite count: 0
has answer: http://stackoverflow.com/a/27561709
linked to: http://stackoverflow.com/q/26692263
tagged with: angularjs
has title: Why can't multiple directives ask for an isolated scope on the same element?
accepted answer: http://stackoverflow.com/a/27563363
possible better answer: http://stackoverflow.com/a/27543131
has answer: http://stackoverflow.com/a/27543131
type: AnsweredQuestion
tagged with: javascript
score: 15
tagged with: angularjs-scope
type: Question
upvote count: 15

http://stackoverflow.com/q/27491934
downvote count: 3
type: Question
answer count: 2
upvote count: 0
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/27492022
tagged with: ajax
has title: Cant parse JSON with JavaScript and Ajax
has body: Ive got an PHP which creates a .json file: &lt;?php $data=array( "Name"=&gt;"Someone", "Surname" =&gt; "Somebody"); $jsontext = "["; foreach($data as $key =&gt; $value) { $jsontext .= "{objectValue: '".addslashes($key)."', textObject: '".addslashes($value)."'},"; } $jsontext = substr_replace($jsontext, '', -1); $jsontext .= "]"; echo $jsontext; $fp = fopen('results.json', 'w'); fwrite($fp, json_encode($jsontext)); fclose($fp); ?> This is the results.json: "[{objectValue: 'Name', textObject: 'Someone'},{objectValue: 'Surname', textObject: 'Somebody'}]" The javascript: var xmlHttp = createXmlHttpRequestObject(); var finalText; window.onload = process; function createXmlHttpRequestObject() { var xmlHttp; if (window.ActiveXObject) { try { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { xmlHttp = false; } } else { try { xmlHttp = new XMLHttpRequest(); } catch (e) { xmlHttp = false; } } if (!xmlHttp) { alert("Cant create XmlHTTP..."); } else { return xmlHttp; } } function process() { if (xmlHttp.readyState == 0 || xmlHttp.readyState == 4) { xmlHttp.open("GET", "http://localhost/results.json", true); xmlHttp.onreadystatechange = handleServerResponse; xmlHttp.send(null); } else { //setTimeout('process()', 1000); alert("Error: Server is busy"); } } function handleServerResponse() { if (xmlHttp.readyState == 4 &amp;&amp; xmlHttp.status == 200) { finalText = xmlHttp.responseText; }else{ //alert("Error: server is busy"); } } function convertJSON(){ parsedText = JSON.parse(finalText); alert(parsedText); //This shows the parsed text, it gets here document.getElementById('finalResult').innerHTML += parsedText.objectValue; document.getElementById('finalResult').innerHTML += parsedText.Name; } Whenever I summon convertJSON from a button onclick I keep getting undefined, when printing the results into the "finalResult" div... what am I doing wrong?
favorite count: 0
has comment: http://stackoverflow.com/comment/43415425
score: -3
has answer: http://stackoverflow.com/a/27492089
accepted answer: http://stackoverflow.com/a/27492089
has comment: http://stackoverflow.com/comment/43415394
has answer: http://stackoverflow.com/a/27492022
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43415392
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/comment/43531108
type: Comment
comment on: http://stackoverflow.com/q/27551631
score: 0
type: QuestionComment
has text: I think, that's impossible!:)

http://stackoverflow.com/q/27615351
has answer: http://stackoverflow.com/a/27615619
answer count: 1
has body: I've built a line-graph in dimple.js that can be found here. http://jsfiddle.net/lukehtravis/0twgc2uL/ You'll notice on the y-axis, there is a little "m" that is automatically generated by dimple and placed next to the numbers as a quantity label. I combed through the documentation, but couldn't find anything about that little m. Anyone know how to remove it? Here's the code // Create the canvas to draw on var svg = d3.select("#charty") .append("svg") .attr("width", 800) .attr("height", 500); // Create the chart object | contents of data visible in fiddle link above var chart = new dimple.chart(svg, data); //Create the x axis var x = chart.addCategoryAxis("x", "Day"); x.showGridlines = true; // Create the y axis var y = chart.addMeasureAxis("y", "Volume"); y.title = "Volume (AF)"; y.overrideMin = 300000; y.overrideMax = 1450000; y.showGridlines = true; // Add location as data series var series = chart.addSeries("Location", dimple.plot.line); // Decorate the lines in the graph series.lineWeight = 2; series.lineMarkers = true; // Create the legend chart.addLegend(100, 50, 200, 200); // Draw the chart chart.draw(3100);
tagged with: d3.js
accepted answer: http://stackoverflow.com/a/27615619
type: AnsweredQuestion
tagged with: dimple.js
type: Question
tagged with: javascript
score: 0
has title: Trying to remove a tick label in dimple.js

http://stackoverflow.com/comment/43490942
comment on: http://stackoverflow.com/q/27530602
type: Comment
type: QuestionComment
has text: Quentin, I went over the link that you suggested and I am sorry if I am misunderstanding. If I may ask, aren't I providing the asynchrony by having that function being called on success? Could you please - and thanks in advance - provide with a short example? Do I need to have a separate function that calls upon the function that has the $.post and then return the value to the original function? If so, am I correct to take/understand that the function within the $.post its only to manipulate the response prior to passing to the function calling upon the function with the $.post?
score: 0

http://stackoverflow.com/q/27628922
tagged with: curl
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27629097
upvote count: 1
has title: How to curl item that doesn't happen on pageLoad
type: Question
has body: I am trying to get the Title of a movie on IMDb: http://www.imdb.com/title/tt0049902/ However, if I do: $ curl http://www.imdb.com/title/tt0049902/ The Title that is contained is Un condamné à mort s'est échappé ou Le vent souffle où il veut, not "A Man Escaped", which is what I want. Here is the HTML from the curl response: Un condamné à mort s'est échappé ou Le vent souffle où il veut (1956) It looks like the English title must be inserted after the initial page load. How would I fetch this title then?
has comment: http://stackoverflow.com/comment/43678826
accepted answer: http://stackoverflow.com/a/27629097
answer count: 1
downvote count: 0
tagged with: javascript
score: 1
has comment: http://stackoverflow.com/comment/43678746
has comment: http://stackoverflow.com/comment/43678731
favorite count: 0

http://stackoverflow.com/comment/43453952
type: QuestionComment
has text: @KamranAhmed Yes thats what i want. but i can't get that workend in my code.
score: 0
comment on: http://stackoverflow.com/q/27511369
type: Comment

http://stackoverflow.com/q/27546951
has answer: http://stackoverflow.com/a/27552321
tagged with: http://stackoverflow.com/tag/json
type: UnansweredQuestion
tagged with: struts
has title: How to set the values of select html element from values retrieved by server side
has body: I have a combobox or select element of html. I want to set the values of this html element through from the values retrieved from server. The value retreived from server array. I want to parse this array and set the value of html element. Using struts 1.3 on server side. I have set the values on server side in an array and set its value in action form. Now without using scriptlets i want to retrieve the values and set this value to an html element using javscript. sample code &lt;table width="100%"&gt; &lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td width="40%" align="right"&gt;&lt;bean:message key="com.console.pack1"/&gt;:&lt;/td&gt; &lt;td&gt; &lt;select name="n1"&gt; &lt;option value="0"&gt;A&lt;/option&gt; &lt;option value="1"&gt;B&lt;/option&gt; &lt;option value="3"&gt;C&lt;/option&gt; &lt;/select&gt; &lt;/td&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr id="line_second"&gt; &lt;td width="40%" align="right"&gt;&lt;bean:message key="com.console.pack2"/&gt;:&lt;/td&gt; &lt;td&gt; &lt;select name="n2"&gt; &lt;option value="0"&gt;A&lt;/option&gt; // set the values of option from the array retrieved from struts action form &lt;option value="1"&gt;B&lt;/option&gt; &lt;option value="3"&gt;C&lt;/option&gt; &lt;/select&gt; &lt;/td&gt; &lt;/td&gt; &lt;/tr&gt; Values set in action Class to action form MyActionForm form = (MyActionForm) actionForm; form.setArray(array); How to set this value in html element. Is there any workaround possible. Any ideas!! **Remeber : ** The values of html element from server are dynamic.
tagged with: javascript
tagged with: jquery
type: Question
tagged with: http://stackoverflow.com/tag/html
score: 0
answer count: 1

http://stackoverflow.com/comment/43664691
score: 1
type: AnswerComment
has text: Does `HTMLCollection` object have `sort` method?
type: Comment
comment on: http://stackoverflow.com/a/27622059

http://stackoverflow.com/comment/43433982
comment on: http://stackoverflow.com/a/27501725
type: AnswerComment
type: Comment
score: 0
has text: Have you checked your own fiddle? First of all, there is `$('.answer').val();` instead of `$('.answer').val('');` in fiddle. Secondly, the idea is to show all selected options, not only last one. And finally it will be better to save `$('.answer')` in variable (`answer`) in the very beginning of code and to use variable instead of multiple same selections.

http://stackoverflow.com/q/27548894
has body: I have an input element and what I want to do is when user types this static text will always appear after the user input. h "staticTextHere" hello "staticTextHere" hello world "staticTextHere" I tried some techniques but there are so much problem here. Is there any idea how to achieve this? Here is my codes; &lt;input type="text" id="staticTextId" name="staticTextName" ..... /&gt; And js; .on('keydown', function (event) { var textLength = document.getElementById($id).value.length; document.getElementById($id).value = document.getElementById($id).value.substr(0,textLength - staticText.length) + staticText; });
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27549396
type: Question
score: 0
has comment: http://stackoverflow.com/comment/43524262
possible better answer: http://stackoverflow.com/a/27549376
has answer: http://stackoverflow.com/a/27549396
tagged with: javascript
has comment: http://stackoverflow.com/comment/43524223
has comment: http://stackoverflow.com/comment/43524187
answer count: 3
tagged with: php
has title: How to add static text to input value
has answer: http://stackoverflow.com/a/27549216
has answer: http://stackoverflow.com/a/27549376

map-files
tag name: map-files
type: Tag
tags question: http://stackoverflow.com/q/27513715

http://stackoverflow.com/comment/43606651
comment on: http://stackoverflow.com/a/27591336
score: 0
type: AnswerComment
type: Comment
has text: But tell me bro just one more thing, what if i have lets say 5 windows (modals)? Thanks for help.

http://stackoverflow.com/comment/43592783
type: Comment
comment on: http://stackoverflow.com/a/27584051
has text: They don't even need `.call()`. Just `(function(){ return this })()` will do the same.
score: 0
type: AnswerComment

http://stackoverflow.com/q/27505036
upvote count: 2
downvote count: 1
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/43440162
has title: Opening a url inside a popup element (get new title and address bar)
has answer: http://stackoverflow.com/a/27796489
possible better answer: http://stackoverflow.com/a/27506779
type: Question
has answer: http://stackoverflow.com/a/27506779
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27506616
answer count: 3
accepted answer: http://stackoverflow.com/a/27796489
tagged with: http://stackoverflow.com/tag/html
has body: I am looking to create something like this: post 23 once a user click on this element I want to fadein a popup div and load page post/23 html to it. I want to title and address bar to change accrodingly to the new post page title and address bar. Once I close the popup div, I want the title and address bad to be changed back. I am sorry I don't have any code for you guys, I am looking for this for quite some time, and unable to find anything certain. my best guess was using http://dimsemenov.com/plugins/magnific-popup/documentation.html can someone with experience performing something similar help me please?

http://stackoverflow.com/comment/43435210
type: AnswerComment
comment on: http://stackoverflow.com/a/27502476
score: 0
type: Comment
has text: Maybe I confuse, I want to start data row "" goes here ... not displaying

http://stackoverflow.com/comment/43445349
type: QuestionComment
has text: The field to update is determined upon which input element is on focus. So this data as far as I can see can only be stored in a variable to perform this operation.
comment on: http://stackoverflow.com/q/27506969
score: 0
type: Comment

http://stackoverflow.com/comment/78886197
has text: I had same problem and come to similar conclusion from looking at the code. What I wanted to achieve is to update marker with different class, when text inside marker changed.
comment on: http://stackoverflow.com/q/27557080
type: QuestionComment
type: Comment
score: 0

http://stackoverflow.com/a/27521038
type: Answer
answers question: http://stackoverflow.com/q/27520851
score: 1
has comment: http://stackoverflow.com/comment/43558919
upvote count: 1
has comment: http://stackoverflow.com/comment/43552118
downvote count: 0
has body: Fast (O(n)) and simple enough. This approach gets the exact and nearest values. Low, Exact and High. var max = function (arr) { return Math.max.apply(null, arr); }; var min = function (arr) { return Math.min.apply(null, arr); }; var nearest = function (arr, x) { var l = [], h = []; var exact = -1; arr.forEach(function (v) { if (v == x) exact = v; ((v &lt; x) &amp;&amp; l.push(v)) || ((v &gt; x) &amp;&amp; h.push(v)); }); return { "low": arr.indexOf(max(l)), "exact": exact, "high": arr.indexOf(min(h)) }; }; var array = [00, 05, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55]; var testValue = 30; var range = nearest(array, testValue); if (range.exact != -1) { alert("Exact Value " + testValue) } alert("Near Low:" + array[range.low] + " Near High:" + array[range.high]);

http://stackoverflow.com/comment/43561560
type: Comment
type: QuestionComment
has text: @NicholasAyoub It's not just `.length`, but also making sure that code doesn't run until the button is clicked
comment on: http://stackoverflow.com/q/27568122
score: 0

http://stackoverflow.com/comment/43614065
comment on: http://stackoverflow.com/a/27595109
type: AnswerComment
has text: now its just the library it can't seem to connect to
score: 0
type: Comment

http://stackoverflow.com/comment/69297497
has text: This should be the accepted answer, because not everyone needs to initiate `FB.init`.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/33857401
type: AnswerComment

http://stackoverflow.com/q/27553767
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27554756
answer count: 3
has title: How to dynamically set parameter on ng-click with variable from ng-repeat
has answer: http://stackoverflow.com/a/27553962
tagged with: angularjs
has answer: http://stackoverflow.com/a/27554122
has body: I am trying to grab the expression in my label and insert it as a method parameter on my ng-click. The problem is that I get an undefined is not a function error when I try this. The {{}} expression populates as it should, but it looks like date going into the ng-click is acting like some undefined variable. I'm not sure how to resolve this, any help would be appreciated. &lt;div ng-controller="methodController"&gt; &lt;div class="btn-group" data-ng-repeat="date in dates"&gt; &lt;label data-ng-click="method(date | date:'dd')"&gt;&lt;/label&gt; &lt;/div&gt; &lt;/div&gt; I've also tried: ng-click="method(date) ng-click="method() In Angular, I use the below method to create my array of dates. $scope.dates = []; for (var i = -3; i &lt;= 3; i++) { var today = new Date(); $scope.dates.push(today.setDate(today.getDate() + i)); } And my method is defined as such within the methodController: $scope.method = function (date) { //code guts }
has answer: http://stackoverflow.com/a/27554756
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27554122
score: 0

http://stackoverflow.com/a/27629649
answers question: http://stackoverflow.com/q/27627048
score: 1
upvote count: 1
downvote count: 0
has body: You can use the $parse service to retrieve the value without using scope: {}, but you will lose the 2 way data binding that you inherently get from using scope: { items: '=' }. As mentioned by Dana Cartwright, if you need 2 way binding, you have to set this up manually with watches. directive('itemList', function($parse){ return { link: function(scope, elem, attrs){ var itemList = $parse(attrs['items'])(scope); // do stuff with itemList // ... // then expose it scope.itemList = itemList; } }; });
type: Answer

http://stackoverflow.com/q/27528164
downvote count: 0
linked to: http://stackoverflow.com/q/13252225
favorite count: 0
has comment: http://stackoverflow.com/comment/43484997
upvote count: 2
tagged with: typescript
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27528732
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27528732
has body: Here's my situation. I have some legacy vanilla JavaScript loaded that contains this code: window.A = { x: { /* several things live here */ } }; This is the minimal code to repro my problem. In reality A is our global "namespace" object, and x is an object with some legacy functions I want to access in my newer Typescript classes. So, after the above has run, I'm trying to access x inside a class in a nested Typescript module, like this: module A { module B { export class Item { constructor(){ alert(A.x); } } } } The Web Essesntials as well as the typescriptlang.org site can generate JavaScript which will in fact work as required, but VS2012' respectively typescriptlang.org's syntax highlighting both complain that: Property 'x' does not exist on type 'typeof A'. This makes sense. In this question it's shown how you need to inform the compiler of global variables, so I've tried adding... declare var x: any; ...to module A, but this doesn't help. I've also tried... declare var A.x: any; ...both inside and outside module A, but this doesn't help either. So, how do I inform the Typescript compiler of A.x in a way so that I can access it safely inside Item?
has title: Use a variable from ancestor module when it's declared elsewhere
score: 2
answer count: 1

http://stackoverflow.com/a/27524176
has comment: http://stackoverflow.com/comment/43486893
has body: You are currently using a PascalCased string of your object path as element ids. It would be easier if you could use a delimited string. Having done that, you can (1) split the string into an array based on that delimiter, (2) iterate that array and checking each item if it is an object property of your json object, (3) if found, assign that property to the object itself for the next iteration, (4) return the last object, (5) use that object value to assign to your form elements by iterating them as well. Note: You have to be consistent in naming your elements, variables and properties. In your code as posted in the question, there is no consistency. For the example below, I have converting everything to lower case to normalize it. For all practical purposes, you will have to relook at that. This snippet will make it clear to you: var jsonString = '{"Cat": {"enabled": false, "Color": "#994c4c", "height":10, "eye": "blue" }, "Dog": { "enabled": true, "typeOf": {"breed": "Affenpinscher"}},"Elephant": {"enabled": true, "food": {"type": {"fruits": true}}}}'; var json = JSON.parse(jsonString.toLowerCase()); /* converted to lowercase */ function getProp(obj, str) { var arr = str.toLowerCase().split('-'); // splitting on delimiter arr.forEach(function(item, idx) { // iterate the split array if (item in obj) obj = obj[item]; // if item is in object, assign this prop else return; // to the object. otherwise continue }); return obj; // return the found prop as current obj } var $elems = $("input, select"); // jQuery set of all your elements $elems.each(function() { // iterate this set of elements var id = this.id, propValue = getProp(json, id); // get the property by passing json and id $(this).val(propValue.toString()); // set the retreived property as val }); TRUE FALSE TRUE FALSE Demo Fiddle: http://jsfiddle.net/abhitalks/5ybu7nt3/1/ .
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43486314
downvote count: 0
answers question: http://stackoverflow.com/q/27522327
type: Answer
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/43486713
accepted answer of: http://stackoverflow.com/q/27522327

http://stackoverflow.com/comment/43554220
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27563925
type: Comment
has text: The fact that I do not know how to use it properly, because I almost do not know JS

html-lists
tags question: http://stackoverflow.com/q/27596691
tags question: http://stackoverflow.com/q/27556375
tags question: http://stackoverflow.com/q/27597975
type: Tag
tags question: http://stackoverflow.com/q/27587505
tag name: html-lists

mongodb
tags question: http://stackoverflow.com/q/27614330
tags question: http://stackoverflow.com/q/27493423
tags question: http://stackoverflow.com/q/27595788
tags question: http://stackoverflow.com/q/27525225
tags question: http://stackoverflow.com/q/27540624
tags question: http://stackoverflow.com/q/27535027
tags question: http://stackoverflow.com/q/27636364
tags question: http://stackoverflow.com/q/27506969
tags question: http://stackoverflow.com/q/27583681
tags question: http://stackoverflow.com/q/27607396
tag name: mongodb
tags question: http://stackoverflow.com/q/27594668
tags question: http://stackoverflow.com/q/27595602
tags question: http://stackoverflow.com/q/27518304
tags question: http://stackoverflow.com/q/27533914
tags question: http://stackoverflow.com/q/27553941
tags question: http://stackoverflow.com/q/27484547
tags question: http://stackoverflow.com/q/27566647
tags question: http://stackoverflow.com/q/27592606
tags question: http://stackoverflow.com/q/27505345
tags question: http://stackoverflow.com/q/27584564
tags question: http://stackoverflow.com/q/27513504
tags question: http://stackoverflow.com/q/27582112
tags question: http://stackoverflow.com/q/27517646
tags question: http://stackoverflow.com/q/27579455
type: Tag
tags question: http://stackoverflow.com/q/27538428
tags question: http://stackoverflow.com/q/27577099
tags question: http://stackoverflow.com/q/27614295
tags question: http://stackoverflow.com/q/27536406
tags question: http://stackoverflow.com/q/27569970
tags question: http://stackoverflow.com/q/27549992
tags question: http://stackoverflow.com/q/27476835
tags question: http://stackoverflow.com/q/27560981
tags question: http://stackoverflow.com/q/27474920
tags question: http://stackoverflow.com/q/27480134
tags question: http://stackoverflow.com/q/27521967
tags question: http://stackoverflow.com/q/27477321
tags question: http://stackoverflow.com/q/27567786
tags question: http://stackoverflow.com/q/27637047
tags question: http://stackoverflow.com/q/27489328
tags question: http://stackoverflow.com/q/27585779
tags question: http://stackoverflow.com/q/27504258
tags question: http://stackoverflow.com/q/27483334
tags question: http://stackoverflow.com/q/27499863
tags question: http://stackoverflow.com/q/27633480
tags question: http://stackoverflow.com/q/27609414
tags question: http://stackoverflow.com/q/27572709

http://stackoverflow.com/comment/43460700
type: Comment
comment on: http://stackoverflow.com/a/27515090
score: 0
type: AnswerComment
has text: Isn't this two lines?

http://stackoverflow.com/comment/43440093
type: AnswerComment
has text: ! is equivalent to NOT operator. It basically inverts the value of boolean. therefore if hasStopped = false -> !hasStopped = true
type: Comment
comment on: http://stackoverflow.com/a/27504633
score: 0

http://stackoverflow.com/q/27576598
has body: I'm creating a "HTML editor" for a webpage of mine. At the moment, I only want the editor to allow entry of HTML and CSS elements and not Javascript (or Jquery for that matter). I'm trying to find a way that disables the use of &lt;script&gt; or &lt;script type="text/javascript"&gt; &lt;/script&gt; using PHP. However the current way outputs a messy result! $content_in_before = str_replace('&lt;script','',$content_in_before); $content_in_before = str_replace('script&gt;','',$content_in_before); It's also not very well coded! Is there a more bulletproof way of coding this, stopping all type of Javascript from being entered into this form? (While still allowing CSS and HTML)? Thanks in advance!
has comment: http://stackoverflow.com/comment/43578707
has answer: http://stackoverflow.com/a/27576810
has comment: http://stackoverflow.com/comment/43578638
has comment: http://stackoverflow.com/comment/43578551
tagged with: php
answer count: 4
has comment: http://stackoverflow.com/comment/43578646
has answer: http://stackoverflow.com/a/27576683
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27576650
has comment: http://stackoverflow.com/comment/43578678
has comment: http://stackoverflow.com/comment/43578657
linked to: http://stackoverflow.com/q/1886740
has comment: http://stackoverflow.com/comment/43578728
has comment: http://stackoverflow.com/comment/43578696
type: Question
has title: Disable javascript entry into form
has comment: http://stackoverflow.com/comment/43578579
possible better answer: http://stackoverflow.com/a/27576693
has comment: http://stackoverflow.com/comment/43578593
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27576693
accepted answer: http://stackoverflow.com/a/27576683
score: 0
has comment: http://stackoverflow.com/comment/43578627
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/27526480
downvote count: 0
has comment: http://stackoverflow.com/comment/43503794
score: 1
answers question: http://stackoverflow.com/q/27517253
accepted answer of: http://stackoverflow.com/q/27517253
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43682514
has comment: http://stackoverflow.com/comment/80437217
type: Answer
has body: Hammer.js as a stand-alone (which is how the official package is provided) does not ship with the jQuery plugin, so you can't use that syntax without manually adding the jQuery plugin yourself. It's pretty easy to do your own local fork of that package and bolt the plugin on (I haven't released this yet as I'm quite sensitive about the Atmosphere namespace mess problem). Alternatively, you could just include the plugin on page load. Either way, that syntax should work or, failing that, you just have to use the non-jQuery syntax described in the core docs.

http://stackoverflow.com/a/27594112
accepted answer of: http://stackoverflow.com/q/27588651
type: Answer
upvote count: 1
score: 1
has body: First off, you are using jQuery 1.2 and a very old lightbox script. I would update both of these. You can include jQuery from a CDN: And you can get a good lightbox script with easy to follow instructions here: http://lokeshdhakar.com/projects/lightbox2/ Then, the first thing to do, is hook up the the thumbnail to display in a lightbox: You can then add the other images as anchor tags, leaving them empty so that they don't display. If you don't feel happy using empty anchor tags, you can hide them using CSS (display: none). And this should work. The important thing to realize is that giving them the same data-lightbox attribute, makes them appear as part of the same show. Here's a demo.
answers question: http://stackoverflow.com/q/27588651
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/43561829
has text: I think, you can't use $apply without $scope or $rootScope.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27568151

http://stackoverflow.com/comment/43422935
comment on: http://stackoverflow.com/a/27493954
score: 0
type: AnswerComment
has text: Yes, it was processing the data correctly before chaining the promises
type: Comment

http://stackoverflow.com/comment/43597333
comment on: http://stackoverflow.com/q/27586444
type: QuestionComment
has text: You mean like http://jsfiddle.net/j08691/7rq64ku1/?
type: Comment
score: 3

http://stackoverflow.com/q/27596760
tagged with: jquery
tagged with: ruby-on-rails-4
tagged with: datepicker
has body: I click on the text field to open a datepicker, If I do not select a date, and just click anywhere on the screen, the datepicker displays wrong date, as shown The code goes like this, In edit.html.erb &lt;%= f.input :birthday, wrapper: :append do %&gt; &lt;%= f.text_field :birthday, :value =&gt; @user.birthday.try(:strftime,"%b %d, %Y"), :class =&gt; "datetime form-control", :'data-date-end-date' =&gt; Date.current.strftime('%m %d, %Y') %&gt; &lt;% end %&gt; &lt;div class="form-group"&gt;&lt;/div&gt; &lt;%= f.input :anniversary, wrapper: :append do %&gt; &lt;%= f.text_field :anniversary, :value =&gt; @user.anniversary.try(:strftime,"%b %d, %Y"), :class =&gt; "datetime form-control", :'data-date-end-date' =&gt; Date.current.strftime('%m %d, %Y') %&gt; &lt;% end %&gt; In datepicker.js, jQuery(document).on('focus', 'input.datetime', function() { opts = {format: 'M dd, yyyy', autoclose: true}; jQuery(this).datepicker(opts); jQuery(".datepicker").css("z-index",10000); }); What can be done to get rid of such error?
has comment: http://stackoverflow.com/comment/43617540
tagged with: ruby
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43620108
has title: Datepicker parses wrong date
score: 0
type: Question
tagged with: javascript

http://stackoverflow.com/comment/43487072
comment on: http://stackoverflow.com/q/27529011
has text: You could use a `ko.computed` and format the items as you'd like. Or just nest several `span`s with your data-bind to visible and text. Do you have a fiddle?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43498786
score: 0
type: Comment
type: QuestionComment
has text: `store.length` can give odd responses; index should change consistently in the `forEach` loop. Try index ...
comment on: http://stackoverflow.com/q/27535140

http://stackoverflow.com/a/27609942
answers question: http://stackoverflow.com/q/27609908
upvote count: 5
score: 5
downvote count: 0
has body: pull your interval reference out to a higher level of scope. var slideInterval; function triggerTimer(){ slideInterval= setInterval(slide,2000); } function cancelTimer(){ clearInterval(slideInterval); }
type: Answer

http://stackoverflow.com/comment/43566630
type: Comment
type: AnswerComment
score: 1
comment on: http://stackoverflow.com/a/27569950
has text: I do not see Telerik in your code; it might be just [ASP.NET AJAX Control Toolkit](http://www.ajaxcontroltoolkit.com/). Btw, how do you know you application use Telerik?

http://stackoverflow.com/comment/106434412
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27574160
type: Comment
has text: I agree with @Gordon, and am confused as to why this answer is upvoted -- the linked example uses pure SVG, and always has, according to the bl.ocks history. There is a canvas element, but it isn't doing anything.

http://stackoverflow.com/comment/43645121
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27611215
type: AnswerComment
has text: Did you create the script file that's being injected? If so, document.ready will trigger within that, then once it has finished resolving, do the try catch. Otherwise you can use .done and call it within there?

http://stackoverflow.com/comment/43618271
has text: @Surender nice reference, but you should quote text/code from the link as links are bound to change or relocate.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27596952

http://stackoverflow.com/comment/43575646
score: 0
type: AnswerComment
type: Comment
has text: how does this fit in the question? I am very new to js. Please bear with me
comment on: http://stackoverflow.com/a/27575006

http://stackoverflow.com/q/27626357
possible better answer: http://stackoverflow.com/a/27626408
tagged with: javascript
type: Question
score: 0
answer count: 2
tagged with: ractivejs
has answer: http://stackoverflow.com/a/27626408
has answer: http://stackoverflow.com/a/27628739
accepted answer: http://stackoverflow.com/a/27628739
has title: Ractive.js flip boolean function
type: AnsweredQuestion
has body: I am new to Javascript (started today) and I am using the Ractive framework to make a web app to deliver an analytics product. I am trying to make a function that flips a boolean value in the .on function. I have something like this but it isn't working. Can someone help me about how to think about this problem? ractive.on('flipBool', function ( ) { ractive.set( 'theData.*.Visible', !'theData.*.Visible' ); });

http://stackoverflow.com/q/27559939
tagged with: google-chrome
score: 7
has title: On mobile, how do I get "enter" to submit a form within a type="number" input?
tagged with: forms
has body: I'm using AngularJS and ng-submit like this: &lt;form ng-submit="submit(foo); foo='';"&gt; &lt;input type="number" ng-model="foo"&gt; &lt;/form&gt; In Chrome on a desktop machine, I can press enter while in the input to submit the form (which calls submit(foo) in this case). In Chrome for Android (KitKat), it doesn't work. BUT, if I change the input to type="text" then it does work when I press "Go." How can I get the form to behave like it does for input type="text" with input type="number"? I'm using type="number" because I want the device to bring up the numerical keyboard. Here's a plunkr that illustrates the problem: http://plnkr.co/edit/4WJfdoKgXu7o6ZsM8WFx?p=preview (or http://goo.gl/IiQzGf if you're on a mobile device). Edit: Listening for enter with JavaScript does not work: http://plnkr.co/edit/07QGA1s4UCyop8IB8Dmx?p=preview Edit 2: It's not an AngularJS problem. It's an HTML problem: http://embed.plnkr.co/ZVD0ZtmEutWZr7P7vq2b/preview
type: Question
has answer: http://stackoverflow.com/a/47122853
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: android
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
type: UnansweredQuestion
upvote count: 7

http://stackoverflow.com/comment/43531898
score: 0
comment on: http://stackoverflow.com/q/27552737
has text: I'd move preventDefault to the top.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27564911
score: 0
answers question: http://stackoverflow.com/q/27564757
has comment: http://stackoverflow.com/comment/43555043
type: Answer
accepted answer of: http://stackoverflow.com/q/27564757
has body: i'm succesful to add this code for change "Load More" with "No More Posts" replace : alert("No more divs"); // alert if there are none left by: $(".load-more").html(' No More Posts ') // if there are none left And is woking fine :) Now only i want to add loading.gif when posts is loading?
type: AcceptedAnswer

http://stackoverflow.com/comment/119094759
type: AnswerComment
has text: Ah ha! An explicit `import` gets the job done. I won't be putting an `import` for each asset I want copied though! Since this is not fundamentally a dependencies/bundling/minification/transpiling step in the build, I'll do it outside of webpack, I think.
type: Comment
comment on: http://stackoverflow.com/a/67068576
score: 1

http://stackoverflow.com/a/27566413
downvote count: 0
answers question: http://stackoverflow.com/q/27566314
type: Answer
score: 7
upvote count: 7
has body: One way which appears to work is to call click() instead of focus(): $('.someclass input').click();

http://stackoverflow.com/a/27504716
score: 4
answers question: http://stackoverflow.com/q/27504668
has body: Use method: 'GET' if you want the params in the url. Update You'll got to convert the payload yourself then... Ext.Ajax#request accepts a string as its params option, and you "url encode" your data object with Ext.Object.toQueryString. So something like that: Ext.Ajax.request({ // ... method: 'POST', params: Ext.Object.toQueryString(payload) });
upvote count: 4
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43439903
has comment: http://stackoverflow.com/comment/43439950
type: Answer
accepted answer of: http://stackoverflow.com/q/27504668

http://stackoverflow.com/q/27568295
has comment: http://stackoverflow.com/comment/43562195
has comment: http://stackoverflow.com/comment/43562256
has comment: http://stackoverflow.com/comment/43786995
accepted answer: http://stackoverflow.com/a/27568541
has title: Regexp search not surrounded by
tagged with: javascript
has comment: http://stackoverflow.com/comment/43786911
has comment: http://stackoverflow.com/comment/43786941
score: 0
has answer: http://stackoverflow.com/a/27568541
has comment: http://stackoverflow.com/comment/43562191
has answer: http://stackoverflow.com/a/27568934
linked to: http://stackoverflow.com/q/3569104
tagged with: regex
has comment: http://stackoverflow.com/comment/43786889
answer count: 4
type: AnsweredQuestion
has body: I want to find all occurences of % that are not within quotation characters. Example> "test% testing % '% hello' " would return ["%","%"] Looking at another stack overflow thread this is what I found: var patt = /!["'],*%,*!['"]/g var str = "testing 123 '%' % '% ' " var res = str.match(patt); However this gives me null. Have you any tips of what I should do? Demo
possible better answer: http://stackoverflow.com/a/27568384
has answer: http://stackoverflow.com/a/27571625
has answer: http://stackoverflow.com/a/27568384
has comment: http://stackoverflow.com/comment/43562411
type: Question

http://stackoverflow.com/q/27481633
tagged with: oop
has body: I'm trying to build a contructor which accepts an object and sets it to itself. For instance: var Somecontructor = function(object){ this = object; } Obviously, I cannot assign anything to "this" because it is immutable, but I'm trying to figure out a way to do this. Any ideas? Edit: I don't know why this question deserves negative vote. All I want to do is, construct an object that creates properities using whatever that was passed as arguments. Sure, I can do this and I wanted to find the most efficient way to do it. If your answer doesn't work, please don't be a terrible human being by negative voting the question.
has comment: http://stackoverflow.com/comment/43396247
has title: Contructor that creates new objects using the object passed as argument
linked to: http://stackoverflow.com/q/122102
score: -1
type: Question
answer count: 2
downvote count: 2
has comment: http://stackoverflow.com/comment/43396269
upvote count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/43400890
favorite count: 0
has answer: http://stackoverflow.com/a/27481656
linked to: http://stackoverflow.com/q/16024940
has comment: http://stackoverflow.com/comment/43396058
possible better answer: http://stackoverflow.com/a/27481656
has comment: http://stackoverflow.com/comment/43410386
has comment: http://stackoverflow.com/comment/43401134
has answer: http://stackoverflow.com/a/27482408
accepted answer: http://stackoverflow.com/a/27482408
has comment: http://stackoverflow.com/comment/43401108
has comment: http://stackoverflow.com/comment/43396226
has comment: http://stackoverflow.com/comment/43395987
has comment: http://stackoverflow.com/comment/43396091
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43396375

http://stackoverflow.com/comment/43424453
comment on: http://stackoverflow.com/q/27496303
has text: It can be done also with an iteration and a queue. Basically add all missing attributes of the first object that are missing in the second in the queue and start looping over them. if any of them is an object, then add it to the queue and continue.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/43774320
has text: @rdegges I've fixed my error by generating a proc file. I will make a separate post about something relative to node if you have any knowledge on ports.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27630355

http://stackoverflow.com/comment/43495310
comment on: http://stackoverflow.com/a/27532934
score: 0
type: Comment
type: AnswerComment
has text: https://getfirebug.com/faq/#Why_does_the_Script_panel_claim_there.27s_no_JavaScript_on_the_page_when_there_obviously_is_code

http://stackoverflow.com/q/27590983
answer count: 2
accepted answer: http://stackoverflow.com/a/27591046
score: 3
downvote count: 0
has title: JavaScript load a file not from cache
tagged with: jquery
has comment: http://stackoverflow.com/comment/43605974
favorite count: 0
type: AnsweredQuestion
upvote count: 3
has answer: http://stackoverflow.com/a/27591046
has comment: http://stackoverflow.com/comment/43605772
type: Question
has body: I have this function to read a text file from a specific location: The thing is that I want to read a text file that continuously changes: http://arbsq.net/dchampolu/champolu_data.txt when I run this function once, the browser caches the text file, and then every time I run the code, it only gets the cached version, not the updated version. I can always tell the users to clean this cache and this sort of stuff, but is there a way by JavaScript or jQuery to force the browser to use only the current version of the file, not the cached version?
possible better answer: http://stackoverflow.com/a/27591045
tagged with: javascript
has answer: http://stackoverflow.com/a/27591045
tagged with: caching
has comment: http://stackoverflow.com/comment/43605959

http://stackoverflow.com/a/27612528
upvote count: 1
type: AcceptedAnswer
has body: Ok, so it was actually Premier Bromanov who answered this, thanks, but I can't accept a comment, which it was, so I will just do this to make it more clear, if anyone should come by and want the answer too. The math i did was a bit wrong, and here is how my code ended up looking like: this.UpdateAngle = function() { this.dx = player.x - this.x; this.dy = player.y - this.y; this.distance = Math.sqrt((this.dx*this.dx) + (this.dy*this.dy)); this.angle = Math.atan2(this.dy,this.dx) * 180 / Math.PI; } this.UpdateSpeed = function() { this.speedX = this.speed * (this.dx/this.distance); this.speedY = this.speed * (this.dy/this.distance); } this.Move = function() { this.UpdateAngle(); this.UpdateSpeed(); this.x += this.speedX; this.y += this.speedY; } Thanks again to Premier Bromanov, this is his answer, and also to everyone else, this was my first post and i am glad how fast i got a response! (I was the slowest one here) :D
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27533331
accepted answer of: http://stackoverflow.com/q/27533331

http://stackoverflow.com/a/72321395
type: Answer
answers question: http://stackoverflow.com/q/27503585
has body: for all who are still having this problem, just change the line in the javascript file: from: cancelConfirmKeysOnEmpty: true, to cancelConfirmKeysOnEmpty: false, And thats all!
score: 0

http://stackoverflow.com/comment/58905962
type: AnswerComment
has text: I know this was answered a long time ago, but I feel the answer doesn't explain why the 5x cap is occurring in Firefox (except, possibly, through the MDN link). Pletnev's answer in [HTML5 Video - what is the maximum playback rate?](http://stackoverflow.com/questions/30970920/html5-video-what-is-the-maximum-playback-rate) is spot on and references the code directly. With that said, Franklin's answer is correct about the audio- I just feel that it didn't answer the question directly.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27537754

list
type: Tag
tags question: http://stackoverflow.com/q/27528486
tags question: http://stackoverflow.com/q/27632267
tag name: list
tags question: http://stackoverflow.com/q/27534455
tags question: http://stackoverflow.com/q/27573488
tags question: http://stackoverflow.com/q/27513028
tags question: http://stackoverflow.com/q/27489425
tags question: http://stackoverflow.com/q/27600679

http://stackoverflow.com/comment/43430455
comment on: http://stackoverflow.com/q/27499948
has text: That's an angular *internal*, you shouldn't be bothered by it.
type: Comment
type: QuestionComment
score: 6

http://stackoverflow.com/q/27593505
has comment: http://stackoverflow.com/comment/43610848
has answer: http://stackoverflow.com/a/27593519
type: Question
score: 5
has answer: http://stackoverflow.com/a/27593529
linked to: http://stackoverflow.com/q/16138678
upvote count: 6
tagged with: javascript
has comment: http://stackoverflow.com/comment/43610833
has comment: http://stackoverflow.com/comment/43610707
has answer: http://stackoverflow.com/a/27593542
has comment: http://stackoverflow.com/comment/43610797
downvote count: 1
linked to: http://stackoverflow.com/q/2001360
has body: I try to understand the examples on angularjs.org. For example the following code snippet. How does this .value and .factory and .config work? angular.module('project', ['ngRoute', 'firebase']) .value('fbURL', 'https://angularjs-projects.firebaseio.com/') .factory('Projects', function($firebase, fbURL) { return $firebase(new Firebase(fbURL)).$asArray(); }) .config(function($routeProvider) { ... EDIT: My point of not understanding the code above is the blank line after the first line and the line starting with a dot.
favorite count: 0
tagged with: angularjs
answer count: 5
has title: How JavaScript treats lines starting with a dot?
has answer: http://stackoverflow.com/a/27593718
accepted answer: http://stackoverflow.com/a/27593718
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27593731
has comment: http://stackoverflow.com/comment/43610835
has comment: http://stackoverflow.com/comment/43610936
possible better answer: http://stackoverflow.com/a/27593542

http://stackoverflow.com/q/27621699
possible better answer: http://stackoverflow.com/a/27622579
has answer: http://stackoverflow.com/a/27622380
score: 6
has comment: http://stackoverflow.com/comment/43664489
type: Question
has comment: http://stackoverflow.com/comment/43663930
has comment: http://stackoverflow.com/comment/43664251
has comment: http://stackoverflow.com/comment/43664045
upvote count: 6
has comment: http://stackoverflow.com/comment/43664330
has answer: http://stackoverflow.com/a/27623922
has comment: http://stackoverflow.com/comment/43665629
has comment: http://stackoverflow.com/comment/43664434
has title: Attach listener to multiple children
has answer: http://stackoverflow.com/a/27622579
has body: I'm trying to get rid of jquery from my page and rewrite some functionalities to pure js. There are 2 lists with class work, containing a few li elements. Each li element should have an action on click to add class 'active' to it. In jquery it is very simple: $('.work li').on('click', function () { var that = $(this); that.parent().find('li.active').removeClass('active'); $(this).addClass('active'); }) Is there a nicer solution in pure js rather than making something like this with nested loops: var lists = document.getElementsByClassName('work'); for(var i=0; i&lt;lists.length; i++){ var children = lists[i].querySelectorAll('li'); for(var j=0; j&lt;children.length;j++){ children[j].addEventListener(); } }
tagged with: javascript
answer count: 6
accepted answer: http://stackoverflow.com/a/27622581
favorite count: 0
has comment: http://stackoverflow.com/comment/43664463
has comment: http://stackoverflow.com/comment/43664534
has comment: http://stackoverflow.com/comment/43664223
has answer: http://stackoverflow.com/a/58495479
has answer: http://stackoverflow.com/a/27622415
has answer: http://stackoverflow.com/a/27622581
has comment: http://stackoverflow.com/comment/43664327
has comment: http://stackoverflow.com/comment/50840861
type: AnsweredQuestion
tagged with: listener
downvote count: 0

http://stackoverflow.com/q/27628706
accepted answer: http://stackoverflow.com/a/27629017
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I would like to create a custom column with a link and call $scope method on ng-click. There is very similar question for ngGrid (How to call a scope method from a button displayed in ngGrid -in Angular js) and that solution works. I'm using the ui-grid, which is supposed to be just a newer version of ngGrid, but it doesn't seem to work there. Here is my code: var app = angular.module('plunker', ['ui.grid']); app.controller('MainCtrl', function($scope) { $scope.gridOptions = { data: [{name: 'test'}], columnDefs: [{ field:'name', displayName:'name', cellTemplate: ' Edit ' }], editUser: $scope.editUser }; $scope.editUser = function() { alert('It works!'); }; }); http://plnkr.co/edit/Q5SuIeAPFpZaUKbmIDCn Here is the original solution for ngGrid that works: http://plnkr.co/edit/hgTQ1XdEVRyxscoNs76q
tagged with: angularjs
has title: How to call a scope method from a button displayed in ui-grid - in Angular js
has answer: http://stackoverflow.com/a/30284324
type: AnsweredQuestion
tagged with: angular-ui-grid
has answer: http://stackoverflow.com/a/27629017
possible better answer: http://stackoverflow.com/a/30284324
linked to: http://stackoverflow.com/q/17362049
type: Question
upvote count: 5
answer count: 2
score: 5

http://stackoverflow.com/q/27587352
tagged with: javascript
has answer: http://stackoverflow.com/a/27603581
has comment: http://stackoverflow.com/comment/43598978
tagged with: tooltipster
score: 0
has title: AngularJS Attach Scope Function in Directive
has body: I have an AngularJS Directive that attaches jQuery Tooltipster to elements in a ng-repeat like so: View: div.chat-wrapper ul.chat-messages li(ng-repeat='chat in chatmessages' chat-tooltip) Directive: angular.module('app') .directive('chatTooltip', function() { return { restrict: 'A', link: function(scope, el, attrs) { scope.mute = function() { console.log('hello world'); }; $(el).tooltipster({ content: $(' Mute '), position: 'left', positionTracker: true, trigger: 'hover', interactive: true, autoClose: false }); } }; } ); I want to call the mute() function defined in the scope or $scope - ? Since the plugin adds the HTML content in the directive - I'm not sure what I need to do?
has comment: http://stackoverflow.com/comment/43599127
tagged with: angularjs
has comment: http://stackoverflow.com/comment/43605958
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/27131078
has answer: http://stackoverflow.com/a/27591593
type: Question
answer count: 2

dreamweaver
type: Tag
tag name: dreamweaver
tags question: http://stackoverflow.com/q/27559047
tags question: http://stackoverflow.com/q/27513893

http://stackoverflow.com/comment/43537225
type: AnswerComment
score: 0
type: Comment
has text: So, what can i do to make the function that returns a promise to wait until it's done some code, and then continue normaly. Basicly i need to somehow trick the async function to be sync.
comment on: http://stackoverflow.com/a/27548425

http://stackoverflow.com/a/27583513
type: Answer
accepted answer of: http://stackoverflow.com/q/27582950
answers question: http://stackoverflow.com/q/27582950
has body: Firstly, to register click handler dynamically you must use different syntax of jQuery.on: Instead of this $('toggled &gt; .alert').click(function() { alert("Yes!"); }) Use this $(document).on('click', 'toggled &gt; .alert', function() { alert("Yes!"); }) Also, if you want to show separate dialog for element, where your directive registered, you must to register click handler on element itself and check is it complies to selector: link: function(scope, element) { element.on('click', function() { if (jQuery(this).is('.toggled &gt; .alert')) { alert("Yes!"); } }); }
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/43559080
comment on: http://stackoverflow.com/a/27495425
type: AnswerComment
score: 0
has text: Thank u so much sir, now my problem is ajax prepand.
type: Comment

http://stackoverflow.com/a/27549650
answers question: http://stackoverflow.com/q/27547439
has comment: http://stackoverflow.com/comment/43547059
upvote count: 1
has comment: http://stackoverflow.com/comment/43558595
score: 1
has body: I originally answered your question in a very complex method that matched your callbacks. Then I re-read your question, and realized that wasn't the goal. The goal is to create something that either shows an image or a frame. Assuming that frame needs to get outside of your domain (based on your usage of $sce, I believe that to be the case), this solution will work. Full Plnkr: http://embed.plnkr.co/jTmWOLMN7LdiCZPIvuof/preview HTML: Hello StackOverflow! Controller: myAppName.controller("myAppController", function($scope, $sce) { $scope.desiredFrameSource = 'http://www.w3schools.com/test'; $scope.errorImageSrc = 'https://cdn2.iconfinder.com/data/icons/contact-flat-buttons/512/thumb_down-512.png'; }); We define our URL's in the controller for convenience. These can obviously be variable. To test a failed URI, we can use $scope.desiredFrameSource = 'http://www.w3schools.com/test'; to test a successful URI: $scope.desiredFrameSource = 'http://www.w3schools.com/'; Simple enough I hope. The magic happens in the directive now. It either emits an iframe or an image, depending on the results of a YQL query. If you need additional alerts, you can send in callbacks/attributes to the directive and do cute things with it. Directive: myAppName.directive('iframeNanny', function($q, $http, $compile, $sce) { return { restrict: 'E', scope: { desiredUri: '=', errorImageUri: '=' }, link: function(scope, element, attrs) { var loadedUri = ''; function isURLReal(fullyQualifiedURL) { var URL = encodeURIComponent(fullyQualifiedURL); var dfd = $q.defer(); var yqlUri = 'http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url%3D%22' + URL + '%22&callback=JSON_CALLBACK'; $http.jsonp(yqlUri) .success(function(data, status) { console.log(data.results.length); if (data.results.length) { console.log('success!') dfd.resolve(true); } else { dfd.reject(false); } }).error(function(data, status) { dfd.reject('failed'); }); return dfd.promise; } scope.$watch('desiredUri', funct…
accepted answer of: http://stackoverflow.com/q/27547439
has comment: http://stackoverflow.com/comment/43556098
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43556147
type: Answer

http://stackoverflow.com/comment/43665316
comment on: http://stackoverflow.com/a/27622191
has text: Yep, it only works for numbers, nice catch.
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/comment/43581328
score: 0
type: Comment
has text: curious what problems you encounter, code should work as shown in second version although `onload` is not preferred jQuery approach
type: QuestionComment
comment on: http://stackoverflow.com/q/27578199

http://stackoverflow.com/comment/43582938
type: Comment
comment on: http://stackoverflow.com/a/27579162
type: AnswerComment
score: 0
has text: Isn't there any simple way by using simple for loop ?

http://stackoverflow.com/a/27487392
answers question: http://stackoverflow.com/q/27487359
has body: a &lt; b &lt; c is (a &lt; b) &lt; c which is either true &lt; c or false &lt; c which, due to conversion, is equivalent to 1 &lt; c or 0 &lt; c From the MDN on comparison operators : If either operand is a number or a boolean, the operands are converted to numbers if possible What you want is if (a &lt; b &amp;&amp; b &lt; c) which is if ( (a &lt; b) &amp;&amp; (b &lt; c) )
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 3
accepted answer of: http://stackoverflow.com/q/27487359
score: 3

http://stackoverflow.com/comment/43502179
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27536833
has text: I agree with @austinwernli, but if you must open it in a new window, you'll have to use [`window.open()`](http://www.w3schools.com/jsref/met_win_open.asp).

http://stackoverflow.com/comment/43458902
score: 0
type: AnswerComment
type: Comment
has text: Only one, but you should be able to distinguish multiple actions based on the object properties that are passed.
comment on: http://stackoverflow.com/a/27488456

http://stackoverflow.com/a/27551984
upvote count: 7
type: Answer
answers question: http://stackoverflow.com/q/27551911
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27551911
has body: &lt;img src=... expects image data from the specified URL. You can't dump Javascript into as source, because that's not an image - it's code. The browser is going to treat the JS code as if it was image data, try to figure out what KIND of image it is (jpg, gif, png, etc...) and go "wtf is this?" and just display a broken image icon. Whatever URL you do point the image's source has to output that raw binary image data, e.g. html: &lt;img src="img.php" /&gt; img.php: &lt;?php header('Content-type: image/jpeg'); readfile('3.jpg');
score: 7
has comment: http://stackoverflow.com/comment/43530321
type: AcceptedAnswer

http://stackoverflow.com/q/27537540
has title: Backbone updateOnEnter creates new line
answer count: 1
tagged with: backbone.js
has body: After pressing [edit] (after a word/definition has been committed) I want to my updateOnEnter method to save the changes to the definition field and lose focus and the field to become uneditable. Instead, when I press Enter, the cursor jumps to the line below and the field increases in size. Here is the CodePen: http://codepen.io/anon/pen/zxBZBe var EntryView = Backbone.View.extend({ model: new Entry(), tagName:'div', events:{ 'click .edit': 'edit', 'click .delete': 'delete', 'keypress .definition': 'updateOnEnter' }, delete: function(ev){ ev.preventDefault; dictionary.remove(this.model); }, edit: function(ev){ ev.preventDefault; this.$('.definition').attr('contenteditable', true).focus(); // this.$el.addClass('editing'); }, close: function(){ var definition = this.$('.definition').text(); this.$('.definition').removeattr('contenteditable'); this.model.set('definition', definition); }, updateOnEnter: function(ev){ if(ev.which == 13){ this.close(); } }, initialize: function(){ this.template = _.template($("#dictionary_template").html()); }, render: function(){ this.$el.html(this.template(this.model.toJSON())); return this; } });
accepted answer: http://stackoverflow.com/a/27538609
type: AnsweredQuestion
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27538609
score: 0

http://stackoverflow.com/q/27533392
score: 6
tagged with: requirejs
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28030338
has title: How to implement a plugin, that modifies the original module only when required?
possible better answer: http://stackoverflow.com/a/27759894
has answer: http://stackoverflow.com/a/27759894
has body: I have a plugin extending an original module. It should only modify the module, when explicitly required. Problem: As soon as it is required once, the original module is modified forever, also for cases where the plugin is not a dependency. The order doesn't matter here, it's enough to require the plugin once. Example: define("main", [], function() { return {opt: "A"}; }); define("plugin", ["main"], function(obj) { obj.opt = "B"; }); require(["main", "plugin"], function(obj) { console.log(obj.opt); // should log B }); require(["main"], function(obj) { console.log(obj.opt); // should log A but logs B }); I guess the way to go is to somehow tell require to always reload main from source instead of using the cached version. I have no idea how, though. Or maybe there's an even more elegant way? Please enlighten me, guys. Fiddle: http://jsfiddle.net/r75e446f UPDATE: Some might find it important to know that I need this for my karma unit test environment to test a module with and without the plugin. UPDATE2: Look below for my own solution.
has answer: http://stackoverflow.com/a/27871947
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/27846125
accepted answer: http://stackoverflow.com/a/28030338
favorite count: 0
answer count: 5
upvote count: 6
has answer: http://stackoverflow.com/a/27853736

http://stackoverflow.com/a/27547116
answers question: http://stackoverflow.com/q/27547023
type: Answer
has comment: http://stackoverflow.com/comment/43520621
score: 2
downvote count: 0
has body: There are several questions about this on SO. last-of-type refers to the last element of a given type, period, full stop. It does NOT refer to the last element which matches some set of conditions such as class, or attribute. There are some proposals to do what you want that we may see in the distant future, but for now, you cannot do this. The alternatives are Add a special class wherever the HTML is generated showing the one you want to do something with Use a different HTML element for the ones you want to do last-of-type on, but in this case you're stuck because &lt;ul&gt; and &lt;ol&gt; elements can only have children of &lt;li&gt; or other &lt;ul&gt;s and &lt;ol&gt;s Write some JS to ferret out the element you want
has comment: http://stackoverflow.com/comment/43520683
upvote count: 2

http://stackoverflow.com/comment/43659576
type: Comment
type: QuestionComment
has text: FYI, it's not generally good to assign new properties to an array. You should keep the paging info separate from the array. e.g. `{ items: data.result, pagingInfo: data.pagingInfo }` (or you could just use `data` without creating something new to contain its values.
score: 0
comment on: http://stackoverflow.com/q/27619233

http://stackoverflow.com/a/27589613
has comment: http://stackoverflow.com/comment/43604228
accepted answer of: http://stackoverflow.com/q/27589568
has comment: http://stackoverflow.com/comment/43604324
type: AcceptedAnswer
downvote count: 0
upvote count: 8
has comment: http://stackoverflow.com/comment/43603455
type: Answer
score: 8
answers question: http://stackoverflow.com/q/27589568
has body: var is not a datatype, but a keyword/operator used to declare a variable in the appropriate scope. Function parameters are already scoped to the function for which they are parameters and there is no changing that. Thus the use of var would be redundant and was not required. Some commented code samples: // A globally accessible function var f1 = function (p1) { // p1 automatically scoped to f1 and available to all inner functions (like f2 below) // A variable available in the scope of f1 and all inner functions (like f2 below) var v1; // f1, p1, v1, and f2 can be reached from here var f2 = function (p2) { // p2 automatically scoped to f2 // A variable available in the scope of f2 var v2; // f1, p1, v1, f2, p2, and v2 can be reached from here }; };

http://stackoverflow.com/q/27629363
has comment: http://stackoverflow.com/comment/43680252
favorite count: 0
has answer: http://stackoverflow.com/a/27629841
has comment: http://stackoverflow.com/comment/43680016
has body: I am building a javascript image slider and noticed a problem pulling up the index.html file locally in chrome. Here is my code (function(){ //slider container var slider = document.getElementById('slider'); var figure = slider.childNodes[1]; var slidyImgs = figure.getElementsByTagName('IMG'); var figureWidth = slidyImgs.length * 100; var slidyImgsWidth = 100 / slidyImgs.length; css('#slider figure{ width: '+figureWidth+"%; }"); css('#slider figure img{ width: '+slidyImgsWidth+"%; }"); var xPos = 100; setInterval(function(){ figure.style.marginLeft = "-" + xPos + "%"; xPos = (xPos === (figureWidth - 100)) ? 0 : xPos + 100; },7000); })() function css(newrule) { //adds a new style to stylesheet var styles = document.styleSheets[1] try { styles.insertRule(newrule, styles.cssRules.length); } catch(err) { try { styles.addRule(newrule); }catch(err){} //IE }; }; When i open the file locally, the insertRule doesn't seem to be applied. But when i open it on my server, the insertRule appears as normal. Anyone got any idea whats causing this you can view the website /source code on my server: http://magnetwd.com/kellin/
type: UnansweredQuestion
upvote count: 1
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/43679809
score: 1
has comment: http://stackoverflow.com/comment/43679545
has comment: http://stackoverflow.com/comment/43679999
type: Question
downvote count: 0
tagged with: javascript
has title: addRule / insertRule Not working locacly
has comment: http://stackoverflow.com/comment/43679933
answer count: 1
has comment: http://stackoverflow.com/comment/43680076
tagged with: css

http://stackoverflow.com/comment/43542942
type: Comment
has text: Well the above code works. It seems like you have some confusion regarding structuring your angular-js application. I would recommend that you further understand how your application works, as with the right understanding you should be able to apply one of these various methods to your application. Good luck.
comment on: http://stackoverflow.com/a/27558001
type: AnswerComment
score: 0

http://stackoverflow.com/comment/43514586
type: Comment
comment on: http://stackoverflow.com/a/27543437
has text: Ah, I get it, and unfortunately it will depend on what popup script you use. If the script is triggered by class, you can add a class with ng-class. If it is jQuery and needs to be triggered manually you might have to do it in the controller. The best would be to use a popup-directive made for Angular, there are several ready made ones like ngDialog.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43659089
has text: just a little update "always return false" as it is 0.
comment on: http://stackoverflow.com/a/27619079
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43664568
type: AnswerComment
has text: @JeremyFriesen I'd intended it more as an example of how to supply optional parameters to a function, but yes - have edited it to put it more in the context of the OP question.
score: 0
comment on: http://stackoverflow.com/a/27621970
type: Comment

http://stackoverflow.com/q/27625894
has answer: http://stackoverflow.com/a/27626178
accepted answer: http://stackoverflow.com/a/27626178
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27626307
type: Question
has title: How to pass a Comma seperated String to select options in Angular js
answer count: 2
upvote count: 1
downvote count: 1
tagged with: javascript
favorite count: 0
score: 0
has body: I have this Json: { "field_id": "4otBG", "label": "Fullness", "type": "dropdown", "props": { "req": "true", "options": "Empty-ish, Plenty of Seats, Few Seats, Standing, Packed Like Sardines" } } How to pass the Options to an selection option , because it is a comma separated string Please help me..
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/27626307
has comment: http://stackoverflow.com/comment/43672911

http://stackoverflow.com/comment/43431115
type: Comment
has text: @Matjis agreed, not a fan of UX hijacking. Interested in the intellectual, problem-solving part of it only. You made a reasonable argument, definitely not downvote-worthy, but didn't offer any details. I wanted readers of this answer know that they could trigger programmatically, say after attaching evt handler: `$(el).scroll(function(e) { ... }).scroll();` I'm still not sure I understand what the OP wants...
comment on: http://stackoverflow.com/a/27495430
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43513026
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27542951
score: 0
has text: The first has the same problem but then the brush draws above the cursor instead of under it.

http://stackoverflow.com/a/67268018
has body: With $http.get you can also pass a config object : I put the scope in there like this: var config = { method: 'GET', scp: $scope } than at the success callaback I recovered: var scp = response.config.scp; I have a similar problem and I solved this way ... I believe that is a dirty trick. But I don't know how to solve this either.
score: 0
answers question: http://stackoverflow.com/q/27558560
type: Answer

http://stackoverflow.com/comment/43614167
comment on: http://stackoverflow.com/q/27595258
has text: don't use the unary `++` on the length property!
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27631309
score: 1
upvote count: 1
has body: controllers is not a function to apply it is a container of the logic that you will apply on a certain scope this logic will be in different functions declared inside the controller so the real question is not the difference but when to use this and when to use the other. directives mainly are used for code re-usability and isolating a part of the app from the outside world and its controller is the container that hold all its variables and functions that will be called during the app run time. from another point of view directive are much more like classes in c++ language as directives can has its own scope and is used mainly for code re-usability. so actually this question is much more like asking what is the difference between declaring a function in a class or in the main function
downvote count: 0
answers question: http://stackoverflow.com/q/27631008
type: Answer

http://stackoverflow.com/q/27636959
accepted answer: http://stackoverflow.com/a/27637386
score: -3
tagged with: http://stackoverflow.com/tag/html
tagged with: php
tagged with: css
downvote count: 4
has answer: http://stackoverflow.com/a/27637386
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43693222
has title: How can I make a dynamic select box?
type: Question
has comment: http://stackoverflow.com/comment/43693119
has body: I've three select-box here. How can I make this. abcd efgh ijkl mnop desk pen pc
tagged with: javascript
has comment: http://stackoverflow.com/comment/43693469
has comment: http://stackoverflow.com/comment/43692854
upvote count: 1
answer count: 1
favorite count: 0

http://stackoverflow.com/a/27609970
score: 3
has body: //extend to allow right click //input mouse map is not a public property of Hammer, so copy it here var MOUSE_INPUT_MAP = { mousedown: Hammer.INPUT_START, mousemove: Hammer.INPUT_MOVE, mouseup: Hammer.INPUT_END }; //override Hammer.inherit(Hammer.MouseInput, Hammer.Input, { /** * handle mouse events * @param {Object} ev */ handler: function MEhandler(ev) { var eventType = MOUSE_INPUT_MAP[ev.type]; //modified to handle all buttons //left=0, middle=1, right=2 if (eventType &amp; Hammer.INPUT_START) { //firefox sends button 0 for mousemove, so store it here if(this.pressed === false) this.button = ev.button; this.pressed = true; } if (eventType &amp; Hammer.INPUT_MOVE &amp;&amp; ev.which === 0) { eventType = Hammer.INPUT_END; } // mouse must be down, and mouse events are allowed (see the TouchMouse input) if (!this.pressed || !this.allow) { return; } if (eventType &amp; Hammer.INPUT_END) { this.pressed = false; this.button = false; } this.callback(this.manager, eventType, { button: this.button, pointers: [ev], changedPointers: [ev], pointerType: 'mouse', srcEvent: ev }); } });
downvote count: 0
answers question: http://stackoverflow.com/q/27609969
type: Answer
upvote count: 3

http://stackoverflow.com/comment/43433131
comment on: http://stackoverflow.com/q/27501217
has text: hmm. ok. I'm trying to `return body._embedded.assets`. Is that not going to return the data?
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/27530406
has body: Instead, find all headers using element.all() and use map() to assert the list in one go: var headers = element.all(by.css('table.table th a')).map(function(elm) { return elm.getText(); }); expect(headers).toEqual([ "Patient Id", "Account Number", "Title", "First Name", "Last Name", "Middle Name", "Sex", "Dob" ]);
accepted answer of: http://stackoverflow.com/q/27519926
upvote count: 3
answers question: http://stackoverflow.com/q/27519926
score: 3
has comment: http://stackoverflow.com/comment/43507469
has comment: http://stackoverflow.com/comment/43507448
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/44156498
score: 1
type: AnswerComment
has text: Would like to know, what you needed to change.
comment on: http://stackoverflow.com/a/27534724
type: Comment

http://stackoverflow.com/a/27481997
type: Answer
has body: U can use muse.. Paste in this code an it will work. Recomeçar Imprimir esta página Recomeçar Imprimir esta página
score: 0
answers question: http://stackoverflow.com/q/27481937
has comment: http://stackoverflow.com/comment/43396732

http://stackoverflow.com/q/27572205
upvote count: 2
answer count: 2
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27572251
has answer: http://stackoverflow.com/a/27572266
accepted answer: http://stackoverflow.com/a/27572266
has body: I hope someone can help me out with this. I'm trying to dynamically build an HTML table in javascript/jquery based on iterating over an array built by earlier code. I am getting an error on the referenced line below as soon as the page loads: function BuildForm (allFields) { var dyndata = ""; var formstart = " \n \n Choose A Parent \n \n \n ID \n Name \n DOB \n Phone \n \n "; $('#PickAParent-Form').append(formstart); $.each(allFields, function (index, value) { if ((index + 5) % 5 == 0) { dyndata = " \n " + value + " \n"; error here---------^ $('#PickAParent-Form').append(dyndata); } elseif ((index +1 ) % 5 == 0) { dyndata = " " + value + " \n \n"; $('#PickAParent-Form').append(dyndata); } else { dyndata = " " + value + " \n"; $('#PickAParent-Form').append(dyndata); } }); DisplayForm; } I have been all over Google and SO this AM but can't figure this one out. Any help is MUCH appreciated!!
score: 2
type: AnsweredQuestion
has title: Building HTML table in javascript, getting "ReferenceError: invalid assignment left-hand side"
type: Question
possible better answer: http://stackoverflow.com/a/27572251
tagged with: javascript

http://stackoverflow.com/comment/43668367
type: Comment
comment on: http://stackoverflow.com/q/27623822
type: QuestionComment
score: 1
has text: It's pointlessly (imo) tricky. Why not use an if, then the warning won't happen.

http://stackoverflow.com/q/27613500
has comment: http://stackoverflow.com/comment/43651088
score: 0
has answer: http://stackoverflow.com/a/27803541
tagged with: after-save
tagged with: javascript
has title: Parse.com Cloud Code afterSave( ) Error: "Uncaught Tried to save an object with a pointer to a new, unsaved object."
tagged with: parse-cloud-code
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27803541
has comment: http://stackoverflow.com/comment/43669682
tagged with: parse-platform
type: Question
answer count: 1
has body: Context I am using Parse.com after my backend for a web application. The problem I am having relates to Cloud Code. After a user completes their profile, I want to call an afterSave( ) function which updates a few fields in the dataset MY_TABLE. The fields being updated (variable01, variable02, and variable03) are retrieved via the function MY_FUNCTION with inputs param01 and param02. Error I get the following error, which I cannot fix: "Uncaught Tried to save an object with a pointer to a new, unsaved object." Code Parse.Cloud.afterSave("PROFILE_COMPLETE", function(request) { // Use Master Key Parse.Cloud.useMasterKey(); // Identify Parameters in Request var param01 = request.user.get('param01'); var param02 = request.user.get('param02'); // Print Parameters to Console console.log("Parameter 01 (" + param01 + ") successfully identified"); console.log("Parameter 02 (" + param02 + ") successfully identified"); // Identify Variables by Calling MY_FUNCTION() Parse.Cloud.run('MY_FUNCTION', {param01: param01, param02: param02}, { success: function(results) { // Print Results console.log("Function MY_FUNCTION() returned successful response"); console.log(results); // Print Result Variables console.log("Identified variable01 = " + results.variable01); console.log("Identified variable02 = " + results.variable02); console.log("Identified variable03 = " + results.variable03); // Do I need to extend MY_TABLE or something else here??? // I am doing the update and save wrong... // Update 'Complete' Data request.object.set("variable01", results.variable01); request.object.set("variable02", results.variable02); request.object.set("variable03", results.variable03); // Save Variables to 'MY_TABLE' request.object.save(null, { success: function(results) { console.log("Variables successfully updated in MY_TABLE dataset"); console.log(results); }, error: function(error) { console.log("Error when saving variables in MY_TABLE dataset"); console.log("Error " + error.code + ": " + error.mes…

http://stackoverflow.com/q/27552242
has title: Can document.referrer be forged?
has answer: http://stackoverflow.com/a/27572189
type: AnsweredQuestion
score: 0
upvote count: 1
downvote count: 1
possible better answer: http://stackoverflow.com/a/27552277
type: Question
has answer: http://stackoverflow.com/a/27552277
has comment: http://stackoverflow.com/comment/43662286
has comment: http://stackoverflow.com/comment/43639378
accepted answer: http://stackoverflow.com/a/27572189
tagged with: javascript
has comment: http://stackoverflow.com/comment/43530727
has body: Situation: We have a widget that we want to allow to be iframed on trusted sites. To mitigate potential Clickjacking attacks, we want to check the referrer when the widget loads against a whitelist of domains. No match = widget disabled. I know that using Flash you can send arbitrary HTTP requests with any Referer header. Is document.referrer similarly vulnerable? NOTE: I know users can change settings and other situations can make document.referrer blank. That is fine. The widget always working is less important than that it not work if the website embedding it is not trusted. EDIT: X-Frame-Options doesn't work at this time because ALLOW-FROM is not implemented in Chrome or Safari. I need to be able to support 3rd party domains.
answer count: 2
favorite count: 0
tagged with: referrer

http://stackoverflow.com/comment/43657972
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27617648
has text: Glad if I could help you understand it.
score: 1

http://stackoverflow.com/comment/43501584
type: AnswerComment
comment on: http://stackoverflow.com/a/27536599
score: 0
type: Comment
has text: ah, duh, had a feeling i just overlooked something basic like that, i.e. scope. the only reason I'm conducting these silly tests is in a persuit of custom elements (web widgets) so I was already frustrated...

http://stackoverflow.com/comment/43644975
comment on: http://stackoverflow.com/a/27611030
has text: I following your suggestion and I put `ev.views.Markers.prototype.remove` in my code, but still doesn't work :/
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/43639477
type: AnswerComment
score: 0
type: Comment
has text: hmmm so to submit the form, something along the lines of var `i = document.getElementById("form-id"); i.addEventListener("submit",...)`?
comment on: http://stackoverflow.com/a/27608575

http://stackoverflow.com/comment/43597233
comment on: http://stackoverflow.com/q/27586392
has text: You will want to use jquery on. This allows you to handle events with dynamic HTML. http://api.jquery.com/on/
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43595714
comment on: http://stackoverflow.com/q/27585619
score: 0
has text: I have managed to get it to work with an older version of angular-block-ui. http://plnkr.co/edit/xBSFHdYwUosNPKu93QaL?p=info . I think I might just use Toaster instead because I would rather not tell bower explicitly which versions to get.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27519287
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27519251
has body: The element is created but not added to the DOM. You should add it to another element

http://stackoverflow.com/q/27485908
has answer: http://stackoverflow.com/a/27486353
has answer: http://stackoverflow.com/a/27486182
has comment: http://stackoverflow.com/comment/43404136
has comment: http://stackoverflow.com/comment/43404338
type: Question
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/43404219
has comment: http://stackoverflow.com/comment/43407941
favorite count: 0
has comment: http://stackoverflow.com/comment/43403994
linked to: http://stackoverflow.com/q/16129157
has title: javascript shipping countdown fails if i use a target of 14:30
has comment: http://stackoverflow.com/comment/43403848
accepted answer: http://stackoverflow.com/a/27486353
upvote count: 3
possible better answer: http://stackoverflow.com/a/27486182
has comment: http://stackoverflow.com/comment/43404049
downvote count: 1
score: 2
type: AnsweredQuestion
has body: I use the following javascript to show a countdown timer for shipping that day var timerRunning = setInterval( function countDown() { var target = 14; // This is the cut-off point var now = new Date(); //Put this in a variable for convenience var weekday = now.getDay(); var despatchday = 'TODAY!'; if (weekday == 0) { //Sunday? Add 24hrs target += 24; despatchday = 'on Monday'; } //keep this before the saturday, trust me :&gt; if (weekday == 6) { //It's Saturday? Add 48hrs target += 48; despatchday = 'on Monday'; } if ((weekday == 5) &amp;&amp; (now.getHours() &gt; target) &amp;&amp; (now.getHours() &lt;= 24)) { target += 72; despatchday = 'on Monday'; } //If between Monday and Friday, //check if we're past the target hours, //and if we are, abort. if ((weekday &gt;= 1) &amp;&amp; (weekday &lt;= 5)) { if ((now.getHours() &gt; target) &amp;&amp; (now.getHours() &lt;= 24)) { //stop the clock target += 24; despatchday = 'tomorrow'; } else if (now.getHours() &gt; target) { //stop the clock return 0; despatchday = 'today'; } } var hrs = (target) - now.getHours(); if (hrs &lt; 0) hrs = 0; var mins = 59 - now.getMinutes(); if (mins &lt; 0) mins = 0; var secs = 59 - now.getSeconds(); if (secs &lt; 0) secs = 0; var str = 'Order in the next ' + hrs + 'hrs ' + mins + 'mins ' + secs + 'secs for despatch ' + despatchday; document.getElementById('countdownTimer').innerHTML = str; }, 1000 ); The problem I have is that if I set the cut off time to anything other than a full hour the timer does not work. The correct output is Order in the next xx hrs, xx mins xx secs for despatch today If I set var target = 14; // This is the cut-off point as 14:30 it gives "Just checking the time" I assumed that it needed the mins as a decimal but if I set it as 14.5 it is adding 0.5 hrs to the output; ie 23.5hrs 50mins 30secs I have set up a fiddle here. http://jsfiddle.net/4eu4o6k0/ Ideally I need it to be able to handle time in the format of hh:mm as that is the format of the time stored in the d…

http://stackoverflow.com/q/27501582
upvote count: 1
tagged with: forms
tagged with: http
type: Question
has comment: http://stackoverflow.com/comment/43433632
has comment: http://stackoverflow.com/comment/43435765
tagged with: javascript
has comment: http://stackoverflow.com/comment/43435364
tagged with: content-type
has body: I use this code to submit a form var form = $("#some-form"); form.attr("action", url); form.attr("method", "post"); form.attr('target', '_blank'); form.submit(); The problem is that the request sent has Content-Type: application/x-www-form-urlencoded, which (as mentioned here) encodes \n characters in textareas of the form as %0D%0A, which are decoded as \r\n on the server side and cause many troubles. I want the server to receive \n, so I need another content type. So, the questions are: what content type should I use? how should I change my javascirpt to use that content type? EDIT I tried enctype="multipart/form-data", but it encodes new line characters the same way.
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has title: Javascript: submit form specyfing content type
has answer: http://stackoverflow.com/a/27532543
type: UnansweredQuestion
score: 1
linked to: http://stackoverflow.com/q/6963480

http://stackoverflow.com/comment/43483698
score: 0
comment on: http://stackoverflow.com/q/27527559
type: QuestionComment
type: Comment
has text: You can do it! With ajax or looping

http://stackoverflow.com/comment/43495258
has text: Thanks for a solution. I was hoping for something built with Rx so that I could add in other composition operators such as retrying a page when an exception occurs. Therefore, I'm going to wait before accepting in case other Rx solutions are posted.
comment on: http://stackoverflow.com/a/27514478
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27541819
has comment: http://stackoverflow.com/comment/43513097
score: 1
has comment: http://stackoverflow.com/comment/43513387
has comment: http://stackoverflow.com/comment/43516911
has body: /^[a-zA-Z][a-zA-Z0-9]*$/ This should do it. Try this if you want to have one or two words. ^[a-zA-Z][a-zA-Z0-9]*(?:\s+[a-zA-Z][a-zA-Z0-9]+)?$
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43513464
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27541497
answers question: http://stackoverflow.com/q/27541497
has comment: http://stackoverflow.com/comment/43514691
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/43515368

http://stackoverflow.com/comment/43669649
has text: Could you copy the code into the question? Thanks
comment on: http://stackoverflow.com/q/27624285
score: 0
type: Comment
type: QuestionComment

internet-explorer-11
tags question: http://stackoverflow.com/q/27622366
tags question: http://stackoverflow.com/q/27558464
tags question: http://stackoverflow.com/q/27479189
type: Tag
tags question: http://stackoverflow.com/q/27541995
tag name: internet-explorer-11
tags question: http://stackoverflow.com/q/27574705
tags question: http://stackoverflow.com/q/27526968
tags question: http://stackoverflow.com/q/27577974
tags question: http://stackoverflow.com/q/27545235
tags question: http://stackoverflow.com/q/27526798

http://stackoverflow.com/q/27599941
type: Question
has comment: http://stackoverflow.com/comment/43623047
accepted answer: http://stackoverflow.com/a/27673620
tagged with: javascript
has title: Not able to select paths in SVG picture
has comment: http://stackoverflow.com/comment/43623798
has comment: http://stackoverflow.com/comment/43623360
score: 0
has comment: http://stackoverflow.com/comment/43623114
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/43623574
has comment: http://stackoverflow.com/comment/43623517
has body: I'm trying to animate a flower SVG image so that it will look like the flower is drawing itself, as described in this article. I've included my current code in JSFiddle here. I can't seem to access each path element, and I'm not too sure why. I used the Javascript code provided in the article, and I downloaded/included the svg HTML for an SVG flower I found online. When I run the code, the console in Firefox, Safari, and Chrome logs 0, telling me that there are no elements with the tag name path. I'm not sure why this is; can anyone explain why/what I should fix? Here is the javascript code: var paths = document.getElementsByTagName('path'); console.log(paths.length); for (var i = 0; i &lt; paths.length; i++) { var path = paths[i]; var length = path.getTotalLength(); // Clear any previous transition path.style.transition = path.style.WebkitTransition = 'none'; // Set up the starting positions path.style.strokeDasharray = length + ' ' + length; path.style.strokeDashoffset = length; // Trigger a layout so styles are calculated &amp; the browser // picks up the starting position before animating path.getBoundingClientRect(); // Define our transition path.style.transition = path.style.WebkitTransition = 'stroke-dashoffset 2s ease-in-out'; // Go! path.style.strokeDashoffset = '0'; } Here is some of my HTML code: &lt;body&gt; &lt;svg xmlns="http://www.w3.org/2000/svg" version="1.0" width="800px" height="800px" id="svg2385"&gt; &lt;!-- &lt;defs id="defs2387" /&gt; &lt;g transform="translate(-163.06366,-372.39925)" id="layer1"&gt; --&gt; &lt;path d="M 368.89962,527.3412 C 359.4568,464.38904 307.36168,439.5961 286.4323,430.39488 C 267.82968,422.21658 263.76952,407.10258 263.76952,407.10258 C 263.76952,407.10258 258.73335,424.09966 258.73335,432.28344 C 258.73335,440.46722 256.84479,478.86804 271.9533,510.97363 C 287.06182,543.07923 333.01689,554.41062 346.23685,570.14866 C 359.4568,585.8867 354.42063,613.58565 354.42063,613.58565 C 354.42063,613.58565 353.79111,591.55239 338…
has comment: http://stackoverflow.com/comment/43622964
tagged with: http://stackoverflow.com/tag/svg
has answer: http://stackoverflow.com/a/27673620
has comment: http://stackoverflow.com/comment/43623228
has comment: http://stackoverflow.com/comment/43623496
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43624064

http://stackoverflow.com/comment/43501001
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27536272
score: 0
has text: I guess I do :) Just thought that might be a reasonable starting point for him to look at .

http://stackoverflow.com/comment/43442517
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27505245
has text: SyntaxError: syntax error angular.min.js:1 TypeError: angular is undefined angular-route.js:24 GET http://advice.local/script.js [HTTP/1.1 404 Not Found 2ms] TypeError: e is undefined angular-route.min.js:10 The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol.

http://stackoverflow.com/comment/43543948
comment on: http://stackoverflow.com/q/27558587
score: 0
type: Comment
has text: Hard to read that code, but how are you firing the AJAX event? Is it when the user presses a button, or when something changes? Have you tried resetting the form (form.reset()) after you get the info from the AJAX request?
type: QuestionComment

http://stackoverflow.com/q/27635657
has comment: http://stackoverflow.com/comment/43690513
has answer: http://stackoverflow.com/a/27635719
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43690557
score: 2
type: Question
answer count: 2
has title: jQuery selector not working as I expected
has body: I have a simple html Alberta British Columbia Manitoba New Brunswick Newfoundland Nova Scotia Ontario Prince Edward Is Quebec Saskatchewan And I am trying to access the "a" but it's giving me undefined. I have no idea what I am doing wrong, any help will be appreciated I am trying to access like this, alert($("#dCA").find("ul>li>a:contains('" + "Alberta"+ "')").attr("id"));
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27635753
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43690529

http://stackoverflow.com/a/29565577
upvote count: 15
has body: You can read a blogpost I wrote exactly about this subject :). https://auth0.com/blog/2015/04/09/adding-authentication-to-your-react-flux-app/. There's an example on Github linking from the post. Let me know if you find it useful. Cheers
score: 14
answers question: http://stackoverflow.com/q/27626366
has comment: http://stackoverflow.com/comment/47284720
has comment: http://stackoverflow.com/comment/55161298
has comment: http://stackoverflow.com/comment/47986434
downvote count: 1
type: Answer

http://stackoverflow.com/a/27566428
has body: You could do it like this: $('table').find('tr').each(function() { // collect all cells with an index greater 4 var newCells = $(this).find('td:gt(4)'), // add a row below current newRow = $('&lt;tr&gt;').insertAfter(this); // add new row newRow.append(newCells); }); basically you loop over each row, grep the relevant cells and append them to a new row. Fiddle is here.
score: 2
answers question: http://stackoverflow.com/q/27566231
downvote count: 0
type: Answer
upvote count: 2

http://stackoverflow.com/q/27628573
has body: I have a JSON object that has a few nested levels in it. I am given a string that refers to the location of a specific object. For instance, if my JSON object looked like: countries: [ canada: { capital: "ottawa", territories: [ yukon: { capital: "yellowknife", ... } ... ] ... } and I'm given the string "countries.canada.territories.yukon" I want to get the object for Yukon. How can I do this?
has answer: http://stackoverflow.com/a/27628633
favorite count: 0
has answer: http://stackoverflow.com/a/27636175
answer count: 4
type: AnsweredQuestion
upvote count: 3
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/67500853
has answer: http://stackoverflow.com/a/43819261
tagged with: jsonpath
has title: How to convert a string to JSONPath
accepted answer: http://stackoverflow.com/a/27636175
type: Question
linked to: http://stackoverflow.com/q/6491463
possible better answer: http://stackoverflow.com/a/43819261
downvote count: 0
tagged with: javascript
score: 3

http://stackoverflow.com/comment/43667639
type: Comment
score: 1
has text: put some code, It is difficult to understand your point
type: QuestionComment
comment on: http://stackoverflow.com/q/27623560

http://stackoverflow.com/comment/43618122
type: Comment
type: QuestionComment
score: 3
has text: My keen powers of perception detect that there was some drama here...
comment on: http://stackoverflow.com/q/27595493

http://stackoverflow.com/a/27604728
answers question: http://stackoverflow.com/q/27604366
has comment: http://stackoverflow.com/comment/43631822
has body: You should add "click" event not "change" event and add "return false;" at end of your statement $(document).ready(function(){ $('#regSubmit').on('click', function(event){ registrationCheck(); return false; }); });
score: 1
upvote count: 1
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/43631726

http://stackoverflow.com/comment/43665576
type: AnswerComment
has text: you shouldnt load data on $viewContentLoaded. you better use resolve or load data on controller load. why do you wait for view to load data anyways? go with resolve or load data inside controller
type: Comment
comment on: http://stackoverflow.com/a/27621817
score: 0

http://stackoverflow.com/q/27572276
upvote count: 1
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/27573739
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/27572847
tagged with: functional-programming
accepted answer: http://stackoverflow.com/a/27573739
has answer: http://stackoverflow.com/a/27572847
downvote count: 0
tagged with: javascript
has title: How to build a decorator that works on the final argument of multi-arity curried functions?
has body: I'm trying to write a functional library in JavaScript. I'm also using lodash. What I've got so far, abstractly: x = _.curry(function(property, data) { return data.get(property); }); With this, you can do x(1)(2) and x(1, 2), and everything works as expected. Say I want to modify the function so that it data can be an array: x = _.curry(function(property, data) { if (_.isArray(data)) { return _.map(data, x(property)); } else { return item.get(property); } }); Now that works great. But I've got 30+ functions. There's got to be a better way than manual if (_.isArray(data)... else... writing for each function. A decorator maybe? decorate = function(func) { // return a curried func and handle the aforementioned _.isArray } x = decorate(function(property, data) { if (_.isArray(data)) { return _.map(data, x(property)); } else { return item.get(property); } }); I'm completely lost on how to write the decorate function: A function that can take arity 2 and arity 3 functions to decorate.
favorite count: 0

http://stackoverflow.com/a/27538964
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/27538722
has comment: http://stackoverflow.com/comment/43505865
has comment: http://stackoverflow.com/comment/43506004
downvote count: 0
score: 1
has body: Rather than using window.location try to create form and redirect to the page you wanted. The code will look something like this. &lt;script type="text/javascript"&gt; var f = document.createElement("form"); f.setAttribute("action", "/userSpace"); f.setAttribute("method", "POST"); document.body.appendChild(f); setTimeout(f.submit(),3000); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/43505971

http://stackoverflow.com/comment/43602513
has text: @fornal you mean calling the function from inside the same function?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27589093

http://stackoverflow.com/comment/43574480
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27573786
has text: In the real app they can pick from a list of return objects so it will resolve immediately, or we hit the api to make the user, and it might be rejected, or it wont pass the the clean which it will rejected immediately. In any of those return states the buttons need to be re-enabled.So it mocks pretty closely a real app.
type: AnswerComment

http://stackoverflow.com/q/27535584
has title: Changes Images folder, based on time of day
has body: Update - Already caught one issue. Was simply my stupid mistake. How do I add a function to make this code rerun itself for each time block, so it updates on an open browser? - Thanks I am trying to have a simple gallery of images (For example 20 images, 15 sec each, scrolling indefinitely), but all the images will change based on the time of day. For example: 8am-11am one set, 12pm-4pm another, 4-8pm, and 8pm-7am. I have been messing with this from existing code I have found, and tried a ton of versions, but none have worked. This is the code idea I am messing with (not working), but maybe I should be going about this entirely differently. Thoughts? (example of different time blocks, and only with 3 images - but doesn't work) $(document).ready(function(){ var d = new Date(); var n = d.getHours(); // If time is after 8PM or before 7AM if (n &gt; 20 || n &lt; 7) { $("img#photo1").attr("src","img/8TO7/photo1.jpg"); $("img#photo2").attr("src","img/8TO7/photo2.jpg"); $("img#photo3").attr("src","img/8TO7/photo3.jpg"); } else if (n &gt; 16 &amp;&amp; n &lt; 20) { $("img#photo1").attr("src","img/4TO8/photo1.jpg"); $("img#photo2").attr("src","img/4TO8/photo2.jpg"); $("img#photo3").attr("src","img/4TO8/photo3.jpg"); } else { $("img#photo1").attr("src","img/main/photo1.jpg"); $("img#photo2").attr("src","img/main/photo2.jpg"); $("img#photo3").attr("src","img/main/photo3.jpg"); } });
has comment: http://stackoverflow.com/comment/43499782
has answer: http://stackoverflow.com/a/27536020
has comment: http://stackoverflow.com/comment/43499702
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/43499654
has comment: http://stackoverflow.com/comment/43499892
tagged with: javascript
tagged with: jquery
tagged with: timeofday
has comment: http://stackoverflow.com/comment/43499859
score: 0
has comment: http://stackoverflow.com/comment/43499651
answer count: 1
has comment: http://stackoverflow.com/comment/43499761
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43500176
upvote count: 1

http://stackoverflow.com/a/27573755
type: Answer
score: 2
has body: Get rid of the '' before the function declarations after start_time and end_time. This isn't correct syntax.
answers question: http://stackoverflow.com/q/27573728
upvote count: 2
has comment: http://stackoverflow.com/comment/43572974
downvote count: 0

http://stackoverflow.com/q/27526161
has comment: http://stackoverflow.com/comment/43481060
has body: A lot of the time, instead of downloading scripts, people will set the source as a fully qualified URL. As shown here: But will the browser cache this file, or will it have to re-download it if the session is reset or if you load a new tab. Would using something like Web Jars or Bower for dependency management keep it from doing so if it did?
type: AnsweredQuestion
has title: Do browser cache downloaded javascripts
has answer: http://stackoverflow.com/a/27526285
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/43480897
tagged with: javascript
has comment: http://stackoverflow.com/comment/43481067
tagged with: browser
score: 0
accepted answer: http://stackoverflow.com/a/27526285
answer count: 1
favorite count: 0

http://stackoverflow.com/q/27617278
tagged with: angularjs
has title: ui-bootstrap timepicker and ng-model value converter
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/31696553
score: 3
upvote count: 3
tagged with: http://stackoverflow.com/tag/json
type: Question
downvote count: 0
tagged with: javascript
tagged with: angular-ui-bootstrap
has body: my server side json uses "HH:mm:ss" to store time data. i'm using UI-Bootsrap TimePicker to let the user input the time. I'm using the ngModelController's $parsers and $formatters to map from server side json to frontend timepickerUI. The conversion from UI to Data is working as expected, however i'm having difficulties converting the Data back to UI. The error message is as follows: 'Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.' this is the HTML markup &lt;timepicker ng-model="HotelProperties.CheckOutTime" time-span-converter hour-step="hstep" minute-step="mstep" show-meridian="false"&gt;&lt;/timepicker&gt; this is the directive .directive("timeSpanConverter", ['$filter',function($filter) { return { restrict: 'A', require: 'ngModel', link: function(scope, element, attr, ngModelCtrl) { function fromJson(value) { if (!value) return new Date(); var parts = value.split(':'); var hh = Number(parts[0]); var mm = Number(parts[1]); var date = new Date(); date.setHours(hh); date.setMinutes(mm); return date; } function fromUser(value) { var time = $filter('date')(value, "HH:mm:00"); return time; } ngModelCtrl.$parsers.push(fromUser); ngModelCtrl.$formatters.push(fromJson); } } }])
answer count: 1
has comment: http://stackoverflow.com/comment/51333032
favorite count: 0

http://stackoverflow.com/q/27524289
favorite count: 0
type: Question
score: 3
tagged with: merge
has body: I have an array populated with objects. How do I go about merging objects inside this array when they have a matching specific sub value? My array looks like this: var data = [ { prod_name:"test1", type:"1", color:"white", product_id:"5" }, { prod_name:"test2", type:"1", color:"green", product_id:"7" }, { prod_name:"test2", type:"2", color:"green", product_id:"7" }, { prod_name:"test3", type:"4", color:"red", product_id:"8" }, { prod_name:"test4", type:"2", color:"white", product_id:"21" } ]; I want to merge the objects based on a matching product_id . In case the values are not the same, I want to keep BOTH values, seperated with a comma. So the outcome of the previous array would become: [ { prod_name:"test1", type:"1", color:"white", product_id:"5" }, { prod_name:"test2", type:"1,2", color:"green", product_id:"7" }, { prod_name:"test3", type:"4", color:"red", product_id:"8" }, { prod_name:"test4", type:"2", color:"white", product_id:"21" } ]; The array shrunk with 1 because it had a duplicate, and the two values that where not the same are merged and seperated by a comma type:"1,2" . I thought the following would work: jQuery.each( data, function( i, val ) { var productID = val.product_id; var index_key = i; jQuery.each( data, function( i, val ) { if(val.product_id == productID &amp;&amp; data[index_key] != data[i]){ jQuery.extend(data[index_key], data[i]); } }); }); But this only overwrites the type value of the first hit and keeps both entries. For "mergable" items the values prod_name and product_id are always the same. Does anyone know of a way to achieve the desired result? UPDATE: Different values(product attributes) might be added in a later stage. Therefor I'd prefer a method that does not specifically check for the type attribute, but rather checks for eveything that is NOT product_id or prod_name and if it has a hit, merges this with a comma. FIDDLE
upvote count: 3
has answer: http://stackoverflow.com/a/27524550
answer count: 1
tagged with: object
accepted answer: http://stackoverflow.com/a/27524550
type: AnsweredQuestion
tagged with: arrays
has title: Merging objects in array based on sub-value
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/27494247
has answer: http://stackoverflow.com/a/27512724
answer count: 3
score: 5
has answer: http://stackoverflow.com/a/75272529
downvote count: 0
tagged with: asynchronous
has comment: http://stackoverflow.com/comment/43420420
has comment: http://stackoverflow.com/comment/43420405
has answer: http://stackoverflow.com/a/27495749
favorite count: 0
has comment: http://stackoverflow.com/comment/43423695
tagged with: google-chrome-app
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43448195
type: Question
has body: I preface this question with the fact that I am new to working with indexedDB and asynchronous javascript. I am writing a function for a chrome application that takes in an Array buffer called sourceBlob and stores it in indexedDB. The function then opens a data base in indexedDB that I previously created on the applications start up and starts a transaction with that data base. For some reason when I execute this code request.onsuccess is completely skipped and thus I am not able to add my data to objectStore. How do I ensure that request.onsuccess is executed? I have read that this issue might be caused by the fact that indexedDB is asynchronous but I have not been able to find an effective solution to this problem. data.indexedDB.addSource = function(sourceBlob) { //adds source to data base var version = 1; var request = indexedDB.open("content", version); request.onerror = errorHandler; request.onsuccess = function(e) { db = e.target.result; var trans = db.transaction(["nContent"], "readwrite"); var store = trans.objectStore("nContent"); var request = store.put(sourceBlob); trans.oncomplete = function(e) { data.indexedDB.getIndexedSource(); }; }; };
has title: Why is my indexedDB.open.onsuccess event not called?
tagged with: indexeddb
upvote count: 5
tagged with: javascript
has comment: http://stackoverflow.com/comment/108036204
has comment: http://stackoverflow.com/comment/43420611

http://stackoverflow.com/a/27511226
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27511164
answers question: http://stackoverflow.com/q/27511164
type: Answer
has body: As is, you are using an object reference. Then if modify one, the othes one is modified too. You could use angular.copy $scope.addToOrder = function(index) { var tempItem = $scope.item; var itemCopy = angular.copy(tempItem[index]); if (tempItem[index].validate == true){ if (_.isEmpty($scope.item2) == true) { $scope.item2.push(itemCopy); } else { for (var i = 0; i &lt; $scope.item2.length; i++) { if ($scope.item2[i] == tempItem[index]) { break; } if (i == $scope.item2.length - 1) { $scope.item2.push(itemCopy); } } } } }
score: 2
downvote count: 0
upvote count: 2

http://stackoverflow.com/q/27560068
type: Question
downvote count: 4
tagged with: javascript
has body: I am creating some social share icons. For example the twitter share code is href="http://twitter.com/home?status=" The URL for the page you want to share goes after the = at the end of the link. Is there a way to add code that will add the current url of the page being viewed to the link address so that it doesnt have to manually be added on every page we want to put the button on?
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
upvote count: 0
type: UnansweredQuestion
score: -4
has answer: http://stackoverflow.com/a/27560115
has comment: http://stackoverflow.com/comment/43546718
has title: How add current URL to the end of existing href link

http://stackoverflow.com/comment/43599874
score: 0
type: QuestionComment
has text: we are talking about this btw: https://gist.github.com/andres-erbsen/1307675.
type: Comment
comment on: http://stackoverflow.com/q/27492135

http://stackoverflow.com/comment/43562407
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27564217
score: 0
has text: Bardo's comment is unhelpful. What he means is `frame` is deprecated, but `iframe` is still used widely today. Many pages on the web use third party applications that run inside `iframe`s. With that consideration, maybe you can change your site to not use frames, but use an `iframe` only when you need to work with other sites/applications. Your likely to not find a quick answer on here *because* `frame`'s deprecation means not many people will know the answer.

http://stackoverflow.com/q/27509797
accepted answer: http://stackoverflow.com/a/27509808
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/43449681
tagged with: javascript
score: 1
possible better answer: http://stackoverflow.com/a/31332911
favorite count: 0
has title: Increment JavasScript date object for next month when days are increased?
has body: Is there a simple solution to auto increment the month of the date object when days are added via getDate? I need to add 2 days to a user supplied date, for example if the user's entered value is 2014-11-16 it returns 2014-11-18. I have this working in the below example, but the problem is if a user supplies a date at the end of the month, for example 2014-11-30 it will return 2014-11-32 (November only has 30 days) instead of rolling into the next month, it should be 2014-12-02. It also does not increment to a new year as well. var actualDate = new Date(arrive); var year = actualDate.getFullYear(); var monthy = actualDate.getMonth()+1; var days = actualDate.getDate()+2; var out = year + '-' + (monthy &lt; 10 ? '0' : '') + monthy + '-' + days; http://jsfiddle.net/bubykx1t/
type: AnsweredQuestion
tagged with: getdate
has comment: http://stackoverflow.com/comment/43449784
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27509808
tagged with: date
linked to: http://stackoverflow.com/q/563406
has answer: http://stackoverflow.com/a/31332911
linked to: http://stackoverflow.com/q/3818193

http://stackoverflow.com/comment/43696148
type: Comment
type: QuestionComment
has text: @Mohit.Bhasi, Hi, it doesn't work
comment on: http://stackoverflow.com/q/27638179
score: 0

http://stackoverflow.com/comment/43540197
has text: @CadeLewis Then just do it when the `onbeforeunload` event is raised. See https://developer.mozilla.org/en-US/docs/WindowEventHandlers.onbeforeunload
comment on: http://stackoverflow.com/a/27556957
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/43596702
has text: What do you mean by alternating the DOM context?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27585336
type: Comment

http://stackoverflow.com/a/27509650
has comment: http://stackoverflow.com/comment/43449626
answers question: http://stackoverflow.com/q/27508827
has comment: http://stackoverflow.com/comment/43449962
has comment: http://stackoverflow.com/comment/43450575
downvote count: 0
has comment: http://stackoverflow.com/comment/43450615
type: Answer
has comment: http://stackoverflow.com/comment/43450448
upvote count: 3
score: 3
has body: Both selectors are wrong to the CHECKBOX and SELECT. Checkbox, as you are using an ID in it, just use the ID: $("#secondYearCB").prop("checked", false); The Selects, they are not INPUT, so use only the "select" word. $("#div12 &gt; .clearfix &gt; select").val(""); P.s.: I add ">" to get only the direct SELECT childs inner the ".clearfix" div, if you don't want this, just remove it. Selector: >
has comment: http://stackoverflow.com/comment/43450008

http://stackoverflow.com/comment/43493606
type: Comment
type: AnswerComment
has text: This does not work for me, the scrollbar does not span the height of the grid. I think there are two issues: First is that the "leftScroll" div should have its height set to the that of the grid (I've fixed this in your example). Second is that "leftScrollContent" is not being set properly. I am not sure where the "sortrows" div is coming from, but I do not seem to have one.
comment on: http://stackoverflow.com/a/27525249
score: 0

http://stackoverflow.com/q/27555661
has answer: http://stackoverflow.com/a/38664470
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/43537730
has answer: http://stackoverflow.com/a/27555730
answer count: 3
downvote count: 3
upvote count: 1
favorite count: 0
has body: I'll need to convert JS function below to exact function in PHP. var user_timezone_offset = new Date().getTimezoneOffset()*60; This is my PHP code, but $user_timezone_offset returns different value than JS: $TZ = 'America/Chicago'; $user_localtime = new DateTime("now", new DateTimeZone($TZ)); $user_timezone_offset = $user_localtime-&gt;getOffset(); The returned values must be exact same in both cases. Now is one 3600 (from PHP) and second value is negative -3600 (from JS)
type: UnansweredQuestion
tagged with: php
has title: convert new Date().getTimezoneOffset() to PHP
has answer: http://stackoverflow.com/a/69074710
type: Question

http://stackoverflow.com/comment/114804839
type: Comment
score: 0
has text: Though yes, this is an approach to just upload the document with the file's specified Content-Type (i think it may default to binary/octet-stream, which will default download for clientside embed) you can in fact specify a unique response content type in the presigned URL as mentioned in @cameck solution
type: AnswerComment
comment on: http://stackoverflow.com/a/27555022

http://stackoverflow.com/comment/43578884
type: QuestionComment
comment on: http://stackoverflow.com/q/27576701
has text: If you want to save the settings for future use, why not just use the chrome.storage API to store the JSON settings? https://developer.chrome.com/extensions/storage For the FileSystem writer, I'm not sure if you can change a file which is `packed` with the extension. As long as I know, FileSystem writes to a `temporary sandboxed` zone.
score: 0
type: Comment

http://stackoverflow.com/comment/43606095
type: QuestionComment
comment on: http://stackoverflow.com/q/27591160
score: 0
has text: i can do that i will remove all sensitive info though
type: Comment

http://stackoverflow.com/q/27513252
tagged with: sql-server
type: Question
has body: I have an application that I wrote in JavaScript/HTML that utilizes a local machine database. It's a pretty complex problem but I just need help with the SQL query right now. More info on the local JavaScript database class is found here: JavaScript Access database class The data consists of 3D values and a time component so the database is pretty large though I simplified the data from 200 time steps to 3 for testing. There are multiple values that describe the 3D model so I access different values using drop downs. Unfortunately I don't have a working version I can show anyone because it only works on a local machine. I'm trying to convert this version to a web-style database driven demo that runs off MySQL. I host at FatCow and if you know them you know they have a php-driven MySQL interface. Data Setup The way the data is set up, I have several columns that describe the 3D data table is described below. This is for one table called "dat": Cell (the unique number for that cell in the matrix) XVal (this is the X location inbn the matrix) YVal (this is the Y location in the matrix) Lift (This is the Z location in the matrix) Oct-97 (this is one of three time components with values) Oct-07 (this is one of three time components with values) Oct-17 (this is one of three time components with values) There are several tables that are called on to make grids, but let's just focus on the 'dat' table for now Some data tables are set up similarly with the references XVal and YVal but some only refer to the unique Cell value. With the current application, I take the large columns of data and do a transformation pivot table to create grids of the model. The 3D matrix grid is 36x41x15. These grids are displayed as: XY plan view XZ cross section YZ cross section I have three SQL queries for each of the grids that work in my local application, but these do not work in MySQL. Keep in mind I'm teaching myself how to do this stuff so I'm a bit inexperienced. Don't kill me if it's a…
has comment: http://stackoverflow.com/comment/43456865
has title: SQL Query conversion from Access to MySQL
has comment: http://stackoverflow.com/comment/43457238
upvote count: 2
tagged with: pivot-table
has comment: http://stackoverflow.com/comment/43457068
tagged with: php
answer count: 1
has comment: http://stackoverflow.com/comment/43457022
has answer: http://stackoverflow.com/a/27515016
tagged with: mysql
accepted answer: http://stackoverflow.com/a/27515016
score: 2
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/43456958
favorite count: 0

http://stackoverflow.com/comment/43643135
comment on: http://stackoverflow.com/q/27610131
has text: @sethetter You can build the fiddle in any browser, and then test `<fiddle-url>/show` in IE8.
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/q/27623896
has comment: http://stackoverflow.com/comment/43668745
tagged with: lodash
has comment: http://stackoverflow.com/comment/43669775
answer count: 0
upvote count: 3
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43670285
has comment: http://stackoverflow.com/comment/43669073
has title: lodash where method to consider nested array elements
type: Question
score: 3
linked to: http://stackoverflow.com/q/17578725
has body: lodash where method is not considering nested array elements when searching. Consider the below example: var foo = [ { "id": "123", "elements": [ { "id": "1231", "name": "foo1" }, { "id": "1232", "name": "bar1" } ] }, { "id": "456", "items": [ { "id": "4561", "name": "foo2" }, { "id": "4562", "name": "bar2" } ] } ] _.where(foo, { 'id' : '123' } ) //works and returns the element _.where(foo, { 'id' : '1231' } ) //fails.. trying to match the first element in the elements array. does not return matched element Is there an API in lodash or other JavaScript library to perform deep search?
duplicate of: http://stackoverflow.com/q/17578725
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/43668828

http://stackoverflow.com/q/27623527
score: 0
answer count: 1
tagged with: jquery
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: Unable to attach css property dynamically
tagged with: dom
type: Question
has body: I want to show popup,but the popup is displaying scroll bar. i am using Iframe to display the popup. var addPartnerDialog = App.addDialog("AddExistingPartner", 500, 250); **$(addPartnerDialog.getId()).css('overflow','hidden');** var iframe = addPartnerDialog.load('/' + App.getVirtualDirectoryName() + '/PlatformPartner/EditPartner?Type=Add', function () { iframe.contentWindow.editPartners.initialize(addPartnerDialog); }); } The css property which is added is not applying to the html div. Please let me now how can i achieve it.
has answer: http://stackoverflow.com/a/27623558
tagged with: javascript

graphael
tags question: http://stackoverflow.com/q/27561132
tag name: graphael
type: Tag

meteor
tags question: http://stackoverflow.com/q/27481684
tags question: http://stackoverflow.com/q/27530936
tags question: http://stackoverflow.com/q/27517253
tags question: http://stackoverflow.com/q/27515309
tags question: http://stackoverflow.com/q/27533942
tags question: http://stackoverflow.com/q/27530336
tags question: http://stackoverflow.com/q/27614330
tags question: http://stackoverflow.com/q/27595341
tags question: http://stackoverflow.com/q/27585020
tags question: http://stackoverflow.com/q/27539590
tags question: http://stackoverflow.com/q/27595788
tags question: http://stackoverflow.com/q/27501825
tags question: http://stackoverflow.com/q/27540624
tags question: http://stackoverflow.com/q/27585886
tags question: http://stackoverflow.com/q/27506969
tags question: http://stackoverflow.com/q/27607396
tags question: http://stackoverflow.com/q/27529057
tags question: http://stackoverflow.com/q/27514577
tags question: http://stackoverflow.com/q/27517575
tags question: http://stackoverflow.com/q/27583853
tags question: http://stackoverflow.com/q/27612383
tags question: http://stackoverflow.com/q/27498932
tags question: http://stackoverflow.com/q/27536213
tags question: http://stackoverflow.com/q/27535473
type: Tag
tags question: http://stackoverflow.com/q/27591971
tags question: http://stackoverflow.com/q/27573811
tags question: http://stackoverflow.com/q/27484016
tags question: http://stackoverflow.com/q/27589346
tags question: http://stackoverflow.com/q/27509125
tags question: http://stackoverflow.com/q/27614295
tags question: http://stackoverflow.com/q/27549992
tags question: http://stackoverflow.com/q/27590459
tags question: http://stackoverflow.com/q/27551428
tags question: http://stackoverflow.com/q/27489328
tags question: http://stackoverflow.com/q/27579393
tags question: http://stackoverflow.com/q/27520951
tags question: http://stackoverflow.com/q/27502248
tags question: http://stackoverflow.com/q/27560094
tags question: http://stackoverflow.com/q/27571542
tags question: http://stackoverflow.com/q/27522537
tags question: http://stackoverflow.com/q/27540099
tags question: http://stackoverflow.com/q/27478864
tags question: http://stackoverflow.com/q/27578990
tag name: meteor
tags question: http://stackoverflow.com/q/27527781
tags question: http://stackoverflow.com/q/27559578
tags question: http://stackoverflow.com/q/27517429
tags question: http://stackoverflow.com/q/27574261

http://stackoverflow.com/comment/43477152
has text: There is no much of them. I've added them to the question.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27505948

http://stackoverflow.com/q/27523865
possible better answer: http://stackoverflow.com/a/27524212
answer count: 4
type: AnsweredQuestion
tagged with: if-statement
type: Question
has answer: http://stackoverflow.com/a/27524165
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27524212
has title: Javascript/JQuery if style display value is equal to
score: 0
has body: I want to check if the display is equal to none or to table-row. I'm currently using this: Javascript/JQuery: function changeDisplay(element){ var clickedLi = $(element).closest("li"); var pageList = $(".paginering li"); var trList = $(".tabelOpenstaand tbody tr.hoofdRij"); var trNumber = $(".tabelOpenstaand tbody tr.hoofdRij").length; debugger; for (var i = 0; i &lt; trNumber; i++){ if (trList[i].css("display") == "table-row"){ trList[i].css("display", "none"); } } } Currently I get the error: 'Uncaught TypeError: undefined is not a function' on the if line. How do I solve this? trList is filled with the right elements.
has answer: http://stackoverflow.com/a/27523981
accepted answer: http://stackoverflow.com/a/27523981
has answer: http://stackoverflow.com/a/27524011

http://stackoverflow.com/a/27623040
answers question: http://stackoverflow.com/q/27622752
has body: Use package HTMLAgilityPack its used for extract values on the basis of tags
type: Answer
score: 0

http://stackoverflow.com/a/27605251
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/43640891
downvote count: 0
answers question: http://stackoverflow.com/q/27596693
type: Answer
has body: Here's a purely algorithmic way to solve the problem (ie it doesn't rely upon the specific state of the DOM). Basically just use a variable to detect recursion and abort the update. /* two way binding */ var twowayBind = function (a, b, aToB, bToA) { var updatingA = 0, updatingB = 0, subscribeA = new Rx.SingleAssignmentDisposable(), subscribeB = new Rx.SingleAssignmentDisposable(), subscriptions = new Rx.CompositeDisposable(subscribeA, subscribeB); subscribeA.setDisposable(a.subscribe(function (value) { if (!updatingB) { ++updatingA; b.onNext(aToB(value)); --updatingA; } })); subscribeB.setDisposable(b.subscribe(function (value) { if (!updatingA) { ++updatingB; a.onNext(bToA(value)); --updatingB; } }); return subscriptions; }; var cmValue = new BehavoirSubject(0), inValue = new BehaviorSubject(0), binding = twowayBind(cmValue, inValue, cmToIn, inToCm);

http://stackoverflow.com/comment/43693098
type: Comment
comment on: http://stackoverflow.com/q/27637074
score: 0
has text: can you show us the HTML code, with class selected?
type: QuestionComment

http://stackoverflow.com/comment/43457789
score: 0
comment on: http://stackoverflow.com/q/27513075
has text: I found a solution to my core problem using a different approach, but I'm still interested in this particular problem I was having...
type: QuestionComment
type: Comment

http://stackoverflow.com/q/27485575
tagged with: javascript
has body: Pixi.js Touchmove and Mousemove event target have different targets. one seems to point to the DisplayObject and the other to the sprite within. Is there a way to stop propagation? Thanks!
score: 0
has comment: http://stackoverflow.com/comment/43403040
answer count: 1
has title: Pixi.js Touchmove and Mousemove event target different?
type: UnansweredQuestion
tagged with: pixi.js
type: Question
has answer: http://stackoverflow.com/a/29260832
has comment: http://stackoverflow.com/comment/43411496

message-passing
tags question: http://stackoverflow.com/q/27477641
tag name: message-passing
type: Tag

deferred-loading
type: Tag
tag name: deferred-loading
tags question: http://stackoverflow.com/q/27504797

http://stackoverflow.com/a/27556797
has comment: http://stackoverflow.com/comment/43566515
has comment: http://stackoverflow.com/comment/43572319
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27555767
has body: The trick here is to not use two-way binding, but to use more traditional event handling techniques. This example listens for change events on the second input (not input events, which happen with each keystroke, since that would cause the cursor to jump about while the user is still typing) in each , and tries to evaluate its contents. Meanwhile, a formatter takes the arguments and turns them back into a string: var ractive = new Ractive({ el: 'main', template: '#template', data: { transforms: [ { fn: 'TheFunctionName', args: [ 'arg1', 2, 'arg3' ] }, { fn: 'AnotherMethod', args: [ 4.678 ] } ], format: function ( args ) { return args.map( JSON.stringify ).join( ', ' ); } }, updateArgs: function ( index, str ) { var keypath = 'transforms[' + index + '].args', args = this.get( keypath ); try { // or use JSON.parse, if you don't want to eval this.set( keypath, eval( '([' + str + '])' ) ); } catch ( err ) { // reset this.set( keypath, null ); this.set( keypath, args ); } } });
has comment: http://stackoverflow.com/comment/43559609
answers question: http://stackoverflow.com/q/27555767
has comment: http://stackoverflow.com/comment/43570902
has comment: http://stackoverflow.com/comment/43548388
type: Answer

http://stackoverflow.com/comment/43596409
score: 0
type: Comment
type: QuestionComment
has text: on chrome, the "contact us" button on the left hand side only hides behind the carousel. Only the button hides, not the form itself. It's on top. AND, it seems that when you transition to the next image the "contact" us button is hidden.
comment on: http://stackoverflow.com/q/27585987

http://stackoverflow.com/q/27581297
upvote count: 1
has comment: http://stackoverflow.com/comment/43587484
has title: Validate Bootstrap - Timepicker start and end time
has comment: http://stackoverflow.com/comment/43587012
tagged with: javascript
type: UnansweredQuestion
downvote count: 0
score: 1
favorite count: 0
type: Question
tagged with: twitter-bootstrap
answer count: 1
has answer: http://stackoverflow.com/a/35968607
has comment: http://stackoverflow.com/comment/43617626
has body: I want user to select valid start and end time. For example ending time should be greater than start time. I am using bootstrap- timepicker gem So far I have like this: HTML Start time: <%= f.text_field :work1, :id=> 'timepicker' ,:class => 'input-small' %> End time <%= f.text_field :work2, :id=> 'timepicker1' ,:class => 'input-small' %> Javascript $("#timepicker, #timepicker1").timepicker( { showMeridian: false }); $("#timepicker1").change(function () { var startDate = document.getElementById("timepicker").value; var endDate = document.getElementById("timepicker1").value; if ((Date.parse(endDate) <= Date.parse(startDate))) { alert("End time should be greater than Start time"); document.getElementById("timepicker1").value = ""; } }); When I change Ending time, there is no errors on console. I believe it could be because of Date.parse. It should be Time ? I tried to Time.parse but got error in console. Time is not defined. Thanks!

http://stackoverflow.com/comment/43570392
type: Comment
score: 0
type: AnswerComment
has text: Frohe Weihnachten und guten Rutsch!
comment on: http://stackoverflow.com/a/27556488

http://stackoverflow.com/q/27636099
has answer: http://stackoverflow.com/a/27636320
has answer: http://stackoverflow.com/a/27636262
answer count: 3
has comment: http://stackoverflow.com/comment/43695380
has comment: http://stackoverflow.com/comment/43694334
has comment: http://stackoverflow.com/comment/43691361
has comment: http://stackoverflow.com/comment/43691342
downvote count: 0
has comment: http://stackoverflow.com/comment/43694343
favorite count: 0
tagged with: ajax
has body: I have created a function for splitting values and run in a for loop but the for loop terminates after a single loop. If I have an array with 4 items then it runs only one time: function color_change() { //alert(document.getElementById("dom-target")); var div_fgh = document.getElementById("dom-target"); var myData = div_fgh.textContent; //alert(myData); alert(myData); var stall_wished= myData; var array_WW= stall_wished.split(","); alert(array_WW.length); for (j=0;j&lt;array_WW.length;j++){ var wished_stalls = array_WW[j]; alert(wished_stalls); document.getElementById(wished_stalls).style.background="#F90"; } }
type: UnansweredQuestion
has title: trouble in running for loop in JavaScript
tagged with: php
upvote count: 3
has comment: http://stackoverflow.com/comment/43691396
type: Question
has answer: http://stackoverflow.com/a/27636211
score: 3
tagged with: javascript

http://stackoverflow.com/comment/43388378
type: Comment
type: QuestionComment
has text: You have multiple alerts, are they all not firing? Seems to work in this JSFiddle: http://jsfiddle.net/LrhuynL5/
score: 0
comment on: http://stackoverflow.com/q/27477187

http://stackoverflow.com/q/27492307
has answer: http://stackoverflow.com/a/27505163
tagged with: firebase
type: AnsweredQuestion
upvote count: 2
type: Question
tagged with: backbone.js-collections
has body: Basically I want this set up: var Game = Backbone.Model.extend({ defaults: { }, autoSync: true }); var Games = Backbone.Firebase.Collection.extend({ url: 'https://&lt;myapp&gt;.firebaseio.com/games', autoSync: false, model: Game }); Each Game should be auto-synced with server data but I do not not want to listen to the entire child_* Firebase family of events. The goal is to update individual item view instead of repainting the whole list. Kind regards to folks out there and happy coding ;)
has title: Does BackboneFire support non-AutoSync collection with AutoSync model
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27505163
tagged with: backbonefire
score: 2
answer count: 1
downvote count: 0
favorite count: 0
tagged with: backbone.js

http://stackoverflow.com/comment/43670877
type: Comment
type: QuestionComment
has text: I run it on default IIS server that comes with ASP.NET Visual Studio 2013. I don't know where's the problem. How do I sync routing configuration with angular and asp.net ? @oryol
comment on: http://stackoverflow.com/q/27624914
score: 0

http://stackoverflow.com/q/27561282
answer count: 2
has answer: http://stackoverflow.com/a/27561504
downvote count: 0
favorite count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: php
has title: Php-Codeigniter : How to exit from ajax Manually .?
has body: In my CI project, im using a webpage and it includes a &lt;div name="call-ajax"&gt; in which it calls an ajax display_table.php on a button click via js. The ajax content is a &lt;table&gt;.....&lt;/table&gt; loaded from database table. i provided a delete(button) option for each row to delete the corresponding row from both Html table and mysql table. for this i called a javascript fn() at onClick of Delete button. the js fn() will remove the corresponding Html table row and then call the controller like this window.location.href = "&lt;?php echo base_url("somecontroller/delete_comapny"); ?&gt;/"+Code+"/"+CId; so this will call controller and then model to delete corresponding row from mysql table. after deletion it back to the Controller delete_comapny(). The problem was here. here i want to load somepage.php $this-&gt;load-&gt;view('somepage'); as a normal webpage. but i get the somepage.php displayed as ajax (all the content in somepage.php is displayed on the element &lt;div name="call-ajax"&gt; that i spefied in 1st paragraph). this is becouse of these all operation begins from an ajax display_table.php. so after all operation it display sompeage.php as ajax in &lt;div name="call-ajax"&gt; how i get a solution for this.? i just need to load a normal webpage. any help would be greatly appreciated .
has answer: http://stackoverflow.com/a/27564674
score: 1
has comment: http://stackoverflow.com/comment/43548508
tagged with: mysql
type: Question
tagged with: javascript
tagged with: ajax

http://stackoverflow.com/comment/43406947
comment on: http://stackoverflow.com/q/27487659
has text: I think you need to declare your `ng-app` only once for single applciation, so try to move `ng-app="AngularJSTestBedWebApp"` to ` ` or ` ` tag.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27575393
upvote count: 1
score: 1
has body: Instead of the inline javascript, I would just go with a querySelectorAll DEMO HTML: 1 2 1 2 1 2 Javascript: var a = document.querySelectorAll('select'); console.log(a); for(var i = 0; i<a.length;i++) { a[i].addEventListener('change',cambiar_fecha); } function cambiar_fecha(){ alert (document.getElementById("fecha_evento").value); var ano = document.getElementById("ano_evento").value; var mes = document.getElementById("mes_evento").value; // var dia = document.getElementById("dia_evento").value; document.getElementById("fecha_evento").value = ano+"-"+mes+"-"+dia; }
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27575275

http://stackoverflow.com/q/27487828
favorite count: 0
type: Question
linked to: http://stackoverflow.com/q/2400935
has body: I want to notify the user when an update for my Greasemonkey/UserScript is available. However when the user has installed the script from the Chrome Web Store, I don't want to bother because it has auto-update functionality. I first thought about using $.browser==chrome but it is also possible that a Chrome user has installed it using Tampermonkey. (Furthermore if the site would update jQuery, $.browser would stop working) So, is it possible to detect that it is a UserScript installed through the Chrome Web Store?
tagged with: chrome-web-store
tagged with: tampermonkey
upvote count: 2
has answer: http://stackoverflow.com/a/27494812
answer count: 1
tagged with: userscripts
score: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27494812
downvote count: 0
tagged with: javascript
has title: How to detect if a userscript is installed from the Chrome Store?

http://stackoverflow.com/comment/43490373
score: 0
has text: I would imagine that `.find('div.my-class')` would be faster (although not significantly) because you're narrowing down the group of elements to search amongst. That said, running some tests (e.g. jpPerf) would probably be the best way to find out.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27530871

http://stackoverflow.com/a/27596168
upvote count: 1
has body: A while ago, abstract was singled out for future use in a later version of the language. However, it is still not yet a reserved word in the current version of the language. I would suggest not using it for the sake of future compatibility https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar
answers question: http://stackoverflow.com/q/27596093
downvote count: 0
score: 1
type: Answer

http://stackoverflow.com/a/27548574
upvote count: 1
has body: try this : http://jsfiddle.net/mig1098/nt3sd8dw/ var cargar = function () { var tabla = document.createElement("TABLE"); document.body.appendChild(tabla); var cebreado = function () { for (var a = 0; a &lt; 10; a++) { console.log("Inicio" + a); var tr = document.createElement("TR"); tabla.appendChild(tr); console.log("Hola" + a); for (var b = 0; b &lt; 10; b++) { var td = (document.createElement("TD")); tr.appendChild(td); var text = document.createTextNode("Hello"); td.appendChild(text); } } } ; return cebreado(); } ; cargar();
has comment: http://stackoverflow.com/comment/43523715
downvote count: 0
answers question: http://stackoverflow.com/q/27548409
type: Answer
has comment: http://stackoverflow.com/comment/43523368
score: 1
has comment: http://stackoverflow.com/comment/43523463

http://stackoverflow.com/a/27577071
has body: $c = curl_init(); $curlConfig = array( CURLOPT_URL =&gt; "http://www.roblox.com/messages/send", CURLOPT_POST =&gt; true, CURLOPT_RETURNTRANSFER =&gt; true, CURLOPT_POSTFIELDS =&gt; array( 'subject' =&gt; 'UMAD!', 'body' =&gt; 'UMAD!', 'recipientid' =&gt; '2342342', ) ); curl_setopt_array($c, $curlConfig); $result = curl_exec($c); curl_close($c);
has comment: http://stackoverflow.com/comment/43579341
score: 4
upvote count: 4
downvote count: 0
has comment: http://stackoverflow.com/comment/43579327
type: Answer
has comment: http://stackoverflow.com/comment/43579371
has comment: http://stackoverflow.com/comment/43579322
answers question: http://stackoverflow.com/q/27577035
has comment: http://stackoverflow.com/comment/43579315

http://stackoverflow.com/a/33811891
has body: Take a look at openstreetmap.org page on zoom levels. It gives this formula for calculating the meters per pixel: The distance represented by one pixel (S) is given by S=C*cos(y)/2^(z+8) where... C is the (equatorial) circumference of the Earth z is the zoom level y is the latitude of where you're interested in the scale.
upvote count: 4
has comment: http://stackoverflow.com/comment/81425360
answers question: http://stackoverflow.com/q/27545098
type: Answer
downvote count: 1
score: 3

http://stackoverflow.com/q/27585511
answer count: 1
has body: Hello Everyone and thank you in advance for your time! I am working on a site involving simultaneous CSS3 animations. I am using setInterval() calls to run the animations. I am looking for the best way to call a function after the animations finish. The code below is just a generic sample to explain my question. When you press the start button, three setInterval() functions are called. One animates translation, one animates scaling, and the last animates rotation. The essence of my question is, how can I run some code - for the sake of argument let's say console.log("We Did IT!"); - when the last clearInterval() is called. I can imagine a boolean network tracking which animations have finished and calling the code when all the flags are thrown, but I was hoping there was a more elegant solution to be found here. Thanks again! //Global Variable Declarations var adc = adc || {}; adc.tWrap = document.createElement('div'); adc.sWrap = document.createElement('div'); adc.rWrap = document.createElement('div'); adc.btn = document.createElement('button'); //Style Objects, Append to Body, Apply Listeners adc.init = function() { adc.setDiv(adc.tWrap, "transform wrap", 22, 22, 200, 200, 1, ""); adc.setDiv(adc.sWrap, "scale wrap", 22, 22, 150, 150, 2, "", ""); adc.setDiv(adc.rWrap, "rotate wrap", 22, 22, 100, 100, 3, "yellow"); adc.setBtn(adc.btn, "start btn", 25, 25, 50, 50, "Start"); var body = document.getElementsByTagName('body'); body[0].appendChild(adc.tWrap); adc.tWrap.appendChild(adc.sWrap); adc.sWrap.appendChild(adc.rWrap); adc.rWrap.appendChild(adc.btn); adc.btn.addEventListener('click', adc.click, true); } adc.setDiv = function(a, id, T, L, H, W, z, bg) { a.id = id; a.style.position = 'absolute'; a.style.top = T + "px"; a.style.left = L + "px"; a.style.height = H + "px"; a.style.width = W + "px"; a.style.zIndex = z; a.style.borderWidth = "3px"; a.style.borderStyle = "solid"; a.style.backgroundColor = bg; } adc.setBtn = function(a, id, T, L, H, W, txt) { a.id = id; a.t…
tagged with: css-animations
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27585541
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
has title: Execute Code on Completion of Multiple setInterval Functions
tagged with: css
accepted answer: http://stackoverflow.com/a/27585541
tagged with: multithreading
upvote count: 1

http://stackoverflow.com/a/27625574
answers question: http://stackoverflow.com/q/27593344
has comment: http://stackoverflow.com/comment/43697046
upvote count: 1
has comment: http://stackoverflow.com/comment/43694190
score: 1
has body: the code is sending only one vehicleType per call to php. The relevant code is for (var vehicleType in roadTaxData.provinceWeightFuelPricesData) { data = ... passToPHP(vehicleType, JSON.stringify(data)); } The first call passes 'personen_auto' only (and kampeer_auto is undefined); the second call passes only 'kampeer_auto' and personen_auto is undefined. The revised version of the code that moves passToPHP outside the loop still resets data each time through the loop, so at the bottom data will contain only the very last auto's provinces. To pass all autos, data needs to be appended to (not re-initialized), data has to be gathered into auto-specific sections (not intermingled), and passToPHP needs to build a multi-parameter query string, one per auto. All that will pretty much rebuild the roadTaxData object. Or just pass all of roadTaxData.provinceWeightFuelPricesData to php and have php loop and separate the auto types. Edit: you don't need to convert objects to arrays when passing them to php. Php's json_decode() can decode objects into associative arrays when the optional second parameter is set to true, as json_decode($data, true). Simply passToPHP('json', JSON.stringify(roadTaxData.provinceWeightFuelPricesData)); and in php $data = json_decode($_POST['json'], true); $kampeer_auto = $data['kampeer_auto']); $personen_auto = $data['personen_auto']);
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27593344
type: Answer

http://stackoverflow.com/comment/109140554
type: Comment
comment on: http://stackoverflow.com/a/33817499
type: AnswerComment
has text: @spencer.sm thanks you! after lot of struggle, finally your solution solved my sub-dependency issues :D
score: 0

http://stackoverflow.com/q/27574546
accepted answer: http://stackoverflow.com/a/27609478
tagged with: backbone.js
type: AnsweredQuestion
tagged with: backbone-views
has comment: http://stackoverflow.com/comment/43641172
has comment: http://stackoverflow.com/comment/43640260
has comment: http://stackoverflow.com/comment/43640604
has comment: http://stackoverflow.com/comment/43633566
type: Question
tagged with: google-maps
tagged with: javascript
has comment: http://stackoverflow.com/comment/43633954
has title: Pass the view that manages something to the second view - Backbone
score: 0
has body: I have two views, one for rendering google maps and another to render list of events that contain's latitude and longitude to render markers on the view that contains google maps. When I try to pass the view that manages the map to the initialize method of the second view and save an instance reference, display in console the following error: Here's my code app.js var ev = new Application(); ev.Router = Backbone.Router.extend({ routes: { "": "home", "evento/:id" : "evento" }, home: function(){ var mapView = new ev.views.Home(); $('#home').html(mapView.el); $('#rightcolumn').html(new ev.views.Home_Eventos(mapView).el); }, evento: function(id){ $('#rightcolumn').html(new ev.views.Evento(id).el); } }); $(document).on('ready', function() { // Load HTML templates for the app ev.templateLoader.load(['shell', 'home', 'home_list_eventos', 'evento'], function () { ev.shell = new ev.views.Shell({el: "#shell"}); ev.router = new ev.Router(); Backbone.history.start(); }); }); home.js ev.views.Home = Backbone.View.extend({ map: 'null', initialize: function(){ this.template = _.template(ev.templateLoader.get('home')); this.render(); }, initMap: function(){ var that = this; if(navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(position) { var pos; pos = new google.maps.LatLng(position.coords.latitude,position.coords.longitude); var infowindow = new google.maps.InfoWindow({ map: that.map, position: pos }); that.map.setCenter(pos); }); } var mapOptions = { zoom: 12, }; that.map = new google.maps.Map(that.$el.find('#map_canvas')[0],mapOptions); google.maps.event.addDomListener(window, "resize", function() { var center = that.map.getCenter(); google.maps.event.trigger(that.map, "resize"); that.map.setCenter(center); }); }, render: function(){ this.$el.html(this.template()); this.initMap(); return this; } }); home_events.js ev.views.Home_Eventos = Backbone.View.extend({ initialize: function(mapView){ this.template = _.template(ev.templateLoader.get('home_list_eve…
has comment: http://stackoverflow.com/comment/43615172
answer count: 1
has answer: http://stackoverflow.com/a/27609478

http://stackoverflow.com/comment/43652005
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27614184
has text: @sakshi, hope you are going to display only the select boxes (user_birthday_3i, user_birthday_2i, user_birthday_1i) as an output and the other divs (s2id_user_birthday_3i, s2id_user_birthday_2i, s2id_user_birthday_1i) are for your manupulation!! if yes, then you can write a css like... (.col-sm-2 div{display:none;}) will fix your problem
type: Comment

http://stackoverflow.com/comment/43576450
comment on: http://stackoverflow.com/a/27575465
has text: `ondragstart`, `ondragend`, `ondragenter`, `ondragleave`, etc are all Javascript events under the Drag events listed [on W3Schools](http://www.w3schools.com/jsref/dom_obj_event.asp)
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/27594446
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27594421
upvote count: 3
has comment: http://stackoverflow.com/comment/43612563
type: Answer
has body: It doesn't make sense to have a dynamic property in the prototype. See the prototype as the blueprint of your object. You can do this: function Person(name, age){ this.name = name; this.whoIs = function(){ alert('I am ' + this.name); } this.age = age; } var john = new Person('John', 20); john.age; // would give 20 Also, the whoIs function is added for each Person object. You can add it to the prototype instead: function Person(name, age){ this.name = name; this.age = age; } Person.prototype.whoIs = function () { return 'I am ' + this.name; } var john = new Person('John', 20); john.whoIs(); // would give "I am John"
score: 3
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27594421

http://stackoverflow.com/comment/43457185
comment on: http://stackoverflow.com/q/27513468
has text: @DLeh — It is not JSON. Why would you expect tags added by someone who doesn't know what data format something is in to include the tag for the right data format?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43429486
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27498615
has text: It's the same thing as original. The only change that i see was instead of button you are using on click event of canvas. See you are using the image that i have shown in Js fiddle. but in may case i am actually generating that as a canvas. and you clearing the canvas and re-drawing the image. i want to do it in a way like Show/ hide part of canvas instead of clear and redraw.

http://stackoverflow.com/a/31674299
upvote count: 11
answers question: http://stackoverflow.com/q/27491672
downvote count: 0
type: Answer
has body: The Web Notification API now has the config option silent, but support is patchy, Chrome v43+, Firefox (not yet supported). I'd suggest building silent into your notifications then if/when Firefox support it, it will just work.
score: 11

http://stackoverflow.com/q/27482073
tagged with: jquery
has answer: http://stackoverflow.com/a/27482388
has comment: http://stackoverflow.com/comment/43397115
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: Basically, I've tried to create a form which when completely filled and submit is clicked a new form is revealed in it's place. Although the complete and reveal works. The validation doesn't seem to, as I'm wanting the form to force the user to complete certain fields prior to advancing the user to the next form, my code is below: CSS: .home-reservation-box { -moz-transition: opacity .25s ease-in-out; -webkit-transition: opacity .25s ease-in-out; transition: opacity .25s ease-in-out; visibility: hidden; } Javascript: HTML: Adults 0 1 2 3 4 5 Children 0 1 2 3 4 5 Thanks for your request for a reservation. We're checking availability and we'll get back to you as soon as possible. When I add type submit to the input button and method="post", the validation still doesn't work and rather than allowing the user to enter information into the newly appeared form it simply disappears quickly
tagged with: css
has comment: http://stackoverflow.com/comment/43397214
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43396796
has comment: http://stackoverflow.com/comment/43397174
has title: How can I get my required autofocus validation to work on html form? - My attempt won't validate
has answer: http://stackoverflow.com/a/27482841
has comment: http://stackoverflow.com/comment/43397058
tagged with: forms
type: Question
answer count: 2
tagged with: javascript

http://stackoverflow.com/comment/81425357
type: AnswerComment
type: Comment
has text: I am told by a Leaflet dev (Per Liedman) that this method will only work in EPSG:3857.
comment on: http://stackoverflow.com/a/31266377
score: 2

http://stackoverflow.com/q/27501489
favorite count: 0
has answer: http://stackoverflow.com/a/27501529
accepted answer: http://stackoverflow.com/a/27501529
possible better answer: http://stackoverflow.com/a/27501572
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27501572
has comment: http://stackoverflow.com/comment/43433388
downvote count: 1
linked to: http://stackoverflow.com/q/2419749
type: Question
has title: Get whole tags including selected tag in jquery
duplicate of: http://stackoverflow.com/q/2419749
tagged with: javascript
tagged with: jquery
score: -1
answer count: 2
upvote count: 0
tagged with: http://stackoverflow.com/tag/html
has body: My html content is div1 div2 My jquery code is $("div").click(function(){ alert($(this).html()); }); This will return either "div1" or "div2" based on the click. But i would like to get whole tags like div1 from "this" object. Is there anyway to do that...?

http://stackoverflow.com/q/27618247
score: 0
type: UnansweredQuestion
upvote count: 1
tagged with: php
duplicate of: http://stackoverflow.com/q/5690541
downvote count: 1
has title: Refreshing web page always shows "Data Successfully Saved"
has comment: http://stackoverflow.com/comment/43657513
has body: I have created an HTML form after submitting it below php code executes. The problem is that every time, page is refreshed or rerun, the if condition statement appears without clicking the Save button and null values are being stored in database table. Please help me how can I resolve it? &lt;?php include 'connection.php'; if ($_POST['submit'] == 'Save') { $student_no=$_POST['student_no']; $student_name=$_POST['student_name']; $sqlQuery= "INSERT INTO student_info (student_no, student_name) VALUES('$student_no','$student_name');"; if(mysql_query($sqlQuery, $con)) { echo "Data Successfully Saved"; } else die("Connection Error:". mysql_error()); } mysql_close($con); ?&gt;
has answer: http://stackoverflow.com/a/27619821
type: Question
has comment: http://stackoverflow.com/comment/43657499
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/43657557
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43657511
linked to: http://stackoverflow.com/q/5690541

http://stackoverflow.com/comment/43664276
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27620195
has text: Can you post your javascript file
type: Comment

http://stackoverflow.com/q/27571837
has body: I have created a chess game with Angular and chess.js and am trying to improve its rudimentary AI. The un-improved code currently lives at: https://gist.github.com/dexygen/8a19eba3c58fa6a9d0ff (or https://gist.githubusercontent.com/dexygen/8a19eba3c58fa6a9d0ff/raw/d8ee960cde7d30850c0f00f511619651396f5215/ng-chess) What the AI currently consists of is checking whether the computer (black) has a move that checkmates (using chess.js' in_checkmate() method), and if so, mating the human (white), otherwise making a random move. To improve this I thought that instead of merely making a random move, I would have the AI check for white's counters to black's responses. Then, if White has checkmate, not including those black responses in the moves to randomly select from. I would like to improve the AI within makeMove() (which currently merely delegates to makeRandomMove()) but I am finding this to be harder than expected. What I expected to be able to do was, not unlike mateNextMove() (refer to lines 155-168 of the gist), to check for in_checkmate() within a loop, except the loop will be nested to account for black responses and white counters to those responses. Here is my first attempt at what I expected would work but it does not avoid checkmate when possible. function makeMove(responses) { var evaluator = new Chess(); var response; var allowsMate; var counters = []; var candidates = []; for (var i=0, n=responses.length; i&lt;n; i++) { response = responses[i]; allowsMate = false; evaluator.load(chess.fen()); evaluator.move(response); counters = evaluator.moves(); //console.log(evaluator.ascii()); //console.log(counters); for (var j=0, k=counters.length; j&lt;k; j++) { evaluator.move(counters[j]); if (evaluator.in_checkmate()) { //console.log('in_checkmate'); allowsMate = true; break; } } if (!allowsMate) { candidates.push(response); } } return makeRandomMove(candidates); } In order to debug/test taking advantage of a little knowledge helps, specifically attempting an early…
has comment: http://stackoverflow.com/comment/43589644
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: artificial-intelligence
tagged with: chess
has comment: http://stackoverflow.com/comment/43589398
score: 2
has title: Improving rudimentary AI of Angular based chess game
upvote count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28080104
has comment: http://stackoverflow.com/comment/43588951
has comment: http://stackoverflow.com/comment/43569083
type: Question

http://stackoverflow.com/comment/43685137
score: 3
has text: Check out the concepts of "truthy" and "falsey" in JavaScript. There's more happening behind the scenes of the `==` operator than initially meets the eye. You're running into one of the odd edge cases.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27632391

http://stackoverflow.com/q/27634488
tagged with: twitter-bootstrap
has title: Issues in toggle sidebar menu with bootstrap
has comment: http://stackoverflow.com/comment/43690527
downvote count: 1
linked to: http://stackoverflow.com/q/12190119
type: Question
has comment: http://stackoverflow.com/comment/43688697
linked to: http://stackoverflow.com/q/20877239
score: -1
has comment: http://stackoverflow.com/comment/43688820
has comment: http://stackoverflow.com/comment/43690566
has answer: http://stackoverflow.com/a/27635957
linked to: http://stackoverflow.com/q/20068962
has comment: http://stackoverflow.com/comment/43688907
has comment: http://stackoverflow.com/comment/43690652
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/43690846
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/27739684
has body: I am working with shopify website, in that sidebar menu, need work like this link http://jsfiddle.net/wasimkazi/CGsJH/2/ I mean when click an one link, another link should be hide(if this link alreay opened). This is bootstrap used: !function ($) { "use strict"; // jshint ;_; /* COLLAPSE PUBLIC CLASS DEFINITION * ================================ */ var Collapse = function (element, options) { this.$element = $(element) this.options = $.extend({}, $.fn.collapse.defaults, options) if (this.options.parent) { this.$parent = $(this.options.parent) } this.options.toggle &amp;&amp; this.toggle() } Collapse.prototype = { constructor: Collapse , dimension: function () { var hasWidth = this.$element.hasClass('width') return hasWidth ? 'width' : 'height' } , show: function () { var dimension , scroll , actives , hasData if (this.transitioning) return dimension = this.dimension() scroll = $.camelCase(['scroll', dimension].join('-')) actives = this.$parent &amp;&amp; this.$parent.find('&gt; .accordion-group &gt; .in') if (actives &amp;&amp; actives.length) { hasData = actives.data('collapse') if (hasData &amp;&amp; hasData.transitioning) return actives.collapse('hide') hasData || actives.data('collapse', null) } this.$element[dimension](0) this.transition('addClass', $.Event('show'), 'shown') $.support.transition &amp;&amp; this.$element[dimension](this.$element[0][scroll]) } , hide: function () { var dimension if (this.transitioning) return dimension = this.dimension() this.reset(this.$element[dimension]()) this.transition('removeClass', $.Event('hide'), 'hidden') this.$element[dimension](0) } , reset: function (size) { var dimension = this.dimension() this.$element .removeClass('collapse') [dimension](size || 'auto') [0].offsetWidth this.$element[size !== null ? 'addClass' : 'removeClass']('collapse') return this } , transition: function (method, startEvent, completeEvent) { var that = this , complete = function () { if (startEvent.type == 'show') that.reset() that.transitioni…
favorite count: 0
has comment: http://stackoverflow.com/comment/43688547
has comment: http://stackoverflow.com/comment/43688731
tagged with: css
accepted answer: http://stackoverflow.com/a/27635957
type: AnsweredQuestion

http://stackoverflow.com/comment/43699241
score: 0
has text: Seems good, let's see what other people come up with, if no one will answer for the next hour, it's the one for me :)
type: Comment
comment on: http://stackoverflow.com/a/27639866
type: AnswerComment

http://stackoverflow.com/comment/43421213
type: QuestionComment
score: 0
has text: @LouisEvans - Your comment proves (proved?) that you didn't understand what a<b gives you...
comment on: http://stackoverflow.com/q/27487359
type: Comment

openstreetmap
tags question: http://stackoverflow.com/q/27609294
tags question: http://stackoverflow.com/q/27561211
tags question: http://stackoverflow.com/q/27597259
tags question: http://stackoverflow.com/q/27542784
tag name: openstreetmap
type: Tag

http://stackoverflow.com/comment/43640730
type: QuestionComment
comment on: http://stackoverflow.com/q/27609154
has text: @PeterKA, yes that is correct
score: 0
type: Comment

http://stackoverflow.com/a/27494607
has comment: http://stackoverflow.com/comment/43421668
score: 1
downvote count: 0
type: Answer
has body: Once you have your properly formatted price, simply add a '$' to your sum variable with string concatenation. sum = "$" + sum; $('#output').html(sum);
answers question: http://stackoverflow.com/q/27494570
upvote count: 1

http://stackoverflow.com/comment/43518096
has text: @jbutler483 thanks, is this less blurry http://jsfiddle.net/webtiki/kmenstqs/2/ ?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27543758
type: Comment

http://stackoverflow.com/a/27538254
score: 1
has body: The array returned by SDL_GetKeyboardState should be indexed by scancodes in SDL 2.0, not keycodes as in SDL 1.2. Try doing it without the SDL_SCANCODE_TO_KEYCODE conversion. For reference: https://wiki.libsdl.org/SDL_GetKeyboardState Also, I should point out that SDL_SCANCODE_TO_KEYCODE is not a general-use conversion macro. It simply sets an upper bit so that certain scancodes can be unique. Use SDL_GetKeyFromScancode and SDL_GetScancodeFromKey.
downvote count: 0
answers question: http://stackoverflow.com/q/27523776
type: Answer
upvote count: 1

http://stackoverflow.com/comment/43437917
type: AnswerComment
comment on: http://stackoverflow.com/a/27503692
score: 0
has text: This only iterates through `dictionable`'s immediate children. Some of those children could contain `` elements. (And BTW, not all of an element's children are elements; only those with `nodeType === 1` are elements).
type: Comment

http://stackoverflow.com/comment/46187881
type: QuestionComment
has text: @Nicolas No I haven't.
comment on: http://stackoverflow.com/q/27584733
score: 0
type: Comment

http://stackoverflow.com/q/27557726
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27557755
tagged with: datetime
has answer: http://stackoverflow.com/a/27557836
has title: Simplest way to get date and time in javascript
has body: For instance in C# there is DateTime.Now.ToString("yyyyMMddHHmmss"); Which will output exactly what it looks like in one short concise line, is there something like that with javascript or jQuery that doesn't require handling each part of the date and time and formatting each bit to have 2 digits etc.. I am new to javascript and jQuery and I think it will save a lot of time if I found out the best way to handle dates and time but after looking around and not finding any answers I am guessing there's no vanilla solution.
favorite count: 0
possible better answer: http://stackoverflow.com/a/27557755
has answer: http://stackoverflow.com/a/27557752
upvote count: 1
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27850488
score: 0
tagged with: date
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/27557752

http://stackoverflow.com/q/27604769
has comment: http://stackoverflow.com/comment/43632676
linked to: http://stackoverflow.com/q/5371047
score: 0
has body: This is a page witch i am about to make it upload a image but when i select the element by id in javascript the browser say 'Cannot set proprety "onchange" of null' But i wrote the exact same id please help this is my code Register
tagged with: dom
answer count: 0
tagged with: javascript
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/5371047
has title: Cannot set property "onchange" of null
has comment: http://stackoverflow.com/comment/43631603
type: Question
has comment: http://stackoverflow.com/comment/43631795
has comment: http://stackoverflow.com/comment/43631645
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/27486127
has answer: http://stackoverflow.com/a/27486821
favorite count: 0
has body: I'm using node.js 0.10.33 and request 2.51.0. In the example below, I've built a simple web server that proxies image using request. There are two routes set up to proxy the same image.. /pipe simply pipes the raw request to the response /callback waits for the request callback and send the response headers and the body to the response. The pipe example works as expected but the callback route won't render the image. The headers and the body appear to be the same. What about the callback route is causing the image to break? Here is the example code: var http = require('http'); var request = require('request'); var imgUrl = 'https://developer.salesforce.com/forums/profilephoto/729F00000005O41/T'; var server = http.createServer(function(req, res) { if(req.url === '/pipe') { // normal pipe works request.get(imgUrl).pipe(res); } else if(req.url === '/callback') { // callback example doesn't request.get(imgUrl, function(err, resp, body) { if(err) { throw(err); } else { res.writeHead(200, resp.headers); res.end(body); } }); } else { res.writeHead(200, { 'Content-Type': 'text/html' }); res.write(' '); // test the piped image res.write(' Piped '); // test the image from the callback res.write(' Callback '); res.write(' '); res.end(); } }); server.listen(3000); Result in this
tagged with: request
tagged with: node.js
type: AnsweredQuestion
has title: Piping images versus sending callback body in node.js with request
downvote count: 0
score: 1
tagged with: node-request
tagged with: http
type: Question
accepted answer: http://stackoverflow.com/a/27486821
tagged with: javascript
upvote count: 1
answer count: 1

http://stackoverflow.com/comment/43558002
comment on: http://stackoverflow.com/q/27565686
type: Comment
type: QuestionComment
has text: This question has been asked countless times here on SO, in one form or another. The canonical form of the question is "How do I pass an object method as a callback parameter to [setTimeout, $.ajax, Promise.then, $.on, etc. etc.]? Why doesn't it work to just pass `this.method`?" The basic reason is that whoever is calling you back doesn't know what `this` to invoke the callback with, so you have to "bind" the callback in one way or another. The question suggested as a duplicate is just one of many answers you'll find to this question.
score: 0

http://stackoverflow.com/q/27640168
has title: Parse JSON / JSONP Response in javascript
has comment: http://stackoverflow.com/comment/43699096
has comment: http://stackoverflow.com/comment/43699925
favorite count: 0
tagged with: parsing
has body: OK for starters this is a mobile app that i am building with PhoneGap. I am sending request over Cross-domains. using JSONP and ajax and sending response from Rails 3 with JSON. I want to receive the data and parse it out into separate records so i can display it in a table. i have tried JSON.parse(data) JSON.parse(data.results) when i alert: alert(data) ====&gt; [object OBJECT] alert(data.results) ====&gt; [object OBJECT],[object OBJECT],[object OBJECT] and have been unsuccessful AJAX call: $.ajax({ type: "GET", dataType: "jsonp", // test url: "http://192.168.1.65:3000/" + ajax_url, cache: false, //data: ajax_data, data: 'auth_token='+ auth_token + '&amp;' + ajax_data, success: function(data) { if (data.response.status === 200 &amp;&amp; callback.onSuccess) { callback.onSuccess.call(this, data.response.data); } else if (data.response.status &gt;= 400 &amp;&amp; callback.onError) { callback.onError.call(this, data.response.data.error); } if (callback.onComplete) { callback.onComplete.call(this, data.response.data); } } }); Rails response code: render :json =&gt; { :response =&gt; { :status =&gt; 200, :data =&gt; {:results =&gt; results} } }, :callback =&gt; params[:callback] I am receiving the response and when i console log the data i get this: When i console log data.results i get this Edit to Question: i dont want to hard code data.results[0].variable for each variable then data.results[1].variable there could be 100's
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43699139
upvote count: 1
has comment: http://stackoverflow.com/comment/43699122
has comment: http://stackoverflow.com/comment/43699734
answer count: 0
linked to: http://stackoverflow.com/q/11922383
score: 1
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/43699494
duplicate of: http://stackoverflow.com/q/11922383
has comment: http://stackoverflow.com/comment/43699979
type: Question
downvote count: 0
has comment: http://stackoverflow.com/comment/43699090
tagged with: javascript

http://stackoverflow.com/a/27615965
has comment: http://stackoverflow.com/comment/43654642
has comment: http://stackoverflow.com/comment/43654519
has body: you need to use something like this: myDataTable.subscribe('cellClickEvent',function(ev) { var target = YAHOO.util.Event.getTarget(ev); var column = myDataTable.getColumn(target); if (column.key == 'delete') { if (confirm('Are you sure?')) { myDataTable.deleteRow(target); } } else { myDataTable.onEventShowCellEditor(ev); } }); and http://www.yuiblog.com/blog/2007/09/26/satyam-datatable-2/
score: 0
answers question: http://stackoverflow.com/q/27615083
type: Answer

http://stackoverflow.com/q/27496018
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/43423811
has comment: http://stackoverflow.com/comment/43424143
has answer: http://stackoverflow.com/a/27496356
accepted answer: http://stackoverflow.com/a/27496356
tagged with: for-loop
has comment: http://stackoverflow.com/comment/43424371
has comment: http://stackoverflow.com/comment/43423868
answer count: 1
downvote count: 1
tagged with: events
tagged with: variables
tagged with: jquery
has comment: http://stackoverflow.com/comment/43424096
favorite count: 0
duplicate of: http://stackoverflow.com/q/750486
has comment: http://stackoverflow.com/comment/43425184
has comment: http://stackoverflow.com/comment/43424131
has comment: http://stackoverflow.com/comment/43424062
type: AnsweredQuestion
upvote count: 0
has body: I developed an app using a constructor/prototypes approach to build and manage few objects. Using JavaScript and jQuery, one of the prototype creates input fields on which an anonymous function is declared on the onclick event. Inside the anonymous function, I can easily access the primary object with an outside reference (var that = this) and I'm also able to access the properties linked to the input object itself. However, my input field is built within a for() loop and I also need to retain the reccursive variable iterated by the loop (the famous "var i" we use to see). Since the "i" value is passed as a reference, every input will always retain the last value "i" got. So I found a workaround by attributing to the input object its own "i" property. So my question is : is this a good approach ? Or should I use another way to get this work ? Here's the code : // Let's create the constructor function familly(motherName,fatherName,children) { // We give to the properties their values this.motherName = motherName; this.fatherName = fatherName; this.children = children; } // Then we create a prototype that creates an input field for each child familly.prototype.createChildrenInputs = function() { // I declare a variable that will serve as a reference to the main object (some people would name it "that") var famillyObject = this; // We pass into a loop all the children existing in the object property var children = this.children; for(var i in children) { // We create the input field var input = document.createElement('input'); $(input).val(i); // !!! WORKAROUND !!! : I attach the "i" variable as a property to the input input.i = i; $(input).on('click', function() { // 1. The main object is accessible through the var famillyObject console.log(famillyObject); // 2. The value of the element is accessible with this.value console.log(this.value); // !!! HOWEVER !!! // --------------- // 3. The var "i" will always return "2" console.log(i); // 4. But the var "this.i" will sho…
has comment: http://stackoverflow.com/comment/43424459
has comment: http://stackoverflow.com/comment/43424177
has comment: http://stackoverflow.com/comment/43424077
has comment: http://stackoverflow.com/comment/43423850
linked to: http://stackoverflow.com/q/750486
type: Question
has comment: http://stackoverflow.com/comment/43424357
has title: JavaScript input event : retaining for() loop variable

http://stackoverflow.com/comment/43563472
type: AnswerComment
type: Comment
has text: The question says that the array is null, not that it throws an error because `toSource` is undefined. While this is a problem with the code, it is not the problem the question is asking about.
comment on: http://stackoverflow.com/a/27569094
score: 0

http://stackoverflow.com/q/27554993
has answer: http://stackoverflow.com/a/27555072
has comment: http://stackoverflow.com/comment/43536328
type: Question
tagged with: forms
possible better answer: http://stackoverflow.com/a/27555164
score: 0
has answer: http://stackoverflow.com/a/27555164
accepted answer: http://stackoverflow.com/a/27555072
has comment: http://stackoverflow.com/comment/43536514
tagged with: javascript
tagged with: jquery
has body: I am trying to create a form that when submitted, sends the data and then when the page reloads the user is returned to the same place on the page they were before submitting the form using either javascript or jquery.
has comment: http://stackoverflow.com/comment/43536394
has comment: http://stackoverflow.com/comment/43536508
has title: How can I submit a form and then have the browser return to the same place on the page?
answer count: 3
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27555187

http://stackoverflow.com/q/27542351
accepted answer: http://stackoverflow.com/a/27542470
type: Question
tagged with: c#
score: -2
tagged with: ext.net
has answer: http://stackoverflow.com/a/27542470
upvote count: 1
answer count: 1
tagged with: javascript
favorite count: 0
has body: I am doing an EXT.NET project I want to highlight the selected row of the gridpanel that I have in my code even from code behind which is c# or from javascript function it doesn't matter Any Help?
has title: How to highlight selected row of a gridpanel in Ext.net from c# code behind or javascript?
type: AnsweredQuestion
downvote count: 3
has comment: http://stackoverflow.com/comment/43513904

http://stackoverflow.com/q/27561211
tagged with: javascript
has title: How to load and destroy maps on panning than loading it completely on load
accepted answer: http://stackoverflow.com/a/27565656
score: 0
tagged with: mapbox
type: AnsweredQuestion
tagged with: leaflet
has answer: http://stackoverflow.com/a/27565656
has body: I am using mapbox with a tile server. I want to load maps while panning and destroy the loaded region when out of screen (assuming that this will not make the map and the browser very light.) How am i suppose to achieve this?
type: Question
tagged with: openstreetmap
answer count: 1

http://stackoverflow.com/comment/43443417
has text: Moved the onclick function after appending to the list, because I read you can't set the onlick property before the element is added to the DOM.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27506683

http://stackoverflow.com/q/27516971
has body: i am currently using drop zone to upload files, however, i would like drop zone to append a hidden form input to my main form after it has successfully uploaded the file, for the form to append the filename to my sql database. Therefore, here is the code that i am using: &lt;script&gt; Dropzone.options.imageuploaddrop = { paramName: "fileimage", maxFilesize: 10, // MB autoProcessQueue: false, uploadMultiple: false, maxFiles: 1, addRemoveLinks: true, clickable:true, acceptedFiles:".jpg,.png,.jpeg,.tif", dictInvalidFileType:"Invalid File Type. Only Jpg, Png and Tif are supported.", dictFileTooBig:"File too Big. Maximum 10 MB!", dictMaxFilesExceeded:"We only need one image.", init: function() { var myDropzone = this; $(function(){ setInterval(oneSecondFunction, 1); }); function oneSecondFunction() { if (myDropzone.getAcceptedFiles().length === 0) { variable2=0; }else { variable2=1; } } document.getElementById("submit").addEventListener("click", function(e) { // First change the button to actually tell Dropzone to process the queue. if (myDropzone.getQueuedFiles().length == 1) { // Make sure that the form isn't actually being sent. e.preventDefault(); e.stopPropagation(); myDropzone.processQueue(); } }); // Listen to the sendingmultiple event. In this case, it's the sendingmultiple event instead // of the sending event because uploadMultiple is set to true. this.on("sendingmultiple", function() { // Gets triggered when the form is actually being sent. // Hide the success button or the complete form. }); this.on('success', function(file, response) { // If you return JSON as response (with the proper `Content-Type` header // it will be parsed properly. So lets say you returned: // `{ "fileName": "my-file-2234.jpg" }` // Create a hidden input to submit to the server: ***$("#ideaform").append($('&lt;input type="hidden" ' + 'name="files[]" ' + 'value="' + response.fileName + '"&gt;'));*** }); this.on("errormultiple", function(files, response) { // Gets triggered when there w…
tagged with: javascript
type: UnansweredQuestion
tagged with: forms
has answer: http://stackoverflow.com/a/30565086
has title: append filename in hidden form input
tagged with: jquery
tagged with: dropzone.js
type: Question
has comment: http://stackoverflow.com/comment/43464549
has comment: http://stackoverflow.com/comment/43466438
has comment: http://stackoverflow.com/comment/43466446
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/43465010

http://stackoverflow.com/q/27631762
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27632837
has comment: http://stackoverflow.com/comment/43683815
linked to: http://stackoverflow.com/q/7645830
has body: How do I run a function when the mouse double-clicks when using flot? If I do the following it only traps the single click. $(graph).bind('plotclick', function(event, pos, item) { if (item) { .... item.series.data[0][2].key } } If I use the dblclick I only have the event and no longer have the item. $(graph).bind('dblclick', function(event) { .... } How do I use double-click with flot? I need to get the name of the bar chart that I am double-clicking on. Edit: See here for a fiddle http://jsfiddle.net/hcszv7wb/1/ Edit 2: This post helps get the bar chart details by assigning the item to a variable in plothover. I just need to work out how to have the plotclick and dblclick work together now. http://jsfiddle.net/hcszv7wb/2/
has title: Run Function On Double-Click Using Flot.js
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27632837
has comment: http://stackoverflow.com/comment/43685080
linked to: http://stackoverflow.com/q/6330431
tagged with: flot
answer count: 1

http://stackoverflow.com/q/27593645
has answer: http://stackoverflow.com/a/27593667
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/27593754
favorite count: 0
has answer: http://stackoverflow.com/a/27593754
accepted answer: http://stackoverflow.com/a/27593667
has answer: http://stackoverflow.com/a/27593814
has answer: http://stackoverflow.com/a/27593769
tagged with: css
has body: I don't know why when I use the .css() function of jQuery it returns me this: Uncaught TypeError: undefined is not a function My code is this: HTML: d d d d CSS: .sliderPhoto{ position: absolute; top: 0px; left: 0px; background-position: center center; background-size: cover; width: 100%; height: 100%; } .photo1{ background-image: url('../photos/ph1.jpg'); z-index: 6; } .photo2{ background-image: url('../photos/ph2.jpg'); z-index: 6; display: none; } .photo3{ background-image: url('../photos/ph3.jpg'); z-index: 6; display: none; } .photo4{ background-image: url('../photos/ph4.jpg'); z-index: 6; display: none; } JQuery on $(document).ready: $photos = [$(".photo1")[0], $(".photo2")[0], $(".photo3")[0], $(".photo4")[0]]; $photos[0].css("z-index"); when I type this jQuery code it doesn't work :( but this $photos[0] returns the exact div I need.
has answer: http://stackoverflow.com/a/27593759
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27593764
type: Question
score: 5
upvote count: 5
downvote count: 0
tagged with: javascript
answer count: 6
tagged with: jquery
has title: jquery .css() not working

http://stackoverflow.com/a/27514255
score: 0
has comment: http://stackoverflow.com/comment/43459616
answers question: http://stackoverflow.com/q/27514097
type: Answer
has body: Simple way is use onsubmit event handler .... or more easy

http://stackoverflow.com/comment/43496920
type: AnswerComment
type: Comment
score: 1
has text: Glad I could help :) Let me know if there is anything else you'd like me to clarify in this example. In general I find that promises model trees of execution very well.
comment on: http://stackoverflow.com/a/27534002

http://stackoverflow.com/comment/43470575
score: 0
type: Comment
has text: That was just a typo in the question.
comment on: http://stackoverflow.com/a/27520600
type: AnswerComment

http://stackoverflow.com/comment/43490941
has text: @SteveMitcham, of course, it's an example. You could check for inequality of input data to get a different promise, you could have `force` parameter to re-query. There a number of ways to tailor this to a specific use case.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/27528562
type: Comment

http://stackoverflow.com/a/31400699
answers question: http://stackoverflow.com/q/27550104
type: Answer
score: 3
upvote count: 3
downvote count: 0
has body: I got the same problem with my code as of need to use a single function export . So instead of exporting a module function like this : exports =module.exports={} exports.f=function(path,ext,callbk){...}; try it doing this way : module.exports = function (path, ext, callbk) {...}; because its a single function so you don't need to specify that function with a name " f " as if you are doing it in this statement : exports.f = function(path,ext,callbk){...}; whenever you will import the module,it will automatically call this function only, since the module contains this single function. You can try this piece of code, it works well for me. module code: mymodule.js var fs = require('fs'); var ph= require('path'); module.exports = function (path, ext, callbk) { var pathio = "." + ext; fs.readdir(path, function (err, files) { if (err) return callbk(err); else { var listf = []; //listf is the resultant list for (var i = 0; i &lt; files.length; i++) { if (ph.extname(files[i]) === pathio) { listf.push(files[i]); } } callbk(null, listf); } }); } program code : moduletest.js var mod = require('./mymodule'); mod(process.argv[2], process.argv[3], function (err, listf) { if (err) { console.log('Error!') } else { for (var i = 0; i &lt; listf.length; i++) { console.log(listf[i]); } } }); and do remember, learnyounode series is very specific about its way of coding and syntax, so even if you are doing the logic right way still you won't get pass,you need your code to be the best and optimized. I'll suggest you to refer to discussions on nodeschool itself for various issues you might get in learnyounode series.

http://stackoverflow.com/q/27555971
type: AnsweredQuestion
has title: Javascript: Search array to see if it contains part of string
has answer: http://stackoverflow.com/a/27556008
accepted answer: http://stackoverflow.com/a/27556187
has body: Using javascript (or Jquery) how would I compare a string of text to an array and return matching values? For example if I have an array: var names = ["John", "Mary", "George"]; And I have a string: var sentence = "Did Mary go to the store today?"; I want to compare the string and the array and return the matching word, in this example "Mary". I have searched and everything I have found seems to be comparing for a specific string. What I am looking for is matching PARTIALS. Thanks!
upvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/27556008
has answer: http://stackoverflow.com/a/27556269
tagged with: javascript
answer count: 3
tagged with: arrays
downvote count: 0
tagged with: string
score: 1
has answer: http://stackoverflow.com/a/27556187
favorite count: 0
tagged with: compare
tagged with: partial

http://stackoverflow.com/comment/43490335
type: Comment
comment on: http://stackoverflow.com/a/27515016
has text: @Crimpy you'll need to put the value into a variable and use mysql math functions http://dev.mysql.com/doc/refman/5.0/en/arithmetic-functions.html
score: 0
type: AnswerComment

http://stackoverflow.com/comment/89525140
comment on: http://stackoverflow.com/a/43699708
type: Comment
has text: Other official way is to let firebase to delete the key if its value equal to `null`. then , In your `getter` you could discover it. `if (!db.ref().child(path).value){ //do something}` ; the second scenario if you get the parent ref, You should recursively iterate over keys by methods like `if (!value.hasOwnProperty(NullableKey)){//the key equal to null or not defined at all// doSomething}`
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43498988
has text: thnx for the tip! wasn't sure if my JS was ok or if i need to redo it in a more Jquery syntax
comment on: http://stackoverflow.com/q/27535078
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27560997
upvote count: 6
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27595457
has body: I am using React's PropTypes and Flow type checker but I am having trouble getting an optional function prop to pass the type check. Here is an example: var Example = React.createClass({ propTypes: { exampleFn: React.PropTypes.func }, handleClick: function() { if (this.props.exampleFn) { this.props.exampleFn(); } }, render: function() { return Click here; } }); Although I'm checking this.props.exampleFn is not null, running Flow's type checker against this code gives me the error call of method exampleFn Function cannot be called on possibly null or undefined value I've tried different variations such as if (this.props.exampleFn !== null && this.props.exampleFn !== undefined) {...} or this.props.exampleFn && this.props.exampleFn() etc. to know that we're guarding against a possibly null/undefined value but I can't find anything that works. Of course, changing the prop type to React.PropTypes.func.isRequired results in no errors but I'd like to keep this prop optional. How can I get an optional function prop to pass the type check?
type: Question
tagged with: reactjs
downvote count: 0
has comment: http://stackoverflow.com/comment/65887012
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27595457
has title: Optional function prop in React component Flow type check fail
answer count: 1
favorite count: 0
tagged with: flowtype
score: 6

http://stackoverflow.com/a/27631306
type: Answer
accepted answer of: http://stackoverflow.com/q/27620286
has body: are your trying to open a dialog window when btnShare is clicked? if so change $("#menu").menu(); to $('#menu').dialog('open'); i think thats your issue if im understanding you right and here is a basic JSFIDDLE showing what I think your after
score: 0
answers question: http://stackoverflow.com/q/27620286
type: AcceptedAnswer

http://stackoverflow.com/a/27605513
answers question: http://stackoverflow.com/q/27605423
type: AcceptedAnswer
upvote count: 1
type: Answer
downvote count: 0
has body: As you're guessing you are not creating a new object when you assign $scope.data to $scope.v1. You're just "pointing" $scope.v1 to $scope.data which implies that any change that you do to $scope.data will be reflected also in $scope.v1. If you want to have different elements you should make a copy of the object. Look at angular.copy
score: 1
accepted answer of: http://stackoverflow.com/q/27605423

http://stackoverflow.com/comment/43662104
has text: I still have some problems:)... but a bit different :) http://stackoverflow.com/questions/27620771/wordpress-jquery-script-is-not-starting-one-instance-with-jquery-noconflict-usag
comment on: http://stackoverflow.com/a/27619287
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/43606779
type: QuestionComment
comment on: http://stackoverflow.com/q/27589141
score: 0
has text: much simpler to just use jQuery `serialize()` to set all the form data for the ajax request. Would remove all of your global variables and probably most of the other event handlers. You have some very strange form code and it is more complex than it needs to be
type: Comment

http://stackoverflow.com/q/27568586
has body: This is my code. var blank_left = 180; var blank_top = 180; var cardset = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]; cardset.sort(function(){ return 0.5 - Math.random()}); $('#wrapper div').each(function(){ $(this).css('left',$(this).attr('id')%4*60) .css('top',Math.floor($(this).attr('id')/4)*60) .html(cardset[$(this).attr('id')]) }); $('#wrapper div').click(function(){ if(Math.abs(parseInt($(this).css('left'))-blank_left)+Math.abs(parseInt($(this).css('top'))-blank_top)==60){ var old_left = blank_left; var old_top = blank_top; blank_left = parseInt($(this).css('left')); blank_top = parseInt($(this).css('top')); $(this).animate({left: old_left, top: old_top}, 150); } }); What it does is that it takes the array in cardset and makes them random then printing them to my divs in an random order. What I wanna do is when i move my divs I want the script to check if I have moved the divs in the right order. The right order being my cardset array. So it should check with the array cardset if all numbers are in the right order. For example: if cardset = true then alert('Done!'); Hope you understand.
tagged with: jquery
type: UnansweredQuestion
answer count: 4
has comment: http://stackoverflow.com/comment/43563709
has title: Check if the values in an jQuery array is in order
has answer: http://stackoverflow.com/a/27568664
has answer: http://stackoverflow.com/a/27568725
type: Question
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/43562424
has comment: http://stackoverflow.com/comment/43562537
has answer: http://stackoverflow.com/a/27568836
score: 0
has answer: http://stackoverflow.com/a/27568736

http://stackoverflow.com/a/31710241
type: Answer
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/27501026
downvote count: 0
has body: You could possibly remove the interaction from the map on the drawend event. var draw; function addInteraction() { draw = new ol.interaction.Draw({ source: sourceComments, type: "Point" }); draw.on('drawend', function(evt) { //... unset sketch map.removeInteraction(draw); }, this); map.addInteraction(draw); }

http://stackoverflow.com/comment/43496803
score: 0
comment on: http://stackoverflow.com/q/27534189
has text: Setting your `dataType` to `json` automatically parses the response as `json`
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27511629
has comment: http://stackoverflow.com/comment/43455832
linked to: http://stackoverflow.com/q/333537
has answer: http://stackoverflow.com/a/48127368
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/43453851
has comment: http://stackoverflow.com/comment/43453658
has comment: http://stackoverflow.com/comment/43456119
has comment: http://stackoverflow.com/comment/43525373
has comment: http://stackoverflow.com/comment/43457372
has answer: http://stackoverflow.com/a/27616508
has body: I'm currently looking for a fast and efficient way to import an excel file into a javascript array, and export it also. I've tried the suggestion here: https://stackoverflow.com/a/27474951/4346569 But the problem is that checking the console, it shows that the output are objects, so they're JSON objects? Is it because my excel file has more than 1 column? In that case, how would I be able to do this :(? I also need a way to do the same thing, but the opposite way. Can someone advise me on that? Thank you! Edit: I figured importing out but now I'm stuck on how to be able to output to excel. I would need to have some cells be colored as specified by a rule. Can anyone give me some guides for this?
upvote count: 3
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43639234
has comment: http://stackoverflow.com/comment/43621658
tagged with: excel
type: Question
score: 3
has title: Importing and exporting excel files to javascript array

http://stackoverflow.com/a/27568251
has comment: http://stackoverflow.com/comment/43564759
has comment: http://stackoverflow.com/comment/43564988
answers question: http://stackoverflow.com/q/27565742
has comment: http://stackoverflow.com/comment/43562074
has comment: http://stackoverflow.com/comment/43564580
score: 0
type: Answer
has body: Your directive is not loaded at all. You need to give the module name to ng-app like &lt;body ng-app="app"&gt;. And after that just call ngModel.$setViewValue(ngModel.$viewValue) whenever factor is modified. angular.module('app', []).directive('multiply', multiplyDirective); function multiplyDirective() { return { restrict: 'A', require: 'ngModel', scope: { factor: '=multiply' }, link: function(scope, elem, attr, ngModel) { ngModel.$formatters.push(function (value) { return value / scope.factor; }); ngModel.$parsers.push(function (value) { return value * scope.factor }); scope.$watch('factor', function () { // how to run the parsers pipeline to update modelvalue? ngModel.$setViewValue(ngModel.$viewValue); }); } } } &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"&gt;&lt;/script&gt; &lt;body ng-app="app" ng-init="factor = 1; value = 1"&gt; &lt;input type="number" ng-model="value" multiply="factor" /&gt; x &lt;input type="number" ng-model="factor" /&gt; = {{ value }} &lt;/body&gt;

http://stackoverflow.com/comment/43504201
type: Comment
score: 0
has text: I need to save the tree when a node is created / deleted,etc.
type: QuestionComment
comment on: http://stackoverflow.com/q/27537825

http://stackoverflow.com/a/27569674
has body: To have each column be a different color, all you have to do is set the colorByPoint property to true. Reference: http://api.highcharts.com/highcharts#plotOptions.column.colorByPoint Alternatively you can make each column a separate series, which gives you additional levels of control. OTOH, in the majority of cases, having each column a separate color serves no purpose except to clutter and confuse the data, and make the user work harder cognitively to interpret the chart. If you want to highlight a single column for a particular reason, you can do that by adding the fillColor property to the data array: Something like: data:[2,4,5,{y:9,fillColor:'rgba(204,0,0,.75)',note:'Wow, look at this one'},4,5,6]
downvote count: 0
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/27553505

http://stackoverflow.com/comment/43408993
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27485081
type: Comment
has text: never mind, I was doing some pref testing and asides from common conventions I understand why nobody really does it the way i outlined... so slow compared to prototypical inheritance, wow. Would you be Ok with me deleting this question? Otherwise, I'll accept your answer as correct... Thanks again.

http://stackoverflow.com/comment/43675326
has text: @A.B Yeah. I guess we probably need more clarification and more code in the question. It is quite unclear now.. looks like.. :(
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27627025

http://stackoverflow.com/a/27544039
score: 0
answers question: http://stackoverflow.com/q/27527897
has body: I ended doing what Steve says in his answer and it solved the issue for me. I'm not very happy with runtime late binding, but it gets the job done! for reference: Try using Dim objWMIService as Object = GetObject("winmgmts:\.\root\cimv2") instead. Then you can use Dim objAccount as Object = objWMIService.Get("Win32_SID.SID='S-1-1-0'"). When doing late-binding, declare everything as an object. You can then step through the code in debug and sometimes see what the return is. Then search for the methods/properties/etc for that type and write your next line. Takes a little work but you don't need references to any dlls. Theres just an assumption that the dll are registered (COM) or in your path that .Net follows (CLR)
type: Answer

http://stackoverflow.com/comment/43426725
type: AnswerComment
score: 0
type: Comment
has text: path is a variable that contains string data.Do you think that represent the anchorelment ?
comment on: http://stackoverflow.com/a/27497456

http://stackoverflow.com/q/27533987
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43646275
has body: I am looking to speed up my workflow by parsing a resource string to auto create my variable paths. Not only can it get confusing to look at large scale UI's, it's even worse getting the paths written out to access each element. ExtendScript ha s a lot of "quirks" we'll call it. So for sake of simplicity the sample below is cut way down. var res = "group{,\ itemsToRenameGrp: Group{,\ itemsToRenameDD: DropDownList{},\ help: Button{},\ },\ listTabPnl: Panel{,\ listOfItemsTab: Panel{,\ listOfItemsPnl: Panel{,\ listOfItemsLB: ListBox{},\ },\ confirmChanges: Button{},\ },\ badItemsTab: Panel{,\ errorLogET: EditText{},\ },\ },\ }"; I need to create paths like this for variable assignment: itemsToRenameGrp.itemsToRenameDD itemsToRenameGrp.help listTabPnl.listOfItemsTab.listOfItemsPnl listTabPnl.listOfItemsTab.listOfItemsPnl.listOfItemsLB listTabPnl.listOfItemsTab.confirmChanges listTabPnl.badItemsTab listTabPnl.badItemsTab.errorLogET I know there has to be a way via RegExp to parse the tab spaces, or "},\" section endings to make this work, I just can't figure out the solution myself. Any help is appreciated. Thanks.
has title: ExtendScript Parse resource string to create variable paths
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/28483788
score: 2
has answer: http://stackoverflow.com/a/27561777
downvote count: 0
has answer: http://stackoverflow.com/a/42552236
favorite count: 0
has comment: http://stackoverflow.com/comment/43551758
tagged with: resourcestring
has answer: http://stackoverflow.com/a/28264138
tagged with: extendscript
tagged with: regex
has comment: http://stackoverflow.com/comment/43569783
answer count: 4

http://stackoverflow.com/q/27589092
tagged with: domexception
answer count: 1
downvote count: 0
favorite count: 0
has title: Javascript SecurityError: DOM Exception 18 while accessing cookies
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: webos
has body: Folks, I am working on WebOS Application for LGTV. In previous version my code was working fine while accessing cookie, but with updated WebOS it is giving me error as following: Can anyone help me over it? Thanks EDIT Here is the output when I try to access cookie in JS Console:
score: 1
has answer: http://stackoverflow.com/a/27597769
upvote count: 1
tagged with: securityexception
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/2704929

http://stackoverflow.com/comment/43446180
comment on: http://stackoverflow.com/q/27508025
has text: Why didnt it work? Did you get an error at all, have you tried debugging it? Its most likely due to the quotes. Try using `'` instead of `"` around the button html
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/27555442
score: 1
has answer: http://stackoverflow.com/a/27555653
type: Question
has body: I have a controller which by using $http fetches some data and then stores it in array $scope.feeds. Now my jade syntax is - div(ng-repeat="post in feeds") div.box.box-success div.box-header h3.box-title i.fa.fa-user | {{post.firstName}} {{post.lastName}} div.pull-right i.fa.fa-clock-o //| {{(new Date(post.date)).toTimeString().split(":")[0]}} {{(new Date(post.date)).toTimeString().split(":")[1]}}, {{(new Date(post.date)).toDateString()}} div.box-body p. {{post.message}} Now, On google I found that due to security concerns jade doesnt allow direct html here so it was suggested to use something like - p!= {{post.message}} or p. #{post.message} but i am getting jade error saying that post.message is undefined. P.S. I am able to see string like - asssada by displaying {{post.message}} so post.message is not undefined. So, can anyone tell me how to add html content to this paragraph tag. Please note that a sample of my controller code is like this - angular.module('student').controller('StudentDashBoardController', function($rootScope, $scope,$http,$location,mvNotifier) { $scope.feeds = []; var obj = { "message" : "asdsdasd","firstName":"test","lastName":"test" ,"username" : "test@test.com", "dislikes" : [ ], "likes" : [ ], "tags" : [ ], "comments" : [ ], "views" : 1, "date" : "2014-12-18T19:08:44Z", "__v" : 0 }; $scope.feeds.push(obj); }); I also tried adding this in controller code - $scope.decode = function(textData){ var textarea=document.createElement("textarea"); textarea.innerHTML = textData; return textarea.textContent; }; $scope.to_trusted = function(html_code) { return $sce.trustAsHtml(html_code); } and the jade part is updated to - p(ng-bind-html="{{to_trusted(decode(post.message))}}") which shows no error in chrome debugger and shows this in inspect element - any suggestions where i might be going wrong??
accepted answer: http://stackoverflow.com/a/27555653
tagged with: javascript
tagged with: express
tagged with: pug
downvote count: 0
answer count: 1
favorite count: 0
has title: Loading Dynamic variable containing html from angularjs to jade template
tagged with: angularjs
upvote count: 1
tagged with: node.js
type: AnsweredQuestion

http://stackoverflow.com/comment/43562281
type: Comment
has text: possible duplicate of [How to style a dropdown with CSS only without JavaScript?](http://stackoverflow.com/questions/1895476/how-to-style-a-select-dropdown-with-css-only-without-javascript)
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27568402

package.json
tag name: package.json
tags question: http://stackoverflow.com/q/27573509
type: Tag

http://stackoverflow.com/comment/43630020
comment on: http://stackoverflow.com/a/27552277
type: AnswerComment
type: Comment
score: 1
has text: I really don't understand how what you are saying applies to my situation. How would a malicious page overwrite the value of document.referrer within my iframe on a different domain?

http://stackoverflow.com/a/27539096
has body: Here's my solution. It retrieves the browser's language preference, and performs a different function if the detected language preference is "zh-cn" (the language code for Chinese (PRC)). It should work in Chrome, Firefox, Safari, and IE. var language = window.navigator.userLanguage || window.navigator.language; if (language == "zh-cn") { //Non-YouTube code here } else { //YouTube code here } http://jsfiddle.net/IronFlare/94q2L4wm/ If you want to use the alternative player for other languages, too, the list of codes I used is available here: http://4umi.com/web/html/languagecodes.php
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/27538894
score: 1
downvote count: 0

http://stackoverflow.com/q/27570546
has body: I have a problem in regard to setInterval that I can't figure out. There is the problem with the scope when calling setInterval or timeout from within an object, but still I can't wrap my head around it. I tried to put my stuff inside an anonymous function, it won't work. This is basicly my problem, simplified to the bare bones: function Scenario(){ var ships = []; this.ini = function(){ for (var i = 0; i &lt; ships.length; i++){ timeoutID1 = setTimeout(ships[i].ding, 1000); timeoutID2 = setTimeout(ships[i].bing, 1000); } } this.setShips = function(){ var ship = new Ship("ship"); ships.push(ship); } function Ship(name){ this.name = name; this.ding = function(){ intervalID1 = setInterval(function(){ console.log("ding"); }, 500) } this.bing = function(){ var _this = this; intervalID2 = setInterval(function(){ console.log(_this.name); }, 500) } } this.setShips(); } var scenario = new Scenario(); scenario.ini(); http://jsfiddle.net/ancientsion/xkwsn7xd/ Basicly, console.log("ding") works, console.log(_this.name) doesn't. Why?
tagged with: setinterval
possible better answer: http://stackoverflow.com/a/27570834
has answer: http://stackoverflow.com/a/27570834
has answer: http://stackoverflow.com/a/27570671
answer count: 5
accepted answer: http://stackoverflow.com/a/27570682
has comment: http://stackoverflow.com/comment/43566426
has title: setInterval, this, again
has answer: http://stackoverflow.com/a/27570660
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27570803
type: Question
linked to: http://stackoverflow.com/q/2749244
duplicate of: http://stackoverflow.com/q/7890685
has answer: http://stackoverflow.com/a/27570682
tagged with: javascript
duplicate of: http://stackoverflow.com/q/2749244
tagged with: scope
duplicate of: http://stackoverflow.com/q/20279484
score: 0

http://stackoverflow.com/comment/43621907
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27571483
has text: @Erik You neither save nor fetch your models, so your storage should not be concerned any way. Do you expect an auto sync?
score: 0

http://stackoverflow.com/q/27537963
accepted answer: http://stackoverflow.com/a/27538780
has title: context.drawImage working in Chrome but not in Firefox
tagged with: css
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/27538780
has comment: http://stackoverflow.com/comment/43504168
tagged with: google-chrome
type: Question
has body: So for some reason my javascript code for displaying images only works in Chrome, and not in any other browsers. Here's the JSFiddle: http://jsfiddle.net/LLy42oa0/ var snowflakeImage = new Image(''); snowflakeImage.ready = true; snowflakeImage.src = 'http://i.imgur.com/W0rqcLP.png'; function drawSnowflakes() { for(var i = 0; i &lt; snowflakesInAir.length; i++) { //Failsafe if(snowflakesInAir[i].x &gt; canvas.width || snowflakesInAir[i].y &gt; canvas.height) { i++; } context.drawImage(snowflakeImage, snowflakesInAir[i].x, snowflakesInAir[i].y); } } Any help would be appreciated! I've tried swapping to image.onload() however that seems to break in my gameLoop. Thanks!
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43504188
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
linked to: http://stackoverflow.com/q/19338032

http://stackoverflow.com/comment/43654644
comment on: http://stackoverflow.com/q/27615700
type: Comment
type: QuestionComment
score: 0
has text: jsfiddle/plnkr please

http://stackoverflow.com/a/33374807
has comment: http://stackoverflow.com/comment/73580208
score: 729
has comment: http://stackoverflow.com/comment/60353990
answers question: http://stackoverflow.com/q/27639005
type: AcceptedAnswer
upvote count: 733
downvote count: 4
has comment: http://stackoverflow.com/comment/59141884
has comment: http://stackoverflow.com/comment/71814680
has comment: http://stackoverflow.com/comment/71141791
has comment: http://stackoverflow.com/comment/61852520
has comment: http://stackoverflow.com/comment/111575895
has comment: http://stackoverflow.com/comment/82085186
has comment: http://stackoverflow.com/comment/110834806
has comment: http://stackoverflow.com/comment/75953440
has comment: http://stackoverflow.com/comment/60931503
has comment: http://stackoverflow.com/comment/64188578
has comment: http://stackoverflow.com/comment/72890367
type: Answer
has comment: http://stackoverflow.com/comment/87899178
has comment: http://stackoverflow.com/comment/99522408
has body: Requiring assets using the file-loader module is the way webpack is intended to be used (source). However, if you need greater flexibility or want a cleaner interface, you can also copy static files directly using my copy-webpack-plugin (npm, Github). For your static to build example: const CopyWebpackPlugin = require('copy-webpack-plugin'); module.exports = { context: path.join(__dirname, 'your-app'), plugins: [ new CopyWebpackPlugin({ patterns: [ { from: 'static' } ] }) ] }; Compatibility note: If you're using an old version of webpack like webpack@4.x.x, use copy-webpack-plugin@6.x.x. Otherwise use latest.
has comment: http://stackoverflow.com/comment/56375365
has comment: http://stackoverflow.com/comment/55482765
has comment: http://stackoverflow.com/comment/86039211
has comment: http://stackoverflow.com/comment/103898130
has comment: http://stackoverflow.com/comment/64208295
has comment: http://stackoverflow.com/comment/98563489
accepted answer of: http://stackoverflow.com/q/27639005

http://stackoverflow.com/q/27538480
tagged with: angularjs
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/27538583
has answer: http://stackoverflow.com/a/27538547
tagged with: object
type: AnsweredQuestion
has body: I am trying to use the filter function in Angular.js but it doesn't work on objects. How do I merge a nested object into its parent using Javascript? e.g. I want to turn this: { "data" : [ { "character" : { "realm" : 1, "displayName" : "John", }, "points" : 1388.0, "wins" : 84, "losses" : 31 }, { "character" : { "realm" : 1, "displayName" : "Steven", }, "points" : 1363.0, "wins" : 96, "losses" : 24 }, { "character" : { "realm" : 1, "displayName" : "Mark", }, "points" : 1322.0, "wins" : 154, "losses" : 43 } ]} into this: { "data" : [ { "realm" : 1, "displayName" : "John", "points" : 1388.0, "wins" : 84, "losses" : 31 }, { "realm" : 1, "displayName" : "Steven", "points" : 1363.0, "wins" : 96, "losses" : 24 }, { "realm" : 1, "displayName" : "Mark", "points" : 1322.0, "wins" : 154, "losses" : 43 } ]} Can someone help me out?
has title: How to merge nested objects into their parents in Javascript?
type: Question
answer count: 3
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27538583
favorite count: 0
has comment: http://stackoverflow.com/comment/43506114
tagged with: merge
accepted answer: http://stackoverflow.com/a/27538547
has answer: http://stackoverflow.com/a/27538584
has comment: http://stackoverflow.com/comment/43505103

http://stackoverflow.com/a/27540850
has body: Try this but I can't really test it because I have no idea what data.terms is besides an array? function get_class_classes(data){ var terms = data.terms, termsArray = ['day', 'medium', 'term', 'type'] classList = ''; for(var term of terms){ for(var termType of termsArray){ for(var child of terms[termType]){ classList += child.slug + ' '; } } } return classList; }
type: Answer
answers question: http://stackoverflow.com/q/27536190
score: 0

http://stackoverflow.com/comment/43529177
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27551255
has text: You can create defaults, but ultimately you need to target a specific alert, no? So, you could create some wrapper service around it, but you have all the tools/hooks in your hands to do whatever you need.. In other words, you already have all the programmatic access required. Other than that, the question is too broad.

http://stackoverflow.com/comment/120066610
score: 0
comment on: http://stackoverflow.com/q/27604801
type: Comment
type: QuestionComment
has text: Possible duplicate of https://stackoverflow.com/questions/5752906/is-reading-the-length-property-of-an-array-really-that-expensive-an-operation

http://stackoverflow.com/a/27495375
has body: OK, turns out the problem was with nginx I think buffering the proxy responses. I changed my nginx config to this and it's all good! upstream faye { server 127.0.0.1:63780; } server { listen 80; server_name localhost; location ~ /faye/(?&lt;sections&gt;.*)|/faye { proxy_pass http://faye/$sections; proxy_redirect off; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_http_version 1.1; proxy_buffering off; proxy_cache_bypass $http_pragma $http_authorization; proxy_no_cache $http_pragma $http_authorization; } }
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27494562

http://stackoverflow.com/comment/43428702
comment on: http://stackoverflow.com/q/27498885
has text: if (if (filters === "answers" || filters === "solution")
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/44109737
score: 1
type: AnswerComment
type: Comment
has text: This is really neat. :) Adding it to the Function prototype is especially nice, as it makes the invocation far cleaner.
comment on: http://stackoverflow.com/a/27838697

http://stackoverflow.com/q/27619207
has answer: http://stackoverflow.com/a/27619287
tagged with: jquery
has answer: http://stackoverflow.com/a/27865196
favorite count: 0
has title: jquery not loading on wordpress / web page
type: Question
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/27619384
has answer: http://stackoverflow.com/a/27619384
accepted answer: http://stackoverflow.com/a/27619287
has body: I have Wordpress blog page which imported JS file. JS code should be started after page load, but it's not working. I don't know why. Following file exists on server: http://.. /wp-content/themes/XXXX/js/script.js No errors in FF console, Generated html looks like this: &lt;html xmlns="http://www.w3.org/1999/xhtml" pl-pl&gt; &lt;head profile="http://gmpg.org/xfn/11"&gt; &lt;title&gt;XXXX test &amp;rsaquo; Just another WordPress site&lt;/title&gt; &lt;meta http-equiv="content-type" content="text/html; charset=UTF-8" /&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt; &lt;!-- &lt;meta property="og:title" content="XXXX" /&gt; &lt;meta property="og:site_name" content="The easiest and fastest way to claim your PAYE tax refund."/&gt; --&gt; &lt;link href="http://localhost/wp-content/themes/XXXX/css/bootstrap.min.css" type="text/css" media="screen" rel="stylesheet" /&gt; &lt;link href="http://localhost/wp-content/themes/XXXXX/style.css" title="very`plaintxt" rel="stylesheet" media="screen,projection" /&gt; &lt;link rel="stylesheet" type="text/css" media="print" href="http://localhost/wp-content/themes/XXXXX/print.css" /&gt; &lt;link rel="alternate" type="application/rss+xml" href="http://localhost/?feed=rss2" title="XXXXX test RSS feed" /&gt; &lt;link rel="alternate" type="application/rss+xml" href="https://XXXXX.disqus.com/latest.rss" title="XXXXXX test comments RSS feed" /&gt; &lt;link rel="pingback" href="http://localhost/xmlrpc.php" /&gt; &lt;script&gt; var theChampSiteUrl = 'http://localhost'; &lt;/script&gt; &lt;div id="fb-root"&gt;&lt;/div&gt; &lt;script&gt; var theChampFBKey = ''; var theChampFBLang = 'en_US'; &lt;/script&gt; &lt;script&gt; var theChampForceFBComment = false; var theChampFBCommentTitle = ''; var theChampFBCommentUrl = 'http://localhost/?p=44'; var theChampFBCommentColor = ''; var theChampFBCommentNumPosts = ''; var theChampFBCommentWidth = '100%'; var theChampFBCommentOrderby = ''; var theChampFBCommentMobile = ''; var …
upvote count: 3
answer count: 3
tagged with: wordpress
downvote count: 1
tagged with: javascript
score: 2
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/27620771

http://stackoverflow.com/a/27605101
has comment: http://stackoverflow.com/comment/43632928
has comment: http://stackoverflow.com/comment/43633995
answers question: http://stackoverflow.com/q/27604865
has comment: http://stackoverflow.com/comment/43633944
has comment: http://stackoverflow.com/comment/43632783
score: 0
type: Answer
has body: Not sure what you are asking in your question but you def. have some bugs and it is to long to put in a comment: value="" &lt;% if (readOnly) { %&gt;disabled="disabled"&lt;% } %&gt; /&gt; should be value="&lt;% if (readOnly) { %&gt;disabled='disabled'&lt;% } %&gt;" /&gt; Note the location of the quotes.

dc.js
tag name: dc.js
tags question: http://stackoverflow.com/q/27529581
tags question: http://stackoverflow.com/q/27589281
tags question: http://stackoverflow.com/q/27477814
tags question: http://stackoverflow.com/q/27594962
tags question: http://stackoverflow.com/q/27554559
type: Tag
tags question: http://stackoverflow.com/q/27508043

http://stackoverflow.com/comment/43449500
comment on: http://stackoverflow.com/q/27509569
type: Comment
type: QuestionComment
has text: @ThisaruGuruge try to replicate your problem in jsfiddle. There is nothing wrong with your code, as far as I can see
score: 1

http://stackoverflow.com/q/27536023
tagged with: jquery
has title: how to change input text box into table td through jquery
possible better answer: http://stackoverflow.com/a/27536217
tagged with: http://stackoverflow.com/tag/html
has body: I am adding a new row to my existing table to jquery. The new row consists of input boxes for taking the inout form the user. After the user input, on the button click I need to make these text box appear as td elements of the table just like previous rows? How do I convert the textbox to td element of the table. Could someone please help me on this? Html: LastName FirstName <?php for($i=0; $i<$numrows; ++$i) { $contacts = mysqli_fetch_assoc($result); ?> <?php echo $contacts['LastName']; ?> <?php echo $contacts['FirstName']; ?> <?php } ?> my jquery code: function handleAdd (e) { var row = $(this).parent().parent().parent().parent(); var form = '\ \ \ \ \ \ \ \ ' ; $('#cust-table tr:last').after(form); $('.btn-save-new').click(function(){ var last_name = $($(this).parent().parent().children()[0]).children().val(); var first_name = $($(this).parent().parent().children()[0]).children().val(); //how to convert the textbox to table elements?? }); }
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27537241
score: 0
type: Question
has comment: http://stackoverflow.com/comment/43500628
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27537241
answer count: 2
has answer: http://stackoverflow.com/a/27536217

http://stackoverflow.com/comment/43570266
type: QuestionComment
has text: Tried simple things like change tag autoplay to autoplay="true", moving javascript code down the page and nothing works. Also error console do not give me any errors.
score: 0
comment on: http://stackoverflow.com/q/27572246
type: Comment

http://stackoverflow.com/comment/43577159
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27570088
has text: Probably another script is binding a click event handler to elements with that class, and that conflicts with what you are trying to add … anyway, with only the snippet you have shown this is not reproducible.
type: Comment

http://stackoverflow.com/comment/135967737
has text: Note that it [potentially has meaning in TypeScript](https://github.com/palantir/tslint/issues/3442), specifically that it's a parameter in a function signature that's _not going to be used_. (That's a TSLint link, but it seems to have carried over. Haven't found a better "official" source yet.)
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27637013
type: Comment

http://stackoverflow.com/comment/43385338
type: QuestionComment
has text: You're overcomplicating things. Get rid of the anonymous function, and just do this: `$("#"+v).click(this.id[v])` http://jsfiddle.net/02stc7q9/
comment on: http://stackoverflow.com/q/27475241
score: 0
type: Comment

http://stackoverflow.com/a/28964922
has body: A much more simple straight forward way without using :contains, .filter() is, $('.sonuc > span:first').parent().addClass('hobi'); It selects the first direct descendant span under .sonuc class and then by using .parent() selects it parent and adds the class '.hobi' in it. Working JSFiddle Demo $('.sonuc > span:first').parent().addClass('hobi'); .hobi { background: red; } text1 text2
type: Answer
score: 0
answers question: http://stackoverflow.com/q/27525098

http://stackoverflow.com/comment/43662139
type: Comment
comment on: http://stackoverflow.com/q/27620357
score: 0
type: QuestionComment
has text: this code is working for me with indexOf == 1 and "/beef-with-some-other-whatever"

http://stackoverflow.com/comment/43692054
type: QuestionComment
comment on: http://stackoverflow.com/q/27636527
has text: what's wrong with scss or less?
score: 0
type: Comment

http://stackoverflow.com/a/33143657
score: 4
accepted answer of: http://stackoverflow.com/q/27521271
has body: This works for me: The Number is retrieved using a async webservice call when the controller loads. That means the value isn't there when the sm.fullyEnteredViewport function is called. But luckily you can set a data-delay attribute on the xe-counter element. 0TOTAL Then modify your directive like this: Retrieve the delay value from element and put the rest of the other code into the delayed function like this: directive('xeCounter', function () { return { restrict: 'EAC', link: function (scope, el, attrs) { var $el = angular.element(el), sm = scrollMonitor.create(el); //get the delay attribute from element var delay = attrs.delay ? attrs.delay : 0; sm.fullyEnterViewport(function () { setTimeout(function () { // get all values from element delayed and start the counter var opts = { useEasing: attrDefault($el, 'easing', true), useGrouping: attrDefault($el, 'grouping', true), separator: attrDefault($el, 'separator', ','), decimal: attrDefault($el, 'decimal', '.'), prefix: attrDefault($el, 'prefix', ''), suffix: attrDefault($el, 'suffix', '') }, $count = attrDefault($el, 'count', 'this') == 'this' ? $el : $el.find($el.data('count')), from = attrs.from ? attrs.from : 0, to = attrs.to ? attrs.to : 100, duration = attrs.duration ? attrs.duration : 2.5, decimals = String(to).match(/\.([0-9]+)/) ? String(to).match(/\.([0-9]+)$/)[1].length : 0, counter = new countUp($count.get(0), from, to, decimals, duration, opts); counter.start(); }, delay * 1000); sm.destroy(); }); } }; }). Your webservice should return within the delay time. That does the trick for me.
answers question: http://stackoverflow.com/q/27521271
type: Answer
upvote count: 4
downvote count: 0
type: AcceptedAnswer

http://stackoverflow.com/q/27534189
score: 1
tagged with: http://stackoverflow.com/tag/json
has body: I have ajax code which returns JSON data which is just Array of string(no key/val pair). function loadData() { $.ajax({ type: 'GET', url: apiURL, dataType: "json", timeout: 2000, success: onLoadData }; function onLoadData(data) { console.log(data); var arr = JSON.parse(data); //var arr = jQuery.parseJSON(data); this also fails. alert(arr[0]); }; Output of console.log() is = ["one", "two", "three"] but JSON.parse() gives error as : Uncaught SyntaxError: Unexpected token o I checked JSON using validator which says this is valid JSON. Can someone help to understand why parse() is failing?
has comment: http://stackoverflow.com/comment/43496787
has answer: http://stackoverflow.com/a/27534239
answer count: 2
upvote count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: How to parse JSON of String Arrays
has answer: http://stackoverflow.com/a/27534452
has comment: http://stackoverflow.com/comment/43496803
type: AnsweredQuestion
downvote count: 0
possible better answer: http://stackoverflow.com/a/27534452
accepted answer: http://stackoverflow.com/a/27534239
type: Question

http://stackoverflow.com/q/27533331
type: AnsweredQuestion
has body: Okay, so I want to make a javascript/html canvas game where the player is being followed by some enemies, and after a little bit of 'research' her is the most important part of my Monster (enemy) class: this.UpdateAngle = function() { this.dx = this.x - player.x; this.dy = this.y - player.y; this.angle = Math.atan2(this.dy, this.dx) * 180 / Math.PI; if (this.angle &lt; 0) { this.angle += 2 * Math.PI; } } this.UpdateSpeed = function() { this.speedX = this.speed * Math.cos(this.angle); this.speedY = this.speed * Math.sin(this.angle); } this.Move = function() { this.UpdateAngle(); this.UpdateSpeed(); this.x += this.speedX; this.y += this.speedY; } So what I meant to do here, was to calculate the angle from the enemy to the player with atan2() and then calculate how much I should move in the x and y axis by using cos() and sin(), the speed and the angle I calculated, and then just moved the calculated pixels. This all seems to work well, until I move the player, then the enemies start to move in weird directions. I have no idea whats wrong, it would be awesome if someone could learn me how this is meant to be done. :D You can see it in action here. *I have updated the code with PremierBromanov's suggestion.
tagged with: game-ai
score: 3
has comment: http://stackoverflow.com/comment/43495702
upvote count: 3
linked to: http://stackoverflow.com/q/13849185
type: Question
has comment: http://stackoverflow.com/comment/43495383
tagged with: javascript
has answer: http://stackoverflow.com/a/27612528
answer count: 2
tagged with: canvas
downvote count: 0
has answer: http://stackoverflow.com/a/27533715
favorite count: 0
has title: Problems making enemy follow moving player
has comment: http://stackoverflow.com/comment/43495478
possible better answer: http://stackoverflow.com/a/27533715
accepted answer: http://stackoverflow.com/a/27612528

http://stackoverflow.com/comment/43692976
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27636799
has text: is it okay to change the extension? it's strange for me. does browser recognize it as css or php?
score: 1

http://stackoverflow.com/q/27542143
tagged with: background-image
upvote count: 1
type: Question
has title: How to configure Panel Background Image in ASP.NET
tagged with: javascript
has answer: http://stackoverflow.com/a/27542969
has comment: http://stackoverflow.com/comment/43511550
answer count: 1
downvote count: 0
tagged with: asp.net
favorite count: 0
has body: I have a dynamic background image url in my web application. I used javascript to re-size my panel depending on the screen resolution. However, my background image "repeats" on larger resolution. How do I set my background image to "fit" the screen resolution programmatically? This is my javascript on back-end: &lt;script language="javascript" type="text/javascript"&gt; $(window).resize(function() { var swidth = $(window).width(); var sheight = $(window).height(); $("#&lt;%=Panel1.ClientID %&gt;").height((sheight / 1.4) + "px"); $("#&lt;%=Panel1.ClientID %&gt;").width((swidth / 1.8) + "px"); }); &lt;/script&gt; This is the result:
tagged with: css
tagged with: vb.net
accepted answer: http://stackoverflow.com/a/27542969
type: AnsweredQuestion
score: 1

http://stackoverflow.com/comment/43404438
type: Comment
comment on: http://stackoverflow.com/a/27486298
type: AnswerComment
has text: Thank you for the clarification I was thinking along those lines but could not get it fully on of the tip of my tongue.
score: 0

http://stackoverflow.com/comment/75041731
type: QuestionComment
has text: I'd also consider most of the question itself legacy now. Can't believe I wrote this.
comment on: http://stackoverflow.com/q/27489881
score: 0
type: Comment

http://stackoverflow.com/a/27629334
accepted answer of: http://stackoverflow.com/q/27628938
score: 9
has body: I get a javascript error with your code: Uncaught InvalidValueError: not a Feature or FeatureCollection. Make your polygon a "Feature": var data = { type: "Feature", geometry: { "type": "Polygon", "coordinates": [ [ [-73.974228, 40.75597], [-73.983841, 40.742931], [-74.008133, 40.75307500000001], [-73.998131, 40.765915], [-73.974228, 40.75597] ] ] } }; working fiddle code snippet: function initialize() { var data = { type: "Feature", geometry: { "type": "Polygon", "coordinates": [ [ [-73.974228, 40.75597], [-73.983841, 40.742931], [-74.008133, 40.75307500000001], [-73.998131, 40.765915], [-73.974228, 40.75597] ] ] } }; var mapProp = { center: new google.maps.LatLng(40.75597, -73.974228), zoom: 12, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("googleMap"), mapProp); map.data.addGeoJson(data); } google.maps.event.addDomListener(window, 'load', initialize); html, body, #googleMap { width: 100%; height: 100%; }
upvote count: 9
answers question: http://stackoverflow.com/q/27628938
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/43648019
type: QuestionComment
comment on: http://stackoverflow.com/q/27612929
has text: Are there any errors showing in the browser's Inspector?
score: 0
type: Comment

http://stackoverflow.com/comment/43486001
type: AnswerComment
has text: Its pretty close but not close enough... I'm looking for a way to find this profiles.Nicholas_Phillips.Name = "Nicholas Phillips" - And it'll output profiles.Nicholas_Phillips by searching Name = "Nicholas Phillips"!
type: Comment
comment on: http://stackoverflow.com/a/27528563
score: 0

http://stackoverflow.com/comment/43697615
comment on: http://stackoverflow.com/q/27630672
score: 0
has text: You might also need to wrap the sockets `addEventListener` function, since message handlers can also be added like that.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27539326
score: 0
has answer: http://stackoverflow.com/a/27539390
has title: My Angular directive is not getting data from controller
has comment: http://stackoverflow.com/comment/43506961
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43507022
has comment: http://stackoverflow.com/comment/43506457
has comment: http://stackoverflow.com/comment/43506534
type: Question
tagged with: angularjs-directive
has body: I have this controller .controller('Main', ['$scope', function ($scope) { $scope.uiState = {'name': 'test'}; }]) and directive is like this scope: {uiState: '='}, link: function(scope, element, attrs) { console.log(scope.uiState) // coming as undefined } I am using like this &lt;my-dir uiState="uiState"&gt; &lt;/my-dir&gt; I think my directive is getting compiled before the controller populates that data. Any ideas I now see that i have this error in firebug Error: [$compile:nonassign] Expression 'undefined' used with directive 'my-dir' is non-assignable!
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/43507268
has answer: http://stackoverflow.com/a/27539356
has comment: http://stackoverflow.com/comment/43506445

http://stackoverflow.com/q/27570466
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/27574796
tagged with: polymer
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27572119
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27574796
has body: After finishing Polymer's post-card/post-list tutorial, I am making a simple quiz app based off these elements. My kanji-list is a collection of 5 kanji-cards: {{k.japan}} {{k.eigo}} The meat of the kanji-card element looks like this: Can you identify this? Answer: My question is, how do I access the contents of the h2 element? I want to write a short Javascript function that will check the user's input against the answer in h2. I have been browsing for a while and can't find a solution that works for me, if anybody can help me that would be great.
has answer: http://stackoverflow.com/a/27572119
type: Question
has title: Accessing content values in Polymer

http://stackoverflow.com/q/27507436
accepted answer: http://stackoverflow.com/a/27507486
tagged with: associative-array
type: Question
tagged with: arrays
has body: Let's take an indexed (associative) array as shown below var gh = { pop: 'apple', jim: 'orange', john: 'ball', sim: 'oran' } How can I search this array to find the indexes where the value is like 'ora'? Example: If I given input ora I have to get indexes jim and sim as output.
has title: search value of index in indexed array javascript
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/27507486
tagged with: indexing
type: AnsweredQuestion

http://stackoverflow.com/comment/43562731
score: 0
type: Comment
has text: Yeah, Rewind, I think you're looking for `@media` queries for CSS. Steer clear of Javascript whenever CSS will do. This let's you do things like `@media (min-width: 1024px) { body { font-size: 16px; } }`. (`@media` works with IE9+.)
type: QuestionComment
comment on: http://stackoverflow.com/q/27565727

http://stackoverflow.com/q/27626092
tagged with: jquery
score: 0
has body: The first part of my script looks like this: $.getJSON('age_get.php', function(data) { var ticks1=[] $.each(data, function(key, val) { ticks1.push("["+val.index+",'"+val.value+"']"); }); var ticks6 =[(ticks1.join())] This outputs (for ticks6) something like this: ["[90,'18-24'],[91,'25-29'],[92,'30-34'],[93,'35-39'…'60-64'],[99,'65-69'],[100,'70-74'],[101,'75-99']"] I'm trying to use this array in flot charts and it's almost perfect. The code in the plot portion of my script to draw the y axis looks like this: yaxis: { ticks:ticks6, autoscaleMargin: 0.02 }, The format that it is expecting is: [[90,'18-24'],[91,'25-29'],[92,'30-34'],[93,'35-39'…'60-64'],[99,'65-69'],[100,'70-74'],[101,'75-99']] It's ALMOST exactly what I have, but I need the leading and trailing pair of double quotes removed. I can't figure out how to do this though. Where am I going wrong?
has comment: http://stackoverflow.com/comment/43672893
answer count: 1
has answer: http://stackoverflow.com/a/27626182
has title: Minor change to array format to use with flot charts
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27626182
type: Question
tagged with: flot
tagged with: arrays
tagged with: javascript

http://stackoverflow.com/comment/43524351
comment on: http://stackoverflow.com/q/27546104
has text: Are you aiming to return only 1 result right?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43573119
comment on: http://stackoverflow.com/q/27573793
score: 1
has text: Your input is set to not display. You have no default value in it (you can use `value=''` to set one). You have no context of when the javascript code is executed. Is it fired before the page loads? Or is it tied to some submit button?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27596848
has title: method returns null in ajax call
has comment: http://stackoverflow.com/comment/43617511
tagged with: http://stackoverflow.com/tag/json
type: Question
tagged with: liferay
linked to: http://stackoverflow.com/q/23829784
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has answer: http://stackoverflow.com/a/27596998
has comment: http://stackoverflow.com/comment/43617564
has body: I am retrieving the data from the database, the data is coming correctly from the database using ajax, problem is I have tried to store the retrieved data in an array, in the below code return jsonArrayis getting null. can any one help me? function selectEntities(){ var jsonArray = []; try{ var url = '&lt;%=resourceURL%&gt;'; var A = AUI(); A.io.request(url, { data: { cmd:'entities', }, dataType:'json', method:'post', on: { success: function(event, id, obj) { try{ var instance = this ; var jsonObject = instance.get('responseData'); var jsonArrayTemp = jsonObject.objJsonArray ; //alert("From the entities: "+jsonArrayTemp); for(var i=0;i &lt; jsonArrayTemp.length ;i++ ){ jsonArray.push([jsonArrayTemp[i][0],jsonArrayTemp[i][1]]); } }catch(exception){ //alert(exception); } } } } ); }catch(exception){ //alert(exception); } return jsonArray ; }
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43617451

http://stackoverflow.com/q/27588659
type: UnansweredQuestion
has title: Spring @ResponseBody get data to populate dataTable Jquery DataTable
tagged with: spring
has comment: http://stackoverflow.com/comment/43606465
type: Question
tagged with: jsp
has comment: http://stackoverflow.com/comment/43605151
tagged with: javascript
tagged with: jquery
score: 0
tagged with: datatable
has body: First of all, exuse my English. I am new to JQuery and DataTable. I have a problem with JQuery dataTable for results and populate the list. I have an object in the controller to return toResponseBody retrieving data from the database. So far so ok. When I send the data to the jsp just show me the results in json format but does not assign the dataTable. What am I doing wrong or what I lack for the results to be correctly rendered. Controller @SuppressWarnings("rawtypes") @RequestMapping(value = "/loadAlbaranes", method = RequestMethod.GET) public @ResponseBody XxxView loadAlbaranes( HttpServletResponse response, @Valid @ModelAttribute ("view") XxxView view, BindingResult result, Locale locale) { if(getLogService().getLog(this.getClass()).isDebugEnabled()) getLogService().getLog(this.getClass()).info("loadAlbaranes &lt;-- "); ValidationResultDTO validations = null; if(result.hasErrors()){ validations = new ValidationResultDTO(); validations.setMessage("Errores de validacion"); validations.setErrors(validationMessages(result, locale)); view.setValidationResultDTO(validations); }else{ ... List&lt;Qry011DTO&gt; albaranesList; DataTableDTO&lt;Qry011DTO&gt; albaranesResult = new DataTableDTO&lt;Qry011DTO&gt;(); try { albaranesList = albaranRPGService.getAlbaranes(params); albaranesResult.setAaData(albaranesList); int count = albaranesList.size(); albaranesResult.setiTotalDisplayRecords(count); albaranesResult.setiTotalRecords(count); view.setAlbaranList(albaranesResult); } catch (Exception e) { getLogService().getLog(this.getClass()).error("Error recuperando datos de albaranes [ ERROR: "+e.getMessage() +" ]"); ValidationErrorDTO valErr = new ValidationErrorDTO(); validations = new ValidationResultDTO(); validations.setMessage("Error"); valErr.setMessage("Error recuperando datos de albaranes \n[ ERROR: "+e.getMessage().toString() +" ]"); List&lt;ValidationErrorDTO&gt; errList = new ArrayList&lt;ValidationErrorDTO&gt;(); errList.add(valErr); validations.setErrors(errList); …
answer count: 0

http://stackoverflow.com/q/27638990
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/43697148
answer count: 1
has title: Javascript `defer` doesn't seem to work
has body: I have this code: It works if I remove the defer's, but if I leave them in, or just the jquery one I get an error about how $ is undefined. Maybe I'm being an idiot but everything I've read about defer says it should load all the scripts and then run them when the document has been parsed. This is with a recent Firefox.
has comment: http://stackoverflow.com/comment/43696883
has answer: http://stackoverflow.com/a/27639053
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43696774
type: Question
has comment: http://stackoverflow.com/comment/43696850
accepted answer: http://stackoverflow.com/a/27639053
tagged with: firefox

http://stackoverflow.com/comment/43548577
comment on: http://stackoverflow.com/a/27550345
has text: thanks it worked. Is it possible to have single json object for above example , so that I dont need to add 4 different arrays in data: for highchart .. Thanks
score: 0
type: Comment
type: AnswerComment

firefox
tags question: http://stackoverflow.com/q/27552270
tags question: http://stackoverflow.com/q/27565753
tags question: http://stackoverflow.com/q/27484180
tags question: http://stackoverflow.com/q/27537606
tags question: http://stackoverflow.com/q/27482472
tags question: http://stackoverflow.com/q/27581205
tags question: http://stackoverflow.com/q/27578071
tags question: http://stackoverflow.com/q/27638990
tags question: http://stackoverflow.com/q/27494590
tags question: http://stackoverflow.com/q/27610756
tags question: http://stackoverflow.com/q/27508316
tags question: http://stackoverflow.com/q/27524721
tag name: firefox
tags question: http://stackoverflow.com/q/27529886
tags question: http://stackoverflow.com/q/27553841
tags question: http://stackoverflow.com/q/27505165
tags question: http://stackoverflow.com/q/27520445
tags question: http://stackoverflow.com/q/27492922
tags question: http://stackoverflow.com/q/27527551
tags question: http://stackoverflow.com/q/27572916
tags question: http://stackoverflow.com/q/27528867
tags question: http://stackoverflow.com/q/27583246
tags question: http://stackoverflow.com/q/27632086
tags question: http://stackoverflow.com/q/27587646
tags question: http://stackoverflow.com/q/27531193
type: Tag
tags question: http://stackoverflow.com/q/27565269
tags question: http://stackoverflow.com/q/27512780
tags question: http://stackoverflow.com/q/27545169
tags question: http://stackoverflow.com/q/27571601
tags question: http://stackoverflow.com/q/27491672
tags question: http://stackoverflow.com/q/27547051
tags question: http://stackoverflow.com/q/27545418
tags question: http://stackoverflow.com/q/27485878
tags question: http://stackoverflow.com/q/27508751
tags question: http://stackoverflow.com/q/27547032
tags question: http://stackoverflow.com/q/27520024
tags question: http://stackoverflow.com/q/27497709
tags question: http://stackoverflow.com/q/27557799
tags question: http://stackoverflow.com/q/27488390
tags question: http://stackoverflow.com/q/27525530
tags question: http://stackoverflow.com/q/27483338
tags question: http://stackoverflow.com/q/27490188
tags question: http://stackoverflow.com/q/27520368
tags question: http://stackoverflow.com/q/27622519
tags question: http://stackoverflow.com/q/27537694
tags question: http://stackoverflow.com/q/27562875
tags question: http://stackoverflow.com/q/27598311
tags question: http://stackoverflow.com/q/27553726
tags question: http://stackoverflow.com/q/27491777
tags question: http://stackoverflow.com/q/27490472
tags question: http://stackoverflow.com/q/27573982
tags question: http://stackoverflow.com/q/27564374
tags question: http://stackoverflow.com/q/27483265
tags question: http://stackoverflow.com/q/27546598
tags question: http://stackoverflow.com/q/27634512

http://stackoverflow.com/q/27614330
type: Question
tagged with: mongodb
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27615218
answer count: 1
score: 1
tagged with: meteor
favorite count: 0
has title: Using conditionals inside {{each}} loop
has body: I have this helper Template.clientesPromo.helpers({ 'mostrarPromosCliente' : function(){ return Promociones.find({'metadata.modalCliente' : Session.get("val") }); } }) And using it like this &lt;template name="clientesPromo"&gt; {{#each mostrarPromosCliente}} &lt;p style="color:#666; display: inline-block;"&gt;{{metadata.diaOferta}}&lt;/p&gt; {{/each}} &lt;/template&gt; And that works it Return for example Monday, Thuesday etc, but i want to do the next if diaOferta its equal to Monday,thuesday, etc (the 7 days of the week) the helper return "all days of the weeks" instead of monday,thuesday etc, note The data on mongo with the name of metadata.diaOferta its an array of days its there a way to accomplish this?
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27615218

http://stackoverflow.com/comment/43674323
type: AnswerComment
type: Comment
has text: For the Security and the IFrame, I would look at this thread if you don't control the website inside the IFrame: http://stackoverflow.com/questions/7289139/why-are-iframes-considered-dangerous-and-a-security-risk
comment on: http://stackoverflow.com/a/27626791
score: 0

http://stackoverflow.com/comment/43401912
type: Comment
type: QuestionComment
has text: The problem with Three.js code is that it is poorly documented --- in this case, *not* documented. And I am far from an expert in geometry and 3D modeling. A piece of example code targeted at my specific problem would be useful. Nonetheless, I'll definitely have a look at the `VertexNormalsHelper` to see what I can make of it. Thanks!
comment on: http://stackoverflow.com/q/27483817
score: 0

http://stackoverflow.com/q/27514683
accepted answer: http://stackoverflow.com/a/27514831
type: AnsweredQuestion
upvote count: 0
linked to: http://stackoverflow.com/q/901115
has comment: http://stackoverflow.com/comment/43459886
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/43459762
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43459947
has answer: http://stackoverflow.com/a/27515111
score: -1
has comment: http://stackoverflow.com/comment/43459854
answer count: 2
has answer: http://stackoverflow.com/a/27514831
possible better answer: http://stackoverflow.com/a/27515111
downvote count: 1
has body: In other words, how can I take an argument passed to a function, and place it in the middle of an src that is being defined in the same code? Note: Please no jQuery. Thank you. Here's my code: JavaScript: &lt;script&gt; var icons = document.getElementsByClassName( 'icon' ); // All elements of the "icon" class. var x, y; // Counters. /* The purpose of the below function is to assign images to 8 members of the same class, given a piece of the image name from an argument passed to a function. */ function example ( test1, test2, test3, test4, test5, test6, test7, test8 ) { for ( x = 0; x &lt; arguments.length, y &lt; (y + 8); x++, y++ ) { icons[y].src = 'http://example.com/img/' + arguments[x] + '.jpg'; } } &lt;/script&gt; HTML: &lt;img class="icon" src="" /&gt; &lt;img class="icon" src="" /&gt; &lt;img class="icon" src="" /&gt; &lt;img class="icon" src="" /&gt; &lt;img class="icon" src="" /&gt; &lt;img class="icon" src="" /&gt; &lt;img class="icon" src="" /&gt; &lt;img class="icon" src="" /&gt; &lt;img onclick="example(1, 2, 3, 4, 5, 6, 7, 8)" src="example.jpg" /&gt;
has title: How to add an argument to an image src using JavaScript?

http://stackoverflow.com/q/27564306
tagged with: javascript
has answer: http://stackoverflow.com/a/27564362
has comment: http://stackoverflow.com/comment/43553950
has title: How to Call a PHP on the Click of a Button
answer count: 2
has comment: http://stackoverflow.com/comment/43553934
upvote count: 0
linked to: http://stackoverflow.com/q/8567114
has comment: http://stackoverflow.com/comment/43553924
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/43553944
has answer: http://stackoverflow.com/a/27564343
has body: I am a newbie in PHP. I need to run this jQuery code to PHP. Class active just change display:none to display:block The code is here http://jsbin.com/weribi/1/ $(document).ready(function(){ $(".cecutient-btn").click(function(){ event.preventDefault(); $(this).parent().find(".more-info-open") .slideToggle("slow") .toggleClass("active"); }); }); What do I need to do?
tagged with: php
type: UnansweredQuestion
downvote count: 2
type: Question
score: -2
has comment: http://stackoverflow.com/comment/43553948

http://stackoverflow.com/comment/43677651
comment on: http://stackoverflow.com/a/27628433
has text: Why does the second "a" get skipped? Also, your solution is not correct, as it changes `'ba a'` to `'b'`
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/43698813
type: QuestionComment
comment on: http://stackoverflow.com/q/27640004
score: 0
type: Comment
has text: @Pointy, too many quotes to type. Besides it's node.js and a config is in the current directory.

http://stackoverflow.com/q/27525962
tagged with: javascript
answer count: 2
tagged with: angular-ui
tagged with: asynchronous
has comment: http://stackoverflow.com/comment/43480416
tagged with: angularjs
has title: Angular JS - How can i execute code only after completion of a function
possible better answer: http://stackoverflow.com/a/27526170
has answer: http://stackoverflow.com/a/27526036
has answer: http://stackoverflow.com/a/27526170
type: AnsweredQuestion
score: 0
accepted answer: http://stackoverflow.com/a/27526036
has body: I have a function AuthService.saveSession() in app.run and i am calling AuthService.isLoggedIn() in my $stateChangeStart function it say undefined because both functions are getting called at the same time. How can i make my code to execute $stateChangeStart after AuthService.saveSession() is completed. Hope i am explaining very clearly any queries please comment. Update app.run(function($rootScope, $location, $state, $http, $q, AuthService){ AuthService.saveSession(); $rootScope.$on('$stateChangeStart', function(event, toState, toParams, fromState,fromParams){ alert(AuthService.isLoggedIn()); // It says undefined. });
has comment: http://stackoverflow.com/comment/43480391
type: Question
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/43480419

http://stackoverflow.com/comment/43559609
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27556797
has text: Yes, it's just a debugging message, in case anyone tried to do ` ` and was surprised that entering 10 didn't cause `number` to become 5. It won't cause any problems with your app, and the message (should?) be squelched in the next version if the element has `twoway='false'`.

http://stackoverflow.com/a/27531047
has body: I think some how in chrome : ScrollExecute is not considered as function so the call is not going. try this way:It should work for all browsers. function ScrollExecute() { console.log('ScrollExecute'); //alert("hi"); if($(document).height() - 350 < ($(document).scrollTop() + $(window).height())) { scrollNode = $('.scrollnode #more').last(); scrollURL = $('.scrollnode #more p a').last().attr("href"); if(scrollNode.length > 0 && scrollNode.css('display') != 'none') { $.ajax({ type: 'GET', url: scrollURL, beforeSend: function() { scrollNode.clone().empty().insertAfter(scrollNode).append(' '); scrollNode.hide(); }, success: function(data) { // remove loading feedback scrollNode.next().remove(); var filteredData = $(data).find(".scrollnode"); filteredData.insertBefore( $("#product-list-foot") ); }, dataType: "html" }); } } } $(document).ready(function () { $('.st-content').on('scroll',function(e){ $.doTimeout( '.st-content', 100, ScrollExecute());// your change here }); }); html, body, .st-content { height: 100%; } .st-content { overflow-y: scroll; background: #fff; -webkit-overflow-scrolling: touch; } .st-content{ position: relative; } .c-4 { float:left; width: 50%; position: relative; overflow:hidden; } img { width:100%; height: auto; } Load More Hope it helps you.
has comment: http://stackoverflow.com/comment/43490699
score: 0
has comment: http://stackoverflow.com/comment/43490844
answers question: http://stackoverflow.com/q/27530110
type: Answer

http://stackoverflow.com/comment/43411451
type: QuestionComment
score: 0
has text: Also: [Why is my variable unaltered after I modify it inside of a function?](http://stackoverflow.com/questions/23667086/why-is-my-variable-unaltered-after-i-modify-it-inside-of-a-function-asynchron)
comment on: http://stackoverflow.com/q/27489866
type: Comment

http://stackoverflow.com/comment/43474229
has text: @TimBJames - We posted within seconds of each other. I'll assume yours was a polite question and not an accusation.
score: 1
comment on: http://stackoverflow.com/a/27522485
type: AnswerComment
type: Comment

yui-datatable
type: Tag
tags question: http://stackoverflow.com/q/27546206
tag name: yui-datatable

http://stackoverflow.com/a/27559507
upvote count: 1
has body: Your syntax is a little off, you're missing a ')' at the end. It should look like $j('.SUBJ').change(function () { alert("foo"); });
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27559497
score: 1

http://stackoverflow.com/a/27523293
score: 0
answers question: http://stackoverflow.com/q/27523127
has body: The reason looks to be that 'getting_Started' !== 'getting_started' You defined the links_array property with a capital S on 'started'. Sometimes its just the small things that catch us out. :)
type: Answer
has comment: http://stackoverflow.com/comment/43475575

http://stackoverflow.com/a/27510215
has body: In general you should avoid using 2 different versions of jQuery on the same page. Most of the time you won't need to - they are largely backwards compatible. Try putting the newer of the 2 versions of jQuery first, then removing the other one. As js/jquery.min.js is the newer version, try removing the google ajax apis one completely. If you are using something that is broken by a new version of jQuery, check that there hasn't been a new version of that thing released. If there hasn't, try to fix it yourself to work with the new jQuery. The next option is to check if there is an older version of the thing that requires a new jQuery that might work with the older jQuery version. If none of those options work, you can try to use 2 versions of jQuery on your page using jQuery.noConflict(), but this is not recommended. After you load the first version and before you load the second, do something like: j = jQuery.noConflict(); Then use j instead of $ whenever you want to use that version of jQuery, and $ for the second version.
score: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27503259
has comment: http://stackoverflow.com/comment/43479274
answers question: http://stackoverflow.com/q/27503259
type: Answer
upvote count: 1

http://stackoverflow.com/a/27575614
type: Answer
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27571833
has comment: http://stackoverflow.com/comment/43587790
answers question: http://stackoverflow.com/q/27571833
has body: Possible solutions: Try removing gapi.client.setApiKey('API_KEY'); and gapi.auth.signOut(); // logging out ! signOut works very fast, while gapi.client.load is asynchronous function which loads js code. User is probably signed out before gapi.client.load callback is executed. I'm not sure if that's required: Go to the Google Developers Console. Select your project. In the sidebar on the left, select APIs &amp; auth. In the displayed list of APIs, find the Google+ API and set its status to ON. Make sure you're requesting scope https://www.googleapis.com/auth/plus.login or https://www.googleapis.com/auth/plus.me while signing in.
score: 2
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/27578441
answers question: http://stackoverflow.com/q/27578397
type: Answer
upvote count: 1
downvote count: 0
has body: Try something like this. Here next() simply grabs the next element and $(this) referrs to the one currently clicked on. $(".read").click(function(e){ //e.preventDefault(); $(this).next().toggleClass('expand'); return false; }); .expand{display:none;background:#000;color:white;} Lorem Ipsum Text Read More Lorem Ipsum text again ! Lorem Ipsum Text Read More Lorem Ipsum text again ! Lorem Ipsum Text Read More Lorem Ipsum text again !
score: 1

http://stackoverflow.com/q/27589281
tagged with: dc.js
type: Question
answer count: 1
has answer: http://stackoverflow.com/a/27639450
tagged with: javascript
has body: I found the flash filter from this address.If you check this you will see when mouse hover map or other charts every elemnts filtering.I want to do like this with dc.js and leaflet maps. How can we do this?
score: 0
tagged with: dc.leaflet.js
has title: How can we filter charts with map hover using dc.js and leaflet maps
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43616500

http://stackoverflow.com/q/27488335
tagged with: google-maps
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/43408269
tagged with: http://stackoverflow.com/tag/html
score: 2
downvote count: 0
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/43442925
has body: I have a map on a website i'm building and i'm trying to overlay a section to add additional details to the location being shown. Currently, on load, it will flash the overlay elements before they disappear permanently. I've been told it's possible to make them seperate and use "position: absolute" but i'd rather keep everything together. I've checked around on the internet, but information on "noClear" tends to be pretty rare. Edit: Will try get it working in JSFiddle again, was a disaster when i tried before asking the question. Edit: I couldnt get it to work correctly with my code for some reason, but i've replicated the error using similiar code. http://jsfiddle.net/103romm2/ Google Maps Javascript HTML Contact us Where we are 124 Park Crescent Barry CF62 6HE United Kingdom +44 (0) 1446 421300
has answer: http://stackoverflow.com/a/27488883
has title: Google maps "noClear" not working
upvote count: 2

http://stackoverflow.com/comment/43654191
has text: @CODEFISH It is not intended that `hide()` is called on a window, that is why sencha introduced the `closeAction` property. So you should always call `close()` and not `hide()`. Otherwise you have a design problem...
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27616010
type: Comment

http://stackoverflow.com/q/27615118
favorite count: 0
has body: how can i get client ip address in javascript or angular or ionic or codova?? i search a lot can't find the right solution?? how it is possible i also try this https://github.com/salbahra/NetworkInterfacePlugin/ but when i try to run this command 'phonegap' is not recognized as an internal or external command, operable program or batch file. i am using ionic and cordova. (cordova plugins running fine)
has comment: http://stackoverflow.com/comment/43652019
has comment: http://stackoverflow.com/comment/43652114
has comment: http://stackoverflow.com/comment/43651948
tagged with: cordova
tagged with: angularjs
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43652159
has comment: http://stackoverflow.com/comment/43652131
has title: 'phonegap' is not recognized as an internal or external command, operable program or batch file
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/43652258
type: Question
has comment: http://stackoverflow.com/comment/43652087
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/27610227
upvote count: 0
has comment: http://stackoverflow.com/comment/43649365
has comment: http://stackoverflow.com/comment/43643674
type: Answer
answers question: http://stackoverflow.com/q/27610186
downvote count: 2
score: -2
has body: Nest your Array like this. var data = { 0 : {'id': {value1: 324, value2: 111},'word':'hello'}, }

http://stackoverflow.com/a/27489303
answers question: http://stackoverflow.com/q/27489224
has comment: http://stackoverflow.com/comment/43410228
accepted answer of: http://stackoverflow.com/q/27489224
has body: Here is an approach for you // first get an array of words var words = text.split(' '); // use Array.prototype.reduce (for example) to // create statistics var statistics = words.reduce(function (stat, word) { if (!stat[word]) stat[word] = 0; stat[word]++; return stat; }, {}); UPDATE: A little example which handles punctuation and upper/lower case, too: http://jsfiddle.net/1pnLzv8h/1/
upvote count: 5
score: 5
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43410380
downvote count: 0
has comment: http://stackoverflow.com/comment/43410885
type: Answer
has comment: http://stackoverflow.com/comment/43410362

http://stackoverflow.com/comment/43552660
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27563484
has text: Yeah I've tried your solution and it seems to work on first test. Thanks. I'm a novice at this so might take me a while to understand it. On the whole is this fairly robust/sensible? Meaning what I've done. Is there a more elegant way to achieve it?

http://stackoverflow.com/comment/43684262
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27614594
type: Comment
has text: That depends on exactly how you're trying to do it (hint: please provide a _complete_ code example) but I'm guessing it's the same problem as before. These methods are **asynchronous** which means that **anything** that depends on a value in the callback must happen within the callback, or after the callback executes.

http://stackoverflow.com/comment/43436664
score: 0
type: Comment
has text: I've added more info about the error which I believe just confirms its coming from the same uncompiled jade file
comment on: http://stackoverflow.com/a/27490619
type: AnswerComment

http://stackoverflow.com/comment/43388330
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27477046
has text: @usermesam0023 No I dont mind, I'm unsure how to do it with php
score: 0

http://stackoverflow.com/comment/43589493
type: Comment
type: QuestionComment
score: 8
comment on: http://stackoverflow.com/q/27580844
has text: Firebase removes nodes that have null values, there is not much we can help you with there. https://www.firebase.com/docs/web/api/firebase/set.html "Passing null for the new value is equivalent to calling remove(); all data at this location or any child location will be deleted."

http://stackoverflow.com/q/27591678
tagged with: angularjs
has title: Angulajs ng-options from a json with child object
type: AnsweredQuestion
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/27591749
type: Question
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
has body: I am trying to populate an angularjs ng-options with a json file that has child object, but i am finding it difficult getting it to work. This is my controller script inmomentControllerNameSpace.controller('userController', function($scope, $http, $q){ $scope.countryUserCode = {}; $http.get("js/countryCode.json").success(function(data){ $scope.countryUserCode = data; $scope.tel = 'show'; }) }) }) My HTML Code &lt;select data-ng-options="name.countryUserCode for d in countryUserCode" data-ng-model="selectedCode"&gt;&lt;/select&gt;&lt;/select&gt; My Json File { "af": { "name": "Afghanistan", "phoneCode": "93" }, "al": { "name": "Albania", "phoneCode": "355" }, "dz": { "name": "Algeria", "phoneCode": "213" } } What i intend to achieve is to have the name appear in the option label and the phone code appear in the option. I will be glad if anyone can help me thank you....
accepted answer: http://stackoverflow.com/a/27591749
answer count: 1
downvote count: 0
favorite count: 0

http://stackoverflow.com/comment/43648524
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27613175
has text: ok so baa my bad i don't get you point i will edit my answer wait

http://stackoverflow.com/a/27544899
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/43516403
answers question: http://stackoverflow.com/q/27544765
has body: You need element.classList - Web API Interfaces if you want to use different buttons for that try this function addclass() { mydiv.classList.add("visible"); } function removeclass() { mydiv.classList.remove("visible"); } var addButton = document.querySelector(".addButton"), removeButton = document.querySelector(".removeButton"), mydiv = document.querySelector(".mydiv"); addButton.addEventListener("click", addclass, false); removeButton.addEventListener("click", removeclass, false); .mydiv{ width: 150px; height: 150px; background: red; margin: 20px auto } .visible{ opacity: .1; } &lt;div class=mydiv &gt;&lt;/div&gt; &lt;button class=addButton&gt;Add Class&lt;button&gt; &lt;button class=removeButton&gt;Remove Class&lt;button&gt; to just toggle it var div = document.querySelector(".mydiv"); // if visible is set remove it, otherwise add it div.classList.toggle("visible"); a full example on how to use is : function modifyopacity() { this.classList.toggle("visible"); } var div = document.querySelector(".mydiv"); div.addEventListener("click", modifyopacity, false); .mydiv{ width: 150px; height: 150px; background: red; margin: 20px auto } .visible{ opacity: .1; } &lt;div class=mydiv &gt;&lt;/div&gt;
has comment: http://stackoverflow.com/comment/43516545

http://stackoverflow.com/q/27632816
tagged with: jquery
has comment: http://stackoverflow.com/comment/43685542
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/27632898
has answer: http://stackoverflow.com/a/27632841
accepted answer: http://stackoverflow.com/a/27632841
has title: -Jquery- get values with one button which placed in same div
has answer: http://stackoverflow.com/a/27632883
has comment: http://stackoverflow.com/comment/43688120
type: AnsweredQuestion
has body: I tried to get element's values in div with button click and bring div's values into input box. and I tried this: window.onload = function () { $('.DA').on('click', '.submit_btn', function () { var getinfo = $(this).val(); $('#val_input').val(getinfo); }); }; this is my example.html name1 info1-1 info1-2 info1-3 submit name2 info2-1 info2-2 info2-3 submit ... I'm also tried to put one value in input box like this: window.onload = function () { $('.DA').on('click', '.submit_btn', function () { var getinfo = $(".SA").val(); $('#val_input').val(getinfo); }); }; but it dosen't work. I 'm very new to JS and Jquery so can't get a clue how to solve & where am I missing...
has answer: http://stackoverflow.com/a/27632898
type: Question
tagged with: javascript

webforms
tags question: http://stackoverflow.com/q/27588060
tags question: http://stackoverflow.com/q/27491206
tags question: http://stackoverflow.com/q/27552755
tags question: http://stackoverflow.com/q/27530621
type: Tag
tag name: webforms
tags question: http://stackoverflow.com/q/27573164
tags question: http://stackoverflow.com/q/27559560

http://stackoverflow.com/a/27491636
type: Answer
has body: You may change you JS function to: function SearchNMClick() { document.getElementById('&lt;%# HiddenSearchNM.ClientID %&gt;').click(); }
upvote count: 3
accepted answer of: http://stackoverflow.com/q/27490678
score: 3
answers question: http://stackoverflow.com/q/27490678
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/27606804
tagged with: javascript
has answer: http://stackoverflow.com/a/27628286
score: 3
tagged with: bdd
downvote count: 0
answer count: 1
tagged with: jasmine
favorite count: 0
tagged with: backbone.js
has body: I've just developed this JavaScript/Backbone module as a part of a web page I am developing. I would like to create a Jasmine test for it, but I am brand new to Jasmine, therefore I am not sure what should I be testing in this class. What should be the "skeleton" of the test? In order to avoid redundancy in tests, what parts will you test? editdestinationview.js: define([ 'common/jqueryex', 'backbone', 'marionette', 'handlebars', 'text!education/eet/templates/editdestination.hb', 'text!common/templates/validationerror.hb', 'lang/languageinclude', 'common/i18nhelper' ], function ($, Backbone, Marionette, Handlebars, templateSource, errorTemplateSource, i18n) { 'use strict'; var errorTemplate = Handlebars.compile(errorTemplateSource), EditDestinationView = Marionette.ItemView.extend({ initialize: function (options) { this._destinationTypes = options.destinationTypes; }, onRender: function () { this.stickit(); this._bindValidation(); }, _bindValidation: function () { Backbone.Validation.bind(this, { valid: this._validAttributeCallback, invalid: this._invalidAttributeCallback, forceUpdate: true }); }, _validAttributeCallback: function (view, attr) { view.$('#error-message-' + attr).remove(); }, _invalidAttributeCallback: function (view, attr, error) { view.$('#error-message-' + attr).remove(); view.$('#destinationTypes').parent('div').append(errorTemplate({ attr: attr, error: error })); }, template: Handlebars.compile(templateSource), ui: { saveAnchor: '#ed_eetSaveDestinationAnchor', deleteAnchor: '#ed_eetDeleteDestinationIcon' }, triggers: { 'click @ui.saveAnchor': 'click:saveDestination', 'click @ui.deleteAnchor': 'click:deleteDestination' }, bindings: { 'select#destinationTypes': { observe: 'destinationTypeId', selectOptions: { collection: function () { return this._destinationTypes; }, labelPath: 'description', valuePath: 'destinationTypeId', defaultOption: {label: i18n.EDUCATION_EET_SELECT_INTENDED_DESTINATION, value: null} } } } }); return EditDestinationView; });…
type: UnansweredQuestion
has title: How to test this with Jasmine test (Behaviour Driven Development)?
upvote count: 3
tagged with: unit-testing
type: Question

http://stackoverflow.com/q/27627806
has answer: http://stackoverflow.com/a/27628035
has body: Can any one help me I'm trying to store the state of checkboxes by using window.sessionStorage. When the user goes from page1 to page2 and then click back button to go to page1 I want all the checkboxes which the user checked before going to page2 to be checked. This link have the script at the bottom of the page which work once it is in the localStorage or sessionStorage mode http://elikirk.com/store-form-data-with-html5-localstorage-and-jquery/.
has title: Store checkbox value in sessionStorage
tagged with: javascript
tagged with: session-storage
answer count: 2
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/43676730
type: UnansweredQuestion
tagged with: checkbox
has comment: http://stackoverflow.com/comment/43677448
has answer: http://stackoverflow.com/a/27664906
score: 1
has comment: http://stackoverflow.com/comment/43676778
upvote count: 1
type: Question

http://stackoverflow.com/comment/43496875
type: Comment
comment on: http://stackoverflow.com/a/27493456
has text: Adding an extra function call to wrap request() fixed the problem, it was not necessary to pass in the index. I've accepted your answer as it pointed me in the right direction, thanks.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43570528
comment on: http://stackoverflow.com/q/27572523
has text: what about `replaceState`?
score: 3
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43418964
type: AnswerComment
score: 0
type: Comment
has text: @khartnett By the way, my original comment was meant more for the OP, I had already upvoted your answer before that...
comment on: http://stackoverflow.com/a/27492089

http://stackoverflow.com/comment/43393350
has text: Don't use `for...in` to iterate over an array. Now you're probably going to have to iterate over the properties of the objects in `msg`, and sanitize those, instead.
score: 3
comment on: http://stackoverflow.com/q/27480141
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43599656
score: 0
has text: I should probably have mentioned that the exact same code works when put directly the . I'll update the question with this and add the relevant part of routes.rb.
type: QuestionComment
comment on: http://stackoverflow.com/q/27587547
type: Comment

http://stackoverflow.com/q/27594904
score: 0
has answer: http://stackoverflow.com/a/27595109
answer count: 1
has body: I was hoping I could get a hand figuring out what's going wrong with this piece. I'm not experienced with javascript so I am seeking your experience instead. I am attempting to use the jquery single.page.nav which is supposed to allow my navigation bar to scroll between links, but I suspect something in the haphazard way I code with my minimal coding experience, is conflicting with it or I'm missing something supper obvious I just can't see. Scott Davis and Associates ABOUT PROJECTS CONTACT SCOTT DAVIS AND ASSOCIATES BUILDING DESIGN AND DOCUMENTATION AWARD WINNING DESIGN WITH ATTENTION TO DETAIL ABOUT Detailed design and documentation for new buildings and extensions, drawing on 25+ years experience of design and client collaboration, for a seamless process from council approval through to construction. PROJECTS LISMORE HEIGHTS Subdivision/ New Dwellings DESIGN COMPETITION Sustainable Small House ELTHAM House GOONELLABAH Medium Density Development EAST LISMORE Carport Addition URALBA House WOOLLAHRA Terrace House Renovation CHANNON House TUCKOMBIL Renovation LISMORE HEIGHTS House CORNDALE House CONTACT Thanks, Gemma
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43613519
tagged with: scroll
type: Question
has comment: http://stackoverflow.com/comment/43613691
accepted answer: http://stackoverflow.com/a/27595109
has title: single.page.nav javascript not working
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/27531557
answers question: http://stackoverflow.com/q/27489665
type: Answer
has body: You should be able to detect the custom protocol by relying only on Javascript. I've found the following project for protocol detection using Javascript, hope it helps: https://gist.github.com/rajeshsegu/3716941 You can check more information in this related question: How to detect browser&#39;s protocol handlers?
downvote count: 0
score: 1
upvote count: 1

http://stackoverflow.com/comment/43467850
has text: it means ...if field 1 is empty...it is hiding by using your script...but the image also be hide ... how can i hide imag src also if its content is empty
comment on: http://stackoverflow.com/a/27518915
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43407799
type: QuestionComment
comment on: http://stackoverflow.com/q/27484877
score: 0
has text: @Christian.tucker Default behavior of a text-box is to display text. You are trying to "make it so the next text appears" - so you are doing something to add text. This is not default behavior, it's something you must do manually. Basically, yeah - always show your code.
type: Comment

http://stackoverflow.com/q/27594614
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/27594663
tagged with: javascript
has body: I've done quite a bit of reading and seen many different questions regarding this topic, but I was wondering if I could get help on WHY breaking out of a For Each loop doesn't work. Also, I am pretty new, so I apologize in advance if this question was answered in a different way that I wasn't able to understand. So far, I have written a forEach function to emulate a native .forEach method: function forEach(collection, callback){ if(collection.isArray){ for(var i =0;i&lt;collection.length&amp;&amp;callback(collection[i])!==false;i++){ callback(collection[i]); } }else{ for(var key in collection){ callback(collection[key]); } } } When I try to utilize this to write another function 'find' that searches for the first instance of the array that matches a criteria, using 'return' or 'break' doesn't seem to work. find([1,2,3,4,5].function(x){return x>3;}); returns 5 instead of 4. function find (collection, criteria){ var result; forEach(collection, function(x){ if(criteria(x)){ result =x; return false; } }); return result; } I have been able to recreate the effect that I want using other functions, but would like to understand why this doesn't work, as I am learning how to implement the use of functions within other functions. Thank you.
answer count: 2
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/27594967
has comment: http://stackoverflow.com/comment/43612907
has answer: http://stackoverflow.com/a/27594663
has comment: http://stackoverflow.com/comment/43612919
tagged with: foreach
possible better answer: http://stackoverflow.com/a/27594967
type: AnsweredQuestion
score: 1
has title: Why is 'break' in JS forEach function not allowed?

http://stackoverflow.com/q/27586606
tagged with: css
downvote count: 2
has title: Superfish menu, need to magic line stick to the first elements only
has body: Im building navigation using super fish and magic line. JSFIDDLE: http://jsfiddle.net/gz7tx0rh/ Width of magic line is calculated based on parent width like so: $(document).ready(function() { $("#example").append("&lt;li id='magic-line'&gt;&lt;/li&gt;"); /* Cache it */ var $magicLine = $("#magic-line"); $magicLine .width($(".current_page_item").width()) .css("left", $(".current_page_item a").position().left) .data("origLeft", $magicLine.position().left) .data("origWidth", $magicLine.width()); $("#example li").find("a").hover(function() { $el = $(this); orPos = $("#example").offset().left; leftPos = $el.offset().left-orPos; newWidth = $el.parent().width(); $magicLine.stop().animate({ left: leftPos, width: newWidth }); }, function() { $magicLine.stop().animate({ left: $magicLine.data("origLeft"), width: $magicLine.data("origWidth") }); }); var example = $('#example').superfish({ //add options here if required }); }); It works okay for the first level of links. However if you hover over second level of links, magic line will take new width and expand. I dont want that. I just need it to be same width as first level (parent) only.
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27588001
tagged with: javascript
type: Question
upvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: magicline
tagged with: superfish
has answer: http://stackoverflow.com/a/27588001
score: -2

http://stackoverflow.com/comment/135583081
score: 0
type: Comment
comment on: http://stackoverflow.com/a/67884427
has text: _"Never use async:false its dangerous, your app might misbehave."_ Source? As far as I'm aware this isn't true. It's still not a good idea simply because it will block the UI, but so long as you're aware of that side-effect it's not inherently dangerous.
type: AnswerComment

http://stackoverflow.com/a/27509947
answers question: http://stackoverflow.com/q/27509633
score: 0
has body: You can disable your password field before submitting. Check if input type is password then disable it and submit the form. Disbaled fields will not be submitted.
type: Answer
has comment: http://stackoverflow.com/comment/43451953
has comment: http://stackoverflow.com/comment/43490884

http://stackoverflow.com/comment/43555262
score: 0
has text: [Specification](http://www.w3.org/TR/html-markup/syntax.html#replaceable-character-data): _In documents in the HTML syntax, the title and textarea elements can contain replaceable character data. Replaceable character data can contain the following: 1) text, optionally including "<" characters; 2) character references._
comment on: http://stackoverflow.com/q/27564809
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27587260
score: 0
has body: This goes against all user accessibility documentation, so I don't really advise doing it, but if you really want to achieve this you can do so with JavaScript by removing the checkbox's focus when focussed by adding onfocus="this.blur()": &lt;input type="checkbox" onfocus="this.blur()" tabindex="-1" /&gt; The reason I advise against this is because this now means the element is inaccessible when using the tab key on your keyboard. This is why I've also added tabindex="-1" to the checkbox in the above example, as without it the JavaScript event would reset the tab back to 1, making it impossible to access all interactive elements appearing after your checkbox.
type: Answer
answers question: http://stackoverflow.com/q/27587248

http://stackoverflow.com/comment/63730716
type: Comment
has text: The answer should probably be modified since gulp-typescript now supports concatenation with out https://github.com/ivogabe/gulp-typescript#basic-usage
comment on: http://stackoverflow.com/a/27580723
score: 1
type: AnswerComment

http://stackoverflow.com/q/27558009
tagged with: c++
score: 2
upvote count: 3
downvote count: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27559123
answer count: 1
favorite count: 0
has title: calling javascript function from c++ node.js extension
type: UnansweredQuestion
has body: I have some javascript file and I want to call some function defined in this file during a call to my c++ function. Note that I want to call it by name, not just some random function passed as argument. test.js: function someFunc() { // do something... } var my_module = require("my_native_module"); my_module.nativeFunc(); test.cpp: using namespace v8; Handle&lt; Value &gt; nativeFunc(const Arguments &amp; args) { HandleScope scope; // I want to somehow get someFunc value from current context by name Local&lt; Value &gt; function_value = Context::GetCurrent()-&gt;Global()-&gt;Get_By_Name(String::New("someFunc")); // this doesn't work // probably check that function_value is really a function... Local&lt; Function &gt; function_callable = Local&lt; Function &gt;::Cast(function_value); function_callable-&gt;Call(Context::GetCurrent()-&gt;Global(), 0, nullptr); return(scope.Close(Undefined())); } All the examples seem to accept the function as an argument (callback) like this: Local&lt;Function&gt; cb = Local&lt;Function&gt;::Cast(args[0]); But I need to find the function by name instead.
tagged with: node.js

http://stackoverflow.com/a/27523247
type: Answer
has body: try using this: with clearStyle and heightStyle $( "#accordion" ).accordion({ heightStyle: "content", collapsible: true , autoHeight: false, clearStyle: true, });
answers question: http://stackoverflow.com/q/27523108
score: 0

http://stackoverflow.com/comment/43449853
type: Comment
score: 0
type: AnswerComment
has text: Well, first off what I'm saying is if you're **NOT** using `SCISSOR_TEST`, AND you're calling `gl.clear` in both drawing functions, then your second `gl.clear` is erasing the results of the first drawing function. As for the second issue I've never done stereoscopic views but I'd just imagine you want to compute both a view matrix that starts at each eye whereas when there's only one view it starts at your nose bridge (the center between your eyes). I'd guess the perspective matrix) is basically the same for both of those but I don't know for sure.
comment on: http://stackoverflow.com/a/27497307

http://stackoverflow.com/q/27626181
type: AnsweredQuestion
tagged with: java
tagged with: javafx
tagged with: fullcalendar
type: Question
has answer: http://stackoverflow.com/a/27627264
has title: Making Upcalls from JavaScript to JavaFX
answer count: 1
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/27627264
tagged with: webview
has body: I'm trying to call a JavaScript function testCheckMate from Java but I get error: Exception in thread "JavaFX Application Thread" netscape.javascript.JSException: SyntaxError: Unexpected EOF The WebView is holding FullCalendar. How do I go about calling JQuery/ Javascript from Java? Thank you all in advance.

http://stackoverflow.com/a/27564066
type: Answer
answers question: http://stackoverflow.com/q/27563981
has body: you should use class when you are using same name for more than once on same page in your html: $('.dash_adc_avg').html(adc_avg);
score: 0

http://stackoverflow.com/comment/43572620
type: QuestionComment
comment on: http://stackoverflow.com/q/27573498
score: 0
has text: Just a flat aray of the elements with selected, so true/false doesn't matter, right now it is just an array of like ['false',true',false], but its just for the first level down, I need that combined with the second level down too. Does that make sense?
type: Comment

http://stackoverflow.com/comment/43480130
comment on: http://stackoverflow.com/a/27525843
score: 1
type: AnswerComment
type: Comment
has text: or even better, use a deferred http://api.jquery.com/category/deferred-object/

http://stackoverflow.com/comment/44733962
type: Comment
type: QuestionComment
has text: http://danml.com/js/blackbox.js captures a lot more data than google, but it's up to you to ship it somewhere. a JSON output of it should all fit in a queryString though.
comment on: http://stackoverflow.com/q/27581199
score: 1

http://stackoverflow.com/q/27608542
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43639808
tagged with: karma-runner
has body: -$injector is not working in my test why?- Why it is not able to return my service? foo.service.js: 'use strict'; angular.module('fooApp') .factory('FooService', function () { var function1 = function function1(value) { return value; }; return { function1 : function1 }; }); my test(foo.service.spec.js) 'use strict'; describe('Service: FooService', function () { beforeEach(module('fooApp')); it('should...', inject(function(FooService) { expect(FooService.function1('...')).toEqual(...); .... })); .... }); When I evaluate FooService is undefined. Why ? Error stacktrace: ... TypeError: 'undefined' is not an object (evaluating 'FooService.function1') ... new stacktrace error : Error: [$injector:modulerr] Failed to instantiate module fooApp due to: TypeError: 'undefined' is not a function (evaluating '$stateProvider .state') at C:/_Projet/foo/client/app/auth/auth.js:15 at invoke (C:/_Projet/foo/client/bower_components/angular/angular.js:4182) at runInvokeQueue (C:/_Projet/foo/client/bower_components/angular/angular.js:4088) at C:/_Projet/foo/client/bower_components/angular/angular.js:4097 at forEach (C:/_Projet/foo/client/bower_components/angular/angular.js:323) at loadModules (C:/_Projet/foo/client/bower_components/angular/angular.js:4120) at createInjector (C:/_Projet/foo/client/bower_components/angular/angular.js:4004) at workFn (C:/_Projet/foo/client/bower_components/angular-mocks/angular-mocks.js:2339) http://errors.angularjs.org/1.3.8/$injector/modulerr?p0=fooApp&amp;p1=TypeError%3A%20'undefined'%20is%20not%20a%20function%20(evaluating%20'%24stateProvider%0A%20%20%20%20%20%20%20%20%20%20%20%20.state')%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fclient%2Fapp%2Fauth%2Fauth.js%3Fb8f7bccdf2d8f57e6d6f0c810e0d1c6f0d3df707%3A15%0A%20%20%20%20at%20invoke%20(http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fclient%2Fbower_components%2Fangular%2Fangular.js%3Febb86f089066f7089a249e390e64bcab67622158%3A4182)%0A%20%20%20%20at%20runInvokeQueue%20(http%3A%2F%2Flocalhost%3A8080%…
has comment: http://stackoverflow.com/comment/43641475
tagged with: unit-testing
type: Question
has title: $injector is not working in my test why?
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27608739
score: 0
has comment: http://stackoverflow.com/comment/43639580
answer count: 1
tagged with: jasmine
tagged with: angularjs
has comment: http://stackoverflow.com/comment/43641561
has answer: http://stackoverflow.com/a/27608739

http://stackoverflow.com/a/27585157
answers question: http://stackoverflow.com/q/27584892
has comment: http://stackoverflow.com/comment/43595143
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/43594811
score: 1
has body: That depends on your timezone, the following snippet returns different results, depending on the client time zone for example: 1.1.1970 01:00:00 GMT+1:00 - in mine (CET) function tm(unix_tm) { var dt = new Date(unix_tm*1000); document.writeln(dt.getHours() + '/' + dt.getMinutes() + '/' + dt.getSeconds() + ' -- ' + dt + '&lt;br&gt;'); } tm(0);
downvote count: 0

http://stackoverflow.com/comment/43448031
score: 0
comment on: http://stackoverflow.com/q/27508448
type: Comment
type: QuestionComment
has text: but i would like to post the data into a new window o_o

http://stackoverflow.com/comment/43520185
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27546776
has text: @vas_bar_code: you forgot name attribute bro. give name to your hidden field you'll get the value
type: AnswerComment

http://stackoverflow.com/a/28376568
upvote count: 1
downvote count: 1
has body: To trigger the change event on backbone after you change something with jquery you need to trigger the change event. elem.trigger('change') http://api.jquery.com/trigger/
score: 0
answers question: http://stackoverflow.com/q/27516172
type: Answer

http://stackoverflow.com/comment/43620334
comment on: http://stackoverflow.com/q/27598536
has text: I have coreected the code time.time Please check the result is still NaN
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/27565941
answer count: 1
downvote count: 0
tagged with: javascript
score: 1
tagged with: html2canvas
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/93126708
tagged with: http://stackoverflow.com/tag/html
has body: I'm using html2canvas for generating image of canvas with the background it work pretty fine with the firefox but in chrome the background is vertically stretched, I'm not sure what is the problem with it. Here is my fiddle link http://jsfiddle.net/vnL0jLmc/ code for it html2canvas(document.getElementById('DBackgroundContainer'), { allowTaint: true, taintTest: false, onrendered: function(canvas) { document.body.appendChild(canvas); } })
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/28158215
tagged with: canvas
has title: html2Canvas background Stretched Chrome

http://stackoverflow.com/comment/43520597
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27547023
type: Comment
has text: @matewka: Sure it does, in the developer console.

http://stackoverflow.com/q/27567128
tagged with: google-apps-script
has title: Distributing Google Apps Scripts for Sheets in your company network
answer count: 2
has body: Developing a simple script. My company uses Google Drive to store its documents, etc. We trawl through Google product datafiles in my company by loading them into spreadsheets, but ImportXML wasn't meeting all our needs. So I made a simple Google Apps Script file that handles the data, and spits it out to the currently active spread in an opened Spreadsheet. The mechanics are controlled by a UI menu/modal combo. Finally, it works. I've been developing it as a script attached to a spreadsheet, but now I want to let others, with access to the Google Drive, use the thing. But how do I get it to my co-workers? How do I distribute this script, and get it to run onOpen() when someone loads a new Google Sheet document? I just want to store the script on the company-wide Google Drive, and let people 'install' it or something, then run it through the menu UI. Ideally that'd mean I can always tweak the script as people are loading the script from the same source. Is my only solution really getting people to copy-paste the code into their own documents' Scripts Editor, and run onOpen() manually? (Not at all maintainable + hard to teach).
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/27568808
tagged with: google-drive-api
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
tagged with: google-sheets
accepted answer: http://stackoverflow.com/a/27568808
possible better answer: http://stackoverflow.com/a/61923132
tagged with: javascript
has answer: http://stackoverflow.com/a/61923132

http://stackoverflow.com/q/27611656
tagged with: bing-maps
has answer: http://stackoverflow.com/a/27733598
score: 0
has comment: http://stackoverflow.com/comment/43664267
answer count: 2
possible better answer: http://stackoverflow.com/a/27697301
has body: Trying to find a way without zooming in real close to tell Google or Bing maps to show all cities. Bing does a good job for the most part but still when you zoom in it shows a whole different set of cities. I have a large monitor this map is going to be sitting on and really need it to show more than just the cities it shows on for example zoom level 8 or 9 on Google. Right now I load in roughly 2900 different locations and mark them on the map so I am trying to do it via the API no just going to maps.google.com Has anyone come up against this issue and found a fix? Did some searching here as well on Google and maybe looking it up wrong but haven't found anyone looking for something like this.
has comment: http://stackoverflow.com/comment/43648082
has comment: http://stackoverflow.com/comment/43648190
accepted answer: http://stackoverflow.com/a/27733598
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43646856
has title: Google / Bing Maps Show All Cities
has comment: http://stackoverflow.com/comment/43648112
type: Question
tagged with: google-maps
has answer: http://stackoverflow.com/a/27697301
tagged with: javascript
has comment: http://stackoverflow.com/comment/43648141

http://stackoverflow.com/q/27638240
has answer: http://stackoverflow.com/a/27638548
tagged with: javascript
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
tagged with: twitter-bootstrap
has title: Responsive Three-Column Restack
tagged with: css
has answer: http://stackoverflow.com/a/27638419
accepted answer: http://stackoverflow.com/a/27638419
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27931032
has body: I am wondering if this is even possible with a MINIMAL amount of javascript or jQuery. I have a three column layout: colA, colB, colC, with a header and nav above and a footer below. HTML: Everything is all fine and dandy across the board, being a bootstrap child. But I was wondering was methods are out there so that when viewing this on a mobile phone, where everything is contracted to a single column, so that the center column (colB) appears on top, rather than between colA and colC
possible better answer: http://stackoverflow.com/a/27931032
type: Question

http://stackoverflow.com/q/27566985
has comment: http://stackoverflow.com/comment/43638763
tagged with: watin
has answer: http://stackoverflow.com/a/27754738
accepted answer: http://stackoverflow.com/a/31605264
tagged with: security
answer count: 3
has comment: http://stackoverflow.com/comment/43640497
has title: Browser.ExecScript() stopped working after updating windows
has comment: http://stackoverflow.com/comment/43559597
has comment: http://stackoverflow.com/comment/43563694
has comment: http://stackoverflow.com/comment/43638465
upvote count: 7
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43666829
score: 7
tagged with: javascript
has answer: http://stackoverflow.com/a/27895930
type: Question
has comment: http://stackoverflow.com/comment/43559505
has answer: http://stackoverflow.com/a/31605264
has comment: http://stackoverflow.com/comment/43704745
has body: I've set up a simple testbed for WatiN (ver 2.1) which reads: var browser = new IE(); browser.GoTo("http://www.google.co.il"); // webpage doesn't matter really browser.RunScript("alert(123)"); This works only if KB3025390 is not installed. Installing it breaks the above test with an UnAuthorizedAccessException which has HRESULT set to E_ACCESSDENIED. What gives? Is there any workaround? Update: Using IWebBrowser2.Navigate2 along with "javascript:console.log(123)" type of scripts works however it makes me feel uneasy using such a backchannel the scripts run through this back-channel of .Navigate2() may only have a max length of about 2070 chars (give or take) otherwise they get forcibly truncated to this length leading to javascript errors upon attempting to run them using .Navigate2(), even with the most trivial script, will clog the ready state of Internet Explorer for good in the sense that it will be set to READYSTATE_LOADING without any hope of getting rid of it. In simple terms this means that once you use this hack, you either have to perform every single subsequent operation in WatiN in a "dont-wait-for-webpage-to-load" fashion (GoToNoWait, ClickNoWait etc) lest your code freezes upon waiting for the browser to turn back to READYSTATE_COMPLETE (which will never come about ofcourse as already mentioned). there appears to be a much broader issue here in the sense that I can't even access the properties of an IHtmlWindow2 object p.e. window.document throws an unauthorized exception again making it virtually impossible to transfer over to the C# world the return-values of the scripts I'm running (using Expando etc) for documents other than window.top.document (for the window.top.document window there is IWebBrowser2.Document which does the trick) Update#2: The folks over at the selenium project have also noticed this issue: https://code.google.com/p/selenium/issues/detail?id=8302 A bug report has been created as well: https://connect.microsoft.com/IE/feedback/det…
downvote count: 0
possible better answer: http://stackoverflow.com/a/27754738
linked to: http://stackoverflow.com/q/18476186
favorite count: 0

http://stackoverflow.com/a/27591595
answers question: http://stackoverflow.com/q/27591208
type: Answer
has body: This would be my solution.Don't know if it is helpful. var init = { name : "myName", display : function () { alert(name); } }; document.onclick = function() { init.display(); }; Live example: http://liveweave.com/ZWUwCu
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/43607350
downvote count: 0

http://stackoverflow.com/comment/43472189
type: Comment
type: QuestionComment
has text: when i type in first textbox the second is not getting disabled.
comment on: http://stackoverflow.com/q/27521261
score: 0

http://stackoverflow.com/q/27557581
has answer: http://stackoverflow.com/a/27557647
type: Question
has title: JavaScript Quiz Scoring Functions
has comment: http://stackoverflow.com/comment/43541530
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: css
has body: Ok, so I'm doing this project in javascipt for a website with a quiz, made in Javascript, css, html and jquery, and I've had an issue with getting the scoring to work. The problem is getting a total at the end of the quiz when the results sections is loaded. It just keeps coming up with the same number every time I end the quiz, 1/6. This is what i have got so far: var answers = "0"; function answerTotals() { if (document.getElementById("1A").checked = true) answers++; else(console.log("answer was incorrect")); } This part displays the results on the page: function showScore() { document.getElementById("Score").innerHTML = "You Got " + answers + "/6"; console.log("Score is displayed."); } And the question: Question 1. Why are there data types in JavaScript? As it helps a computer differentiate between different data. There aren't. To help it interact with Java. To allow it to complete a task.
accepted answer: http://stackoverflow.com/a/27557647
type: AnsweredQuestion

http://stackoverflow.com/comment/45403289
type: QuestionComment
comment on: http://stackoverflow.com/q/27500266
score: 0
has text: Curious what the "fixes" you mention are.
type: Comment

http://stackoverflow.com/a/27541030
type: Answer
has comment: http://stackoverflow.com/comment/43509611
answers question: http://stackoverflow.com/q/27540814
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/27540814
has comment: http://stackoverflow.com/comment/43509838
has body: You might be trying to do this? var myObj = {}; var myArr = [ { nom: 'fusion', nbrRune: 1 }, { nom: 'air', nbrRune: 2 }, { nom: 'earth', nbrRune: 0 }, { nom: 'fire', nbrRune: 0 }, { nom: 'life', nbrRune: 0 }, { nom: 'logic', nbrRune: 0 }, { nom: 'water', nbrRune: 0 } ]; myObj.stuff = myArr; alert(JSON.stringify(myObj)); Example: http://jsfiddle.net/d90Lkcgs/ This will give you an object that contains an array of objects. Things within curly braces are objects. Things within square brackets are arrays.
has comment: http://stackoverflow.com/comment/43509482
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43509536
has comment: http://stackoverflow.com/comment/43509855
has comment: http://stackoverflow.com/comment/43509762

http://stackoverflow.com/a/27512296
accepted answer of: http://stackoverflow.com/q/27512192
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43455095
has comment: http://stackoverflow.com/comment/43455143
type: Answer
has body: Well, there isn't a way to look for that directly as best I know. You could add onbeforeunload to all pages and have them set a cookie of the current URL before transition. Then you could check that cookie on page1 to see if the last URL was page2.
upvote count: 2
answers question: http://stackoverflow.com/q/27512192
score: 2

http://stackoverflow.com/a/37330930
has body: For those who stumble upon this looking for Angular 1.x solution Here's how it could work: class Foo { constructor(injectOn, bar) { injectOn(this); console.log(this.bar === bar); // true } } And here's what injectOn service does under the hood: .service('injectOn', ($injector) =&gt; { return (thisArg) =&gt; { if(!thisArg.constructor) { throw new Error('Constructor method not found.'); } $injector.annotate(thisArg.constructor).map(name =&gt; { if(name !== 'injectOn' &amp;&amp; name !== '$scope') { thisArg[name] = $injector.get(name); } }); }; }); Fiddle link Edit: Because $scope is not a service, we cannot use $injector to retrieve it. To my knowledge, it's not possible to retrieve it without re-instantiating a class. Hence why, if you inject it and need it outside constructor method, you'll need to assign it to this of your class manually.
answers question: http://stackoverflow.com/q/27529518
type: Answer
upvote count: 5
downvote count: 0
has comment: http://stackoverflow.com/comment/62749639
has comment: http://stackoverflow.com/comment/90864401
score: 5

http://stackoverflow.com/a/27556524
type: Answer
answers question: http://stackoverflow.com/q/27556492
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27556492
has body: The regex would be as easy as .match(/(.)\1*/g) What it does - it matches a character and any number (including zero) of the same characters followed. "Hello?".match(/(.)\1*/g) // ["H", "e", "ll", "o", "?"]
score: 5
has comment: http://stackoverflow.com/comment/43539301
type: AcceptedAnswer
upvote count: 5

http://stackoverflow.com/comment/43576653
has text: Thanks for the suggestions, unfortunately I didn't really see anything about the left hand rule that could fix this problem, and using TRIANGLE_STRIP made the shapes look odd.
score: 0
comment on: http://stackoverflow.com/q/27572963
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43726730
type: Comment
type: QuestionComment
has text: no i am using titanium signle window application
score: 0
comment on: http://stackoverflow.com/q/27631917

http://stackoverflow.com/comment/43505687
type: Comment
score: 1
has text: `userLevel` is not in the shown code
type: QuestionComment
comment on: http://stackoverflow.com/q/27538873

http://stackoverflow.com/q/27547051
tagged with: javascript
tagged with: mozilla
has body: A user asked this a while ago. Why not work on the latest versions of Mozilla? Getting attribute using XPath Given an XML structure like so: Harry Potter 29.99 Learning XML 39.95 I'm using this expression: path="/bookstore/book/title/@lang"; It works on Google Chrome, Opera, Internet Explorer, Safari. But not in Mozilla Firefox. Only happens with attributes (@ or attributes::). I tried in Mozilla 6 and works perfect, but not in Mozilla 33 or 34
has comment: http://stackoverflow.com/comment/43522481
score: 0
tagged with: firefox
has comment: http://stackoverflow.com/comment/43523300
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43528727
tagged with: http://stackoverflow.com/tag/html
tagged with: xpath
answer count: 0
linked to: http://stackoverflow.com/q/4531995
has title: Getting attribute using XPath Mozilla Firefox fails recent version
type: Question
has comment: http://stackoverflow.com/comment/43622714

http://stackoverflow.com/comment/43603483
has text: Modern browsers no longer require the leading dot to carry it across domains. This still works, but both the leading dot and without should have the same result.
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/27589755

http://stackoverflow.com/comment/43796101
has text: I might be able to, but if it works for you, could you post your working setup as an answer?
comment on: http://stackoverflow.com/q/27574784
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43549854
type: QuestionComment
score: 1
has text: Both `new Date().getTime()` and `Date.now()` will return exactly the same value: milliseconds since the (UTC) epoch.
comment on: http://stackoverflow.com/q/27561651
type: Comment

http://stackoverflow.com/a/27492928
has body: While you can pass a starting index as Paul suggested, it would seem that a simple regex may just be easier. var re = /IBAN:\s*(\S+)/ The capture group will hold the sequence of non-whitespace characters after the IBAN: var match = re.exec(my_str) if (match) { console.log(match[1]); }
answers question: http://stackoverflow.com/q/27492882
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43417506
type: Answer
accepted answer of: http://stackoverflow.com/q/27492882
upvote count: 1
has comment: http://stackoverflow.com/comment/43417457
score: 1

http://stackoverflow.com/comment/43508717
type: Comment
comment on: http://stackoverflow.com/a/27538780
has text: This worked. Thank you very much! It also led me to finding firebug, which is a excellent tool. The fix was adding one to the sWidth and x under the context.DrawImage call in the function drawBins().
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43395436
comment on: http://stackoverflow.com/q/27481353
score: 9
has text: Your issue is not with `prop`, but having a frankly ridiculous number of items in your `select` list. JS is never going to be quick in that situation. I would strongly suggest reducing that list somehow.
type: Comment
type: QuestionComment

http://stackoverflow.com/tag/xml
tags question: http://stackoverflow.com/q/27604903
tags question: http://stackoverflow.com/q/27529568
tags question: http://stackoverflow.com/q/27543448
tags question: http://stackoverflow.com/q/27638222
tags question: http://stackoverflow.com/q/27630696
tags question: http://stackoverflow.com/q/27558463
type: Tag
tags question: http://stackoverflow.com/q/27616715
tags question: http://stackoverflow.com/q/27533111
tags question: http://stackoverflow.com/q/27632398
tag name: xml
tags question: http://stackoverflow.com/q/27622189
tags question: http://stackoverflow.com/q/27622270
tags question: http://stackoverflow.com/q/27550607
tags question: http://stackoverflow.com/q/27605721
tags question: http://stackoverflow.com/q/27476359
tags question: http://stackoverflow.com/q/27564832
tags question: http://stackoverflow.com/q/27529172
tags question: http://stackoverflow.com/q/27534221
tags question: http://stackoverflow.com/q/27593634
tags question: http://stackoverflow.com/q/27550984
tags question: http://stackoverflow.com/q/27578687
tags question: http://stackoverflow.com/q/27588799
tags question: http://stackoverflow.com/q/27606941

http://stackoverflow.com/q/27603131
tagged with: jquery
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has title: How to execute a script on a child html file that is included in the parent's html?
has comment: http://stackoverflow.com/comment/43638748
score: 2
type: Question
has body: I am prototyping Reactjs into an existing jQuery project. Within the index.html, I am loading a separate html file inside a tab. ... ... Now inside the golden-records.html I have a simple component: However this component doesn't appear. It seems the reason is that the script on this html has not run. How can I make sure this script has run after it's html has loaded? Thanks
has answer: http://stackoverflow.com/a/27608452
tagged with: javascript
tagged with: reactjs
downvote count: 0
answer count: 1

http://stackoverflow.com/comment/43456689
type: AnswerComment
has text: @Ragnar I am not expert in JS so I do not know if `new` is good here. But I tested and it works (very well, thanks!) without it.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27513001

http://stackoverflow.com/q/27584710
tagged with: object
has answer: http://stackoverflow.com/a/27584722
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/27584749
accepted answer: http://stackoverflow.com/a/27584749
tagged with: constructor
possible better answer: http://stackoverflow.com/a/27584722
has title: Is it not possible for a function to return a constructor and create a new instance?
type: AnsweredQuestion
has body: I have the following JavaScript code, comprised of a function and two constructors: function get_type(type){ switch(type){ default: case "a": return apple; break; case "b": return banana; break; } } function apple(color){ this.color = color; this.age = 0; } function banana(length,unit){ this.length = length; this.unit = unit||"cm"; this.age = 0; } When I try to create a variable macintosh with the value of new get_type("a")("red"), its value is undefined, even thought get_type("a") successfully returns the apple constructor. Is there a problem with my code, or is it not possible to have function that returns a constructor? EDIT: Construction of variable macintosh. var macintosh = new get_type("a")("red")
type: Question

http://stackoverflow.com/a/27627565
upvote count: 1
has comment: http://stackoverflow.com/comment/43675941
has body: If the JavaScript is in your PHP file, you can simply echo the PHP variable. For example, if your PHP array was $array: 'title' : "&lt;?php echo $array['title']; ?&gt;",
score: 1
answers question: http://stackoverflow.com/q/27627520
has comment: http://stackoverflow.com/comment/43675903
downvote count: 0
has comment: http://stackoverflow.com/comment/43676515
type: Answer
has comment: http://stackoverflow.com/comment/43676409
has comment: http://stackoverflow.com/comment/43676495
has comment: http://stackoverflow.com/comment/43676396

http://stackoverflow.com/comment/45768984
type: AnswerComment
has text: I guess I should have been more descriptive. TogetherJS's feature of seeing other peoples' cursor.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28711385

http://stackoverflow.com/q/27561402
type: Question
linked to: http://stackoverflow.com/q/3160277
score: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/43548896
tagged with: jquery
has comment: http://stackoverflow.com/comment/43548792
has title: Sort rows in css table
tagged with: css
answer count: 0
type: UnansweredQuestion
has body: I have a css table and need to be able to sort the rows by clicking on headers. All the plugins I've found so far require an actual table. Are there any jquery plugins that will allow to sort any html? My data is structured like this: One Two Three .data { display: table;} .data > a {display: table-row} .data > a > div {display: table-cell}

http://stackoverflow.com/q/27633195
type: UnansweredQuestion
tagged with: url-routing
answer count: 4
has comment: http://stackoverflow.com/comment/43686759
downvote count: 0
has comment: http://stackoverflow.com/comment/43686271
has answer: http://stackoverflow.com/a/47785054
upvote count: 8
type: Question
has comment: http://stackoverflow.com/comment/43686865
tagged with: url-encoding
has title: AngularJS route parameters with any characters
tagged with: javascript
has comment: http://stackoverflow.com/comment/43686642
has comment: http://stackoverflow.com/comment/43700020
has comment: http://stackoverflow.com/comment/43686523
has comment: http://stackoverflow.com/comment/43686551
has answer: http://stackoverflow.com/a/27634134
has answer: http://stackoverflow.com/a/27633624
favorite count: 0
has answer: http://stackoverflow.com/a/53634153
score: 8
has body: I am new to AngularJS, so forgive me if this is obvious, but I am looking for someone who can answer this tricky question. I am implementing an application, and need to pass some parameters to a particular view to display details about a book. Basically I would like to be able to use the following routing expressions: bookApp.config(['$routeProvider', function($routeProvider) { $routeProvider. when('/catalog', { templateUrl: 'cataloglist.htm', controller: 'catCtrl' }). when('/book/:title/:chapter', { template: 'chapterdetail.htm', controller: 'chapterCtrl' }). otherwise({ template: 'oops ... do not understand that route', }); }]); The expression /book/:title/:chapter should allow me to pass in the name of the title of a book. I am expecting to be able to pass ANY title of any book in there. To make sure that things are properly delimited, I am going to URL encode the title value, so that in the encoded value there will be no slashes and the value will be clearly delimited by the slash characters. This is the normal way to construct URLs that contain values. The problem is that there exist book titles that contain the slash character (e.g. The 3/5 solution) This is URL encoded as The+3%2F5+Solution. So can construct a URL like this: /app/#/book/The+3%2F5+Solution/The%20Beginning However, my experience seems to show that the entire value is URL decoded BEFORE it is broken into parameters! This means that any data value with a slash in it, will be misinterpreted as two values, and the pattern matching of the route parameters is broken, and only the first half of the value is passed in. Furthermore, the chapter might have a slash in the name as well. If I was making a REST service, I would URL encode the value, and the URL will be parsed into pieces BEFORE each piece is decoded. For example, I can use query parameters in a URL like this: app.jsp?title=The+3%2F5+Solution&amp;chapter=The%20Beginning and this will work correctly. Using URL encoding, I can pass ANY string v…
tagged with: angularjs
has comment: http://stackoverflow.com/comment/43686619

http://stackoverflow.com/a/27626968
answers question: http://stackoverflow.com/q/27626634
has body: You don't have to use Raphaël for this, you can just use vanilla JS (or jQuery if you load that library too). el.mouseover(function () { document.getElementById('myHoverContents').style.display = 'block'; //show the div this.toFront(); this.attr({ cursor: 'pointer', fill: 'black', stroke: '#fff', 'stroke-width': '2', }); this.animate({ scale: '1.2' }, 200); }); el.mouseout(function () { document.getElementById('myHoverContents').style.display = 'none'; //hide the div this.animate({ scale: '1.05' }, 200); this.attr({ fill: '#003366' }); }); http://jsfiddle.net/b3vLx8uh/3/
type: Answer
has comment: http://stackoverflow.com/comment/43696893
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27626634

http://stackoverflow.com/a/27621710
accepted answer of: http://stackoverflow.com/q/27621515
type: Answer
has comment: http://stackoverflow.com/comment/43664142
has body: You can't access element from data source function. this points to Dataset object, and there is no reference to input element. However you can initialize typeahead in each loop, so you can access current input element: $('.typeahead').each(function() { $(this).typeahead({ hint: true, highlight: true, minLength: 1 }, { name: 'items', displayKey: 'value', source: populateItems(this.id) }) }); function populateItems (id) { return function findMatches(inp, cb) { console.log("id: " + id); // ... }; };
answers question: http://stackoverflow.com/q/27621515
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/43563275
has text: @Ryan: Just out of curiosity, what if a section has too much data (say 2-3 pages). Will user scroll all the way down? and since the width of these sections are not much, small amount of data might cause long scroll. An alternative could be a reading section, like a div fixed to right side of screen that has say 40% width. now user can scroll through this div and header sections remain still. Also you can have this div as resizable div. This might help users in reading big articles.
type: Comment
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/27568336

http://stackoverflow.com/comment/45838603
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28762981
has text: Thank you for the good idea, it could be a valid workaround. I will try to test this approach in the future.
type: AnswerComment

http://stackoverflow.com/comment/43448439
score: 0
has text: is `Schemas` a global variable? do you load it using `require`? maybe you need to show us more code because as the code is written there should be no issues
comment on: http://stackoverflow.com/q/27509125
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27593667
has body: $photos[0].css("z-index"); Should be: $($photos[0]).css("z-index"); You have to convert DOM element back into a jQuery Object to use jQuery function. Alternatively, it may be more efficient to simply filter the element using jQuery so that no conversion is required - $photos.first().css("z-index"); See http://api.jquery.com/first/ for more details on the .first() method
answers question: http://stackoverflow.com/q/27593645
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43611999
type: Answer
has comment: http://stackoverflow.com/comment/43611861
has comment: http://stackoverflow.com/comment/43611892
accepted answer of: http://stackoverflow.com/q/27593645
has comment: http://stackoverflow.com/comment/43611448
score: 6
upvote count: 7
downvote count: 1
has comment: http://stackoverflow.com/comment/43611671

http://stackoverflow.com/comment/43675735
type: QuestionComment
has text: Yes, I see, deleted the comment but you are fast =)
score: 0
comment on: http://stackoverflow.com/q/27627460
type: Comment

http://stackoverflow.com/comment/43459616
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27514255
has text: Sorry I should have been a bit more clear, I cannot modify the markup in any way. @adeneo's solution worked, I was on the right track I just forgot the script had to be included after the markup on the HTML page.

http://stackoverflow.com/comment/43577652
comment on: http://stackoverflow.com/q/27576034
type: Comment
type: QuestionComment
has text: If you have an answer, please post it as such! I've noticed that a lot of users will comment with what I'd consider to be the answer to my question, so I'm going to preemptively request that :)
score: 0

http://stackoverflow.com/q/27580402
has answer: http://stackoverflow.com/a/27580536
upvote count: 1
tagged with: video
type: AnsweredQuestion
has title: Trouble with video.currentTime event binding
score: 1
accepted answer: http://stackoverflow.com/a/27580536
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
has body: I want to fire an event after the video has reached 5 or more seconds, but I'm having some trouble with the code. HTML: &lt;video id="video1" controls&gt; &lt;source src="media/video.m4v" type="video/mp4" /&gt; &lt;source src="media/video.webm" type="video/webm" /&gt; &lt;source src="media/video.ogg" type="video/ogg" /&gt; &lt;p&gt; Your browser does not support the HTML5 video feature. &lt;/p&gt; &lt;/video&gt; Javascript: $(function () { var video = $('#video1'); var time = 5; function init () { alert('Video is not available.'); } $(video).on('timeupdate', function () { if (video.currentTime &gt;= time) { init(); } }); }); This is unfortunately not a valid code, does anybody know where I went wrong...?
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: events

http://stackoverflow.com/a/27593778
score: 0
has body: to embed a video, the correct url is https://www.youtube.com/embed/code example: there's an example http://jsfiddle.net/5wt37ns0/
type: Answer
answers question: http://stackoverflow.com/q/27593485

http://stackoverflow.com/q/27628920
has body: Is there any way to print out the value of the array players like in the example below? I've tried to find a solution for hours now... function Room(name, id, owner) { this.players = []; this.movementz = function() { console.log(this.players); } } I'm calling the function using setInterval, like this: setInterval(room.movementz, 1000);
type: Question
has title: Object method loses its scope when called using setInterval
has comment: http://stackoverflow.com/comment/43679451
tagged with: javascript
has comment: http://stackoverflow.com/comment/43679146
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/43678540
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43679255
score: 6
has answer: http://stackoverflow.com/a/27629475
has comment: http://stackoverflow.com/comment/43678812
upvote count: 6
has comment: http://stackoverflow.com/comment/43679002

http://stackoverflow.com/q/27532566
has answer: http://stackoverflow.com/a/27532708
has comment: http://stackoverflow.com/comment/43493865
has comment: http://stackoverflow.com/comment/43494019
has comment: http://stackoverflow.com/comment/43494205
has comment: http://stackoverflow.com/comment/43494189
has comment: http://stackoverflow.com/comment/43494146
has title: looping through 2 arrays javascript
tagged with: foreach
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43494537
has comment: http://stackoverflow.com/comment/43494118
has comment: http://stackoverflow.com/comment/43493906
type: Question
has body: i need a bit of help to get a function working correctly. let me explain a few parts so you understand the issue before i show you the function so far. please note: all the data is being passed in don't worry about anything like that my question is in regards to looping through the data i have stated below and making it work correctly. When this function hits everything is being passed in already. I have 2 arrays which hold data in them one is called Variants() this always holds 6 Variants which all have a unique ID, and the other is called ProductRequests(). Variants holds ALL my Variants and ProductRequests holds all the chosen variants, this can vary from 1 to 6 so its all down to what they chose, but they have to chose at least one.. no matter what they chose there will always be a match when comparing to Variants() Array IDs. These both hold IDs which match each other and also quantities, what i want to do is loop through variants and product requests find if any of the ids match and then if they do match the quantity from the ProductRequests overwrite the quantity from the Variants of that product ID. I have done the 2nd part below but it kind of needs to be written a lot better. What i did was i wrote a function (without any looping through) which compares the IDs of them but what my issue was sometimes depending on what the user picks in the arrays will not match up on the array numbers as ProductRequests for example ProductRequests may only have 1 item in it but that only matches Variant()[5] of the IDs that are in Variants etc. So this hard coded way just would not work.. (well it could but it would be a horrible messy code.) function Compare(){ var OldVariants = Variants(); var RequestVariants = ProductRequests(); var One = OldVariants[0].Id; var Two = OldVariants[1].Id; var Three = OldVariants[2].Id; var Four = OldVariants[3].Id; var Five = OldVariants[4].Id; var Six = OldVariants[5].Id; if (One == RequestVariants[0].Id) {OldVariants[0].Quantity(RequestV…
tagged with: for-loop
accepted answer: http://stackoverflow.com/a/27532708
has comment: http://stackoverflow.com/comment/43493673
answer count: 1
tagged with: arrays
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/comment/43657256
score: 0
has text: If I understand correctly, you're trying to do a client-side search but using server-side data. I wouldn't have thought this was possible but seeing as you managed to do it with the input boxes, I might be wrong!
comment on: http://stackoverflow.com/q/27611258
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27532677
type: Answer
has body: What you have does 0,3,6, just adjust the remainder. 2 % 3 and 5 % 3 return 2 if ( index % 3 === 2 )
upvote count: 5
accepted answer of: http://stackoverflow.com/q/27532602
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27532602
score: 5

http://stackoverflow.com/q/27606405
downvote count: 0
tagged with: javascript
has body: I have some incremental id in elements. {{firmante.dni}} As you can imagen I can access from controller to actual0, noActual0, actual1, noActual1, actual2, no actual2... And so on, but the problem is that I don't know how much elements will be, and I cannot concat/compose the complete variable $scope.actual + 0 = $scope.actual0, which is the one I need. PD: I have tried $scope.actual.concat(index)=true; but without success Any help will be wellcome!
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
tagged with: angularjs
answer count: 0
upvote count: 2
type: UnansweredQuestion
has title: Concat $scope.variable + idNumber ?? (from controller)
has comment: http://stackoverflow.com/comment/43635121
score: 2
has comment: http://stackoverflow.com/comment/43635816
type: Question
has comment: http://stackoverflow.com/comment/43635382

http://stackoverflow.com/a/27598903
answers question: http://stackoverflow.com/q/27598827
score: 0
has body: You can't do this from JavaScript, this is the job for your web server, in this case Tomcat. This question is about what you want to achieve. Make a servlet for your static content, and set the headers there. Or as mentioned in the other answer, the more complex (but more performant) solution would be setting up another server like Apache2 or nginx for the static resources, and set it up as a reverse proxy for your servlets. However I would not recommend this for simple projects, it is a fair amount of work. This question also worth a look: Tomcat Cache Control
type: Answer

http://stackoverflow.com/q/27476566
tagged with: javascript
tagged with: jquery
answer count: 3
has comment: http://stackoverflow.com/comment/43387372
tagged with: http://stackoverflow.com/tag/html
has title: How to make editable on click?
has answer: http://stackoverflow.com/a/27476605
has comment: http://stackoverflow.com/comment/43387626
favorite count: 0
has comment: http://stackoverflow.com/comment/43387500
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/64014954
upvote count: 7
tagged with: css
score: 7
type: Question
has answer: http://stackoverflow.com/a/27476721
has body: I have a menu that looks like this: I want to make it possible that when the user clicks on + the &lt;li&gt; element that it's located inside becomes like an editable input form, where a new menu item name can be created and saved (by entering the name and clicking Enter). The code of the current item is &lt;li id="addNewContext" class="menu-item-divided"&gt;&lt;a href="javascript:"&gt;+&lt;/a&gt;&lt;/li&gt; Is there a snippet of code I could use to make that field editable that could save the name entered into an array, which I can then use to repopulate the menu? Thanks!
downvote count: 0

http://stackoverflow.com/comment/43534282
has text: How do I set the values of type and name in that file object?
comment on: http://stackoverflow.com/q/27553617
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/q/27596652
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27596977
accepted answer: http://stackoverflow.com/a/27596977
score: 12
type: Question
answer count: 2
tagged with: canvas
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/49557454
favorite count: 0
upvote count: 12
has answer: http://stackoverflow.com/a/49557454
tagged with: http://stackoverflow.com/tag/svg
has body: What I want to do is load an svg, change its fill color to a random value and then draw it on the canvas. This has proved to be much more difficult than I would have thought. Here's the code I have at the moment. var canvas = document.getElementById("canvas"); var context = canvas.getContext("2d"); //images var bottomLeftTop = new Image(); var bottomRightTop = new Image(); var fullTop= new Image(); var leftMidSide = new Image(); var leftSide = new Image(); var rightMidSide = new Image(); var rightSide = new Image(); var topLeftTop = new Image(); var topRightTop = new Image(); bottomLeftTop.src = "img/bottomLeftTop.svg"; bottomRightTop.src = "img/bottomRightTop.svg"; fullTop.src = "img/fullTop.svg"; leftMidSide.src = "img/leftMidSide.svg"; leftSide.src = "img/leftSide.svg"; rightMidSide.src = "img/rightMidSide.svg"; rightSide.src = "img/rightSide.svg"; topLeftTop.src = "img/topLeftTop.svg"; topRightTop.src = "img/topRightTop.svg"; //draw context.drawImage(fullTop,50,50); I'm currently loading my svg's as Image objects, which works fine for just drawing but won't allow me to change the fill color. I did try converting my svg to canvas commands, which allows me to change the fill but requires a lot of work to get scaled and positioned properly, and just isn't feasible with the amount of images I'm working with. Is there any other way I can do this while still working with the canvas?
has title: Change svg fill color and then draw to canvas
downvote count: 0

http://stackoverflow.com/comment/43413224
type: Comment
has text: @BenjaminGruenbaum: With using ` `, you can even have *links* in code :-)
comment on: http://stackoverflow.com/a/27486419
score: 0
type: AnswerComment

http://stackoverflow.com/q/27504223
type: Question
tagged with: javascript
has title: Prototype: Difference between these two scripts
answer count: 2
upvote count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/27504507
has body: Consider these two version of constructing object hierarchies in JavaScript: Version 1 function Employee() { this.name = "NoName"; this.dept = "NoDept"; }; function Manager() { Employee.call(this); this.reports = "Nobody"; } //Manager.prototype = Object.create(Employee.prototype); var m = new Manager(); console.log(m.name); Version 2 function Employee() { this.name = "NoName"; this.dept = "NoDept"; }; function Manager() { //Employee.call(this); this.reports = "Nobody"; } Manager.prototype = Object.create(Employee.prototype); var m = new Manager(); console.log(m.name); In the first version, the name property is accessible even though we don't use prototype inheritance (of course because of the call() method). In the second version, we comment out the call() and define the prototype chain, and yet the name property is inaccessible. This leaves me wondering, then, why bother with Manager.prototype?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27504507
downvote count: 0
possible better answer: http://stackoverflow.com/a/27504682
score: 1
has answer: http://stackoverflow.com/a/27504682

http://stackoverflow.com/comment/43543314
type: QuestionComment
comment on: http://stackoverflow.com/q/27558464
type: Comment
score: 0
has text: @EricBlade yeah I saw that too and that is actually how I found out about `contetnWindow` and `contentDocument`

http://stackoverflow.com/q/27551345
answer count: 1
linked to: http://stackoverflow.com/q/27550488
has body: Update I have integrated the Type into Member Registration using some hints in Igor's Answer and searching stackoverflow. It doesn't work as intended as except for the first members type select other members type select elements are not triggering the registrationTypeChange function. Hence the first member's type works fine where as others aren't being displayed as intended. Note : The first member's select works as intended in Chrome and IE but doesn't work in Firefox Screenshots As you can see when the second member's type is changed to "period" the related elements are not being displayed and it should be similar to the first member as both are of type "period". I have checked the regular expression I have used to find the number in id it works fine (Fiddle). I guess the error might be with the function registrationTypeChange. Can someone help me in fixing the code to work as intended in all browsers? Fiddle HTML Members Registration ×Close Minimum one member is required. Name Type 1st Parameter 2nd Parameter Member Yearly Period JavaScript function registrationTypeChange(memberNum) { var theValue = $('#registrationMember' + memberNum + 'Type').find("option:selected").text(); if (theValue === "Yearly") { $('#registrationMember' + memberNum + 'Param1Help').attr("title", "Please provide the year of membership"); $('#registrationMember' + memberNum + 'Param1').attr("placeholder", "Year"); $('#registrationMember' + memberNum + 'Param2').hide(); $('#registrationMember' + memberNum + 'Param2Help').hide(); } else if (theValue === "Period") { $('#registrationMember' + memberNum + 'Param1Help').attr("title", "Please provide the starting year of membership"); $('#registrationMember' + memberNum + 'Param1').attr("placeholder", "From"); $('#registrationMember' + memberNum + 'Param2Help').attr("title", "Please provide the ending year of membership"); $('#registrationMember' + memberNum + 'Param2').attr("placeholder", "To"); $('#registrationMember' + memberNum + 'Param2').show…
favorite count: 0
has comment: http://stackoverflow.com/comment/43529432
tagged with: http://stackoverflow.com/tag/html
tagged with: regex
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/16744594
has comment: http://stackoverflow.com/comment/43529350
type: Question
linked to: http://stackoverflow.com/q/15090942
has answer: http://stackoverflow.com/a/27551937
accepted answer: http://stackoverflow.com/a/27551937
tagged with: javascript
tagged with: jquery
upvote count: 2
score: 0
downvote count: 2
has title: Toggle DOM elements using jQuery

http://stackoverflow.com/comment/43437125
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27501572
has text: But what he wants , why don't you look that ? @BenM

http://stackoverflow.com/comment/43508707
comment on: http://stackoverflow.com/a/27540503
type: AnswerComment
score: 0
type: Comment
has text: It's either in the script on in the html...no difference really. Explanation also will help Icereaper666 on solving anything else with it.

http://stackoverflow.com/a/27500527
has comment: http://stackoverflow.com/comment/43432082
has comment: http://stackoverflow.com/comment/43432176
answers question: http://stackoverflow.com/q/27500481
has comment: http://stackoverflow.com/comment/43432139
score: 3
has comment: http://stackoverflow.com/comment/43431790
downvote count: 0
has comment: http://stackoverflow.com/comment/43432138
type: Answer
upvote count: 3
has comment: http://stackoverflow.com/comment/43431491
has comment: http://stackoverflow.com/comment/43432205
has body: Use on() instead of live() since live() is long deprecated $("#inputID").parent().on('click',function(){ Also, it's not a good idea to use &lt;td onclick="var ele = document.getElementById('inputID'); ele.click();" Instead create on click event in JS like shown above. (and add class or id to your td element so you can attacht click event to it ofcourse). If you must call onclick from HTML, then perhaps try onclick="javascript:var ele = document.getElementById('inputID'); ele.click();" That sometimes helps if you are not sure the code is being executed. Also try to alert() something to make sure the code actually executes. Also you have a syntax error in your code. (onlcick instead of onclick) &lt;input id="inputID" onlcick="event.stopPropagation();"

http://stackoverflow.com/a/27499196
has comment: http://stackoverflow.com/comment/43429286
answers question: http://stackoverflow.com/q/27498784
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/43429477
has body: How long is that list going to be? Is it static or will it change over time? If its static just sort it once by importance and be done with it. If it is not static but not too long you could just sort it every time you need it and if it is not static but quite long you would have to keep it sorted the whole time (insert into sorted array). Here some pseudocode: var selectAThing = [ {level:1, 5:"abc", 29:"efg"}, {level:2, 28:"HIJ", 11:"xyz"}, ... ]; // sort on level (ascending) selectAThing.sort(function(a,b) { return a.level - b.level; }); If you want to do it with a dictionary ({}), they you would have to do it like this: var selectAThing = { 1: [{"5" : "abc"}, {"29" : "efg"}], 2: [...] };

http://stackoverflow.com/q/27560743
accepted answer: http://stackoverflow.com/a/28164055
has comment: http://stackoverflow.com/comment/44697006
has comment: http://stackoverflow.com/comment/44717869
type: Question
possible better answer: http://stackoverflow.com/a/28060349
linked to: http://stackoverflow.com/q/8548533
has title: Detecting browser autofill before selection
tagged with: autocomplete
upvote count: 5
tagged with: javascript
has comment: http://stackoverflow.com/comment/43547680
answer count: 2
has body: Is there anyway I can detect the autofill BEFORE the user selects an option from the dropdown? Expected: 400010 as seen. Currently I have: $('input').on('input paste change keyup', function(event) { if(event.type=='input'){ console.log( $(this).val() ); } }); .. and it works AFTER the user has made a selection, but not before as seen in the above screenshot.
score: 5
has comment: http://stackoverflow.com/comment/44620632
has answer: http://stackoverflow.com/a/28164055
tagged with: autofill
downvote count: 0
linked to: http://stackoverflow.com/q/11708092
tagged with: jquery
has comment: http://stackoverflow.com/comment/43547507
has comment: http://stackoverflow.com/comment/43547523
favorite count: 0
has comment: http://stackoverflow.com/comment/43547546
tagged with: events
has comment: http://stackoverflow.com/comment/44502459
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28060349

authorize.net
tags question: http://stackoverflow.com/q/27498433
type: Tag
tag name: authorize.net

http://stackoverflow.com/q/27482695
favorite count: 0
has answer: http://stackoverflow.com/a/47429091
tagged with: twitter-bootstrap
type: AnsweredQuestion
downvote count: 0
score: 7
has answer: http://stackoverflow.com/a/27745464
accepted answer: http://stackoverflow.com/a/27745464
type: Question
answer count: 2
has body: After i include the bootstrap.js &lt;script type="text/javascript" src="/js/bootstrap/js/bootstrap.js"&gt;&lt;/script&gt; I get followning error in the console: Uncaught TypeError: Cannot read property 'documentElement' of null The boots collapse works just fine but the console get spammed this error. I have included jquery before bootstrap. Anyone else had this problem before? Edit: Tooltip.prototype.show = function () { var e = $.Event('show.bs.' + this.type) if (this.hasContent() &amp;&amp; this.enabled) { this.$element.trigger(e) var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]) if (e.isDefaultPrevented() || !inDom) return var that = this this is a snipet from the bootstrap.js script. It seems the error comes always in the tooltip function in the var inDom line at the documentElement part
tagged with: javascript
tagged with: jquery
has title: Uncaught TypeError: Cannot read property 'documentElement' of null
has comment: http://stackoverflow.com/comment/43397940
has comment: http://stackoverflow.com/comment/43397894
upvote count: 7
possible better answer: http://stackoverflow.com/a/47429091

http://stackoverflow.com/comment/43604476
type: Comment
score: 1
type: QuestionComment
has text: https://jwatt.org/svg/demos/scripting-across-object.html
comment on: http://stackoverflow.com/q/27572161

http://stackoverflow.com/comment/43693839
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27637476
has text: You should apply a class to `body` element, indicating that the page is being shown in a `iframe`. Then apply custom CSS rules for cases when the page is in an iframe. That is the best way.
score: 0

http://stackoverflow.com/a/27477437
type: Answer
upvote count: 6
answers question: http://stackoverflow.com/q/27477406
downvote count: 0
type: AcceptedAnswer
has body: You cannot declare a property of an object with var statement, because var statement expects the variable names not to contain invalid characters. And . is definitely an invalid character for an identifier name. So, you cannot declare a new variable called reason.reasons or reason.scholarships. You should declare reason like this var reason = { reasons: [], scholarships = [] };
accepted answer of: http://stackoverflow.com/q/27477406
score: 6

http://stackoverflow.com/comment/43507931
comment on: http://stackoverflow.com/a/27534957
type: AnswerComment
has text: In first solution, you are adding empty model rather than adding a new model with default values.
type: Comment
score: 0

http://stackoverflow.com/comment/43530154
type: QuestionComment
comment on: http://stackoverflow.com/q/27551701
score: 0
has text: You're going to need to show us how you're handling your Login page, because it would appear to be that you're using Angular for it. There's a good chance that your Login page doesn't do what you think it does.
type: Comment

http://stackoverflow.com/a/27611164
type: Answer
answers question: http://stackoverflow.com/q/27609264
has comment: http://stackoverflow.com/comment/43921896
score: 0
has body: A couple of things you could do to improve your code. You probably don't have to make two separate requests, pass the username and email direct to your php code, and you'll save on HTTP requests going out. onsubmit="return RegFormValidation();" should be changed in jQuery to a bind call. Give the form an ID and do something like this &lt;form id="registerForm"&gt;.... $("form#registerForm").on('submit', function(e){ }); You've got var username = $('#username').val(); then if($('#username').val().length &gt; min_chars || characterReg.test($('#username').val())) { You could probably clean that up a bit and reuse the variable, rather than continued calls to the jQuery functions. Patrick's answer above is a good start to some tidy ups and I reckon addresses the overall problem you are experiencing.

http://stackoverflow.com/comment/43640119
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27608922
has text: If this is only for your own testing: Call an HTTPS URL that uses that certificate directly, and add an exception in your browser. If you want it to work everywhere in user’s browsers on the web – then you need to get a certificate that is signed by a trusted CA.
score: 0

http://stackoverflow.com/comment/43552803
type: Comment
comment on: http://stackoverflow.com/a/27563484
has text: There is no problem in the way you do that for me. You can replace the auto executed anonymous function I used by a function set in a variable: `var getProfile = function(i) { /*...*/ }` and then call this function like that `getProfile(i)` if you prefer.
type: AnswerComment
score: 1

http://stackoverflow.com/a/27489279
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/27488832
upvote count: 2
has body: you dont need JSON.stringify. just write it like this: var data = new FormData(); var img = $('#image_field_id')[0].files[0]; data.append('img', img); $.ajax({ url : "/prive/nouveau-projet", processData : false, contentType : false, type : 'POST', data : data, }).done(function(data) { // work with data }); and in views if request.method == "POST": file = request.FILES.get('img') # FILES instead of POST ....

http://stackoverflow.com/comment/74953572
comment on: http://stackoverflow.com/a/27558944
type: AnswerComment
has text: is the curly brace mismatch deliberate? `onClick={alert)`
score: 0
type: Comment

http://stackoverflow.com/comment/43669560
score: 0
type: Comment
has text: Check out my pen, with the $(document).ready(...) commented out, it still works: http://codepen.io/KK4OXJ/pen/Eagjax/
comment on: http://stackoverflow.com/a/27613892
type: AnswerComment

http://stackoverflow.com/q/27607510
has comment: http://stackoverflow.com/comment/43638467
has comment: http://stackoverflow.com/comment/43637914
has answer: http://stackoverflow.com/a/27607653
has title: Calling a java script class method by class name dot prototype dot method name
score: 0
has comment: http://stackoverflow.com/comment/43637302
tagged with: javascript
has comment: http://stackoverflow.com/comment/43637506
favorite count: 0
answer count: 3
has comment: http://stackoverflow.com/comment/43637254
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43638983
has comment: http://stackoverflow.com/comment/43637149
has comment: http://stackoverflow.com/comment/43637801
has comment: http://stackoverflow.com/comment/43637617
has answer: http://stackoverflow.com/a/27607941
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/43637466
type: Question
has comment: http://stackoverflow.com/comment/43638757
has body: I need to understand the following code. Can someone please explain it. var MyClass = function(){ this.publicMethod = function(){ console.log("I am a public method"); } MyClass.prototype.foo = function(){ //Need to know how it is working. console.log('I am in foo'); } } var myClassObject = new MyClass(); MyClass.prototype.foo(); // If I don't include the above line it throws an exception. I need to know how last two statements are working?
has answer: http://stackoverflow.com/a/27607546

http://stackoverflow.com/comment/43539381
has text: @Chilipote thanx for your help:) didnt know you can do it this way too:) i have learned now:D
comment on: http://stackoverflow.com/a/27556360
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/27578053
answers question: http://stackoverflow.com/q/27574769
has comment: http://stackoverflow.com/comment/43609613
type: Answer
score: 8
downvote count: 0
has body: I don't know what your getTabs function does. Yet if you know how to find the tab id of the tab you want all you need to do is chrome.tabs.remove(tabId, optionalCallback);
upvote count: 8
has comment: http://stackoverflow.com/comment/43606648

http://stackoverflow.com/a/27580919
type: Answer
score: 3
has comment: http://stackoverflow.com/comment/43592224
downvote count: 0
answers question: http://stackoverflow.com/q/27580890
has body: To quote this answer: Some JavaScript implementations allow direct access to the Prototype property, eg via a non-standard property named __proto__. In general, it's only possible to set an object's prototype during object creation: If you create a new object via new Func(), the object's Prototype property will be set to the object referenced by Func.prototype. The reason you can't assign to its prototype using .prototype is because the Math object has already been created. Fortunately for us, we can assign new properties to the Math object by simply using: Math.myFunc = function() { return true }; In your case, this would be: Math.randomBetween = function(...) { ... };
upvote count: 3

http://stackoverflow.com/comment/43618800
comment on: http://stackoverflow.com/q/27597552
type: Comment
type: QuestionComment
score: 0
has text: Actually i dont have button, i am opening my example.com site inside iframe , if userAgent is IE then on click on the iframe any where i want to open my site into another tab. and if its not IE then user could continue with site inside iframe. I am not able to detect click event of user on iframe

http://stackoverflow.com/q/27615333
has body: How can I index to nth child of a specific jquery object.Like that... var $parent = $('#slect'); var $index = 4; var $active = $parent.children().nth-child($index); I tried this but doesn't work. How can I index from Jquery Object with dynamic variable.
type: Question
has title: Jquery variable of nth-child
accepted answer: http://stackoverflow.com/a/27615355
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/27615355
possible better answer: http://stackoverflow.com/a/27615357
has answer: http://stackoverflow.com/a/27615540
has answer: http://stackoverflow.com/a/27615357
type: AnsweredQuestion

http://stackoverflow.com/comment/43637617
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27607510
has text: If you want a class method, then define it as `MyClass.foo = ...`. If you want an instance method, define `MyClass.prototype.foo` **outside** the constructor. But it makes no sense then to call it as `MyClass.prototype.foo()`, since it will have no `this` pointing to the instance.
type: Comment

http://stackoverflow.com/a/27500503
answers question: http://stackoverflow.com/q/27500414
has comment: http://stackoverflow.com/comment/43431876
type: Answer
has comment: http://stackoverflow.com/comment/43585553
has comment: http://stackoverflow.com/comment/43432740
has body: Do you mean something like this? http://jsfiddle.net/mLbkcwmf/
score: 0

express
tags question: http://stackoverflow.com/q/27539454
tags question: http://stackoverflow.com/q/27505363
tags question: http://stackoverflow.com/q/27505268
tags question: http://stackoverflow.com/q/27585779
tags question: http://stackoverflow.com/q/27491572
tags question: http://stackoverflow.com/q/27474839
tags question: http://stackoverflow.com/q/27566527
tags question: http://stackoverflow.com/q/27575521
tags question: http://stackoverflow.com/q/27587256
tags question: http://stackoverflow.com/q/27517264
tags question: http://stackoverflow.com/q/27584422
tags question: http://stackoverflow.com/q/27552609
tags question: http://stackoverflow.com/q/27496500
tags question: http://stackoverflow.com/q/27529812
tags question: http://stackoverflow.com/q/27622845
tags question: http://stackoverflow.com/q/27551089
tags question: http://stackoverflow.com/q/27527797
tags question: http://stackoverflow.com/q/27496355
tags question: http://stackoverflow.com/q/27606750
tags question: http://stackoverflow.com/q/27604384
tags question: http://stackoverflow.com/q/27608427
tags question: http://stackoverflow.com/q/27528089
tags question: http://stackoverflow.com/q/27601289
tags question: http://stackoverflow.com/q/27578484
tags question: http://stackoverflow.com/q/27492101
tags question: http://stackoverflow.com/q/27476835
tags question: http://stackoverflow.com/q/27580731
tags question: http://stackoverflow.com/q/27542507
tags question: http://stackoverflow.com/q/27483338
tags question: http://stackoverflow.com/q/27486433
tags question: http://stackoverflow.com/q/27609144
tags question: http://stackoverflow.com/q/27538630
tags question: http://stackoverflow.com/q/27553049
tag name: express
tags question: http://stackoverflow.com/q/27513504
tags question: http://stackoverflow.com/q/27475255
type: Tag
tags question: http://stackoverflow.com/q/27533516
tags question: http://stackoverflow.com/q/27636463
tags question: http://stackoverflow.com/q/27485735
tags question: http://stackoverflow.com/q/27599614
tags question: http://stackoverflow.com/q/27552584
tags question: http://stackoverflow.com/q/27616557
tags question: http://stackoverflow.com/q/27592657
tags question: http://stackoverflow.com/q/27555442
tags question: http://stackoverflow.com/q/27501217
tags question: http://stackoverflow.com/q/27512846
tags question: http://stackoverflow.com/q/27513248
tags question: http://stackoverflow.com/q/27589851

http://stackoverflow.com/comment/43439073
comment on: http://stackoverflow.com/q/27504532
has text: add " console.log('inside loaderStop') " as 1st line inside your 2nd funciton. and check console (press F12 and search console) whether the line is present in the console. Other wise, temporarily put alert('inside loaderStop') and see whether u get an alert
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/60165378
comment on: http://stackoverflow.com/a/35177460
has text: I prefer this method over the copy-webpack-plugin module. Additionally, I was able to get it working without using "&context=./app/static" in my webpack config. I only needed the require.context line.
type: AnswerComment
score: 4
type: Comment

http://stackoverflow.com/comment/43467547
type: Comment
has text: `Date.UTC(2014,12,13,13,23)` returns `1421155380000`; so you MIGHT be able to use `[1421155380000, 0]` ...
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27518708

http://stackoverflow.com/comment/43618008
type: QuestionComment
has text: @Sean I had taken the code from this link http://jsfiddle.net/Fresh/UkB7u/
score: 0
comment on: http://stackoverflow.com/q/27597037
type: Comment

http://stackoverflow.com/comment/43652363
comment on: http://stackoverflow.com/q/27613314
has text: (1) Oversized canvases use more resources than viewport sized canvases--keep your canvas size as close to viewport size as possible. Redrawing is more expensive than panning an oversized canvas using a viewport (2) Not much difference in rendering simple vs complex content if drawing commands are not involved. (3) 10K by 10K times several canvases(!!!). Stop immediately and refactor your code to use sane sized canvases.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27484366
has answer: http://stackoverflow.com/a/27484446
favorite count: 0
has comment: http://stackoverflow.com/comment/43400849
type: UnansweredQuestion
score: -4
duplicate of: http://stackoverflow.com/q/2113940
tagged with: php
has body: I have an if statement that will compare the input date with the system date. $Date &gt; date('m/d/Y') The problem is that when I input 12/16/2012 it will throw an error that the date is greater than the date today. I don’t know what the problem in my if statement is. I have a try and catch inside that function that will catch any InputException.
has answer: http://stackoverflow.com/a/27484504
type: Question
downvote count: 4
upvote count: 0
tagged with: javascript
tagged with: jquery
has title: Why is my date comparison function throwing errors?
has answer: http://stackoverflow.com/a/27484423
answer count: 3
has comment: http://stackoverflow.com/comment/43400779
has comment: http://stackoverflow.com/comment/43400846
linked to: http://stackoverflow.com/q/2113940

http://stackoverflow.com/comment/43656644
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27611870
has text: Thank you for your answer but can you please answer me this too, why does makaroni exist, but fruits.apple dont? Now I know what I need to do that it will work and why this.change does not work but I still dot get the difference between makaroni and apple

http://stackoverflow.com/q/27560663
type: Question
accepted answer: http://stackoverflow.com/a/27573786
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I have a directive to serve as a credit card form. This form can have many different submit buttons. During the purchase, which is async, I need to make sure that the buttons are disabled. So I'm using a simple observer pattern to accomplish this. The issue I'm having is that when the user clicks a button, the observer pattern is working fine the isolated scope attribute controlling the ng-disable is being set correctly, however the disabled isn't being applied to the buttons. I'm thinking it might be a priority thing? So heres an observer. The subject is rather mundane. Just validates a form, and has a list of it's observers. Here's where I'm having issues. .directive('submitCardButton', ['$q', function ($q) { return { restrict: 'E', require: '^createCard', scope: { successBack: '&amp;', buttonVal: '@' }, template: "&lt;button class='button button-pink full-width small-top' ng-class=\"{disabled: submitting}\" ng-click='getCC()' ng-disabled=\"submitting\"&gt;{+ submitting +} {+ buttonVal +}&lt;/button&gt;", link: function (scope, elem, attr, card) { card.registerButton(scope); scope.submitting = false; function getCC () { card.disableButtons(); card.getCC().then(function (response) { $q.when(scope.successBack({response:response})) .finally(card.enableButtons); }, function () { card.enableButtons(); }); } scope.disable = function () { scope.submitting = true; console.log(scope.submitting); }; scope.enable = function () { scope.submitting = false; console.log(scope.submitting); }; scope.getCC = getCC; } // end link };// end return }])// end directive When I debug, inside the getCC, after I call the disableButtons the submitting is set to true. Howerver the submitting inside the template is still false and therefore not disabled. Any help would be soooo much appreciated. I created a plunkr that demonstrates the issue I'm having. I'm using a simple user first name last name to show the issue. It works fine if you submit properly. However, if you just submit with out put…
has title: button inside directive not being disabled
has comment: http://stackoverflow.com/comment/43548001
tagged with: angularjs
has comment: http://stackoverflow.com/comment/43572277
upvote count: 1
has answer: http://stackoverflow.com/a/27573786
type: AnsweredQuestion
score: 1
tagged with: observers

http://stackoverflow.com/comment/43482087
type: Comment
type: QuestionComment
has text: it could be same but different data type. If you think the are actually same try this. `document.getElementById("map-txt").value[0]` which will give you the fist character than the first array element. Am posting it as answer with more explanation.
score: 0
comment on: http://stackoverflow.com/q/27526588

http://stackoverflow.com/comment/43650953
has text: suggest you create a demo in [plunker](http://plnkr.co/edit/?p=catalogue) that replicates issue
comment on: http://stackoverflow.com/q/27614312
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/43505971
comment on: http://stackoverflow.com/a/27538964
type: AnswerComment
score: 0
type: Comment
has text: `window.location` works in all major browsers, it's a standard.

http://stackoverflow.com/comment/43651945
has text: @dwana- The issue is that when I try to invoke the drawScreen() function, the following error occurs "Uncaught TypeError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': No function was found that matched the signature provided." I don't get why the signature would be false.
type: QuestionComment
comment on: http://stackoverflow.com/q/27597366
score: 0
type: Comment

http://stackoverflow.com/a/27479287
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27478734
has body: Further to my comment, what I mean by splitting up the sendMail.php (you will, of course, have to modify your main page javascript to accommodate a confirm response from your sendMail.php): if(isset($_POST['data']) && is_array($_POST['data']) ) { foreach($_POST['data'] as $data) { } $datatList = implode(', ', $_POST['data']); } else $datatList = $_POST['data']; if(!isset($_POST['confirm'])) { $name = strip_tags($_POST['name']); $email = strip_tags($_POST['mail']); $age = preg_replace('/[^0-9]/','',$_POST['age']); $data = strip_tags($datatList); $response = ' Preview NAME: '.$name.' EMAIL: '.$email.' AGE: '.$age.' DATA: '.$data.' '; echo json_encode(array("confirm"=>true, "message"=> $response)); } else { $send_for_address = "test@email.com"; $header = "From: test@email.com"; $messages = "Name: $_POST[name]\n"; $messages .= "Email: $_POST[mail]\n"; $messages .= "Age : $_POST[age]\n"; $messages .= "Work $datatList\n"; mail($send_for_address, $messages,$header); mb_internal_encoding("UTF-8"); if (mail($send_for_address, $messages,$header)) { $response = << true, "message"=> $response)); } }
type: Answer
answers question: http://stackoverflow.com/q/27478734
has comment: http://stackoverflow.com/comment/43392857
has comment: http://stackoverflow.com/comment/43406645
score: 0

http://stackoverflow.com/a/27512933
type: Answer
has body: Another solution using the page objects you may have: int numberOfLinks = page.getUserLink().size(); NextPage nextPage; for (int i = 0; i &lt; numberOfLinks - 1; i++) { page.getUserLink().get(i).click(); nextPage = new NextPage(); if (nextPage.isInformationFound()) { break; } driver.navigate().back(); page = new Page(); } Make the correspondent adjustments and give it a try ;) Regards.
score: 0
answers question: http://stackoverflow.com/q/27510191

http://stackoverflow.com/q/27640106
type: Question
tagged with: sails.js
tagged with: javascript
has title: Sails JS check if upload file is sent
has answer: http://stackoverflow.com/a/30477885
score: 0
tagged with: skipper
answer count: 2
has body: When uploading files with Sails JS the server crashes if there is no file sent with the request, considering this to be the controller action: function(req, res) { req.file('testFile').upload(function() { // do something... }); } I have tried to check the headers, but there seems to be no difference between a file being sent or not. I am looking for something like this: function(req, res) { if(file sent) { req.file('testFile').upload(...); } else { // file was not sent, do something else } } Is there a way that I could achieve this behavior of uploading a file or not on the same API?
type: UnansweredQuestion
tagged with: node.js
has answer: http://stackoverflow.com/a/27641234

http://stackoverflow.com/a/27488932
has comment: http://stackoverflow.com/comment/43412760
has body: You could, at each AJAX call to load the new dropdown, store a session variable indicating the state of the dropdowns. Then, just fetch those results to display the content you had previously selected. Edit: What you are doing seems quite allright. A few suggestions to make it better: You can get rid of the PHP tags in your jQuery by creating a javascript variable ( as var mainURL = &lt;?=site_url() ?&gt;;. This will allow then to put your functions in a file, that can be cached, hence you get a better separation between JS/PHP. For more flexibility, how about considering using POST instead of GET? This could allow to add a variable saying which form is being selected, and in the returning data, add a variable to indicate the field to populate: Therefore, you would only need one $.ajax instance. For example, something like: function updateForms(type,value){ $.ajax({ url:mainURL+"/mycontroller/getdata", type:"POST", data:{ dropdownSelected:type, value:value }, success:function(returnData){ populate(returnData.form); });
type: AcceptedAnswer
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/43415938
accepted answer of: http://stackoverflow.com/q/27488856
type: Answer
answers question: http://stackoverflow.com/q/27488856
score: 2

http://stackoverflow.com/q/27527247
answer count: 1
downvote count: 0
favorite count: 0
tagged with: ruby
upvote count: 1
tagged with: ruby-on-rails
type: AnsweredQuestion
has body: I would like to display a simple bar chart of views against Posts. I'm using the Impressionist gem to track the number of impressions on each Post, and I'm using the Chartkick gem to create the bar chart. This is the code I have in my view: &lt;%= bar_chart @posts.map{|post| {name: post.title, data: post.impressionist_count } } %&gt; Both gems are working fine in other areas, and the above code passes without any errors, but what gets rendered is an empty bar chart with an accurate legend. It seems like there should be a simple solution, but I can't find it! Any help would be appreciated.
score: 1
has title: Impressionist and Chartkick
has answer: http://stackoverflow.com/a/27541742
type: Question
tagged with: chartkick
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27541742

http://stackoverflow.com/a/27520394
score: 1
has comment: http://stackoverflow.com/comment/43470651
downvote count: 0
has comment: http://stackoverflow.com/comment/43470405
type: Answer
has body: You need window.open(...) to be able to window.close(). You are using window.alert(). See Best Practice in the link https://developer.mozilla.org/en-US/docs/Web/API/Window.open
upvote count: 1
answers question: http://stackoverflow.com/q/27520257

titanium
type: Tag
tags question: http://stackoverflow.com/q/27512138
tag name: titanium
tags question: http://stackoverflow.com/q/27631917
tags question: http://stackoverflow.com/q/27636678

http://stackoverflow.com/a/27479512
type: Answer
upvote count: 4
accepted answer of: http://stackoverflow.com/q/27479305
type: AcceptedAnswer
has body: Refreshing your AdSense advertisements automatically isn't allowed. I understand that you only intend to refresh the ad in response to user action, but it still isn't allowed, even though it should be! Remember, the reason why you want to update the advertisements is so that you can show new ones. Displaying an advertisement is called an "impression." When you use code to refresh the ads, you are automatically generating ad impressions. AdSense Program Policies state (emphasis mine): See full answer Refresh a Div that has a Google ad inside it
score: 4
answers question: http://stackoverflow.com/q/27479305
downvote count: 0

http://stackoverflow.com/comment/43435187
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27502487
has text: Choose a module system - I recommend webpack or requirejs. Then see the many grunt tasks and tutorials for doing exactly that ^
type: Comment

http://stackoverflow.com/comment/43441592
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27505256
has text: @metadings I am very new to mailgun, can you please guide me where I went wrong?

http://stackoverflow.com/comment/43391656
comment on: http://stackoverflow.com/a/27478520
score: 0
type: Comment
has text: Try script tag like to reference your js file obviously depending on your file structure
type: AnswerComment

http://stackoverflow.com/comment/43431672
comment on: http://stackoverflow.com/q/27500315
score: 0
type: QuestionComment
type: Comment
has text: At least IE 10+ actually makes a valid attempt to support standards. IE 9 doesn't support strict mode, and IE 8 hardly supports ES5. IE8+ do largely support HTML 4.01 and CSS 2.1 but that was only when things started getting consistent cross-browser.

http://stackoverflow.com/comment/43427997
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27498449
has text: `filename` will have to be an HTMLInputElement for your code to make sense

http://stackoverflow.com/q/27504801
has comment: http://stackoverflow.com/comment/43439708
type: Question
answer count: 2
linked to: http://stackoverflow.com/q/11939770
has answer: http://stackoverflow.com/a/27504961
downvote count: 0
tagged with: javascript
has title: How to split a string based on single occurance of the delimiter?
favorite count: 0
has comment: http://stackoverflow.com/comment/43439810
accepted answer: http://stackoverflow.com/a/27504961
has comment: http://stackoverflow.com/comment/43439706
possible better answer: http://stackoverflow.com/a/27504902
has answer: http://stackoverflow.com/a/27504902
has comment: http://stackoverflow.com/comment/43439790
upvote count: 1
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/43439880
has body: I have a delimiter $ seperated string created from individual components . I need to split it and get the components that formed the string . However there are corner cases where $ appears in the value itself breaking my split logic . Example bar,fo$o and zoo are the components . So the string created is bar$fo$o$zoo . All is fine but I can't now split it using $ because it gives me bar,fo,o and zoo as the components. One way to solve this is use a delimiter that is complex and most likely not going to occur . But I am trying to solve this using escaping . Replace $ in tthe components with $$ . Hence input components are now bar,fo$$o,zoo . Concatenated string is bar$fo$$o$zoo . Now how do I split if basis single occurrence of $ in javascript ? I am reading Split string with a single occurence (not twice) of a delimiter in Javascript but it appears slightly complex . If its a duplicate question I will close it .
duplicate of: http://stackoverflow.com/q/11939770

http://stackoverflow.com/q/27476328
tagged with: cookies
type: Question
score: 0
has body: I have two cookies in this form, one is Text, one is a radio button selection. The text cookie works fine, but the radio button does not. How its supposed to work: Input text, make a selection, press button. Sends you to next page where the text is displayed, and the associated number of the radio button is displayed. What is actually happening: Input text, make a selection, press buton. Sends you to next page where the text is displayed, but there is nothing from the radio button selection. Thank you ahead of time. JSfiddle - http://jsfiddle.net/q7nja8j9/ HTML - &lt;form action="javascript:void(0)"&gt; &lt;input type="text" name="cookie" id="cookie" value=""&gt; &lt;div id="pics"&gt; &lt;/div&gt; &lt;div id="radio"&gt; &lt;input type="radio" name="char" id="char1" value="1"&gt; &lt;input type="radio" name="char" id="char2" value="2"&gt; &lt;input type="radio" name="char" id="char3" value="3"&gt; &lt;/div&gt; &lt;input type="button" name="Fight" id="saveCookie" value="Fight" onclick="window.location.href='Battle.html'"&gt; &lt;/form&gt; JS- $(function(){ // attach event listener to save cookie button $('#saveCookie').click(function(){ // set cookie expiration to 1 year from today var expDate = new Date(); expDate.setFullYear(expDate.getFullYear() + 1); // create cookie string var cookieStr = $('#cookie').val() + ";expires=" + expDate.toGMTString(); // create cookie var cookieChar = $('input[name="char"]:checked').val() + ";expires=" + expDate.toGMTString(); document.cookie = cookieStr; document.choice = cookieChar; }); });
answer count: 1
tagged with: javascript
has title: Jquery cookie not being read, or recognized correctly
tagged with: jquery
has answer: http://stackoverflow.com/a/27476511
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/4825683

http://stackoverflow.com/q/27565410
upvote count: 3
answer count: 5
possible better answer: http://stackoverflow.com/a/27565523
has answer: http://stackoverflow.com/a/27565620
has title: jQuery / JavaScript: Check all checkboxes and Check each checkbox to display div
has answer: http://stackoverflow.com/a/27565766
downvote count: 0
tagged with: checkbox
has body: I am having a hard time figuring this out. I tried to make a global checkbox that will check all other sub-checkboxes and display a div, which works fine, but the issue is when i try to make each sub-checkboxes check and display the div themselves. I wrote jquery hide and show for it. When I check the first sub-checkbox, and check the second; the div displays but when i go back and uncheck the first one, the div closes and one and on due to the hide and show function, how can i do this? Here is my code below. $(document).ready(function(){ $('#checkbox-global').click(function(){ if($(this).is(':checked')) $('.checkbox-group').prop('checked', true); else $('.checkbox-group').prop('checked', false); }); }); $(document).ready(function(){ $('#checkbox-global').click(function(){ if($(this).is(':checked')) $('.loaded').show(1000); else $('.loaded').hide(1000); }); }); $(document).ready(function(){ $('.checkbox-group').click(function(){ if($(this).is(':checked')) $('.loaded').show(1000); else $('.loaded').hide(1000); }); }); RESTORE | DELETE
has answer: http://stackoverflow.com/a/32478870
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/27565523
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27565620
tagged with: jquery
has comment: http://stackoverflow.com/comment/43556024
favorite count: 0
has answer: http://stackoverflow.com/a/27566651

http://stackoverflow.com/comment/43613841
has text: Use `document.createElement()` instead of `innerHTML` for dynamically inserting elements. `innerHTML` will remove any events attached to the child elements and will have to re-render _every single row element_ all over again each time you parse it.
comment on: http://stackoverflow.com/q/27594957
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/100240309
comment on: http://stackoverflow.com/a/27638728
type: AnswerComment
has text: If you're using ajax to get the image data you can use the same process function with the response of your ajax(as an array buffer) to create the data view.
type: Comment
score: 0

http://stackoverflow.com/comment/43521772
type: AnswerComment
score: 0
has text: Thank you! using containers/layouts i can put buttons without problem.
type: Comment
comment on: http://stackoverflow.com/a/27547608

http://stackoverflow.com/q/27530756
tagged with: google-polyline
upvote count: 1
answer count: 1
downvote count: 1
tagged with: javascript
favorite count: 0
has title: Google Maps API v3 generating lines dynamically?
type: AnsweredQuestion
has body: I am working on a Google Maps prototype and I would like to draw a line connecting each of the markers on my map. However, currently I am hardcoding the coordinates for the line separate from the coordinates used for the markers and was wondering how I can make it dynamic so that I only have to add markers and the line will automatically be generated from those points. The portion of the script I want to be generated dynamically is commented Here's my current code: Travel Log JSFiddle
type: Question
has answer: http://stackoverflow.com/a/27530855
accepted answer: http://stackoverflow.com/a/27530855
tagged with: google-maps-api-3
has comment: http://stackoverflow.com/comment/43490349
score: 0

http://stackoverflow.com/comment/43569107
comment on: http://stackoverflow.com/q/27569970
score: 0
has text: mongodb-org-2.6.5-1.x86_64 is the RPM Im using on CentOS 6.5. Using mongodump/mongorestore seems to leave us with NO indices after a restore as confirmed by db.MyCollection.getIndexes(). My question is how to format the .js so multiple db.MyCollection.ensureIndex() statements can be run one with one mongo command.
type: QuestionComment
type: Comment

http://stackoverflow.com/q/27491142
has comment: http://stackoverflow.com/comment/43414611
tagged with: css
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/43414003
upvote count: 3
type: Question
has answer: http://stackoverflow.com/a/27491879
tagged with: javascript
tagged with: jquery
has title: Animating page contents in and out of window based on their position in navigation. [Fiddle inside]
has body: I am currently trying to implement a "flow" to my site. What I am trying to achieve is to animate in and out the page content based on buttons clicked in the navigation menu. The navigation menu is the only consistent element. The menu has 3 buttons Phone, Home and Mail. At the moment the starting content is that of the Phone page, but eventually I'd need to switch it to Home. Now the goal is to animate the content container of the current "page" out and the content of the "page" whos navigation button has been clicked in. The tricky part is this. When I start on Phone page and click on Home button the Phone page container slides away to left and Home content comes in from right. This is the desired effect as Phone is to the left of Home. This also work appropriately when going from Home to Mail. But when I want to move from say Mail to Home I need the content of phone to slide away to right and the content of Home to come in from left. Also when going from 1 far end to the opposite I want to slide past the content between. UPDATE 2 So the fix to "I do not know what is causing this" was to simply move this line currBoxX = destBoxX; out of the comparing to after it. I was dumb enough to miss that. I have achieved almost the functionality I wanted, but I still don't know how to display the inbetween contents when going from one page over some inbetween to other one. This don't matter anymore as Rick Hitchock has shown me how this whole thing can be done much more effectively. So check out his answer if you're curious. ---- Now it kind of works on the first run and also only if I go from one menu button to the very next. The problem is that in second round it falls starts moving the containers from wrong place and I do not know what is causing this. To see this in work go to the fiddle and first click on Home then Mail then Home again, then Phone. Till now it was exactly how I want it. Now click on Home and it will come in from wrong side. Any ideas? Updated Fiddle Wha…
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/27491879

http://stackoverflow.com/a/27542800
has body: First line, your anonymous function isn't saved and isn't ran. Then. In each function, what does this refer to ? What is this context ? Is this window or do you call your function like saveEvents.apply( jQuery ) ? JavaScript is powerful, when your want to run XMLHttpRequest (Ajax uses it), scripts are called when an event happen, like "server is found", "request is send", "file is reading", "file loaded"... for each state of your request. Ajax by jQuery help you to request asynchronous. You can request as many Ajax request as you would like in the same time. The important is to create a function happen in success case. In this success function, you receive data, you compute it, then this function may call another Ajax request, and so on. When you chain requests like this to get the same file, we call it Ressource. Ressource uses Ajax which uses XMLHttpRequest.
type: Answer
score: 0
answers question: http://stackoverflow.com/q/27542167
has comment: http://stackoverflow.com/comment/43512857

http://stackoverflow.com/comment/43463171
has text: Ok, just because this seems obvious: Wouldn't the text box lose focus on page navigation? Or is it just supposed to pass the *last* one that was clicked?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27516458
score: 0

http://stackoverflow.com/q/27529789
has title: Masonry sometimes lays out in one column straight line
upvote count: 1
score: 1
type: Question
tagged with: jquery-masonry
tagged with: masonry
answer count: 1
downvote count: 0
tagged with: javascript
has body: I have masonry initialized on some "tiles" that include an image. Most of the time I am not having issues but sometimes the tiles lay out in one column when there should be 3 columns. Do you have any idea what the issue might be? On ready initialization: $(document).ready(function() { var $container = $('#news'); $container.masonry({ itemSelector: '.pageNewsItem', transitionDuration: 0 }); $container.masonry( 'on', 'layoutComplete', function( msnryInstance, laidOutItems ) {debounced = true;} ) }); Dynamically append tiles: var count = 0; function placeNewsTiles(news){ //places news tiles var length = (news.data.length > 20) ? 20 : news.data.length; var elems =""; for(var i = 0; i < length; i++){ elems += ' \ \ \ \ ' + news.data[i]._title + '\ \ ' + news.data[i]._source + '\ \ \ \ \ \ \ \ \ \ \ \ \ \ Read Article \ \ \ \ \ '; getTileImage({total: news.count, i:count + "" + i, url:news.data[i]._url}); } elems = $(elems); $('#news').append(elems).imagesLoaded(function(){ //for(var i = 0; i < length; i++) $('.pageNewsItem').removeClass('inactive'); //$('.pageNewsItem').show(1000); $('#news').masonry( 'appended', elems); }); newsPage = 0; count++; hoverTiles(); } getTileImage function is called to conduct an ajax call to obtain the tile image. Masonry layout happens on complete: var cnt = 0; function getTileImage(args){ var _t = localStorage.getItem("token"), url = args.url, i = args.i; $.ajax({ type: "GET", url: apiHost+'/api/tileImg?url=' + url + '&token='+_t, dataType: "json", success: function(data) { var img = (data && data.image.src) ? data.img.src : (data && data.image) ? data.image: ""; if(img.indexOf("spacer") > -1|| img.indexOf("blank") > -1 || img === ""){ $('.pageNewsItem#' + i).hide(); } else $('.pageNewsItem#' + i).find('.imageWrap').append(' '); }, error: function(e) { if (e.status == 404) { //need to get a new token getToken(getTileImage, url); } }, complete: function(){ cnt++; if ((cnt ==20) || cnt == args.total) { var $container = $('#news'); $container…
tagged with: jquery
has answer: http://stackoverflow.com/a/27984309
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/27595023
upvote count: 2
type: UnansweredQuestion
tagged with: browser-automation
has body: I have dynamically generated tree html code like below: (...) myItem And i have to automate setting true various checkboxes (in this case tree_115_check) and after that and after clicking OK button on this page and some operations, i have to check whether icon.png changed to OK.png. I have to reffer to object by its name, because before executing test i will know myItem name, but i won't know which element of the tree it will be. Do you know how to do that using RobotFramework or JavaScript? It will be simple, if i will know ID of all checkboxes, icons, etc, but how to do that when it is various and I know just, that i have to find "myItem" element of tree, its checkbox and status icon? Thank You in advance for your support.
score: 2
tagged with: selenium
type: Question
tagged with: robotframework
has comment: http://stackoverflow.com/comment/43767786
tagged with: automation
downvote count: 0
tagged with: javascript
has title: RobotFramework/JavaScript automated tree checkbox click and icon check with various tree element id
has comment: http://stackoverflow.com/comment/43809273
favorite count: 0
answer count: 0

http://stackoverflow.com/q/27603177
has comment: http://stackoverflow.com/comment/43630314
has comment: http://stackoverflow.com/comment/43630038
tagged with: m3u8
score: 19
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/43630377
answer count: 1
downvote count: 0
has body: Is it possible to download all m3u8 segments in one file using javascript or php I search for this but couldn't find anything;
has comment: http://stackoverflow.com/comment/138281969
favorite count: 0
has answer: http://stackoverflow.com/a/35930512
has comment: http://stackoverflow.com/comment/43630224
has comment: http://stackoverflow.com/comment/43630171
has comment: http://stackoverflow.com/comment/43630190
type: UnansweredQuestion
has title: Can I download all segments of a m3u8 file as one mp4 file using web ( no ffmpeg )
has comment: http://stackoverflow.com/comment/43628796
tagged with: php
has comment: http://stackoverflow.com/comment/43628698
has comment: http://stackoverflow.com/comment/43630498
upvote count: 19
has comment: http://stackoverflow.com/comment/59511109

http://stackoverflow.com/q/27514310
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27514478
tagged with: rxjs
favorite count: 0
has answer: http://stackoverflow.com/a/27605520
has answer: http://stackoverflow.com/a/53632860
has title: Turning paginated requests into an Observable stream with RxJs
possible better answer: http://stackoverflow.com/a/27605520
answer count: 4
tagged with: reactive-extensions-js
has answer: http://stackoverflow.com/a/43461163
has answer: http://stackoverflow.com/a/27514478
type: AnsweredQuestion
upvote count: 9
score: 9
type: Question
has body: I have a service which returns data in pages. The response to one page contains details on how to query for the next page. My approach is to return the response data and then immediately concat a deferred call to the same observable sequence if there are more pages available. function getPageFromServer(index) { // return dummy data for testcase return {nextpage:index+1, data:[1,2,3]}; } function getPagedItems(index) { return Observable.return(getPageFromServer(index)) .flatMap(function(response) { if (response.nextpage !== null) { return Observable.fromArray(response.data) .concat(Observable.defer(function() {return getPagedItems(response.nextpage);})); } return Observable.fromArray(response.data); }); } getPagedItems(0).subscribe( function(item) { console.log(new Date(), item); }, function(error) { console.log(error); } ) This must be the wrong approach, because within 2 seconds you get: throw e; ^ RangeError: Maximum call stack size exceeded at CompositeDisposablePrototype.dispose (/Users/me/node_modules/rx/dist/rx.all.js:654:51) What is the correct approach to pagination?

http://stackoverflow.com/q/27636874
downvote count: 0
tagged with: javascript
has title: blueimp jQuery file upload new files order
tagged with: jquery
favorite count: 0
tagged with: jquery-file-upload
has answer: http://stackoverflow.com/a/27984932
has answer: http://stackoverflow.com/a/35109921
type: UnansweredQuestion
has body: i'm trying to find place inside blueimp file upload scripts to change the behavior of new files position in the table. How to force them to by added at the top of the table insted of the end of files list?
upvote count: 5
type: Question
tagged with: blueimp
answer count: 2
score: 5

http://stackoverflow.com/comment/43508654
type: QuestionComment
comment on: http://stackoverflow.com/q/27540441
score: 1
has text: i knw its a very basic thing..show what you have tried?
type: Comment

http://stackoverflow.com/q/27631576
has comment: http://stackoverflow.com/comment/43683449
tagged with: recursion
tagged with: math
possible better answer: http://stackoverflow.com/a/27631633
score: -1
has comment: http://stackoverflow.com/comment/43683454
answer count: 2
downvote count: 1
tagged with: javascript
favorite count: 0
has body: Want to know the significance of the following function var abc=(function(a, b){ return a == 0 ? 0 : abc(a -1, b) + b; }); (function(){ var a = abc(10, 10); console.log(a); })(); I know the output of the following function is 100 but what is it call in Mathematics?
has answer: http://stackoverflow.com/a/27631633
type: AnsweredQuestion
upvote count: 0
has answer: http://stackoverflow.com/a/27631665
has comment: http://stackoverflow.com/comment/43683521
accepted answer: http://stackoverflow.com/a/27631665
has title: significance of this recursive function
type: Question

http://stackoverflow.com/a/27602465
upvote count: 1
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27602333
has body: Use .error. $http.get($rootScope.api + '/authentication/check-login') .success(function(response) { console.log('You are logged in'); }) .error(function(response) { console.log('You are not logged in'); });

http://stackoverflow.com/comment/43474940
type: Comment
has text: @MarcoMura that would help if you are not familiar with sessions at least ;) thanks.
comment on: http://stackoverflow.com/a/27523016
type: AnswerComment
score: 0

http://stackoverflow.com/comment/43556961
has text: it is jquery plugin function..http://tristanedwards.me/sweetalert
score: 0
comment on: http://stackoverflow.com/q/27565754
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43572920
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27573278
has text: @Katana314 if you **did** want to continue the rejection down the `then` chain, you would replace the `return` on line 4 of the second code block with `throw`.

http://stackoverflow.com/a/27513778
has body: Here's a solution using display:table which should get you started: HTML Information A section of text Some text and other stuff - even divs. CSS #wrapper { height:100%; width:100%; } #wrapper div { border:1px solid black; } #row1 { display:table; /* Creates the table */ } #row1 > div { display:table-cell; width:30%; /* Sets the width of each table cell */ height:auto; /* Expands the height of the entire row as content is added */ } Here's a CodePen demo with a mockup. The nice thing about this is that you can still use HTML5 and CSS3 for all of your content and styling.
has comment: http://stackoverflow.com/comment/43492507
has comment: http://stackoverflow.com/comment/43503447
score: 3
downvote count: 0
answers question: http://stackoverflow.com/q/27509128
upvote count: 3
type: Answer

http://stackoverflow.com/q/27523759
accepted answer: http://stackoverflow.com/a/27523840
possible better answer: http://stackoverflow.com/a/27523831
has answer: http://stackoverflow.com/a/27523831
has body: I have this code (Chrome and Firefox only) HTML: &lt;a id="savefile""&gt; Save transferred file &lt;/a&gt; javascript: // event is returned by a readAsDataURL() var save = document.getElementById('savefile'); save.href = event.target.result; save.target = '_blank'; save.download = fileName; Besides the first line, is line 2, 3 and 4 possible in jQuery? I understand this is a non-space saving question - however It's in the middle of a jQuery subject tutorial I'm trying to compose on dataBlobs and browser compatibility. I've been looking for about an hour - have had no luck finding the info, 'download' being the worlds worst keyword.
has comment: http://stackoverflow.com/comment/43476343
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43476336
score: 0
has comment: http://stackoverflow.com/comment/43476340
has title: Can html5 'a' attributes be added using jQuery
type: Question
has answer: http://stackoverflow.com/a/27523840
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27523834
answer count: 3
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/27549555
score: 4
has answer: http://stackoverflow.com/a/27550152
tagged with: google-apps-script
answer count: 1
favorite count: 0
upvote count: 4
has body: I have a google apps script that is pulling data from a google apps sheet via a For loop then puts each row into an array to prep for exporting to an external API. My problem is that the script skips ahead/over some entries and I cannot understand why. Here's the entire code: function prepEmails() { var ss = SpreadsheetApp.getActive(); var s = ss.getSheetByName("Emails"); var sLastRow = s.getLastRow(); var scriptProperties = PropertiesService.getScriptProperties(); var logCount = scriptProperties.getProperty('EmailCount'); Logger.log("63 logCount = "+logCount); var url = "https://apitoexportto.com"; var recordType = "email"; var logKey = "mailCount" var activityDesc = "######" if (logCount === null) { scriptProperties.setProperty('EmailCount', 0); logCount = 0; } Logger.log("68 logCount = "+logCount); var msgs = sLastRow - logCount; var arr = new Array(); for (var i=0; i&lt;msgs-1; i++) { Logger.log("78 inside FOR loop"); var nextRow = logCount+1; //+1 to skip header row var msg = s.getRange(nextRow+1, 1, 1, 6).getValues(); //+1 to skip to next row var payload = { 'type' : "TimeEntry", 'matter_id' : msg[0][0], 'price' : msg[0][1], 'date' : msg[0][2], 'note' : msg[0][3], 'quantity' : msg[0][4], 'activity_description_id': activityDesc }; arr.push(payload); var logCount = parseInt(logCount)+1; } Logger.log("95 logCount = "+logCount); if (i&gt;0) { exportEmails(url, recordType, arr, logKey, activityDesc); } } Here's the execution transcript: EDIT: I don't have enough rep to post images yet, so here's a link to the transcript. Execution Transcript and I'll paste it below as well. [14-12-18 08:20:44:782 CST] Starting execution [14-12-18 08:20:44:814 CST] SpreadsheetApp.getActive() [0 seconds] [14-12-18 08:20:44:840 CST] Spreadsheet.getSheetByName([Emails]) [0.024 seconds] [14-12-18 08:20:44:859 CST] Sheet.getLastRow() [0.019 seconds] [14-12-18 08:20:44:861 CST] PropertiesService.getScriptProperties() [0 seconds] [14-12-18 08:20:44:867 CST] (class).getProperty([EmailCount]…
type: AnsweredQuestion
downvote count: 0
has title: For loop skipping entries
has comment: http://stackoverflow.com/comment/43525842
accepted answer: http://stackoverflow.com/a/27550152
has comment: http://stackoverflow.com/comment/43525687
type: Question
tagged with: google-apps
tagged with: javascript

http://stackoverflow.com/q/27632090
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has body: i have scollable area , i want to user long press and then scroll to scroll that area. is there any way to detect mouse / touch event movement after long press so that i may do above functionality see : http://liveweave.com/ggfAdD please help i am stucked up belwo i code of longpress, what top add code to make it work where user long press and move up / down (function($) { $.fn.longpress = function(longCallback, shortCallback, duration) { if (typeof duration === "undefined") { duration = 500; } return this.each(function() { var $this = $(this); // to keep track of how long something was pressed var mouse_down_time; var timeout; // mousedown or touchstart callback function mousedown_callback(e) { mouse_down_time = new Date().getTime(); var context = $(this); // set a timeout to call the longpress callback when time elapses timeout = setTimeout(function() { if (typeof longCallback === "function") { longCallback.call(context, e); } else { $.error('Callback required for long press. You provided: ' + typeof longCallback); } }, duration); } // mouseup or touchend callback function mouseup_callback(e) { var press_time = new Date().getTime() - mouse_down_time; if (press_time &lt; duration) { // cancel the timeout clearTimeout(timeout); // call the shortCallback if provided if (typeof shortCallback === "function") { shortCallback.call($(this), e); } else if (typeof shortCallback === "undefined") { ; } else { $.error('Optional callback for short press should be a function.'); } } } // cancel long press event if the finger or mouse was moved function move_callback(e) { clearTimeout(timeout); } // Browser Support $this.on('mousedown', mousedown_callback); $this.on('mouseup', mouseup_callback); $this.on('mousemove', move_callback); // Mobile Support $this.on('touchstart', mousedown_callback); $this.on('touchend', mouseup_callback); $this.on('touchmove', move_callback); }); }; }(jQuery));
score: 2
answer count: 0
has title: longpress to scroll :mobile

http://stackoverflow.com/a/27520133
score: 68
has body: When you use Object.defineProperties, by default writable is set to false, so _year and edition are actually read only properties. Explicitly set them to writable: true: _year: { value: 2004, writable: true }, edition: { value: 1, writable: true }, Check out MDN for this method. writable true if and only if the value associated with the property may be changed with an assignment operator. Defaults to false.
answers question: http://stackoverflow.com/q/27519836
accepted answer of: http://stackoverflow.com/q/27519836
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/54536908
type: Answer
upvote count: 68

http://stackoverflow.com/a/27523553
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27523507
score: 5
type: Answer
upvote count: 5
accepted answer of: http://stackoverflow.com/q/27523507
has body: You'll have to query the individual font-* properties you're interested in. From the css documentation: Retrieval of shorthand CSS properties (e.g., margin, background, border), although functional with some browsers, is not guaranteed. For example, if you want to retrieve the rendered border-width, use: $( elem ).css( "borderTopWidth" ), $( elem ).css( "borderBottomWidth" ), and so on.

http://stackoverflow.com/a/27515045
has body: You cannot use ajax to send data to a different domain than the one your javascript code is served from. This is called the Same Origin Policy There are two possible ways around this restriction: On your server, have a server-side page (in PHP for example) that takes the data and posts it to that remote URL If that remote URL has a REST API, you can use JSONP to submit it client-side CORS - but there's a lot of issues with this cross-browser and server
has comment: http://stackoverflow.com/comment/43460545
answers question: http://stackoverflow.com/q/27514963
downvote count: 0
has comment: http://stackoverflow.com/comment/43460540
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/43460566
score: 1
has comment: http://stackoverflow.com/comment/43460709

infinite-scroll
tag name: infinite-scroll
tags question: http://stackoverflow.com/q/27530110
type: Tag
tags question: http://stackoverflow.com/q/27598520
tags question: http://stackoverflow.com/q/27606926

http://stackoverflow.com/comment/43473711
has text: @Dab0416 you can add a hover state by using the mouseover and mouseout event listeners. As for the text, you'll need to hook up your click event to this too (as well as hover events if you add them) and find the associated sector to animate. You're probably going to need to find the index of the text and use that to search through the array of sectors with the class "sector".
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27508889
type: AnswerComment

http://stackoverflow.com/comment/43489217
has text: @T.J Thanks for the reply. basically index = (index + 1) % urls.length; limits the increment to # pics in the array. What is the % purpose here ? meaning less or equal ? Can't we use <= ?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27530213
type: AnswerComment

http://stackoverflow.com/comment/43412506
type: QuestionComment
comment on: http://stackoverflow.com/q/27490295
score: 1
has text: @T.J.Crowder: (my thoughts as well)
type: Comment

http://stackoverflow.com/comment/43619224
score: 0
type: Comment
has text: Thanks for the reply and the links. At least now I know what's causing the problem and what should I do. This is why other solution's didn't work for me. Need to find a workaround.
type: AnswerComment
comment on: http://stackoverflow.com/a/27545729

http://stackoverflow.com/comment/44830904
type: Comment
score: 0
has text: Sometimes Meteor reset works for me (thinking seriously on pay the $20 for the premium box)
type: AnswerComment
comment on: http://stackoverflow.com/a/27616311

http://stackoverflow.com/q/27624668
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has body: In this D3 diagram, the circles are filled with radial gradients, and changing opacity is used for fading in and fading out: var width = 400, height = 400, padding = 1.5, // separation between same-color nodes clusterPadding = 6, // separation between different-color nodes maxRadius = 12; var n = 200, // total number of nodes m = 10; // number of distinct clusters var color = d3.scale.category10() .domain(d3.range(m)); // The largest node for each cluster. var clusters = new Array(m); var nodes = d3.range(n).map(function() { var i = Math.floor(Math.random() * m), r = Math.sqrt((i + 1) / m * -Math.log(Math.random())) * maxRadius, d = {cluster: i, radius: r}; if (!clusters[i] || (r &gt; clusters[i].radius)) clusters[i] = d; return d; }); // Use the pack layout to initialize node positions. d3.layout.pack() .sort(null) .size([width, height]) .children(function(d) { return d.values; }) .value(function(d) { return d.radius * d.radius; }) .nodes({values: d3.nest() .key(function(d) { return d.cluster; }) .entries(nodes) }); var force = d3.layout.force() .nodes(nodes) .size([width, height]) .gravity(.02) .charge(0) .on("tick", tick) .start(); var svg = d3.select("body").append("svg") .attr("width", width) .attr("height", height); var grads = svg.append("defs").selectAll("radialGradient") .data(nodes) .enter() .append("radialGradient") .attr("gradientUnits", "objectBoundingBox") .attr("cx", 0) .attr("cy", 0) .attr("r", "100%") .attr("id", function(d, i) { return "grad" + i; }); grads.append("stop") .attr("offset", "0%") .style("stop-color", "white"); grads.append("stop") .attr("offset", "100%") .style("stop-color", function(d) { return color(d.cluster); }); var node = svg.selectAll("circle") .data(nodes) .enter() .append("circle") .style("fill", function(d, i) { return "url(#grad" + i + ")"; }) // .style("fill", function(d) { return color(d.cluster); }) .call(force.drag) .on("mouseover", fade(.1)) .on("mouseout", fade(1)); node.transition() .duration(750) .delay(function(d, …
has comment: http://stackoverflow.com/comment/43669863
has title: D3 transition: Fading in and out the colors within a gradient fill
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
tagged with: gradient
type: Question
type: AnsweredQuestion
upvote count: 5
has answer: http://stackoverflow.com/a/27627061
accepted answer: http://stackoverflow.com/a/27627061
tagged with: transition
score: 5

http://stackoverflow.com/comment/43439426
type: Comment
comment on: http://stackoverflow.com/a/27504650
type: AnswerComment
score: 0
has text: You can make the call inside the functions by putting `var getHtmlStuff = $("#yourHtmlId").val();` inside the `handleSliderChange`?

http://stackoverflow.com/comment/43394926
type: Comment
type: QuestionComment
has text: @Barmar - I don't think so. When I repeat the same action, sometimes it works but sometimes it doesn't.
score: 0
comment on: http://stackoverflow.com/q/27480984

http://stackoverflow.com/comment/43535139
comment on: http://stackoverflow.com/q/27554348
type: QuestionComment
has text: @Blazemonger Yes, but the OP wants to stop the script from loading.
type: Comment
score: 0

http://stackoverflow.com/comment/43436859
score: 0
type: Comment
type: QuestionComment
has text: How do you manage the header checkbox changing state event? The best way to do this is to use javascript...Here u can find a nice example => http://www.aspsnippets.com/Articles/Check-Uncheck-all-CheckBoxes-in-ASPNet-GridView-using-jQuery.aspx
comment on: http://stackoverflow.com/q/27503312

http://stackoverflow.com/q/27588990
tagged with: php
tagged with: hosting
has comment: http://stackoverflow.com/comment/43602097
type: AnsweredQuestion
has body: On the host the php generates javascript which drops an error of: missing ; before statement the generated code was : try{ obj = document.getElementById('subcat'); }catch(e){} try{ obj.innerHTML = " - bootle Puzzle "; }catch(e){} It is generated by action.php with this code: if($var_type=='array') $text = ' '; else $text = ' '; $text .= ' - '; $res = $ads->get_ads_categories($_SESSION['lang'],$parent_id); while($r = mysql_fetch_array($res)){ $text .= ' '.$r['category_name'].' '; } $text .= ' '; echo "try{obj = document.getElementById('".$id."');}catch(e){}"; echo "try{obj.innerHTML = ".$text.";}catch(e){}";
has comment: http://stackoverflow.com/comment/43602110
downvote count: 3
accepted answer: http://stackoverflow.com/a/27589015
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/43602172
upvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/43606221
tagged with: ajax
has answer: http://stackoverflow.com/a/27589015
has title: What is the problem with this php generated javascript?
has comment: http://stackoverflow.com/comment/43602106
score: -3

http://stackoverflow.com/q/27508619
tagged with: ajax
score: 0
has body: I try to load and add a local json file as var for a futur use in my script. I think that the data aren't load when I try to populate my var with the json data but fail to find the solution! Here is my json file (it's a geojson file but may work as a json) : { "type": "FeatureCollection", "features": [ { "type": "Feature", "id": "45140", "properties": { "Name": "Nogent-le-Rotrou", "ZE": "0054", "Chomage2013": 8.7, "Chomage2012": 8.3, "Chomage2011": 7.5, "Chomage2010": 7.6, "Chomage2009": 8.2, "Chomage2008": 6.2, "Chomage2007": 5.7, "Chomage2006": 6.8, "Chomage2005": 7.4, "Chomage2004": 7.2, "Chomage2003": 6.4, "evochomage2013": 4.82 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 0.93175560354212, 48.474513031284 ], [ 0.93570906113333, 48.475508748811 ], [ 0.93824280719487, 48.469235350982 ], [ 0.94065612469203, 48.459117109658 ], [ 0.95557675746743, 48.445300194094 ] ] ] } }, { "type": "Feature", "id": "45138", "properties": { "Name": "Le Blanc", "ZE": "2407", "Chomage2013": 7.6, "Chomage2012": 7.2, "Chomage2011": 7, "Chomage2010": 7.1, "Chomage2009": 6.8, "Chomage2008": 5.4, "Chomage2007": 5.7, "Chomage2006": 6.4, "Chomage2005": 6.5, "Chomage2004": 6.7, "Chomage2003": 6.3, "evochomage2013": 5.56 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 0.93775810435161, 46.594424656767 ], [ 0.91586530805381, 46.596631487525 ], [ 0.90498141613517, 46.617645541724 ], [ 0.89405928709303, 46.628623597551 ], [ 0.89551763798088, 46.631821020526 ], [ 0.90762804417877, 46.646715861732 ], [ 0.91563786082172, 46.650671906043 ], [ 0.90733980986345, 46.666436781446 ], [ 0.911236562269, 46.676028593016 ], [ 0.90226151243206, 46.677666264493 ], [ 0.91815499060708, 46.690484998251 ], [ 0.92713345915642, 46.693601953386 ], [ 0.92481246298246, 46.700216357902 ], [ 0.91040415839575, 46.717410974559 ], [ 0.91117187498138, 46.727071705034 ], [ 0.85872947708123, 46.75915353208 ], [ 0.84484012327248, 46.763019155912 ], [ 0.82939560079849, 46.776869974366 ], [ 0.82609906707742, …
linked to: http://stackoverflow.com/q/14220321
has title: Get json file as variable in javascript with getJSON
answer count: 0
type: UnansweredQuestion
tagged with: getjson
has comment: http://stackoverflow.com/comment/43447241
has comment: http://stackoverflow.com/comment/43447289
tagged with: http://stackoverflow.com/tag/json
type: Question
duplicate of: http://stackoverflow.com/q/14220321
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43447601

http://stackoverflow.com/comment/43590490
comment on: http://stackoverflow.com/q/27582501
has text: @charlietfl as i explained above my server side code is expecting it to be {'userkey':uservalue}
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27508146
score: 2
downvote count: 0
type: Question
type: AnsweredQuestion
tagged with: donut-chart
has title: Raphaël Donut chart click and unclick sections
tagged with: raphael
upvote count: 2
answer count: 2
tagged with: javascript
tagged with: jquery
has body: I am a novice with this but I am trying to create a donut chart that has sections that scale larger when clicked and then when a different section is clicked the first section returns to the original size and the new section scales larger. I have the chart and the scaling with the click but right now I can only get the section to go back to the original size with mouseout. This is the code I have: p.click(function () { p.stop().animate({transform: "s1.1 1.1 " + cx + " " + cy}, ms, "elastic"); txt.stop().animate({opacity: 1}, ms, "elastic"); }).mouseout(function () { p.stop().animate({transform: ""}, ms, "elastic"); txt.stop().animate({opacity: 0}, ms); }); Fiddle: http://jsfiddle.net/dll416/70twey1o/1/
possible better answer: http://stackoverflow.com/a/27509716
has answer: http://stackoverflow.com/a/27508889
accepted answer: http://stackoverflow.com/a/27508889
has answer: http://stackoverflow.com/a/27509716
favorite count: 0

http://stackoverflow.com/q/27503585
has answer: http://stackoverflow.com/a/27504261
type: Question
has answer: http://stackoverflow.com/a/41249908
score: 3
has title: Twitter Bootstrap tags input doesn't remove placeholder when onfocus
tagged with: http://stackoverflow.com/tag/html
tagged with: css
tagged with: bootstrap-tags-input
has answer: http://stackoverflow.com/a/78757677
has comment: http://stackoverflow.com/comment/43437306
tagged with: twitter-bootstrap
upvote count: 3
has body: I have been scratching my head since yesterday on this problem, which I cannot solve. I am a new starter to Twitter Bootstrap and everything was going well until yesterday. I am using the latest JQuery v1.11.1 and Twitter Bootstrap v3.3.1. Yesterday I downloaded Bootstrap Tags Input, from here: http://timschlechter.github.io/bootstrap-tagsinput/examples/ The plugin works and I have changed the CSS styles to match my page layout but the problem I am having is that the placeholder attribute will not disappear when on focus. If I type in a tag and add a comma value the placeholder will show until I start typing and then it will disappear again. I have tried using JQuery onfocus function to remove the attribute when onfocus but it doesn't do anything. What I want to achieve is that when onfocus the placeholder does not show at that point not even on blur. My input field is demonstrated below: &lt;input type="text" name="customer_tags" id="customer_tags" value="" placeholder="Enter you tags" data-role="tagsinput" required /&gt;
has answer: http://stackoverflow.com/a/72321395
linked to: http://stackoverflow.com/q/9707021
has answer: http://stackoverflow.com/a/27503860
has comment: http://stackoverflow.com/comment/43438446
has answer: http://stackoverflow.com/a/44963126
has comment: http://stackoverflow.com/comment/43437739
answer count: 9
has comment: http://stackoverflow.com/comment/43437271
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/45409504
has answer: http://stackoverflow.com/a/27503699
has comment: http://stackoverflow.com/comment/43437327
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/43438307
has comment: http://stackoverflow.com/comment/67467320
favorite count: 0
has answer: http://stackoverflow.com/a/49024317

http://stackoverflow.com/q/27507293
upvote count: 5
has answer: http://stackoverflow.com/a/27507329
answer count: 5
possible better answer: http://stackoverflow.com/a/27507358
type: AnsweredQuestion
type: Question
score: 5
downvote count: 0
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27507344
has answer: http://stackoverflow.com/a/27507409
favorite count: 0
has answer: http://stackoverflow.com/a/27507358
has title: How to check if a specific textbox under a specific div is empty
has body: I have this code: <asp:TextBox ID="a" runat="server" /> <asp:TextBox ID="ab" runat="server" /> I need to let the user know if he left a Textbox empty, I tried something like this.. (not working) What have I missed? $('.greenDiv > input:text').blur(function () { if (!$(this).val()) { alert("fill this field"); } });
has answer: http://stackoverflow.com/a/27507344
has answer: http://stackoverflow.com/a/27507411

http://stackoverflow.com/q/27530336
has title: What Meteor collection does an object come from?
has answer: http://stackoverflow.com/a/27531932
type: Question
answer count: 2
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27539296
tagged with: meteor
has body: I have a custom block helper (essentially, an {{#each}} loop) that renders the results of a Mongo.Collection.find(): {{#sortable items=someCursor}} {{&gt; sortableItemTarget}} {{/sortable}} In the sortableItemTarget template event handlers, how do I access the parent data context, i.e. the collection (or at least cursor) that the item came from? Because of a bug, custom block helper template event handlers don't have access to the parent data context. In other words, if I run var items = Mongo.Collection('items'); ... var item = items.findOne({...}); How can I easily remove item from its collection with something like item._collection.remove()? The minimal code is in this GitHub repo.
type: UnansweredQuestion
tagged with: collections
has comment: http://stackoverflow.com/comment/43491645

http://stackoverflow.com/a/27532237
answers question: http://stackoverflow.com/q/27522450
score: 0
has body: Actually I think there may be an easier way - I think you already have the closure, but are just not using it correctly function createMarker(key) { // ^^^ $scope.startStation = key; alert(key); //window.location.href = '#/station/' + key; }
type: Answer

http://stackoverflow.com/q/27574223
accepted answer: http://stackoverflow.com/a/27575218
score: 4
upvote count: 4
answer count: 3
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/27574604
favorite count: 0
tagged with: google-chrome-extension
has title: Any way to pull data from an API in a Chrome extension
has answer: http://stackoverflow.com/a/27575218
type: AnsweredQuestion
tagged with: google-chrome
possible better answer: http://stackoverflow.com/a/27575035
type: Question
has body: I'm trying to create a Chrome extension that pulls and manipulates data from Metacritic. I found this pretty great API online that would let me send a GET request for the data I need and return it in a JSON. However, it doesn't look like I can do it directly in JS. Is there any way to run the API request in the extension? I saved the URL as a variable in the JS file and formatted it so that all it would take is plugging it into the request... if I could figure out how it would work. Edit: After thinking, maybe one way to solve it would be to run a script in one of the available languages (like Ruby) FROM the Javascript file in the extension... Is this possible?
has answer: http://stackoverflow.com/a/27575035
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/a/27735524
has body: The quick answer: you don't need to return undefinedValue. You can return anything you want. However, engine-&gt;evaluate() can only return a single value, which I think is the source of the confusion. Take a look at the evaluation code: QString command = input-&gt;toPlainText(); QScriptValue result = engine-&gt;evaluate(command); output-&gt;append(result.toString()); This takes a script string and evaluates it, assigning the resulting value into result, where it is then appended to the QTextEdit control. The return value of evaluate() is going to be the last value of the script. For example: QString command = "var a=1, b=2; a; b;"; QScriptValue result = engine-&gt;evaluate(command); output-&gt;append(result.toString()); result would contain 2, which would then get logged to the QTextEdit control. So, what's happening? Take this input for example: print("Stack"); print("Overflow"); When using the QtPrintFunction, "Stack" and "Overflow" are added to the output control as part of the QtPrintFunction implementation. When the evaluate() finishes, the last statement was print("Overflow") which returns undefined. The evaluation code then takes that return value and adds it to the output, resulting in: Stack Overflow undefined When using the myPrintFunction, that implementation doesn't log anything to the output, but returns the value. The result is that the evaluate() function only returns the last value ("Overflow"), resulting in this output: Overflow Which is what you are seeing. Since you want to redirect output to your own custom text editor, you need to change this block of code: QScriptEngine *engine = new QScriptEngine(this); QTextEdit *input = new QTextEdit(this); //QTextEdit *output = new QTextEdit(this); YourCustomEditor *output = getYourCustomEditor(); // Use my revised print function : QScriptValue fun = engine-&gt;newFunction(myPrintFunction); fun.setData(engine-&gt;newQObject(output)); // pass your editor in engine-&gt;globalObject().setProperty("print", fun…
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/43888450
score: 1
has comment: http://stackoverflow.com/comment/43888365
answers question: http://stackoverflow.com/q/27613481
downvote count: 0

http://stackoverflow.com/a/27491596
upvote count: 7
downvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/43425519
answers question: http://stackoverflow.com/q/27489426
score: 6
has body: You can overcome the vertical align problem by using css Flexbox. Add the class "vertical_center" to the parent div. Then add the following css .vertical_center { display: flex; align-items: center; }
has comment: http://stackoverflow.com/comment/63595437
has comment: http://stackoverflow.com/comment/73327673
has comment: http://stackoverflow.com/comment/43425850

http://stackoverflow.com/comment/43673707
type: QuestionComment
type: Comment
has text: You can't with the standard jQuery core.
score: 0
comment on: http://stackoverflow.com/q/27626527

http://stackoverflow.com/comment/43473787
comment on: http://stackoverflow.com/q/27521286
has text: @PatrickRuzand I got the same error message no matter I changed to dom.byId or registry.byId
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/43547192
type: Comment
type: QuestionComment
has text: @Victor2748 is the file even getting called? Like if you put the alert outside the function, does it shows up? If not, then your issue is inside the HTML, if yes, then the issue is in calling the function.
comment on: http://stackoverflow.com/q/27560516
score: 0

http://stackoverflow.com/q/27535511
tagged with: http://stackoverflow.com/tag/html
tagged with: dijit.form
type: Question
has answer: http://stackoverflow.com/a/27537678
tagged with: css
answer count: 1
tagged with: dojo
score: 0
has body: I'm using Dojo 1.10 and I need to display a Select widget centered horizontally on the page. I cannot figure out how to do it. I have guessed a number of CSS attributes to try with no luck. The Select widget is always displayed to the left. Nothing seems to move it to the center. How do I do it? More broadly, where in the Dojo documentation does it describe how to do this? Believe me when I say I have done web search after web search; maybe I don't know what to search for. Thanks in advance. This code is adapted from one of the dijit/form/Select samples. Tennessee Virginia Washington Florida California
has title: How to center a Dijit Select widget?
accepted answer: http://stackoverflow.com/a/27537678
tagged with: javascript
type: AnsweredQuestion

http://stackoverflow.com/a/27507589
score: 3
has comment: http://stackoverflow.com/comment/43446301
has comment: http://stackoverflow.com/comment/43453044
upvote count: 3
answers question: http://stackoverflow.com/q/27507547
downvote count: 0
has body: How to refill with the same colors: if ( i = colors.length ) { colors = [ "rgb(199, 179, 78)", "rgb(127, 195, 133)", "rgb(102, 169, 162)", "rgb(132, 122, 224)" ]; } But like others have suggested, there are other ways to do this like wrapping around to the first element again and not splicing, or randomizing which values there are.
type: Answer

http://stackoverflow.com/comment/43542916
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27558001
type: AnswerComment
has text: So, my modal code is inside of a script in my html code. (I made an Edit above), and i have a separate controller for this modal that's only called during the modals instantion, so putting it in the body tag doesn't trigger it.

http://stackoverflow.com/comment/43468620
type: AnswerComment
type: Comment
has text: Thanks New Dev. Now it's working fine : http://plnkr.co/edit/ULJlInfSlK7SIf3o8DOG?p=preview
comment on: http://stackoverflow.com/a/27519052
score: 0

http://stackoverflow.com/q/27637516
has title: Save RSA Key object from Cryptico.js
has body: I'm struggling to discover how to transform an javascript object, into some variable (array?) and save it with a code like: function onDownload() { document.location = 'data:Application/octet-stream,' + encodeURIComponent(RsaKey); } Why? The library cryptico (documentation: github) gives-me an easy to use RSA interface. But my nightmare came when the generated key pair, is an object. I don't know how to export this object from the client's browser, to a file, for later using. The public part of the key, can be converted in string, by the function publicKeyString But the private part, is inside the object. I read about the RSA algorithm and saw that the "d" is what matters in the private key, and I have the "d" in the key gen function, inside the rsa.js this.d = ee.modInverse(phi); I tried to get this value and put into a string, but didn't worked. Don't know what else to do. Appreciate any help.
has answer: http://stackoverflow.com/a/41940619
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/43694065
favorite count: 0
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/43695057
score: 1
tagged with: cryptico
type: Question
tagged with: javascript

http://stackoverflow.com/comment/43502607
has text: Thanks Teemu, I used **Event()** constructor to trigger events. My real application needs **drop** event but dataTransfer cannot be "emulated" (Security risks in the drag-and-drop model) so I decided to add a new attribute to event variable (created by Event()) an check (read) them by **drop** event function. Have a nice day.
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27532556

http://stackoverflow.com/a/27510363
score: 5
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27510303
upvote count: 5
answers question: http://stackoverflow.com/q/27510303
type: Answer
has body: That article excerpt is both correct and incorrect. It's correct that the body of the if will not be entered with if (x = 0), but it's incorrect when it says why. The incorrect part is highlighted: Instead of checking whether the variable x has the value 0 the example above will assign the value 0 to x. The body of the if statement will not be executed because the assignment expression results in undefined which is falsy (sic). That's just plain wrong. The result of an assignment expression is the value that was assigned, not undefined, so if (x = 0) won't enter the body of the if (because 0 is falsey), but if (x = 1) will (because 1 is truthy). Is it a matter of JS version? No, it's always been this way. Someone just got it wrong in those docs. In fact I made a mistake assuming that is possible to use the result of an assignment as a test value. It wasn't a mistake, you can&nbsp;&mdash; and sometimes, you want to. This is fairly common, for instance: while ((thing = getMeTheNextThing()) != null) { // ...do something with `thing` } That's also using the result of an assignment as a test. Sometimes people even write it like this: while (thing = getMeTheNextThing()) { // ...do something with `thing` } ...although I never do, because it's just too easy to see that as an == and mess something up. Note that it's very, very rare to want to assign to a variable within an if statement. It does happen, but it's really rare, and most style guides will suggest you break up the assignment and the branch. Almost always, when you see if (x = 0), what the author meant to write was if (x == 0) or if (x === 0). That is, they meant to test the value of x, not assign a new value to x. Example of what the JSLint docs mean about assigning zero: var x; snippet.log("first test: using 0"); if (x = 0) { snippet.log("entered if body"); } else { snippet.log("entered else body"); } snippet.log("second test: using 1"); if (x = 1) { snippet.log("entered if body"); } else { snippet.log("entered e…
has comment: http://stackoverflow.com/comment/43451314

http://stackoverflow.com/comment/43434076
type: AnswerComment
has text: Yep, worked, dont know why i didnt think of it in the first place. Thanks a ton man, its working now :)
comment on: http://stackoverflow.com/a/27499416
type: Comment
score: 0

http://stackoverflow.com/comment/43663263
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27620934
score: 0
has text: let me try :). Thanks

http://stackoverflow.com/comment/43572147
score: 0
has text: @user3634133 There are many videos on youtube that can help. e.g. https://www.youtube.com/results?search_query=JSP
type: QuestionComment
comment on: http://stackoverflow.com/q/27571189
type: Comment

http://stackoverflow.com/a/27525747
has comment: http://stackoverflow.com/comment/43480694
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27525457
has body: A Pure CSS Solution Depending on what you're wanting to achieve, you could make use of CSS's :target pseudo-class selector. Some URIs refer to a location within a resource. This kind of URI ends with a "number sign" (#) followed by an anchor identifier (called the fragment identifier). URIs with fragment identifiers link to a certain element within the document, known as the target element. For instance, here is a URI pointing to an anchor named section_2 in an HTML document: http://example.com/html/top.html#section_2 A target element can be represented by the :target pseudo-class. If the document's URI has no fragment identifier, then the document has no target element. For example: .Data-Sheets .expand2 { display: none; } .Data-Sheets .expand2:target { display: block; } Here's a JSBin demo of this in action, using the following markup: I should be visible when #foo is added to the URL. I should be visible when #bar is added to the URL. With no target specified: http://jsbin.com/qowurijavi/1 With #foo specified: http://jsbin.com/qowurijavi/1/#foo With #bar specified: http://jsbin.com/qowurijavi/1/#bar Provided your browser handles the :target pseudo-class, in the first example both p elements should be hidden; in the second you should see the first p element should be visible, but not the second; and in the third the second p element should be visible, but not the first.
has comment: http://stackoverflow.com/comment/43480526

http://stackoverflow.com/a/27576892
type: Answer
answers question: http://stackoverflow.com/q/27576653
score: 0
has body: Derived from the current answer marked as correct, it can all be much simpler: $(document).ready(function() { $('#exp').click(function(event) { $('.subchkbox').prop({ checked: $(this).prop('checked') }); }); });

image
tags question: http://stackoverflow.com/q/27504678
tags question: http://stackoverflow.com/q/27536982
tags question: http://stackoverflow.com/q/27637546
tags question: http://stackoverflow.com/q/27540502
tags question: http://stackoverflow.com/q/27494304
tags question: http://stackoverflow.com/q/27511468
tags question: http://stackoverflow.com/q/27586134
tags question: http://stackoverflow.com/q/27630705
tags question: http://stackoverflow.com/q/27594496
tags question: http://stackoverflow.com/q/27618707
tags question: http://stackoverflow.com/q/27532825
tags question: http://stackoverflow.com/q/27508086
tags question: http://stackoverflow.com/q/27573807
tags question: http://stackoverflow.com/q/27505517
tags question: http://stackoverflow.com/q/27539343
tags question: http://stackoverflow.com/q/27505391
tags question: http://stackoverflow.com/q/27592398
tags question: http://stackoverflow.com/q/27597366
tags question: http://stackoverflow.com/q/27569792
tags question: http://stackoverflow.com/q/27549134
tags question: http://stackoverflow.com/q/27567035
tags question: http://stackoverflow.com/q/27504797
tags question: http://stackoverflow.com/q/27502417
tags question: http://stackoverflow.com/q/27623218
tags question: http://stackoverflow.com/q/27542784
tags question: http://stackoverflow.com/q/27558193
tags question: http://stackoverflow.com/q/27521074
tags question: http://stackoverflow.com/q/27545511
tag name: image
tags question: http://stackoverflow.com/q/27625760
tags question: http://stackoverflow.com/q/27621168
tags question: http://stackoverflow.com/q/27621505
tags question: http://stackoverflow.com/q/27494310
tags question: http://stackoverflow.com/q/27507129
type: Tag
tags question: http://stackoverflow.com/q/27619555

http://stackoverflow.com/comment/43553440
type: QuestionComment
has text: OK, I'll try to explain it: Whenever the user resizes his screen or scrolls down, the image isn't displayed correctly. What I would expect is that the image scrolls up. In my case, it's scrolling with what the user sees. I guess that's due to the 'background-attachment: fixed' property, but I didn't find another solution yet. Setting the ['background-attachment' property to 'scroll'](http://jsfiddle.net/011rjqqt/3/) will give me the desired scrolling behaviour, but it's removing the effect of the 'filled up image'.
comment on: http://stackoverflow.com/q/27563193
score: 0
type: Comment

http://stackoverflow.com/comment/43400328
type: AnswerComment
comment on: http://stackoverflow.com/a/27484079
type: Comment
has text: please explain your answer
score: 0

http://stackoverflow.com/q/27476388
has comment: http://stackoverflow.com/comment/43387296
has comment: http://stackoverflow.com/comment/43387159
answer count: 1
has comment: http://stackoverflow.com/comment/43387359
has comment: http://stackoverflow.com/comment/43415121
has comment: http://stackoverflow.com/comment/43387044
favorite count: 0
has comment: http://stackoverflow.com/comment/43387382
has body: I am trying to parse a text document containing multiple bullets. I would like to parse a bullet point having single newline characters but would like to break when 2 or more newline characters are found. for example : ----------------------------------- * bullet text on new line more text this should be a separate block ----------------------------------- when passed through the function, this should capture : ----------------------------------- -&gt; start bullet text on new line more text &lt;- end capture this should be a seperate block ----------------------------------- This is what i have so far , I have written a javascript function that can recursively parse ordered/unordered mediawiki'sh lists to html. Only difference is that the blocks are onserted on 2 line breaks vs mediawiki way of 1 line breaks. function parseLists(str) { //How can I capture bulleted lines with less than or equal to "1" newline character? return str.replace(/(?:(?:(?:^|\n)[\*#].*)+)/g, function (match) { var listType = match.match(/(^|\n)#/) ? 'ol' : 'ul'; match = match.replace(/(^|\n)[\*#][ ]{0,1}/g, "$1"); match = parseLists(match); return '&lt;' + listType + '&gt;&lt;li&gt;' + match.replace(/^\n/, '').split(/\n/).join('&lt;/li&gt;&lt;li&gt;') + '&lt;/li&gt;&lt;/' + listType + '&gt;'; }); } http://jsfiddle.net/epinapala/L18y7zyx/7/ I think the problem is with the first regex - /(?:(?:(?:^|\n)[*#].*)+)/g to match bullts, this regex actually breaks when a newline character is found, How can I capture bulleted lines with less than or equal to "1" newline character? I would like to parse the bullets with newlines in them, and would like to break a bullet only if there are 2 or more new line characters. followed by bullet content. [Edit] - I was able to make some changes and the current version of my function looks like below function parseLists2(str) { return str.replace(/(?:(?:(?:^|\n)[\*#](?:.+\n)+.*))/g, function(match){ match = match.replace(/\n(?![#\*])/g," "); //alert(match); var …
has comment: http://stackoverflow.com/comment/43387701
tagged with: regex
has comment: http://stackoverflow.com/comment/43387571
tagged with: mediawiki
has comment: http://stackoverflow.com/comment/43426698
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27528445
accepted answer: http://stackoverflow.com/a/27528445
downvote count: 0
has title: Parsing bullets containing newlines from plain text
has comment: http://stackoverflow.com/comment/43387317
linked to: http://stackoverflow.com/q/1068280
score: 6
type: Question
has comment: http://stackoverflow.com/comment/43387101
has comment: http://stackoverflow.com/comment/43424724
upvote count: 6
tagged with: javascript

http://stackoverflow.com/q/27482980
type: Question
has title: how to get the dynamic column header and result from ajax call in jquery datatable
tagged with: javascript
has answer: http://stackoverflow.com/a/27486026
has comment: http://stackoverflow.com/comment/43515718
has comment: http://stackoverflow.com/comment/43399631
answer count: 3
tagged with: datatables
downvote count: 0
has answer: http://stackoverflow.com/a/30727092
tagged with: jquery
has body: I want to display the dynamic column header along with the results in datatable.In aaData and aoColumns attributes has to get result data and columns name from ajax call, Please suggest me how to do this or give me some alternate solution to get the dynamic data and column header from ajax call, Here is my code.: var $table=$('#MSRRes').dataTable( { "bFilter": false, "bDestroy": true, "bDeferRender": false, "bJQueryUI": true, "oTableTools": { "sSwfPath": "swf/copy_cvs_xls_pdf.swf", }, "sDom": 'TC&lt;"clear"&gt;l&lt;"toolbar"&gt;frtip', "ajax" :{ url: 'getResult.php', type: "POST", data: { formData:postData, } }, "aaData": results.DATA , "aoColumns": [ column_names ] }); Here is my ajax call to get the result data and column names to be display: $result=$afscpMsrMod-&gt;getAdvanceSearchResults($colCond,$whereCond,$having); foreach($cols as $col) { array_push($colArr, $colnames); } $colJson= json_encode($colArr); $newarray = array( "draw" =&gt; 1, "recordsTotal" =&gt; sizeof($result), "recordsFiltered" =&gt; sizeof($result), "data" =&gt; $result, "COLUMNS" =&gt; $colJson ); echo json_encode($newarray);
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/29551604
linked to: http://stackoverflow.com/q/14098680
tagged with: datatable
score: 2
upvote count: 2
type: UnansweredQuestion

http://stackoverflow.com/q/27602321
has comment: http://stackoverflow.com/comment/43628454
tagged with: datebox
has body: I'm using jQuery Mobile DateBox (in mode "timebox") to make the user select a time. This works fine, but both hitting the top-left close icon and the Set Time button result in the same callback with the same arguments. I'm looking for a way to make the close button just dismiss the control. I found example here, but I fear that the DOM for the control has changed as $('.ui-datebox-controls') gives an empty result. I can't find the control in the DOM either. So, I hoped for openCallBack or beforeOpenCallBack to realise a similar trick, but neither appear to be called.
linked to: http://stackoverflow.com/q/9815613
answer count: 0
type: Question
score: 0
has title: How to detect clear/close from set in jQueryMobile DateBox?
tagged with: jquery-mobile
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43666260

http://stackoverflow.com/comment/49023818
type: Comment
has text: could you please provide the details on what needs to be tweaked? Thank you!
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/30307641

http://stackoverflow.com/comment/43484083
type: AnswerComment
has text: ...so it's not me, and it's not jQuery using the `document.write`, it's Google's API. Bugger.
type: Comment
comment on: http://stackoverflow.com/a/27524596
score: 0

http://stackoverflow.com/q/27484037
type: Question
has title: event loop model in javascript
has comment: http://stackoverflow.com/comment/43400284
tagged with: javascript
upvote count: 7
answer count: 1
has comment: http://stackoverflow.com/comment/43400273
has comment: http://stackoverflow.com/comment/43400518
has comment: http://stackoverflow.com/comment/43400307
favorite count: 0
has comment: http://stackoverflow.com/comment/43400416
has comment: http://stackoverflow.com/comment/43400543
linked to: http://stackoverflow.com/q/15924014
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/43400514
has comment: http://stackoverflow.com/comment/43400486
has answer: http://stackoverflow.com/a/27484257
accepted answer: http://stackoverflow.com/a/27484257
score: 7
has comment: http://stackoverflow.com/comment/43400533
has body: based on: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/EventLoop stack frame is empty before next event is processed. So why in folowing snippet alert displays 1 instead of 0 because alert function should run before callback var a=0; var b={}; $(b).on("event", function (){ a++; }); $(b).trigger("event"); alert(a); http://jsfiddle.net/nxjhokL0/ Thanks!

http://stackoverflow.com/comment/43686171
has text: you are mixing mysql_ and mysqli_ functions. That is not correct.
comment on: http://stackoverflow.com/q/27633108
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/43542033
has text: If you want use the soundcloud sdk you need a client_id. Here a link where you can sign up : https://soundcloud.com/signup Also don't forget to accept the answer if your problem is solved.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27537599
type: AnswerComment

http://stackoverflow.com/a/27477407
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27477082
accepted answer of: http://stackoverflow.com/q/27477082
has body: you can use a $scope variable to detect a progressing of a ajax request. based on that variable you can show or hide the spinner $scope.sendAjax = function() { $scope.prograssing = true; // show spinner $http.get('data.json').then(function() { //sucess $scope.prograssing = false; // hide spinner when success ajax } , function() { //error $scope.prograssing = false; // hide spinner when unsuccessful ajax }); } here is the working plunker
type: Answer
upvote count: 6
score: 6

http://stackoverflow.com/comment/135674840
type: Comment
comment on: http://stackoverflow.com/a/27637038
score: 0
type: AnswerComment
has text: In your case `arr.forEach(function (_, i) {..})`, what should I use for the second parameter if I want to get only the third parameter...?

http://stackoverflow.com/q/27555426
tagged with: ajax
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/27555575
upvote count: 2
tagged with: wordpress
has title: Javascript for a suggestion box that pops up as the user scrolls down the screen.
accepted answer: http://stackoverflow.com/a/27555575
type: AnsweredQuestion
score: -5
has body: I'm trying to build an Ajax snippet for a wordpress site that will pop up and suggest the next blog post for that category when the user scrolls down the screen. Is there any jQuery plugins available for this or where should I start?
downvote count: 7
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/27607677
has answer: http://stackoverflow.com/a/27607811
tagged with: css
has answer: http://stackoverflow.com/a/27607805
type: AnsweredQuestion
upvote count: 2
possible better answer: http://stackoverflow.com/a/27607811
type: Question
accepted answer: http://stackoverflow.com/a/27607805
tagged with: javascript
has comment: http://stackoverflow.com/comment/43637679
has title: display image in table row
answer count: 2
score: 2
downvote count: 0
tagged with: jquery
favorite count: 0
has body: I have a requirement on mouse over on the table, image one will display and on mouse over of the image one, a tooltip will display. When I click on tooltip link test, image two has to display inside td and previous image one should hide. Issue is image two is getting displayed but I can see only if I mouse over on the table. How can I show image two once I click on tooltip link test without mouse over? Here is the fiddle http://jsfiddle.net/0w9yo8x6/45/. CSS : td.myData &gt; img { display: none; float: right; height: 19px; } td.myData:hover &gt; img { display: inline-block; } JavaScript : function test(data) { alert('test invoked with data: ' + data); var two = document.getElementById('two'); two.style.visibility = 'visible'; var one = document.getElementById('one'); one.style.visibility = 'hidden'; }
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/27576389
score: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/63332116
has answer: http://stackoverflow.com/a/27576421
answer count: 5
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27576416
has answer: http://stackoverflow.com/a/27576400
has answer: http://stackoverflow.com/a/27576449
upvote count: 1
type: Question
has title: Html local storage saving data
has comment: http://stackoverflow.com/comment/43578207
tagged with: javascript
has body: I have a simple main menu program. HOW IT WORKS: Simple, once you click level one and click on the done button, it unlocks level two, the problem is when you refresh the page it does not save it and level two is gone again. Code I've tried: I tried HTML Local storage, here are some examples I used window.highestLevel = localStorage.getItem('highestLevel'); and stuff like that but I can't get it to save the level. Please help here is a link. jsFiddle Note: I want to use html local storage.
has comment: http://stackoverflow.com/comment/43578907
downvote count: 0

http://stackoverflow.com/comment/43430497
score: 0
comment on: http://stackoverflow.com/q/27499864
type: QuestionComment
type: Comment
has text: I am specifically not using svg elements in my code.

http://stackoverflow.com/q/27477934
favorite count: 0
accepted answer: http://stackoverflow.com/a/27478070
tagged with: regex
type: AnsweredQuestion
has title: JavaScript: Stripping URLs in meta data without stripping whitespace in all strings
has comment: http://stackoverflow.com/comment/43389804
has comment: http://stackoverflow.com/comment/43389662
upvote count: 1
downvote count: 1
type: Question
has body: I am trying to validate and pass valid JSON to store in a database. I'm also allowing a user to copy the meta-data. Unfortunately, the below is failing and I'd like to know how to strip just URLs to be valid, without removing whitespace from other key-value pairs. Invalid example: { "hello" : "http : //google.com" } Valid examples: var metaDataContent = {"hello":"http://google.com"} var metaDataContent = {"typeId":5,"mainEventId":301049,"meetingId":54,"title":"Hour of Power"} I've already tried metaDataContent.replace(RegExp(" ", "g"), ""); which will correctly strip the first example and store in the DB fine, but unfortunately, will also remove the spacing from "title":"HourofPower" Any help with improving the regex would be greatly appreciated!
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/43389561
has answer: http://stackoverflow.com/a/27478070
answer count: 1
tagged with: jquery

http://stackoverflow.com/q/27572523
has comment: http://stackoverflow.com/comment/45472628
accepted answer: http://stackoverflow.com/a/28461881
downvote count: 1
has comment: http://stackoverflow.com/comment/43571199
type: Question
score: 3
tagged with: pushstate
tagged with: javascript
tagged with: browser-history
has comment: http://stackoverflow.com/comment/43572915
upvote count: 4
has title: How to modify history as facebook's photo viewer does?
answer count: 1
has comment: http://stackoverflow.com/comment/43570528
has comment: http://stackoverflow.com/comment/43574116
tagged with: jquery
has comment: http://stackoverflow.com/comment/43570788
has answer: http://stackoverflow.com/a/28461881
favorite count: 0
has body: I have a popup modal on my website similar to facebook's photo viewer. When the modal is opened, it is displaying content from another page and I want to change the address bar value and history to show this. There is a dropdown in the modal that changes the content in the modal to that of a different page. When this happens, I once again want to change the address bar value and history to show the page was changed. Essentially, I want to exactly replicate the behavior of facebook's photo viewer, which you can try out by: Clicking on this link Clicking on Photos Clicking on a photo on the page Click the right or left arrows (or use your keyboard arrow keys) to change iamges a) click the back and forward history buttons in your browser b) click out of the photo viewer I tried to create a JSFiddle to show where I am at with this, but JSFiddle apparently does not allow the history to be manipulated. As such, I've put my code online here, and which you can download from here. A few key points: Start by viewing the index page, then use the link to go to the test page When the modal is closed, pressing the back button should not reopen the modal, but instead should take you back to the index page. After closing the modal, pressing the forward button should reopen the modal in it's original state as facebook's photo viewer does In my production code, the full URL will be changed instead of adding/changing a variable in the URL as shown in the demo code
has comment: http://stackoverflow.com/comment/43570823
has comment: http://stackoverflow.com/comment/43570714
has comment: http://stackoverflow.com/comment/43570944
tagged with: html5-history
type: AnsweredQuestion

http://stackoverflow.com/a/27612051
accepted answer of: http://stackoverflow.com/q/27611303
score: 0
answers question: http://stackoverflow.com/q/27611303
type: AcceptedAnswer
type: Answer
has body: Currently your donut chart has a white background-color whereas the body element of your page has a transparent background: body { background-color: transparent; margin: 8px; } Source: your webpage. Note the margin associated to your body element. It corresponds to the top and left "margins of tiles" that you can see on your screenshot. On the web, the margin of tiles represent transparence. To fix this, you should set the background-color to white. Add the following to your CSS: body { background-color: white; } Or, just above , add this line:

http://stackoverflow.com/q/27611610
favorite count: 0
has comment: http://stackoverflow.com/comment/43645586
has body: I have the following code: &lt;script type="text/javascript"&gt; function createDialog(text, id) { return $("&lt;div class='dialog'&gt;&lt;textarea id='textarea' class ='texbox' name='textarea' value='text'&gt;" + text + "&lt;/textarea&gt;&lt;/div&gt;" .dialog({ dialogClass: "dialogStyle", title: "Edit Description", resizable: false, position: { my: "right+240 top-200", at: "center", of: $("body"), within: $("body") }, height: 200, width: 300, modal: true, buttons: { "Save": function() { var product = $(this).find('textarea [name="textarea"]').val(); $(this).dialog("close"); $("#" + id).val(product); }, Cancel: function() { $(this).dialog("close"); } }, overlay: { opacity: 0.5, background: "black" } }); } &lt;/script&gt; How do i incorporate a character count with max 255 characters for the textarea within the dialog box? I've looked around for code but placing it within the function createDialog won't work and getting length variable doesn't work either when putting it inside the dialog.
upvote count: 1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27611837
has title: How do you count characters of a textarea within a dialog?
has comment: http://stackoverflow.com/comment/43645798
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/43645863
has comment: http://stackoverflow.com/comment/43645894
downvote count: 0
has comment: http://stackoverflow.com/comment/43645742
possible better answer: http://stackoverflow.com/a/27611831
tagged with: javascript
tagged with: jquery
tagged with: oracle-apex
has answer: http://stackoverflow.com/a/27611831
has comment: http://stackoverflow.com/comment/43645874
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27611837
score: 1

http://stackoverflow.com/q/27484408
type: Question
tagged with: google-maps
upvote count: 0
tagged with: javascript
tagged with: jquery
score: -1
has comment: http://stackoverflow.com/comment/43401851
has answer: http://stackoverflow.com/a/27485373
answer count: 1
has body: I am showing 5 random places using google map API. Here is the fiddle: http://jsfiddle.net/d0s4yzag/ function mapExecute(targetLocation) { var currentLocation = new google.maps.LatLng(targetLocation.latitude, targetLocation.longitude) mapProp = { center: new google.maps.LatLng(targetLocation.latitude, targetLocation.longitude), zoom: 12, mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById("googleMap"), mapProp); var marker = new google.maps.Marker({ position: new google.maps.LatLng(targetLocation.latitude, targetLocation.longitude), animation: google.maps.Animation.BOUNCE }); marker.setMap(map); for (var i = 0; i &lt; data.Locations.Location.length; i++) { var entity = data.Locations.Location[i]; var myLatLng = new google.maps.LatLng(data.Locations.Location[i].latitude, data.Locations.Location[i].longitude); console.log("myLatLng", myLatLng); var mark = new google.maps.Marker({ position: myLatLng, map: map }); calcRoute(); } } I have markers placed on it and I need to show the name of the place which I have in my data JSON as a tool tip on mouse over. I tried the solution what they have given here, Google Maps API - Marker ToolTip. But it doesn't work for me.
favorite count: 0
accepted answer: http://stackoverflow.com/a/27485373
has title: Tooltip on hover of marker
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/21861585
downvote count: 1

http://stackoverflow.com/q/27534535
has title: Run javascript function after file is added to upload but before submit button
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has body: I have an input that accepts a file to be uploaded. The problem is that I can not figure out how to call the function after the file is added to the input. I have tried things like onMouseMove, onClick and onChange but they do not call the function after the file is added to the input. jQuery('.attachment').click(function(){ console.log("test"); checkFile(); });
downvote count: 4
has comment: http://stackoverflow.com/comment/43497491
has answer: http://stackoverflow.com/a/27534599
has comment: http://stackoverflow.com/comment/43497404
linked to: http://stackoverflow.com/q/12030686
has answer: http://stackoverflow.com/a/27534733
has comment: http://stackoverflow.com/comment/43497557
favorite count: 0
type: UnansweredQuestion
score: -3
upvote count: 1

http://stackoverflow.com/comment/43632901
comment on: http://stackoverflow.com/a/27605137
type: AnswerComment
score: 0
type: Comment
has text: If Chrome is still using V8 (ISTR it is?) then the results from Chrome _should_ extrapolate to V8.

http://stackoverflow.com/comment/43588325
type: AnswerComment
has text: And this is an answer to this question _how?_
comment on: http://stackoverflow.com/a/27581432
score: 0
type: Comment

text
tags question: http://stackoverflow.com/q/27570647
type: Tag
tags question: http://stackoverflow.com/q/27579781
tags question: http://stackoverflow.com/q/27627053
tags question: http://stackoverflow.com/q/27496961
tags question: http://stackoverflow.com/q/27575255
tags question: http://stackoverflow.com/q/27531208
tags question: http://stackoverflow.com/q/27606025
tag name: text
tags question: http://stackoverflow.com/q/27622506

http://stackoverflow.com/a/27566763
has comment: http://stackoverflow.com/comment/43567178
has body: Your query var query={'UserID':req.body.UserID}; identifies the document you want to edit. Then you need another query to identify which object in the NetworkRequest array that the UserID should be pushed into. Something like below: var query = { 'UserID':req.body.UserID, 'NetworkRequest._id': ObjectId(someNetworkRequestId) }; Then use this update query containing $ which is the index of the object in the nested array(NetworkRequest) var update = { $push:{ 'NetworkRequest.$.to': req.body.FriendID } };
has comment: http://stackoverflow.com/comment/43566379
has comment: http://stackoverflow.com/comment/43565745
upvote count: 1
has comment: http://stackoverflow.com/comment/43566772
score: 1
has comment: http://stackoverflow.com/comment/43565415
answers question: http://stackoverflow.com/q/27566647
downvote count: 0
has comment: http://stackoverflow.com/comment/43567083
has comment: http://stackoverflow.com/comment/43565667
type: Answer

http://stackoverflow.com/a/76009101
has body: I am using Google Chrome and had the same problem for a few days. Then, I realized that the error only occurred when I used a playlist attribute to force playback in a loop. Therefore, I deleted my playlist attribute and used the onStateChange method to restart playback. If you ever encounter this problem and have a playlist attribute, it's worth checking whether it is the cause.
type: Answer
answers question: http://stackoverflow.com/q/27573017
score: 0

http://stackoverflow.com/q/27608427
has answer: http://stackoverflow.com/a/27608527
has body: This are middlewares and their options i used: app.use(require('cookie-parser')(credentials.cookieSecret)); app.use(require('express-session')({ secret: 'introduced skill', resave: false, saveUninitialized: false, cookie: {secure:true,maxAge:900000} })); This my post login function : app.post('/login',function(req,res){ req.session.email=req.body.u_email; res.redirect('/admin'); }); This is my code for redirecting to home page after successful login. I am saving session using email . When user is redirecting to home page i am loosing the session. Actual problem is req object in the above code is not the same object which is in routing function . I didn't understand how new req object is creating instead of using old req object. Please help me with the problem. I am using express 4 ,express-session
type: Question
has title: Loosing session when redirecting to home page from login page in node.js
tagged with: session
tagged with: javascript
has answer: http://stackoverflow.com/a/27625437
tagged with: express
score: 0
answer count: 2
tagged with: server-side
has comment: http://stackoverflow.com/comment/43640233
type: UnansweredQuestion
tagged with: node.js

http://stackoverflow.com/comment/43460067
type: Comment
has text: great thanks! I love that there are always more than one way to do things.
type: AnswerComment
comment on: http://stackoverflow.com/a/27514825
score: 0

http://stackoverflow.com/a/27575984
has comment: http://stackoverflow.com/comment/43639588
score: 2
has comment: http://stackoverflow.com/comment/43620821
downvote count: 0
has comment: http://stackoverflow.com/comment/43636031
has body: It is possible the device is blacklisted by the Linux HID driver. If you can put your Chrome OS device in developer mode or connect the device to a Linux computer you can check the kernel log to see how the device is recognized. If all is well then there should be a /dev/hidraw node created for the device. Can you tell me what the device vendor and product IDs are?
upvote count: 2
has comment: http://stackoverflow.com/comment/43612127
accepted answer of: http://stackoverflow.com/q/27557114
type: Answer
answers question: http://stackoverflow.com/q/27557114
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43613157

http://stackoverflow.com/comment/43536107
comment on: http://stackoverflow.com/q/27554866
score: 0
type: Comment
type: QuestionComment
has text: should be `reader.onloadend ` instead of `reader.onload`

http://stackoverflow.com/comment/43483574
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27527427
has text: @JamesDonnelly that's not necessarily the same thing, though it might be what the OP wants.

http://stackoverflow.com/comment/43384952
score: 1
comment on: http://stackoverflow.com/q/27474930
type: Comment
type: QuestionComment
has text: Tested in Firefox 34.0.1 on Windows and the problem does not occur. Tested in Opera 26.0.1656.32 on Windows and the problem occurs. Tested in Safari 5.1.7 on Windows and the problem occurs. Judging from all this testing, it looks like it is specific to Webkit. Non-Webkit browsers don't have the problem.

http://stackoverflow.com/comment/44049344
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27494840
type: Comment
has text: There was no answer which help me to find a 100% solution but I have changed my whole project to ANSI based textfiles and use correct charset. I was struggling when using UTF-8 w/o BOM because there are troubles with notepad++ and filezilla to ensure UTF-8 w/o BOM. Thanks to t.niese, you gave me a direction for a solution.

http://stackoverflow.com/q/27624139
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/27625094
type: AnsweredQuestion
score: 3
tagged with: radial-gradients
upvote count: 3
has comment: http://stackoverflow.com/comment/43669789
has comment: http://stackoverflow.com/comment/43670264
type: Question
has body: I'm making a game with javascript canvas. I'm drawing all the game elements, like the player, blocks and lines, but I don't want you to see all that. Instead want the whole screen to be black, expect for in some places where there is lightsources. I don't need any shadows, just a circle on the screen that is lit up with a radial gradient. I am able to achieve this for one lightsource by adding a transparent gradient after I have drawn everything else, like this: (imagine the red rectangle to be all the things in the game) //Drawing all the game elements ctx.fillStyle = "red"; ctx.fillRect(100, 100, 400, 300); //adding the darkness and the lightsources var grd = ctx.createRadialGradient(150, 100, 5, 150, 100, 100); grd.addColorStop(0, "transparent"); grd.addColorStop(1, "black"); ctx.fillStyle = grd; ctx.fillRect(0, 0, 600, 400); JSFiddle But how can I achieve this with multiple lightsources? The technique showed won't work. I have tried using the Illuminated.js api, but that was incredibly slow, and I don't need anything of the shadows and all that fancy stuff, just a circle where you can see the game.
accepted answer: http://stackoverflow.com/a/27625094
tagged with: javascript
has comment: http://stackoverflow.com/comment/43670182
tagged with: canvas
has title: Javascript canvas simple lightsource

http://stackoverflow.com/comment/43438406
score: 0
type: AnswerComment
type: Comment
has text: I want to display alert only the email is exist in db.If the textbox is empty I don't want any alert...
comment on: http://stackoverflow.com/a/27502986

http://stackoverflow.com/q/27636880
type: Question
downvote count: 2
has comment: http://stackoverflow.com/comment/43764017
answer count: 1
tagged with: javascript
favorite count: 0
has body: So I want to make a function with if in my html using django. My function looks like : function try() {document.getElementById("demo").inerHTML = '{%for x in xl%}'+ '{%if x.name == document.getElementById("select1").value%}'+ ' hello '+ '{%endif%}{%endfor%}'} And the relevant html is : So just to make it clear : 'xl' is a list, the items in this list have a name variable. I want my web to show in the "demo" paragraph 'hello' buttons for each time that the selcted animal is the name of item in the list. When trying to run this it says : " Could not parse the remainder: '("select1").value;' from 'document.getElementById("select1").value;' " Please help me find what`s wrong and how to fix it, Thanks.
has title: How to use the value of in with django function?
has answer: http://stackoverflow.com/a/27676045
tagged with: python
has comment: http://stackoverflow.com/comment/43695546
upvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43692709
tagged with: django
has comment: http://stackoverflow.com/comment/43693958
score: -2

http://stackoverflow.com/a/27513599
score: 0
answers question: http://stackoverflow.com/q/27513195
type: Answer
has body: Commenters are correct. There are formatting errors, but that was probably just a mistake since you said it was hiding all the elements on the page (i.e. the code was sorta working). If you're going to have multiple elements on the page, you can't use IDs. You need to use classes. I thought I might add a solution that doesn't even require javascript at all just maybe to inspire a way of doing it. It requires certain things of the markup (this one requires the elem class to be a next sibling of the original "img" elements). This could be adjusted, but you'll need to make sure the .img boxes have a tabIndex="0" so they can receive focus. CSS-only solution .img { height: 5em; width: 5em; background: gray; border: .5em solid #eee; margin: 1em; } .elem { width: 5em; height: 2em; background: lime; display: none; } .img:focus + .elem { display: inline-block; } Click the gray box to show the elem div

http://stackoverflow.com/q/27552370
has answer: http://stackoverflow.com/a/27554268
type: AnsweredQuestion
has title: Display Vines in Bootstrap collapse modules
tagged with: twitter-bootstrap
score: 0
tagged with: iframe
accepted answer: http://stackoverflow.com/a/27554268
type: Question
tagged with: vine
answer count: 1
has body: I'm trying to display iFrame embedded vines in a collapse module of Twitter Bootstrap. VINE #1 Place de la république 1/20 - Place de la république VINE #2 Quai de Seine 2/20 - Quai de Seine Problem is, it only display the one of the non collapsed panel. Probably because the server doesnt load hid Vines... I saw a solved problem quite similar to mine with google maps iframe but can't make it work for my case. :( $('[data-toggle="collapse"]').click('show.bs.collapse', function() { var mapFrame = $($(this).attr('href') + ' .googlemap iframe'); if (!$(mapFrame).hasClass('map-refreshed')) { mapFrame.attr('src', mapFrame.attr('src')+''); mapFrame.addClass('map-refreshed'); } }); My be the easiest way is to load my Vines when I open a collapsed panel ? But i don't how to do it... Any help would be really appreciated.
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/27539869
upvote count: 1
has answer: http://stackoverflow.com/a/27539915
has title: javascript how to detect keyboard input
type: AnsweredQuestion
has body: when focusing on a certain input, user press kind of combination key such as "ctrl+e", I would like to show "ctrl+e" in the input. next time user press another combination key, it will clean input and show the new one. how can I make this? I look for some javascript plugins, but they are most for detecting certain input. like this: https://github.com/OscarGodson/jKey $("input").jkey("i",function(){ jkey.log("You pressed the i key inside of an input."); }); thanks a lot.
linked to: http://stackoverflow.com/q/14561988
possible better answer: http://stackoverflow.com/a/27539915
type: Question
has comment: http://stackoverflow.com/comment/43507503
has answer: http://stackoverflow.com/a/27540232
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: keyboard
favorite count: 0
score: 1
accepted answer: http://stackoverflow.com/a/27540232

http://stackoverflow.com/comment/43560882
type: Comment
has text: Nice! If you had another template literal there, like ${person.message}, it would be translated along?
score: 2
type: AnswerComment
comment on: http://stackoverflow.com/a/27567436

http://stackoverflow.com/a/27605330
answers question: http://stackoverflow.com/q/27563402
has comment: http://stackoverflow.com/comment/43641907
type: Answer
upvote count: 11
score: 11
has comment: http://stackoverflow.com/comment/43641762
has comment: http://stackoverflow.com/comment/43642107
has body: You ask the same question I had for years while exploring the potential advantages of CouchDB in Forms-over-Data use-cases. Initially my hope was to find an approach that enables data validation based on the same JSON schema definition and validation code - server- and client-side. It has turned out that it is not only possible but also some additionally advantages existing. Where put schema in CouchDB ? As regular document? Design document ? Or maybe store them as file ? But if I would validate them, especially server-side in validate_doc_update function, they should be stored in design documents. You are right. The design doc (ddoc) that also includes the validate_doc_update function to execute the validation before the doc update is the most common place to put the schemata in. this in the validate_doc_update function is the ddoc itself - everything included in the ddoc can be accessed from the validation code. I had began to store schemata as JSON object in my general library property/folder for commonjs modules e.g. lib/schemata.json. The type property of my docs specified the key of the schema that the doc update validation should fetch e.g. type: 'adr' -> lib/schemata/adr. A schema could also refer to other schemata per property - a recursive validation function has traversed to the end of any property no matter from what type the nested properties were. It has worked well in the first project. { "person": { "name": "/type/name", "adr": "/type/adr", ... }, "name": { "forname": { "minlenght": 2, "maxlength": 42, ... }, "surname": { ... } }, "adr": { ... } } But then i wanted to use a subset of that schemata in another project. To simply copy it over and to add/remove some schemata would have been too short-sighted thinking. What if a general schema like for an address have a bug and needs to be updated in every project it is used? At this point my schemata were stored in one file in the repository (i use erica as upload tool for ddocs). Then I realized that wh…
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27563402

http://stackoverflow.com/comment/95070022
type: Comment
comment on: http://stackoverflow.com/a/27496510
has text: its in a content script, i want to play an mp3 sound thats in the chrome extension dir
score: 0
type: AnswerComment

http://stackoverflow.com/q/27563496
tagged with: http://stackoverflow.com/tag/html
tagged with: angularjs-watch
has comment: http://stackoverflow.com/comment/43552506
type: UnansweredQuestion
type: Question
has title: When browser refresh localStorage flushes
tagged with: gridster
linked to: http://stackoverflow.com/q/3738047
tagged with: javascript
score: 0
answer count: 1
has body: I am tinkering this code now and I would like to make use of localStorage to save the state of my widgets on my dashboard so that when the user goes back to my application the position of the widgets are intact and saved but everytime I refresh the browser it goes back to its current scope.dashboards state which I have no idea on how will I fix. I used ngStorage module for localStorage var modInProgr = false; $scope.$watch("dashboards['1'].widgets", function(newVal, oldVal) { if (!modInProgr) { modInProgr = true; // modify dashboards $scope.$storage = $localStorage; $localStorage.sample = $scope.dashboards[1]; console.log($localStorage.sample); } $timeout(function() { modInProgr = false; }, 0); $scope.dashboard = $localStorage.sample; }, true); // init dashboard $scope.dashboard = $localStorage.sample;
has answer: http://stackoverflow.com/a/32996536
tagged with: angularjs
has comment: http://stackoverflow.com/comment/43552524

http://stackoverflow.com/q/27574733
tagged with: recaptcha
accepted answer: http://stackoverflow.com/a/27703907
linked to: http://stackoverflow.com/q/22540612
has answer: http://stackoverflow.com/a/46211500
has answer: http://stackoverflow.com/a/28932806
has answer: http://stackoverflow.com/a/38548102
tagged with: ruby-on-rails
type: AnsweredQuestion
has body: I have a registration form with the new google recaptcha widget on it. When a user submits info, we check the validation with javascript and return the problems to the page (ex: "please use a valid phone number"). however, since the page doesn't reload, when the user enters correct info and goes to submit again (without having to do the recaptcha again)...the recaptcha is no longer valid and they can't submit without reloading the page. is there a good solution to this? can I reload the widget somehow? i tried grecaptcha.render but it didn't really do anything. EDIT: When I try to render the widget again, it says "placeholder element must be empty" I tried emptying the element which seemed to work ($('.g-recaptcha').empty();) and then rendering but it still threw the same error.
has answer: http://stackoverflow.com/a/31936250
answer count: 11
has answer: http://stackoverflow.com/a/34466376
type: Question
has comment: http://stackoverflow.com/comment/43819801
upvote count: 35
has answer: http://stackoverflow.com/a/37901590
downvote count: 0
linked to: http://stackoverflow.com/q/3371314
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/27695239
has answer: http://stackoverflow.com/a/49761154
has answer: http://stackoverflow.com/a/29846334
has answer: http://stackoverflow.com/a/27687266
score: 35
possible better answer: http://stackoverflow.com/a/37901590
has answer: http://stackoverflow.com/a/27703907
has title: How to reload the google recaptcha widget after user submits invalid inputs

http://stackoverflow.com/q/27512846
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/43456262
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27513082
tagged with: express
has answer: http://stackoverflow.com/a/27513082
upvote count: 4
answer count: 2
score: 3
has comment: http://stackoverflow.com/comment/43456102
favorite count: 0
linked to: http://stackoverflow.com/q/7042340
has answer: http://stackoverflow.com/a/27513111
has comment: http://stackoverflow.com/comment/43456358
has body: Well, after I read many threads about this I begin to stagnate. The error is the popular Error: Can't set headers after they are sent. The best answer is here but, i have no repeated functions or twice executed callbacks (At least not that I know), it's just an standard base rest API. Full trace log: /home/nano/Dev/JS/OMI/node_modules/mongoose/lib/utils.js:413 throw err; ^ Error: Can't set headers after they are sent. at ServerResponse.OutgoingMessage.setHeader (http.js:689:11) at ServerResponse.header (/home/nano/Dev/JS/OMI/node_modules/express/lib/response.js:666:10) at ServerResponse.send (/home/nano/Dev/JS/OMI/node_modules/express/lib/response.js:146:12) at ServerResponse.json (/home/nano/Dev/JS/OMI/node_modules/express/lib/response.js:235:15) at Promise.&lt;anonymous&gt; (/home/nano/Dev/JS/OMI/app/routes/clientes.js:19:11) at Promise.&lt;anonymous&gt; (/home/nano/Dev/JS/OMI/node_modules/mongoose/node_modules/mpromise/lib/promise.js:172:8) at Promise.emit (events.js:95:17) at Promise.emit (/home/nano/Dev/JS/OMI/node_modules/mongoose/node_modules/mpromise/lib/promise.js:84:38) at Promise.reject (/home/nano/Dev/JS/OMI/node_modules/mongoose/node_modules/mpromise/lib/promise.js:111:15) at Promise.error (/home/nano/Dev/JS/OMI/node_modules/mongoose/lib/promise.js:95:15) Anyway, my code is simple: index.js: "use strict"; var express = require('express'), router = express.Router(); var clientes = require('./clientes'); var items = require('./items'); router.route('/clientes') .post(clientes.crear) .put(clientes.actualizar) .delete(clientes.borrar); router.route('./items') .post(items.crear) .put(items.actualizar) .delete(items.borrar); module.exports = router; clientes.js Note: reqHelper is my own function to go through req.body object, for now is disabled. "use strict"; // instancias de modelos var Cliente = require('../models/models').Cliente; // var reqHelper = require('./util'); var clientes = { crear: function (req, res) { var nuevoCliente = { _id: req.body._id, no…
accepted answer: http://stackoverflow.com/a/27513111
has title: Routes error: Error: Can't set headers after they are sent
tagged with: node.js
type: AnsweredQuestion

http://stackoverflow.com/comment/43646071
type: AnswerComment
comment on: http://stackoverflow.com/a/27611459
type: Comment
has text: Sorry, my faulty, It's working fine. Thank you so much for your code and for the explanation!
score: 0

http://stackoverflow.com/q/27594479
type: AnsweredQuestion
tagged with: woocommerce
has body: I am building a Woocommerce site and am having some issues. On the category page, it shows the 15 products and at the bottom it has a link to view additional products. When you click on the page number, it should show the products on that page, but it does not go anywhere. I have not been able to figure out why, I have actvated different templates, deactivated all plugins and removed all scripts in the header and none of them fix it. The URL is http://198.143.189.211/~utahball/?product_cat=birthday-bouquets If there are any ideas, it would be appreciated.
tagged with: wordpress
type: Question
has answer: http://stackoverflow.com/a/27594796
tagged with: javascript
score: 0
answer count: 1
has title: Woocommerce Additional Products now showing
accepted answer: http://stackoverflow.com/a/27594796

http://stackoverflow.com/comment/43522313
type: Comment
comment on: http://stackoverflow.com/a/27547911
type: AnswerComment
has text: but what if the path is curved so it looks something like letter "C" or "O" - so it has two points with the same X ?
score: 0

http://stackoverflow.com/comment/43483378
score: 0
has text: The CodePen works for me as well in IE11, but as I said, the issue is that I'm suspecting that an IE-specific property has been set somewhere in my 3rd-party libraries or somewhere in my own css-stylesheets. I just don’t know what to look for.
comment on: http://stackoverflow.com/q/27526798
type: QuestionComment
type: Comment

http://stackoverflow.com/q/27576381
tagged with: javascript
tagged with: mocha.js
score: 0
has body: I'm confused about how Mocha should be setup to run tests in the browser. I've setup some command line tests which run fine with 'mocha' in the terminal. I've also setup a test.html page that is supposed to load 'mocha.css' and 'mocha.js' (http://mochajs.org/#browser-support). It seems mocha has to be running as a server for the duration of the tests in order for mocha.js and mocha.css to load. Is there another app that must act as an intermediary?
has comment: http://stackoverflow.com/comment/43592878
type: UnansweredQuestion
type: Question
tagged with: testing
has comment: http://stackoverflow.com/comment/43585986
has answer: http://stackoverflow.com/a/27580786
has title: Does Mocha need a server to run tests in a browser?
answer count: 1

http://stackoverflow.com/q/27611949
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43646194
score: 0
has answer: http://stackoverflow.com/a/27612027
possible better answer: http://stackoverflow.com/a/27611993
has title: How to store $.getJSON object in global variable and navigate through it later
has answer: http://stackoverflow.com/a/27611993
has answer: http://stackoverflow.com/a/27612137
type: Question
tagged with: object
type: AnsweredQuestion
has body: I'm experimenting with JQuery and trying to create a function to get dynamic data from a JSON returned API and store it in a global variable (I don't know if this is the right/best way to do this). What I have so far is function getdata(url){ var data = $.ajax({ type: 'GET', url: url }); return data; }; So far everything works fine, but this returns an object with a "responseJSON" key and I can't seem to find a way to navigate to this key and then do a $.each loop through the arrays in it. So the questions are: Is this the right / way ( if not please explain your answer) How do you navigate through a multidimensional object containing arrays in the "responseJSON" key.
accepted answer: http://stackoverflow.com/a/27612027
tagged with: http://stackoverflow.com/tag/json
answer count: 3

http://stackoverflow.com/q/27612932
has comment: http://stackoverflow.com/comment/43648134
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43648071
type: Question
has body: I have a form I'm setting up with javascript/ajax to not reload the page when a submission is successful. The form works and it displays the success message. The problem is it doesn't display the success message in the correct div. I press submit. The success message should show up right over the form specified in . Instead it shows up at the top. HTML CODE: Name* Email* Message* Your message was sent succssfully! I will be in touch as soon as I can. Something went wrong, try refreshing and submitting the form again. JAVASCRIPT CODE: There is of course a lot more html code since this is being embedded on a full web page. I don't know if anything in the html code would affect it though. Any help is greatly appreciated, thanks!
tagged with: javascript
has title: Displaying JS/Ajax message after submit
score: 0
has comment: http://stackoverflow.com/comment/43648179
answer count: 1
tagged with: jquery
tagged with: ajax
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27613018
accepted answer: http://stackoverflow.com/a/27613018
tagged with: php

http://stackoverflow.com/a/27610234
upvote count: 1
type: AcceptedAnswer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43644090
has comment: http://stackoverflow.com/comment/43643571
type: Answer
accepted answer of: http://stackoverflow.com/q/27609872
has body: The directions service is subject to a quota and a rate limit. You aren't checking the status returned by the service (OVER_QUERY_LIMIT) You might want to use waypoints (up to 8 are supported in a single directions request with the free API), you currently only have 20 points, you should be able to do the route with 3 requests. See the example in this related question:Google Maps API to get bus route fiddle with error checking service.route({ origin: src, destination: des, travelMode: google.maps.DirectionsTravelMode.DRIVING }, function (result, status) { if (status == google.maps.DirectionsStatus.OK) { for (var i = 0, len = result.routes[0].overview_path.length; i &lt; len; i++) { path.push(result.routes[0].overview_path[i]); } } else { document.getElementById('info').innerHTML += status + "&lt;br&gt;"; } }); working fiddle (based off of example in this answer) code snippet: jQuery(function() { var msg = "41.077354,-81.511337:41.080647,-81.516579:41.077435,-81.521561:41.075253,-81.521492:41.074604,-81.520309:41.07415,-81.516335:41.073158,-81.514931:41.070534,-81.516563:41.066677,-81.516502:41.063942,-81.516502:41.06514,-81.513458:41.067383,-81.513412:41.069546,-81.513397:41.070778,-81.513382:41.072514,-81.512619:41.071106,-81.507614:41.073326,-81.506195:41.075886,-81.506058:41.077274,-81.507652:41.077354,-81.511337"; var input_msg = msg.split(":"); var map = new window.google.maps.Map(document.getElementById("dvMap")); // new up complex objects before passing them around var directionsDisplay = new window.google.maps.DirectionsRenderer({ suppressMarkers: true }); var directionsService = new window.google.maps.DirectionsService(); Tour_startUp(input_msg); window.tour.loadMap(map, directionsDisplay); window.tour.fitBounds(map); if (input_msg.length &gt; 1) window.tour.calcRoute(directionsService, directionsDisplay); }); function Tour_startUp(stops) { if (!window.tour) window.tour = { updateStops: function(newStops) { stops = newStops; }, // map: google map object // …
answers question: http://stackoverflow.com/q/27609872

http://stackoverflow.com/q/27488887
accepted answer: http://stackoverflow.com/a/27489494
type: AnsweredQuestion
tagged with: mysql
type: Question
downvote count: 4
has title: php: how to obtain values of dynamically added inputs using jquery and $post[]
has body: please I have a problem in my code, I added inputs Dynamically using jquery and I want to insert values of this inputs into mysql database but the error is "Notice: Undefined index: year .." "Notice: Undefined index: month .." I can't obtain the values of added inputs. there is my code and i can't insert into database: here is image of my form https://i.sstatic.net/qpBN4.png &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Site&lt;/title&gt; &lt;link href="style.css" rel="stylesheet" type="text/css" /&gt; &lt;link href="menu.css" rel="stylesheet" type="text/css" /&gt; &lt;script src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt; &lt;script type='text/javascript'&gt; //&lt;![CDATA[ $(document).ready(function() { var currentItem = 1; $('#addnew').click(function(){ currentItem++; $('#items').val(currentItem); var strToAdd = '&lt;tr&gt;&lt;td&gt;Year&lt;/td&gt;&lt;td&gt;:&lt;/td&gt;&lt;td&gt;&lt;select name="year'+currentItem+'" id="year'+currentItem+'" &gt;&lt;option value="2012"&gt;2012&lt;/option&gt;&lt;option value="2011"&gt;2011&lt;/option&gt;&lt;/select&gt;&lt;/td&gt;&lt;td&gt;Month&lt;/td&gt;&lt;td&gt;:&lt;/td&gt;&lt;td width="17%"&gt;&lt;select name="month'+currentItem+'" id="month'+currentItem+'"&gt;&lt;option value="1"&gt;January&lt;/option&gt;&lt;option value="2"&gt;February&lt;/option&gt;&lt;option value="3"&gt;March&lt;/option&gt;&lt;option value="4"&gt;April&lt;/option&gt;&lt;option value="5"&gt;May&lt;/option&gt;&lt;option value="6"&gt;June&lt;/option&gt;&lt;option value="7"&gt;July&lt;/option&gt;&lt;option value="8"&gt;August&lt;/option&gt;&lt;option value="9"&gt;September&lt;/option&gt;&lt;option value="10"&gt;October&lt;/option&gt;&lt;option value="11"&gt;November&lt;/option&gt;&lt;option value="12"&gt;December&lt;/option&gt;&lt;/select&gt;&lt;/td&gt;&lt;td width="7%"&gt;Week&lt;/td&gt;&lt;td width="3%"&gt;:&lt;/td&gt;&lt;td width="17%"&gt;&lt;select name="week'+currentItem+'" id="week'+currentItem+'" &gt;&lt;option value="1"&…
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27489494
has comment: http://stackoverflow.com/comment/43409700
has comment: http://stackoverflow.com/comment/43409328
has comment: http://stackoverflow.com/comment/43409527
score: -3
upvote count: 1
has comment: http://stackoverflow.com/comment/43409534
tagged with: php

http://stackoverflow.com/comment/43525678
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27536190
has text: Updated with a sample of data @ChrisBaker.

http://stackoverflow.com/comment/43584169
has text: Hey thanks for the answer..but cant I get the polyline after I click the submit button? I am not sure of how too create the event.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27567877
type: Comment

http://stackoverflow.com/comment/43558897
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27566729
has text: @Justinas..thank u for response me..Here i just changed pixel into inches for example 100pixel converted into 1'0" like wise i need to change exact inches values ? or else any more idea for changes this?
score: 0

http://stackoverflow.com/comment/43415754
has text: You're creating a webserver "instance" and passing it to sockec.io so it can use it for transport. `require` is just a function, if you return another function from the export, it can be called with arguments, and you can pass stuff to the middleware.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27492101
score: 0

http://stackoverflow.com/a/30474997
score: 0
has comment: http://stackoverflow.com/comment/49029550
answers question: http://stackoverflow.com/q/27545564
has comment: http://stackoverflow.com/comment/49029514
has body: I did it shortly in this way :
type: Answer

http://stackoverflow.com/a/27504100
type: Answer
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/27503555
has body: Feed below styles into your map - styles: [{"stylers":[{"visibility":"off"}]},{"featureType":"road","stylers":[{"visibility":"on"},{"color":"#ffffff"}]},{"featureType":"road.arterial","stylers":[{"visibility":"on"},{"color":"#fee379"}]},{"featureType":"road.highway","stylers":[{"visibility":"on"},{"color":"#fee379"}]},{"featureType":"landscape","stylers":[{"visibility":"on"},{"color":"#f3f4f4"}]},{"featureType":"water","stylers":[{"visibility":"on"},{"color":"#7fc8ed"}]},{},{"featureType":"road","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"poi.park","elementType":"geometry.fill","stylers":[{"visibility":"on"},{"color":"#83cead"}]},{"elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"landscape.man_made","elementType":"geometry","stylers":[{"weight":0.9},{"visibility":"off"}]}] inside mapOptions array. When you provide this mapoption to your google map, there will be no markers.
answers question: http://stackoverflow.com/q/27503555
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/27593226
score: 0
answer count: 2
upvote count: 1
downvote count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/27593326
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27638024
has comment: http://stackoverflow.com/comment/43611616
type: Question
has body: I have this piece of code that successfully detects Mozilla Firefox: function isFFold() { return ( (navigator.userAgent.toLowerCase().indexOf("firefox") &gt;= 0) ); } How can I alter the code so that I can get specific version? I have looked everywhere but the only way I find is using the deprecated browser function.
has comment: http://stackoverflow.com/comment/43610144
tagged with: javascript
tagged with: jquery
has title: Detecting specific browser versions using jQuery

http://stackoverflow.com/comment/43520685
has text: @BoltClock, you're right. But it's not gonna _stop the reset of the CSS_. I've always treated it more like: "oh! This is an invalid statement. We're not gonna use it but will proceed with the rendering".
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27547023
score: 0

http://stackoverflow.com/a/27629310
type: Answer
answers question: http://stackoverflow.com/q/27629234
score: 0
has body: As @Pointy pointed out,, you are increasing the 'speed' every click, because you are creating a new interval which is calling that same function. Consider either clearing the interval and making a new one each time : window.clearInterval(intervalId); OR implementing a bool within your function which will prevent its movement until click.

http://stackoverflow.com/q/27550944
favorite count: 0
answer count: 3
has comment: http://stackoverflow.com/comment/43528927
has comment: http://stackoverflow.com/comment/43528961
has answer: http://stackoverflow.com/a/27551210
score: 2
accepted answer: http://stackoverflow.com/a/27551745
downvote count: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27551745
has answer: http://stackoverflow.com/a/27679333
possible better answer: http://stackoverflow.com/a/27551210
type: Question
upvote count: 2
has title: jquery one page scroll start at the bottom
has body: I'm using the One Page Scroll jquery plugin (https://github.com/peachananr/onepage-scroll) and I want to have the site start from the bottom. I have five sections, so when I added: $( window ).load(function() { $(".main").moveTo(5); }) The page loads at the top and then immediately scrolls down to the bottom. I'm trying to avoid that: just want it to load at the bottom and then the user can navigate upwards. I'm still learning jquery/javascript so I have a feeling this is a simple fix and thats why I couldn't find an answer in the forum. Thanks in advance for any help or guidance. Edit: here's the working example
tagged with: javascript
tagged with: jquery

arrays
tags question: http://stackoverflow.com/q/27590643
tags question: http://stackoverflow.com/q/27612502
tags question: http://stackoverflow.com/q/27486711
tags question: http://stackoverflow.com/q/27582971
tags question: http://stackoverflow.com/q/27538270
tags question: http://stackoverflow.com/q/27636846
tags question: http://stackoverflow.com/q/27593185
tags question: http://stackoverflow.com/q/27573118
tags question: http://stackoverflow.com/q/27623204
tags question: http://stackoverflow.com/q/27548993
tags question: http://stackoverflow.com/q/27606308
tags question: http://stackoverflow.com/q/27502736
type: Tag
tags question: http://stackoverflow.com/q/27552280
tags question: http://stackoverflow.com/q/27567505
tags question: http://stackoverflow.com/q/27632865
tags question: http://stackoverflow.com/q/27513638
tags question: http://stackoverflow.com/q/27511102
tags question: http://stackoverflow.com/q/27608520
tags question: http://stackoverflow.com/q/27531392
tags question: http://stackoverflow.com/q/27611277
tags question: http://stackoverflow.com/q/27575698
tags question: http://stackoverflow.com/q/27620056
tags question: http://stackoverflow.com/q/27482271
tags question: http://stackoverflow.com/q/27626092
tags question: http://stackoverflow.com/q/27630794
tags question: http://stackoverflow.com/q/27627475
tags question: http://stackoverflow.com/q/27636287
tags question: http://stackoverflow.com/q/27507246
tags question: http://stackoverflow.com/q/27487518
tags question: http://stackoverflow.com/q/27538349
tags question: http://stackoverflow.com/q/27524289
tags question: http://stackoverflow.com/q/27504555
tags question: http://stackoverflow.com/q/27603360
tags question: http://stackoverflow.com/q/27609637
tags question: http://stackoverflow.com/q/27628669
tags question: http://stackoverflow.com/q/27616806
tags question: http://stackoverflow.com/q/27598340
tags question: http://stackoverflow.com/q/27499719
tags question: http://stackoverflow.com/q/27612713
tags question: http://stackoverflow.com/q/27480916
tags question: http://stackoverflow.com/q/27478451
tags question: http://stackoverflow.com/q/27527438
tags question: http://stackoverflow.com/q/27533342
tags question: http://stackoverflow.com/q/27568586
tags question: http://stackoverflow.com/q/27622697
tags question: http://stackoverflow.com/q/27590470
tags question: http://stackoverflow.com/q/27637607
tags question: http://stackoverflow.com/q/27479750
tags question: http://stackoverflow.com/q/27603832
tags question: http://stackoverflow.com/q/27631900
tags question: http://stackoverflow.com/q/27612618
tags question: http://stackoverflow.com/q/27541311
tags question: http://stackoverflow.com/q/27533608
tags question: http://stackoverflow.com/q/27607892
tags question: http://stackoverflow.com/q/27513286
tags question: http://stackoverflow.com/q/27519174
tags question: http://stackoverflow.com/q/27631973
tags question: http://stackoverflow.com/q/27542861
tags question: http://stackoverflow.com/q/27606220
tags question: http://stackoverflow.com/q/27595773
tags question: http://stackoverflow.com/q/27510009
tags question: http://stackoverflow.com/q/27515854
tags question: http://stackoverflow.com/q/27564318
tags question: http://stackoverflow.com/q/27625480
tags question: http://stackoverflow.com/q/27579826
tags question: http://stackoverflow.com/q/27604801
tags question: http://stackoverflow.com/q/27613881
tags question: http://stackoverflow.com/q/27622121
tags question: http://stackoverflow.com/q/27570555
tags question: http://stackoverflow.com/q/27535780
tags question: http://stackoverflow.com/q/27476715
tags question: http://stackoverflow.com/q/27630696
tags question: http://stackoverflow.com/q/27488197
tags question: http://stackoverflow.com/q/27619849
tags question: http://stackoverflow.com/q/27485514
tags question: http://stackoverflow.com/q/27499219
tags question: http://stackoverflow.com/q/27499407
tags question: http://stackoverflow.com/q/27593344
tags question: http://stackoverflow.com/q/27480677

http://stackoverflow.com/a/27561338
upvote count: 2
has comment: http://stackoverflow.com/comment/43570060
type: Answer
score: 1
downvote count: 1
answers question: http://stackoverflow.com/q/27561337
type: AcceptedAnswer
has body: It can be tested with jasmine simply by doing this : describe('app', function () { var $controller; beforeEach(function () { module('app'); inject(function (_$controller_) { $controller = _$controller_('MainCtrl'); }); }); //-- spec - test controller describe('Controller : MainCtrl', function () { it('should create an object with val 50', function () { expect($controller.obj.val).toBe(50); }); }); }); here's a jsfiddle for it Hope it helps !
accepted answer of: http://stackoverflow.com/q/27561337

http://stackoverflow.com/q/27549416
has comment: http://stackoverflow.com/comment/43525095
score: 0
accepted answer: http://stackoverflow.com/a/27549564
tagged with: angularjs
has answer: http://stackoverflow.com/a/27549633
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27549633
has body: I have a AngularJS Application in different languages. Now I want to preselect a language, when the user calls the site, with following string at the end: /en, /de, ... Is this even possible in AngularJS? I also can use some other syntax, if this is needed. Thank you very much!
type: Question
answer count: 2
has title: AngularJS: Pass Parameter through URL
has answer: http://stackoverflow.com/a/27549564
has comment: http://stackoverflow.com/comment/43525167
tagged with: javascript

http://stackoverflow.com/comment/66870237
type: AnswerComment
comment on: http://stackoverflow.com/a/27573589
type: Comment
has text: Erm... but how do you include the .d.ts file in the project :) Do you need a ///ref tag or do you add it to tsconfig.json ? Also, do you need to include the index.d.ts file, or can you just include @types/es6-promise?
score: 0

http://stackoverflow.com/a/27627737
has comment: http://stackoverflow.com/comment/43676319
upvote count: 1
answers question: http://stackoverflow.com/q/27627686
has body: You can use arguments. The variable arguments is an array of all the arguments passed to a function. So you can try this: function merge() { return _.uniq(Array.prototype.concat.apply([], arguments)); } I have no experience with underscore but this should work. Due to the behavior of concat, calling merge([3, 4, 5], null, 6) will result in [3, 4, 5, null, 6]. To ensure that all are arrays: for (var i = 0; i &lt; arguments.length; ++i) { if (Object.prototype.toString.call(arguments[i]) !== '[object Array]') { throw new Error(arguments[i] + " is not an array"); // Or do whatever you want } }
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/comment/43625320
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27598820
has text: Oh, my bad, I misread the question. Then it's not possible *and most likely illegal*
score: 0

http://stackoverflow.com/q/27519926
tagged with: testing
tagged with: protractor
upvote count: 5
accepted answer: http://stackoverflow.com/a/27530406
has body: I am using below table. In that I want to test each tag(th, td tags), Text in that tags and count of that text. HTML snippet Patient Id Account Number Title First Name Last Name Middle Name Sex Dob 10 Tam Mr. Tam Vinh J. F Details Delete 12 Tam12 Mr. Steve John A. F Details Delete I tried like this, but it's not working. it('Patient Page text testing', function(){ var table = element(by.css('.table')); var firsttag = table.element(by.tagName('tbody')); var secondtag = firsttag.all(by.tagName('tr')).get(0); var thirdtag = secondtag.all(by.tagName('th')).get(0); expect(element(by.xpath('//b/a')).getText()).toEqual('Patient Id'); var thirdtag = secondtag.all(by.tagName('th')).get(1); expect(element(by.xpath('//b/a')).getText()).toEqual('Account Number'); }); In the above test, expectation is working but second expectation is not working. Error : Message: Expected 'Patient Id' to equal 'Account Number'. Still in the second expectation it is expecting 'Patient Id'. I don't no where I did wrong.
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has title: Protractor e2e test table header and , tags
tagged with: angularjs
score: 5
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27530406
tagged with: e2e-testing
type: Question

canvas
tags question: http://stackoverflow.com/q/27545781
tags question: http://stackoverflow.com/q/27640268
tags question: http://stackoverflow.com/q/27621647
tags question: http://stackoverflow.com/q/27568267
tags question: http://stackoverflow.com/q/27584142
tags question: http://stackoverflow.com/q/27613948
tags question: http://stackoverflow.com/q/27597366
tags question: http://stackoverflow.com/q/27526445
tags question: http://stackoverflow.com/q/27621844
tags question: http://stackoverflow.com/q/27523501
tags question: http://stackoverflow.com/q/27587532
tags question: http://stackoverflow.com/q/27635881
tags question: http://stackoverflow.com/q/27493909
tags question: http://stackoverflow.com/q/27543194
tags question: http://stackoverflow.com/q/27480771
tags question: http://stackoverflow.com/q/27623218
tags question: http://stackoverflow.com/q/27593998
tags question: http://stackoverflow.com/q/27524283
tags question: http://stackoverflow.com/q/27508931
tags question: http://stackoverflow.com/q/27502214
tags question: http://stackoverflow.com/q/27547791
tags question: http://stackoverflow.com/q/27565941
tags question: http://stackoverflow.com/q/27501642
tags question: http://stackoverflow.com/q/27557044
tags question: http://stackoverflow.com/q/27580438
tags question: http://stackoverflow.com/q/27599797
tags question: http://stackoverflow.com/q/27552969
tags question: http://stackoverflow.com/q/27518279
tags question: http://stackoverflow.com/q/27505498
tags question: http://stackoverflow.com/q/27533331
tags question: http://stackoverflow.com/q/27484107
tags question: http://stackoverflow.com/q/27633420
tags question: http://stackoverflow.com/q/27569431
tags question: http://stackoverflow.com/q/27551659
tags question: http://stackoverflow.com/q/27581007
tags question: http://stackoverflow.com/q/27495650
tags question: http://stackoverflow.com/q/27561041
tags question: http://stackoverflow.com/q/27531811
tags question: http://stackoverflow.com/q/27611111
tags question: http://stackoverflow.com/q/27625049
tags question: http://stackoverflow.com/q/27596652
tags question: http://stackoverflow.com/q/27625760
tags question: http://stackoverflow.com/q/27535336
tags question: http://stackoverflow.com/q/27604446
tag name: canvas
tags question: http://stackoverflow.com/q/27493672
tags question: http://stackoverflow.com/q/27602819
tags question: http://stackoverflow.com/q/27637546
tags question: http://stackoverflow.com/q/27607179
tags question: http://stackoverflow.com/q/27498419
tags question: http://stackoverflow.com/q/27484146
tags question: http://stackoverflow.com/q/27606308
type: Tag
tags question: http://stackoverflow.com/q/27635443
tags question: http://stackoverflow.com/q/27495571
tags question: http://stackoverflow.com/q/27619555
tags question: http://stackoverflow.com/q/27542416
tags question: http://stackoverflow.com/q/27554083
tags question: http://stackoverflow.com/q/27613314
tags question: http://stackoverflow.com/q/27568143
tags question: http://stackoverflow.com/q/27624139
tags question: http://stackoverflow.com/q/27492968
tags question: http://stackoverflow.com/q/27526451
tags question: http://stackoverflow.com/q/27482175
tags question: http://stackoverflow.com/q/27553726
tags question: http://stackoverflow.com/q/27573982
tags question: http://stackoverflow.com/q/27512654
tags question: http://stackoverflow.com/q/27484473
tags question: http://stackoverflow.com/q/27640152
tags question: http://stackoverflow.com/q/27526911
tags question: http://stackoverflow.com/q/27512689
tags question: http://stackoverflow.com/q/27635588
tags question: http://stackoverflow.com/q/27581845
tags question: http://stackoverflow.com/q/27630126
tags question: http://stackoverflow.com/q/27585620
tags question: http://stackoverflow.com/q/27528349

http://stackoverflow.com/a/27564005
accepted answer of: http://stackoverflow.com/q/27563937
has body: You can try like below $(function(){ //iterate all a tag having href="example.com" $('ul li a[href="example.com"]').each(function(){ //set href with new value $(this).attr('href',$(this).attr('href')+'?myString'); }); }); DEMO
upvote count: 1
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/27563937
downvote count: 0
score: 1

http://stackoverflow.com/a/27693119
upvote count: 1
has body: Just change it so it does not edit the text if the user has entered anything. in mouseover event: //if the text is the default text, hide it on mouseover. if (this.rawValue == "Address") this.rawValue = ""; in mouseExit event: //if the text is empty, replace it with the default when the user exits the field. if (this.rawValue == "" || this.rawValue == null) this.rawValue = "Address"; I'd consider putting this in normal enter/exit events instead of the mouse-specific ones, because some users may use the tab key to navigate the form. Also, don't use spaces to signify empty, just use "".
has comment: http://stackoverflow.com/comment/43856684
score: 1
accepted answer of: http://stackoverflow.com/q/27611051
has comment: http://stackoverflow.com/comment/43800375
has comment: http://stackoverflow.com/comment/43803986
has comment: http://stackoverflow.com/comment/43800793
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27611051
type: Answer

http://stackoverflow.com/a/27624107
type: AcceptedAnswer
has body: Now the /game is probably a folder? It is part of the URL. That's all you can know about it. And how can i see the actual path to the application? You cannot. How the URL maps on to the server's file system (or even if it maps on the file system at all) is not information that the webserver will expose. Can't I see the server side scripting language Not really. There might be fingerprints in the HTTP response headers that could clue you in, or HTML returned in the response body might include fingerprints from a particular CMS which would imply a programming language, but there is nothing certain.
score: 0
accepted answer of: http://stackoverflow.com/q/27623946
type: Answer
answers question: http://stackoverflow.com/q/27623946

http://stackoverflow.com/q/27533606
has answer: http://stackoverflow.com/a/27533726
tagged with: javascript
has comment: http://stackoverflow.com/comment/43495767
score: 0
answer count: 2
has title: javascript get file type only works if file has 1 dot in name
has body: I am getting the file name which includes the type from an html input, var file = jQuery('#attachment')[0].files[0]; var fileType = file.name.substr(file.name.indexOf(".") + 1); and this works great if the file name is FILE.TYPE but if the file name if FIlE.Name.TYPE it does not work correctly. How can I make sure I get the last dot before the file type? Or is there a better way to go about getting the file type?
tagged with: jquery
has answer: http://stackoverflow.com/a/27533738
accepted answer: http://stackoverflow.com/a/27533738
has comment: http://stackoverflow.com/comment/43495634
possible better answer: http://stackoverflow.com/a/27533726
tagged with: regex
tagged with: file-type
type: AnsweredQuestion
type: Question

http://stackoverflow.com/a/27572891
accepted answer of: http://stackoverflow.com/q/27572709
downvote count: 0
answers question: http://stackoverflow.com/q/27572709
has body: The below Mongo queries may help you. db.test.find({},{"customers.logins":true,_id:false}) will return login details alone. db.test.find({"customers.cart":"34323"}) will get a whole document based on the "cart" property.
upvote count: 2
type: AcceptedAnswer
type: Answer
score: 2

http://stackoverflow.com/q/27565060
answer count: 0
score: 1
has comment: http://stackoverflow.com/comment/43556027
upvote count: 1
type: Question
has body: I'm trying to create a custom validator that checks if the newly input number is greater or equal to the first value it has from the model bound to the input field, but I can't figure out what properties to use in the validator to do this. Currently I have an attribute minvalue="{{data.mileage}}" on my input field. The validator looks like this: var minvalue = function (){ return { require: 'ngModel', link: function(scope, elem, attr, ngModel) { var minval = attr.minvalue; ngModel.$parsers.unshift(function(value) { var valid = !isNaN(parseFloat(minval)); console.log(minval); if(valid){ valid = (value &gt;= minval); console.log(value); console.log(minval); ngModel.$setValidity('minvalue', valid); } }); } }; }; But I can't even get the correct value, it's always blank. What is the right way to do this?
tagged with: javascript
tagged with: validation
downvote count: 0
has comment: http://stackoverflow.com/comment/43555721
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has title: Angular validator limit number to first model value

http://stackoverflow.com/comment/43680076
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27629363
has text: not sure really. Should i just use style.property instead?
score: 0

http://stackoverflow.com/comment/43681645
type: Comment
has text: I figured that out before you posted the correction, but I still get the 500 error. I know everything is in the right place, because if I go back to my original PHP file and remove the "?category=" part everything works fine. I think there's another problem.
score: 0
comment on: http://stackoverflow.com/a/27630363
type: AnswerComment

sockets
tags question: http://stackoverflow.com/q/27533631
tags question: http://stackoverflow.com/q/27533703
tags question: http://stackoverflow.com/q/27516028
tags question: http://stackoverflow.com/q/27476733
type: Tag
tags question: http://stackoverflow.com/q/27488946
tags question: http://stackoverflow.com/q/27525376
tags question: http://stackoverflow.com/q/27511015
tags question: http://stackoverflow.com/q/27587160
tags question: http://stackoverflow.com/q/27526203
tag name: sockets
tags question: http://stackoverflow.com/q/27564297

http://stackoverflow.com/a/27620053
type: Answer
answers question: http://stackoverflow.com/q/27619849
score: 0
has body: Here's a recursive function (cloneObj) that may make your life easier. It uses Array.map to clone Objects within an Array on all levels. var array = [{name: 'object1'}, {name: 'object2'}]; Helpers.log2Screen('array initially:&lt;br&gt;'+Object.print(array)); var arraySlice = cloneObj(array); // change names in clone: arraySlice[0].name = "changed"; arraySlice[1].name = "DEMO"; arraySlice[1].addedProp = [{a: 1, b: 2}, {a: 2, b:3}]; Helpers.log2Screen('arraySlice (clone, changed):&lt;br&gt;'+Object.print(arraySlice)); Helpers.log2Screen('array didn\'t change, still:&lt;br&gt;'+Object.print(array)); function cloneObj(obj) { // clone the whole enchillada, recursive function clone(o, curr) { for (var l in o){ if (!o.hasOwnProperty(l)) { continue; } if (o[l] instanceof Object) { curr[l] = cloneObj(o[l]); } else { curr[l] = o[l]; } } return curr; } return obj instanceof Array ? obj.slice().map( function (v) { return cloneObj(v); } ) : obj instanceof Date ? new Date(obj.getTime()) : obj instanceof Object ? clone(obj, {}) : obj; } &lt;script src="https://rawgit.com/KooiInc/Helpers/master/Helpers-min.js"&gt;&lt;/script&gt;

http://stackoverflow.com/comment/43531985
type: Comment
comment on: http://stackoverflow.com/a/27539025
type: AnswerComment
has text: Thanks, that did it! I had just figured out myself that that's what I needed to do, but I wasn't sure how to go about doing it. Note that the while loop should be `while (d.values[j].position == 0 && j > 0)`.
score: 0

http://stackoverflow.com/a/27522827
upvote count: 3
answers question: http://stackoverflow.com/q/27522776
type: Answer
downvote count: 0
score: 3
has body: Both are correct. Parentheses are optional when the new operator is used and there are no arguments.

http://stackoverflow.com/comment/43541104
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27556884
has text: This will work but keep in mind that if you want readers to be able to view the modal on smartphones, tablets etc of smaller size view then this will not scale well.
score: 0

http://stackoverflow.com/comment/43645976
comment on: http://stackoverflow.com/q/27610649
type: Comment
type: QuestionComment
has text: This question has appeared numerous times in different contexts, see e.g. [here](http://stackoverflow.com/questions/11007640/fit-text-into-svg-element-using-d3-js) or [this example](http://bl.ocks.org/milkbread/6571949).
score: 0

http://stackoverflow.com/a/27484545
has comment: http://stackoverflow.com/comment/43471801
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27482794
has body: try disabling the button after the click event. try adding (you can enable it after a timeout or after the ajax is success) $(this).attr('disabled',true); after $('#entry_sub_btn').on('click',function(e){ UPDATE This can also be because the click event is assigned twice for that button. so before assigning, just unbind the old click event and assign new. sample code $('#entry_sub_btn').off('click').on('click',function(e){
has comment: http://stackoverflow.com/comment/43429745

http://stackoverflow.com/comment/43608114
type: QuestionComment
has text: Once you remove the function definition from inside the `document.ready` and remove the outer jQuery call `$(...)`, it works fine: http://jsfiddle.net/c6Lxom8w/
comment on: http://stackoverflow.com/q/27592178
score: 4
type: Comment

http://stackoverflow.com/comment/70862974
comment on: http://stackoverflow.com/a/27535312
type: AnswerComment
has text: Nice example, although it contains some weird things: why convert the map function to a string and mess around with the function body just to inject emit? Why Array.sum? If you want to add a new method to each array you have to use Array.prototype.sum.
score: 0
type: Comment

http://stackoverflow.com/comment/43629974
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27603724
has text: Working fine in chrome here

http://stackoverflow.com/q/27502627
tagged with: iframe
tagged with: scroll
tagged with: scrolltop
type: Question
has answer: http://stackoverflow.com/a/27514924
accepted answer: http://stackoverflow.com/a/27514924
has body: re: http://www.gooplusplus.com/cost-of-living-compare-cities/ I made a relatively simple web site to make it easier to compare potential "expat" cities. There are links (target=iframe) for each city for cost of living data, wikipedia, expat blogs, climate info, and Google map. The left column consists of several control links for each city. The main window is a single iframe within a DIV. Iframe scrolling is set to OFF. Scrolling is done using the iframe's DIV. Iframe contents are from external domains. The problem: if one scrolls down to view a long Wikipedia entry and then the user clicks on a new City link, the iframe content position stays at the old DIV position, which is not what is typically wanted. The desired behavior (Javascript, not jQuery): Move the DIV's vertical scrollbar - go to the TOP of document whenever the iframe SRC document changes.
score: 0
answer count: 1
tagged with: javascript
has title: Javascript - Move DIV Scrollbar to Top When iFrame SRC Changes
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion

http://stackoverflow.com/q/27528944
has answer: http://stackoverflow.com/a/27529133
tagged with: angularjs
type: Question
has title: How to disable Angular Drop Down if the model is null or empty?
answer count: 2
accepted answer: http://stackoverflow.com/a/27529104
has body: I have an angular DropDown , which is bound to scope variable, which is array. I would like disable the dropdown when the array empty. HTML JS if( $scope.riskProfileModel.riskProfileData.RiskImprovment ) { //I am doing some chart generation } else { return null; } I am not sure how to disable the drop down. Can anybody suggest how to do that ?
score: 0
tagged with: highcharts
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27529104
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27529133

http://stackoverflow.com/a/27498799
type: Answer
answers question: http://stackoverflow.com/q/27498558
has body: Found an answer finally with the help of 4dgaurav! var sections = $('div') , nav = $('.menu') , nav_height = nav.outerHeight(); $(window).on('scroll', function () { var cur_pos = $(this).scrollTop(); sections.each(function() { var top = $(this).offset().top - nav_height, bottom = top + $(this).outerHeight(); if (cur_pos &gt;= top &amp;&amp; cur_pos &lt;= bottom) { nav.find('a').removeClass('active'); sections.removeClass('active'); $(this).addClass('active'); nav.find('a[href="#'+$(this).attr('id')+'"]').addClass('active'); } }); }); nav.find('a').on('click', function () { var $el = $(this) , id = $el.attr('href'); $('html, body').animate({ scrollTop: $(id).offset().top - nav_height }, 500); return false; });
score: 0

http://stackoverflow.com/comment/43408726
has text: Is your question can JavaScript send email, or is it how do you retrieve user input values?
type: Comment
comment on: http://stackoverflow.com/q/27488551
type: QuestionComment
score: 2

http://stackoverflow.com/comment/43575527
type: Comment
type: QuestionComment
has text: I have tested your code at [jsFiddle](http://jsfiddle.net/awolf2904/6ex37k1a/) and it's working there.
score: 0
comment on: http://stackoverflow.com/q/27574620

http://stackoverflow.com/a/27498615
has comment: http://stackoverflow.com/comment/43428979
answers question: http://stackoverflow.com/q/27498419
has comment: http://stackoverflow.com/comment/43437735
has comment: http://stackoverflow.com/comment/43428755
has comment: http://stackoverflow.com/comment/43447843
upvote count: 1
has body: You can clip the image this way. var canvas = document.getElementById('canvas'); var context = canvas.getContext('2d'); var btn = document.getElementById('btn'); var c = 0; var img = new Image(); img.src = 'http://placehold.it/200/200'; img.onload = function() { canvas.width = img.width; canvas.height = img.height; context.drawImage(img, 0, 0) } btn.onclick = function() { if (c++ % 2 == 0) { context.clearRect(0, 0, canvas.width, canvas.height); context.drawImage(img, 100, 100, 20, 20, 100, 100, 20, 20); btn.value = 'Unclip'; } else { context.drawImage(img, 0, 0); btn.value = 'Clip'; } } &lt;input id="btn" type="button" value="Clip" /&gt;&lt;br /&gt; &lt;canvas id="canvas"&gt;&lt;/canvas&gt; EDIT When a user clicks on the canvas, you can get the exact co-ordinates of where the event happened and if the co-ordinates lies inside of the middle circle, you can toggle the whole image by using the same clipping method. var canvas = document.getElementById('canvas'); var context = canvas.getContext('2d'); var c = 0; var img = new Image(); img.src = 'http://s25.postimg.org/cv29exevj/index.png'; img.onload = function() { canvas.width = img.width; canvas.height = img.height; context.drawImage(img, 80, 80, 40, 40, 80, 80, 40, 40); } canvas.onclick = function(e) { var x = e.clientX - canvas.getBoundingClientRect().left; var y = e.clientY - canvas.getBoundingClientRect().top; if (x &gt;= 80 &amp;&amp; x &lt;= 120 &amp;&amp; y &gt;= 80 &amp;&amp; y &lt;= 120) { if (c++ % 2 == 0) { context.clearRect(0, 0, canvas.width, canvas.height); context.drawImage(img, 0, 0); } else { context.clearRect(0, 0, canvas.width, canvas.height); context.drawImage(img, 80, 80, 40, 40, 80, 80, 40, 40); } } } &lt;canvas id="canvas"&gt;&lt;/canvas&gt;
type: Answer
has comment: http://stackoverflow.com/comment/43429486
has comment: http://stackoverflow.com/comment/43428358
has comment: http://stackoverflow.com/comment/43447887
has comment: http://stackoverflow.com/comment/43437352
downvote count: 0
score: 1

http://stackoverflow.com/q/27584108
answer count: 1
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27588502
tagged with: jquery
has comment: http://stackoverflow.com/comment/43601018
type: Question
tagged with: css
score: 0
has body: I just started using Skrollr.js - I was able to make the animations I wanted, however i needed to use position:fixed; for my elements to position them exactly where they should be. Problem is, if your screen isn't a certain size, the animations are cutoff or not centred. Is there a better way to position the elements or something with Skrollr I can do to fix this? I have a 3 elements that come together to make a logo so it needs to be pretty precise in how it comes together. Thanks
has title: skrollr.js Responsiveness

http://stackoverflow.com/q/27500410
linked to: http://stackoverflow.com/q/5110001
score: 1
has comment: http://stackoverflow.com/comment/43431308
has comment: http://stackoverflow.com/comment/43431806
has comment: http://stackoverflow.com/comment/43431589
has answer: http://stackoverflow.com/a/27502626
upvote count: 2
answer count: 2
downvote count: 1
has title: Why are ajax calls to two page methods being executed synchronously?
has comment: http://stackoverflow.com/comment/43431719
has comment: http://stackoverflow.com/comment/43431507
has answer: http://stackoverflow.com/a/27500496
has comment: http://stackoverflow.com/comment/43431373
has comment: http://stackoverflow.com/comment/43431874
linked to: http://stackoverflow.com/q/5118236
possible better answer: http://stackoverflow.com/a/27500496
accepted answer: http://stackoverflow.com/a/27502626
type: AnsweredQuestion
has body: I have two script tags on page, each containing a document.ready(), and each of them is making an ajax call to a page method. First one loads the values into the select list. Second one loads the tree into the DOM. &lt;script&gt; $(document).ready(function() { $.ajax({ url: 'PageMethods.aspx/GetTop50', async: true, success: function(data) { //loads the values to the select list } //rest of stuff... }); }) &lt;/script&gt; &lt;script&gt; $(document).ready(function() { $.ajax({ url: 'Default.aspx/GetTree', async: true, success: function(data) { // loads the tree into DOM } //rest of stuff... }); }) &lt;/script&gt; Why does my GetTree page method keep executing only AFTER the success callback of the GetTop50? I set the breakpoint to GetTree method serverside, and it is only hit AFTER the select list is loaded.
has comment: http://stackoverflow.com/comment/43431438
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
type: Question
has comment: http://stackoverflow.com/comment/43431335
has comment: http://stackoverflow.com/comment/43431446
has comment: http://stackoverflow.com/comment/43431593

http://stackoverflow.com/a/27584537
has comment: http://stackoverflow.com/comment/43611295
has body: You can use Math.random() and setTimeout. Would be something like this: function startRandomizer(){ window.setTimeout( function(){ window.alert("Hello World " + Math.random() * 1000); startRandomizer(); }, Math.random() * 100 + 10); // From 10 to 110 secconds } startRandomizer(); // Call it once, and it will do it forever... Note that, Math.random() returns a floating number between 0 and 1. If you multiply it by 100, it will be between 0 and 100. If you want it to be between 50 and 100 (for example), multiply by 50 and sum 50... You got the idea.
score: 1
accepted answer of: http://stackoverflow.com/q/27584468
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27584468
has comment: http://stackoverflow.com/comment/43593600
has comment: http://stackoverflow.com/comment/43593768
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/43593811
has comment: http://stackoverflow.com/comment/43593786

http://stackoverflow.com/comment/43643674
comment on: http://stackoverflow.com/a/27610227
score: 0
type: AnswerComment
has text: you say nest array, but there is no array in your structure and trying to scale this would be very ugly. The `word` doesn't even match for both in OP data
type: Comment

http://stackoverflow.com/a/27581174
type: AcceptedAnswer
has body: function addCustomerDetails (tagName) { var tag = $(this).children(tagName).text(); $("#" + tagName).html("&lt;p&gt;" + tag + "&lt;/p&gt;"); } and call it like this: addCustomerDetails.call(this, "time_added"); addCustomerDetails.call(this, "last_update"); Or following this path you can invent something even more convenient to use: $(xml).find("customer[value=" + customerID + "]").each(appendTag('time_added', 'last_update')); where appendTag will look like: function appendTag() { var tags = [].slice.call(arguments); return function() { for (var i = 0; i &lt; tags.length; i++) { var tag = $(this).children(tags[i]).text(); $("#" + tags[i]).html("&lt;p&gt;" + tag + "&lt;/p&gt;"); } }; }
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/27581128
accepted answer of: http://stackoverflow.com/q/27581128
downvote count: 0

http://stackoverflow.com/q/27601924
has answer: http://stackoverflow.com/a/27602472
accepted answer: http://stackoverflow.com/a/27602472
favorite count: 0
tagged with: twitter-bootstrap
has title: Bootstrap-contextmenu with knockout
score: 2
type: AnsweredQuestion
tagged with: knockout.js
type: Question
upvote count: 2
downvote count: 0
tagged with: javascript
has body: I'm trying to use Bootstrap-contextmenu from https://github.com/sydcanem/bootstrap-contextmenu with knockout js. And i have a problem. How can i pass the selectedItem from my table to my viewModel. I have a simple code like that: ... Edit ... Command works but i didn't get a user from the clicked tr. Maybe there is another context menu with knockout js support?
answer count: 1

http://stackoverflow.com/q/27580052
has comment: http://stackoverflow.com/comment/43584528
upvote count: 1
answer count: 1
has body: I want to ask that, is to run a jquery/javascript function such that, A PopUp that will run once on browser of every new user who visit a webpage. Here is the code which i want to run. $(window).load(function() { $('#index9').fadeIn("slow"); });
favorite count: 0
has title: Run a javascript function once in a day for every new user
has comment: http://stackoverflow.com/comment/43584826
type: AnsweredQuestion
tagged with: popup
downvote count: 0
tagged with: cookies
score: 1
accepted answer: http://stackoverflow.com/a/27580251
type: Question
tagged with: session
has answer: http://stackoverflow.com/a/27580251
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/27508909
has comment: http://stackoverflow.com/comment/43448558
has body: Controller: [OutputCache(NoStore = true, Duration = 0, VaryByParam = "*")] public class ExperimentalController : Controller { public ActionResult ReloadTest1() { string temp = DateTime.Now.ToString(); ViewBag.Time = temp; return View(); } public PartialViewResult ReloadTest1Partial() { string temp = DateTime.Now.ToString(); ViewBag.Time = temp; return PartialView(); } } View: @{ ViewBag.Title = "ReloadTest1"; string time = this.ViewBag.Time; ViewData["date"] = time; ViewBag.TheTitle = "test"; } ReloadTest1 1 2 3 4 5 @{Html.RenderPartial("_ReloadTest1Partial", null, new ViewDataDictionary { {"vb", ViewBag}});} Partial View: @{ var vb = ((dynamic)ViewData["vb"]); } @vb.Time What is not working: Passing the viewbag/viewdata directly from controller to partial view because mvc does not accept that to happen. What is working: from the above code you can see that the partial view gets the data ONCE with the Html.RenderPartial method and the viewbag passing down. the reload does work on change of the selected object in the dropdown What is needed: I need to pass data to the partial view when it is reloaded or afterwards, this is mainly a test setup but i finally want to be able to update tables dependant on the select value. If somone is able to give me a working example please do so.
has answer: http://stackoverflow.com/a/27547892
tagged with: asp.net-mvc
has title: How to pass data to partial view after reload
tagged with: javascript
tagged with: partial
accepted answer: http://stackoverflow.com/a/27547892
tagged with: view
type: AnsweredQuestion
score: 0
possible better answer: http://stackoverflow.com/a/27509405
has answer: http://stackoverflow.com/a/27509405
has comment: http://stackoverflow.com/comment/43447793
type: Question
answer count: 2
linked to: http://stackoverflow.com/q/26127447

http://stackoverflow.com/comment/43479733
type: QuestionComment
comment on: http://stackoverflow.com/q/27515739
score: 0
has text: @Lolo thanks for the reply, I just need an `else` to check that my code was doing the right thing, so it's solved, thanks anyway Lolo.
type: Comment

http://stackoverflow.com/comment/43532872
type: AnswerComment
type: Comment
has text: the good news is I got the data pulling through, but now it only pulls through the resulting attn_name1 from the first row in mysql table. I have tried changing the limit from 0 and 10, get the same result. Also, it only populates the first field, so attn_email1 is going in my client name field (first field on my form). Here is my modified code [link](http://pastie.org/9788625). The name fields in the Java bit are taken directly from my form source, is it because they are named so similar would you recommend changing the names?
comment on: http://stackoverflow.com/a/27549910
score: 0

http://stackoverflow.com/comment/43617540
comment on: http://stackoverflow.com/q/27596760
type: Comment
type: QuestionComment
has text: This may be occur due to Bootstrap date-picker is selecting default date when you not select any date from calendar.
score: 0

http://stackoverflow.com/a/27484719
has comment: http://stackoverflow.com/comment/43401572
accepted answer of: http://stackoverflow.com/q/27484654
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27484654
downvote count: 0
has body: use ng-options instead of ng-repeat &lt;select data-ng-model="card" ng-options="card.name for card in cardSelect"&gt; here is the plunker
type: Answer
score: 3
upvote count: 3

http://stackoverflow.com/a/27496510
has comment: http://stackoverflow.com/comment/125560148
has comment: http://stackoverflow.com/comment/95083116
has comment: http://stackoverflow.com/comment/125318923
answers question: http://stackoverflow.com/q/27496465
has comment: http://stackoverflow.com/comment/95070659
score: 39
has comment: http://stackoverflow.com/comment/125558357
has comment: http://stackoverflow.com/comment/113277534
type: Answer
has comment: http://stackoverflow.com/comment/95069926
has comment: http://stackoverflow.com/comment/95069526
has comment: http://stackoverflow.com/comment/95063905
has comment: http://stackoverflow.com/comment/121397833
has comment: http://stackoverflow.com/comment/95063618
has comment: http://stackoverflow.com/comment/91489861
downvote count: 1
upvote count: 40
has body: Update: as of Chrome Extension Manifest v3, Chrome Extensions have switched to service workers for background pages, so if you are using Manifest v3, it is no longer possible to play audio directly from the background page of your extension. See also: Play a sound from a Service Worker. If you are still using Manifest v2, then go ahead and read the answer below. The easiest way to play some sound/music using JavaScript is by using an Audio object: you just need to have the file you want to play inside your extension folder, and you can play it like this: var myAudio = new Audio(chrome.runtime.getURL("path/to/file.mp3")); myAudio.play(); You can play using play() and pause using pause(). Remember that if you want to play the sound in a content script (or anywhere else that is not under a chrome://extension URL) you'll have to declare the audio file in the web_accessible_resources manifest field: "web_accessible_resources": [ "path/to/file.mp3" ] Working example You can download a test extension I made from HERE. It plays a sound through a content script when you click anything inside a stackoverflow.com page.
has comment: http://stackoverflow.com/comment/102794335
has comment: http://stackoverflow.com/comment/95070022
has comment: http://stackoverflow.com/comment/102794983
has comment: http://stackoverflow.com/comment/107637178
has comment: http://stackoverflow.com/comment/107637771

http://stackoverflow.com/comment/43433558
type: Comment
comment on: http://stackoverflow.com/a/27500845
score: 0
has text: You can try referencing to this anchor from its parent. like: `li#repairImg a{} li#repairImg a img{} `etc. that means you can give an id to the parent li.
type: AnswerComment

http://stackoverflow.com/comment/43545164
type: AnswerComment
comment on: http://stackoverflow.com/a/27557647
type: Comment
score: 1
has text: I like that syntax too, Todd, but I have been told it is less readable. It requires a deeper understanding of the way javascript interprets each line. Both ways work

http://stackoverflow.com/comment/43604132
comment on: http://stackoverflow.com/q/27589914
score: 0
type: Comment
type: QuestionComment
has text: Try adding `data-no-transition-cache` to one of the DOM elements to disable page (and title) caching. Perhaps this will give you a hint. Rails specifically extracts the text content of the Title tag and the Body tag and replaces them on page load. So assuming `page_title_tag` returns some text, there should be no problem.

http://stackoverflow.com/comment/43620335
comment on: http://stackoverflow.com/a/27578907
type: AnswerComment
type: Comment
has text: Can I update gradient between specific Y axes values,if I set min and max for Y axis?Because the gradient isn't showing much difference in there.What I've came to know is the gradient doesn't change corresponding to manual Y axis settings.It actually applies gradient between it's own Y axis extremes calculated by Highcharts.
score: 1

http://stackoverflow.com/comment/43475433
has text: Its a string.so I need to use quotes
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27523147

http://stackoverflow.com/a/27601617
answers question: http://stackoverflow.com/q/27601581
has comment: http://stackoverflow.com/comment/43630240
type: Answer
has comment: http://stackoverflow.com/comment/43630083
score: 4
has body: Since you say you get the result which you get, you could use Element.querySelector which uses css selectors to target the elements. var type = table.rows[r].cells[11].querySelector("[selected]").innerHTML; Note that I'm using innerHTML since there's some variations between textContent and innerText and also due to the fact that &lt;option&gt; cannot contain any html.
upvote count: 4
downvote count: 0

http://stackoverflow.com/a/28080104
answers question: http://stackoverflow.com/q/27571837
type: Answer
has body: It seems to me from the code you posted that you are not undoing the moves you make. When you loop through all possible moves, you make that move, then check for a threat. You should then unmake the move. That is probably why your last test didn't work as well.
score: 0

http://stackoverflow.com/comment/43525206
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27549224
type: Comment
has text: unless you class your edges as `.selectedEdge` or maintain a selected edges data structure I don't see an straightforward way to go about this.

http://stackoverflow.com/comment/43436148
type: QuestionComment
score: 1
has text: Is jQuery an option?
comment on: http://stackoverflow.com/q/27503019
type: Comment

http://stackoverflow.com/a/27513482
upvote count: 1
has comment: http://stackoverflow.com/comment/43458160
has comment: http://stackoverflow.com/comment/43458722
type: Answer
has comment: http://stackoverflow.com/comment/43460323
has comment: http://stackoverflow.com/comment/43458082
has comment: http://stackoverflow.com/comment/43459187
has comment: http://stackoverflow.com/comment/43457935
has comment: http://stackoverflow.com/comment/43458672
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27512852
has comment: http://stackoverflow.com/comment/43458353
has body: Basically you do something like this: if(!isset($_SESSION['cart_name']) && isset($_POST['cart_name'])) { $_SESSION['cart_name'] = $_POST['cart_name']; } // then reference $_SESSION['cart_name'] from there on out. Don't forget to call session_start() on your page before trying to interact with $_SESSION. Now on the JS side you only want to invoke your prompt if the cart hasn't been named yet. So what I would do is output a var on the page somewhere - needs to be output before any calls to myFunction() on the page. I'd probably put it near the top: Then in your function you can check it: function myFunction() { // note the lack of `var` - this means we are referencing the global namedCart // normally I would recommend passing this in as an argument but I don't have enough detail // on your set up if (namedCart === null) { // if named cart doesn't exist we name it from the prompt namedCart = prompt("Please enter Cart Name"); } document.getElementById("person").value=namedCart; document.getElementById("form").submit(); }

http://stackoverflow.com/a/27620526
score: 0
has comment: http://stackoverflow.com/comment/43661835
type: Answer
answers question: http://stackoverflow.com/q/27620467
has comment: http://stackoverflow.com/comment/43662277
has body: Add your ajax request dataType as "dataType: 'json'" $.ajax({ type: "GET", url: "upsidenew.php", async: true, cache: false, timeout:50000, dataType: 'json' success: function(data){ if(data) { $("#updatetime").append('&lt;div class="upbox1"&gt;' + data.detail + '&lt;/div&gt;'); } setTimeout( waitForMsg, 1000 ); }, error: function(XMLHttpRequest, textStatus, errorThrown){ addmsg("error", textStatus + " (" + errorThrown + ")"); setTimeout( waitForMsg, 15000); } });
has comment: http://stackoverflow.com/comment/43662684
has comment: http://stackoverflow.com/comment/43662542

http://stackoverflow.com/a/27591887
has comment: http://stackoverflow.com/comment/43608551
answers question: http://stackoverflow.com/q/27591732
has body: Don't use Math.random, rather increment a number and create ID like: #tab_NN. Add an ID to your Form Element id=myForm Delegate click events to dynamically generated delete buttons using .on() While removing the table that matched the button data-* attribute, delete the button too using .add( this ) (where this stays for the clicked button) var id = 0; function delete_field(event){ event.preventDefault(); $("#tab_"+ $(this).data("remove")).add(this).remove(); } function add_form_field(){ id += 1; var html = ' '+ ' Label '+ ' '+ ' remove '; $("#myForm").append(html); } $('#addField').on('click', add_form_field); $('#myForm').on('click', '.remove', delete_field); Add a field The code above allows you to have changes in the future markup cause it targets a specific ID, but in case your DELETE buttons will always be exactly after table than you can do it without assigning ID's, by simply using .prev("table"): http://jsbin.com/wuqati/1/edit function delete_field(event){ event.preventDefault(); $(this).prev("table").add(this).remove(); } function add_form_field(){ var html = ' '+ ' Label '+ ' '+ ' remove '; $("#myForm").append(html); } $('#addField').on('click', add_form_field); $('#myForm').on('click', '.remove', delete_field);
accepted answer of: http://stackoverflow.com/q/27591732
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43607873
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/43607919
score: 1

http://stackoverflow.com/comment/43525689
type: Comment
type: QuestionComment
score: 8
comment on: http://stackoverflow.com/q/27549766
has text: Put it all in an onLoad handler...

http://stackoverflow.com/q/27616439
score: 1
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/27619218
has title: Drawing data 1 by 1 D3 js
tagged with: javascript
has body: I am trying to draw the data points 1 by 1. Since its 22.000 some data points I want them to be drawn AFTER each other not all at the same time. Any suggestions how to do it? I cant seem to figure it out. ps. the code for running through all the data is not there obviously because I dont know how. // add the tooltip area to the webpage var tooltip = d3.select("body").append("div") .attr("class", "tooltip") .style("opacity", 0); // load data d3.csv("giants.csv", function(error, data) { // draw dots svg.selectAll(".dot") .data(data) .enter().append("circle" ) .attr("class", function(d) { var c = " "; c="dot " + d["last"]; return c; }) .attr("r", 1.5) .attr("cx", xMap) .attr("cy", yMap) .style("fill", function(d) { return color(cValue(d));}) .on("mouseover", function(d) { tooltip.transition() .duration(500) .style("opacity", .9); tooltip.html("&lt;img class='playerfoto' src=img/"+d["last"]+".png&gt;&lt;img class='playerfoto'src='img/sf.png'&gt;&lt;br/&gt;" +" "+ d["last"]+", "+ d["first"]+ "&lt;br/&gt;&lt;br/&gt;" +"Pitch made on: "+d["date"]+"&lt;br/&gt; "+"Batter faced : " + d["batter_last"] +", "+ d["batter_first"]+ "&lt;br/&gt; (" + xValue(d)+ ", " + yValue(d) + ")") .style("left", ( 20) + "px") .style("top", ( 20) + "px"); }) .on("mouseout", function(d) { tooltip.transition() .duration(500) .style("opacity", 0); });
downvote count: 0
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/27619218
tagged with: d3.js
linked to: http://stackoverflow.com/q/19206948
type: AnsweredQuestion

http://stackoverflow.com/q/27516458
type: UnansweredQuestion
score: 0
has body: I have a repeater control in my aspx page which has a textbox field called "name" and a hidden field called "id" that is the id of the name. I want to get the value of the id field when the name textbox is in focus and pass it, can you please let me know how i can accomplish that? &lt;asp:Repeater ID="rpt" runat="server"&gt; &lt;ItemTemplate&gt; &lt;tr&gt; &lt;td &gt; &lt;asp:TextBox ID="txtName" runat="server" Text='&lt;%#Eval("Name")%&gt;'/&gt; &lt;/td&gt; &lt;td &gt; &lt;asp:DropDownList ID="ddListNumber" runat="server"&gt; &lt;asp:ListItem Text='First' Value="1" /&gt; &lt;asp:ListItem Text='Second' Value="0" /&gt; &lt;/asp:DropDownList&gt; &lt;/td&gt; &lt;asp:HiddenField runat="server" Value='&lt;%# Eval("ID") %&gt;' ID="txtID" Visible="false" /&gt; &lt;/tr&gt; &lt;/ItemTemplate&gt; &lt;/asp:Repeater&gt;
has comment: http://stackoverflow.com/comment/43469070
has comment: http://stackoverflow.com/comment/44262042
has comment: http://stackoverflow.com/comment/43463243
has title: control inside a repeater
has comment: http://stackoverflow.com/comment/43463279
type: Question
tagged with: c#
has comment: http://stackoverflow.com/comment/43463106
tagged with: javascript
has comment: http://stackoverflow.com/comment/43463171
has comment: http://stackoverflow.com/comment/43463135
tagged with: asp.net
has comment: http://stackoverflow.com/comment/43463260
answer count: 0

http://stackoverflow.com/q/27524614
downvote count: 0
favorite count: 0
tagged with: hammer.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43798948
has comment: http://stackoverflow.com/comment/43489610
has body: I have a site that uses mediaboxAdv1.3.4b.js to display images. Keydown events are used to move through images and I would like to add the ability on a mobile device to use swipe left/right. In the MediaboxAdv code the relevant part seems to be that pasted below. I guess it should be straightforward to edit this to add swipe events using something like hammer.js but my experiments so far have failed. if (options.keyboard) document[fn]("keydown", keyDown); } function keyDown(event) { switch(event.code) { case 27: // Esc case 88: // 'x' case 67: // 'c' close(); break; case 37: // Left arrow case 188: // , &lt; case 80: // 'p' previous(); break; case 39: // Right arrow case 190: // . &gt; case 78: // 'n' next(); } } if (options.stopKey) { return false; }; } function previous() { return changeImage(prevImage); } function next() { return changeImage(nextImage);
linked to: http://stackoverflow.com/q/6986490
answer count: 0
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/43801338
tagged with: javascript
has title: how can I add swipe detection to a javascript script that uses keydown
tagged with: media-player

http://stackoverflow.com/a/27584488
has body: The top level of your variable isn't an array, and thus has no notion of order. The closest you could do is extract those items into an array and sort that, or do that with just the keys.
has comment: http://stackoverflow.com/comment/43593647
has comment: http://stackoverflow.com/comment/43593763
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/27584453
score: 2
has comment: http://stackoverflow.com/comment/43593640
has comment: http://stackoverflow.com/comment/43593676
has comment: http://stackoverflow.com/comment/43593531
downvote count: 0

http://stackoverflow.com/q/27489496
has comment: http://stackoverflow.com/comment/43411417
tagged with: forms
type: Question
has title: Javascript form duplicate
has answer: http://stackoverflow.com/a/27489877
accepted answer: http://stackoverflow.com/a/27489877
has body: I am trying to duplicate that Director / Member form. I want add button to just add another member, and delete to erase last entry. Code seemed to work at some point, but does not anymore. Do not remember what I have changed. Add button works just fine, but delete button is just disabled. And if I purposely enable it, it does not work the right way. Directors / Members Corporations: Please list each director of the company. LLCs: Please list each member (owner) of the company. Non-Profits: Please enter information for at least three (3) unrelated directors if filing for 501(c)(3) status. <?php $y=0; $clone =1; do{ ?> <div id="<?php echo "clonedSection$clone"; ?>" class="clonedSection" > <label id="<?php echo "member_label$clone"; ?>" > <?php echo "Director / Member $clone"; ?> First name:<input type="text" name="member_firstname" id="member_firstname" value="<?php echo $split_members[$y][0];?>"> <?php echo $member_errors[$y]["member_first_name"];?> Last name:<input type="text" name="member_lastname" id="member_lastname" value="<?php echo $split_members[$y][1];?>"> <?php echo $member_errors[$y]["member_last_name"];?> Street address:<input type="text" name="member_address" id="member_address" value="<?php echo $split_members[$y][2];?>"> <?php echo $member_errors[$y]["member_address"];?> City: <input type="text" name="member_city" id="member_city" value="<?php echo $split_members[$y][3];?>"> <?php echo $member_errors[$y]["member_city"];?> State: <?php //$states = listStates(statesList()); foreach($states as $value){ echo ' '.$value.' '; } echo ' '.$split_members[$y][4].' '; ?> <?php echo $member_errors[$y]["member_state"];?> ZIP code:<input type="text" name="member_zip" id="member_zip" value="<?php echo $split_members[$y][5];?>"> <?php echo $member_errors[$y]["member_zip"];?> <?php $y++; $clone++;}while($y < count($split_members)); ?>
tagged with: javascript
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/43411253
type: AnsweredQuestion
tagged with: duplicates

http://stackoverflow.com/q/27638467
favorite count: 0
upvote count: 2
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27646658
has comment: http://stackoverflow.com/comment/43696283
type: Question
has comment: http://stackoverflow.com/comment/43710467
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27646658
has body: I'm completely blocked with this issue. I need to run a function which changes the image every time my h4 reaches the middle of window. In my case, one image per h4, changing it when user scrolls down or scrolls up. That's to say, each img will belong to a h4. Up to now, I've achieved change the opacity per h4 but I don't get change the image. Here's my html: Targets Valors Me Here's my code: var findMiddleElement = (function(docElm){ var viewportHeight = docElm.clientHeight, elements = $('h4'); $('h4').first().css('opacity','1','important'); return function(e){ var middleElement; if( e && e.type == 'resize' ) viewportHeight = docElm.clientHeight; elements.each(function(){ var pos = this.getBoundingClientRect().top; // if an element is more or less in the middle of the viewport if( pos > viewportHeight/2.5 && pos < viewportHeight/1.5 ){ middleElement = this; console.log('I am in the middle'); changeImage(); return false; // stop iteration } }); $(middleElement).css({opacity:'1', transition : 'opacity 1s ease-in-out'}); } })(document.documentElement); $(window).on('scroll resize', findMiddleElement); function changeImage(){ console.log('I am ready to change the image'); $('img').each(function(){ $('.active').removeClass('active'); $(this).addClass('active'); }); } And here's the fiddle: jsfiddle.net/antoniobarcos/owv1ysto/4/ Thanks in advance.
tagged with: http://stackoverflow.com/tag/html
has title: Running a function to change images every time reaches middle of window

http://stackoverflow.com/comment/43468650
type: QuestionComment
comment on: http://stackoverflow.com/q/27511468
has text: I am hoping the HTML part will be auto-generated so the first image can be after many `h1` `p` and `a` tags, thus I can't edit the html part. @Vishal
score: 0
type: Comment

http://stackoverflow.com/q/27515472
type: Question
tagged with: validation
has body: I have a wrapped form that is custom. Inline Validation is having a fit because the javascript runs into error because the input data.errmsg is null and it can't handle that. It spits out this traceback: 2014-12-16 16:28:15 WARNING plone.protect error parsing dom, failure to add csrf token to response for url http://localhost:8080/Plone/.../@@questionsinglepart/@@z3cform_validate_field For an error in this part of the inline javascript: if (fname) { $form.ajaxSubmit({ url: append_url_path($form.attr('action'), '@@z3cform_validate_field'), data: {fname: fname, fset: fset}, iframe: false, success: function (data) { render_error($field, data.errmsg); }, dataType: 'json' }); } How can I disable the inline validation for a form so I don't get the errors when it attempts to validate?
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/27531169
accepted answer: http://stackoverflow.com/a/27531169
tagged with: z3c.form
answer count: 1
tagged with: plone
favorite count: 0
upvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43489874
score: 1
tagged with: forms
has title: How can you disable inline validation for a z3c.form on Plone?

http://stackoverflow.com/q/27532602
accepted answer: http://stackoverflow.com/a/27532677
tagged with: javascript
has answer: http://stackoverflow.com/a/27532677
downvote count: 1
has comment: http://stackoverflow.com/comment/43493747
favorite count: 0
has body: i have this loop in javascript which executes code every 3rd element in the loop, how could I do the same but with this pattern: 2nd, 5th, 8th, 11th etc if ( index % 3 === 0 ) { // message }
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/27532669
has answer: http://stackoverflow.com/a/27532669
has title: Match a pattern with iterator in loop
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/43494221
answer count: 2

http://stackoverflow.com/comment/43786994
type: QuestionComment
type: Comment
has text: What Tizen SDK are you using?
comment on: http://stackoverflow.com/q/27633756
score: 0

http://stackoverflow.com/a/27592896
has comment: http://stackoverflow.com/comment/43609716
has comment: http://stackoverflow.com/comment/43609422
score: 0
answers question: http://stackoverflow.com/q/27592879
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27592879
type: Answer
has body: Yes you can, but remove the curly brackets. ng-click="tvarURL(grupe.grupe)"
has comment: http://stackoverflow.com/comment/43609690
has comment: http://stackoverflow.com/comment/43609996
has comment: http://stackoverflow.com/comment/43609572
has comment: http://stackoverflow.com/comment/43609758

http://stackoverflow.com/comment/43454637
type: Comment
comment on: http://stackoverflow.com/a/27512133
has text: Why does it not work in normal dom listners?. I am still updating the $scope.date.time inside my event listener?.
score: 0
type: AnswerComment

http://stackoverflow.com/a/27516663
score: 0
type: Answer
has body: JSFiddle function outputUpdate1(val) { document.querySelector('#percent1').value = val; document.getElementById('slider2').value = val; document.getElementById('percent2').value = val; } function outputUpdate2(val) { document.querySelector('#percent2').value = val; document.getElementById('slider1').value = val; document.getElementById('percent1').value = val; } Actually, these function can be brief and generate a new one.
answers question: http://stackoverflow.com/q/27516356

http://stackoverflow.com/a/27482622
score: 0
answers question: http://stackoverflow.com/q/27481669
type: Answer
has body: Use Local storage. localStorage.setItem('some key',radiobuttonValue); //To set values localStorage.getItem('some key'); // To get values These values will be stored on your browsers storage. Note that this doesnt work if user clears the cache.

http://stackoverflow.com/a/27481457
answers question: http://stackoverflow.com/q/27481353
has comment: http://stackoverflow.com/comment/43396494
upvote count: 5
has comment: http://stackoverflow.com/comment/43395853
score: 5
has comment: http://stackoverflow.com/comment/43395910
type: AcceptedAnswer
downvote count: 0
has body: 60,000 options in select lists in a browser is not going to be workable on several levels, not least user experience. It's just always going to be slow and awkward, not to mention incomprehensible to the user. So the best thing to do here is to not do that, to put things into categories, etc., etc. Answering the actual question, though: Assuming options2select is an array (since you haven't said what it is), this would probably be faster: options2select.forEach(function(option) { option.selected = true; }); or even var n; for (n = options2select.length - 1; n &gt;= 0; --n) { options2select[n].selected = true; } Assuming options2select is a selector, much the same with document.querySelectorAll at the outset: var list = document.querySelectorAll(options2select); Array.prototype.forEach.call(list, function(option) { option.selected = true; }); or even var list = document.querySelectorAll(options2select); var n; for (n = list.length - 1; n &gt;= 0; --n) { list[n].selected = true; } But again, faster doesn't mean fast.
type: Answer
accepted answer of: http://stackoverflow.com/q/27481353

http://stackoverflow.com/q/27627306
has title: Scope.watch in directive called at beginning angularjs
has answer: http://stackoverflow.com/a/27627405
tagged with: angularjs
type: Question
answer count: 2
score: 0
tagged with: angularjs-scope
tagged with: angularjs-directive
has body: I am building a simple directive, I have a custom element that goes by as Change owner I want to change the owner of the problem with button click, so here it is in my controller: $scope.change = function() { $scope.owner = "12390898"; } And my directive code is as follows: app.directive('problem', function() { return { restrict: 'E', scope: { owner: '=owner', id: "=id", }, templateUrl: "partials/directives/problem.html", controller: function($scope) { $scope.$watch("id", function(newValue, oldValue) { console.log("id ->", oldValue, " --> ", newValue); }); $scope.$watch("owner", function(newValue, oldValue) { console.log("owner ->", oldValue, " --> ", newValue); }); }, link: function(scope, element, attrs) { } } }); However, the console output is: // At initial load id -> 1230312 --> 1230312 owner -> 548dfa6accfc105ae415f0e7 --> 548dfa6accfc105ae415f0e7 // After the click owner -> 548dfa6accfc105ae415f0e7 --> 12390898 Why is it called at the beginning? The values are same. Is it the right approach to do the following?: I want to initialize the problem at the beginning with default id and owner, and be able to change the owner later with controller outside.
has answer: http://stackoverflow.com/a/27634995
tagged with: javascript
tagged with: variables
type: UnansweredQuestion

http://stackoverflow.com/q/27507918
has title: detect if the useragent supports popup
score: 0
linked to: http://stackoverflow.com/q/10240398
has answer: http://stackoverflow.com/a/27508153
type: UnansweredQuestion
tagged with: popup
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/27508292
has body: Is there a way to detect if the current user agent support popup using native javascript? for example in WEB, window.open will open a popup, and the parent will know when the popup is closed. however in Iphone for example or Ipad it opens the popup in new tab and the parents will lose the context. so the parent's can't listen to the event when the new tab is closed. Currently am using a work around, is by checking each device manually if it's supports popup and then in my javascript i check the user agent if it's included in the list i checked manually. but i was thinking if there are more intelligent way to implement this. Thanks.
tagged with: javascript

http://stackoverflow.com/q/27638468
has comment: http://stackoverflow.com/comment/43696627
has title: Make placeholder text inside html text field blink
tagged with: http://stackoverflow.com/tag/html
upvote count: 4
has answer: http://stackoverflow.com/a/27644242
accepted answer: http://stackoverflow.com/a/27644242
type: AnsweredQuestion
tagged with: html-input
favorite count: 0
type: Question
score: 3
possible better answer: http://stackoverflow.com/a/27638634
has answer: http://stackoverflow.com/a/27638634
answer count: 2
downvote count: 1
tagged with: javascript
tagged with: jquery
has body: Before asking this question I searched a lot for this functionality but did'nt find any clue so that's why posting a new question. So actually I have a placeholder text inside an html text field like this &lt;input type="text" class="timepicker" placeholder="Placeholder Text..." &gt; So what I want is to make this placeholder blink. So is it possible in html or by using jquery or javascript.
has comment: http://stackoverflow.com/comment/43696081

http://stackoverflow.com/a/27507329
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27507293
upvote count: 1
has comment: http://stackoverflow.com/comment/43445141
type: Answer
has body: Instead of input:text you should use input[type=text] $('.greenDiv>input[type=text]').on("blur",function () { if (!$(this).val()) { alert("fill this field"); } });

http://stackoverflow.com/q/27561568
downvote count: 0
has comment: http://stackoverflow.com/comment/43549241
tagged with: javascript
has answer: http://stackoverflow.com/a/49125699
score: 3
has answer: http://stackoverflow.com/a/27562124
tagged with: jsp
has answer: http://stackoverflow.com/a/27561631
favorite count: 0
has answer: http://stackoverflow.com/a/27561643
has title: fetch value from database on selection of in jsp
answer count: 5
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/27561631
has body: I am developing one web based application where I have one list and one dependent textbox. I have added customer names in list. I want customer id to be filled in textbox when I will select customer name in list. I have tried using javascript function but that only helps me to know customer name. Customer Id is not value of option tag its customer code which I have entered while registration of customer. So I want to fetch customer code from mysql database. Can any one please suggest me something? This is my jsp code. &lt;% DBConnection dbc=new DBConnection(); Connection con=dbc.getNewConnection(); Statement st = null; ResultSet rs = null; try { st=con.createStatement() ; rs=st.executeQuery("select cname from CustomerMaster"); %&gt; &lt;td&gt; &lt;select id="selectBox" &gt; &lt;% while(rs.next()){ %&gt; &lt;option &gt;&lt;%= rs.getString(1)%&gt;&lt;/option&gt; &lt;% } %&gt;
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27562124
has comment: http://stackoverflow.com/comment/43549362
upvote count: 3
tagged with: mysql
type: Question
has answer: http://stackoverflow.com/a/38698849

http://stackoverflow.com/comment/43608840
comment on: http://stackoverflow.com/a/27569654
has text: I want to put a dynamic php string into thew range error message
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/27602059
has comment: http://stackoverflow.com/comment/43627822
has title: HTML inputbox to Javascript variable
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43628798
has body: Im trying to get three variables from HTML input boxes to a JavaScript that prints ZPL barcodes. Below is the code I have: TAG Model: Serial: SJM: The ModelSKU, LabelSku and SAPSku are the variables I need to pass from the input boxes to the ZPL text to print the barcodes. Can anyone point me in the right direction. I have little knowledge of JavaScript some pointers would be greatly appreciated. Thanks all.
tagged with: vbscript
tagged with: jquery
has answer: http://stackoverflow.com/a/27603072
type: Question
tagged with: http://stackoverflow.com/tag/html
score: 0
answer count: 1

http://stackoverflow.com/comment/43428577
type: AnswerComment
comment on: http://stackoverflow.com/a/27493485
score: 0
type: Comment
has text: Did not work, but I gave up, I will try to find another solution. However Browserify is interesting. Thanks.

http://stackoverflow.com/comment/43690129
has text: @MANOJ see i edited, value will be "open" or "expired" you can change it to keys "0" or "1" if you replace value={{value}} with value="{{key}}"
type: Comment
comment on: http://stackoverflow.com/a/27635287
type: AnswerComment
score: 0

http://stackoverflow.com/comment/43548382
type: QuestionComment
comment on: http://stackoverflow.com/q/27561212
has text: Can you generate subsets out of the whole set? Yes. Can you write a for loop that goes from `n` to `1` in decreasing order? Yes. All that remains is generating the permutations.
score: 0
type: Comment

http://stackoverflow.com/a/27596433
upvote count: 1
has body: In your code you declared array with two objects. To access first of them you should use $scope.proposal2.sites[0]. Then this object have only one key - 0: { "0": { "catf": { "2": { "cats": { "id": "9" } }, "4": { "cats": { "id": "12" } }, "5": { "cats": { "id": "13" } } } } }, so you accessing it with $scope.proposal2.sites[0][0] to get object with only one key catf: { "catf":{ "2": { "cats": { "id": "10" } }, "4": { "cats": { "id": "11" } } } } so now you use $scope.proposal2.sites[0][0].catf[2] to access what you want. Also I agreed with charlietfl`s comments in that your structure looks too complicated and maybe you would like to have something like this: [ {"catf": { "2": { "cats": { "id": "9" } }, "4": { "cats": { "id": "12" } }, "5": { "cats": { "id": "13" } } } }, {"catf": { "2": { "cats": { "id": "10" } }, "4": { "cats": { "id": "11" } } } } ] and access it with $scope.proposal2.sites[0].catf[2] Also I believe than even this structure can (and should) be simplified, but to go with it, you should give more information about your task.
score: 1
answers question: http://stackoverflow.com/q/27595773
downvote count: 0
has comment: http://stackoverflow.com/comment/43647466
type: Answer

http://stackoverflow.com/q/27584875
has title: Javascript - how to safely evaluate expressions for auto-complete?
answer count: 1
has answer: http://stackoverflow.com/a/27585336
tagged with: eval
type: AnsweredQuestion
score: 0
accepted answer: http://stackoverflow.com/a/27585336
type: Question
tagged with: autocomplete
has body: I'm adding an auto-complete feature to my javascript console (the script is running on a remote browser). My approach is to evaluate the expression where the caret is, and if the evaluation yield an object - suggest it's list of properties for auto-complete. For instance (where | is the caret position): document.| in this case I evaluate var evalExp = document; then iterate it's members for (var prop in evalExp) to create a list of auto-complete suggestions. The problem is, if the expression I'm evaluating contains functions or assignments, such as: count++, e.click() or alert('Some message'), I wouldn't want it to be executed, since it changes the browsers state instead of just evaluating and returnning an object. Therefore, I want to avoid evaluating any expressions if they call functions, or if they contain assignment operators. Questions: Are there any other kinds of expressions I should avoid evaluating? What alternative ways are there to create the suggestion list?
tagged with: javascript

http://stackoverflow.com/q/27487280
downvote count: 2
type: Question
linked to: http://stackoverflow.com/q/20279484
accepted answer: http://stackoverflow.com/a/27487664
tagged with: javascript
has comment: http://stackoverflow.com/comment/43406230
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/43406175
tagged with: asynchronous
tagged with: callback
favorite count: 0
possible better answer: http://stackoverflow.com/a/27487352
has comment: http://stackoverflow.com/comment/43406302
has answer: http://stackoverflow.com/a/27487352
has answer: http://stackoverflow.com/a/27487664
has body: I have an object that looks like this: var users = function(url){ this.users = [] console.time("api"); d3.json(url, function(data){ console.timeEnd("api"); this.users = data.data }) } it's instatiated like this: var liveUsers = new users(apiPoint) d3.json is an asynchonomous api-call. I wish to perform a callback once it's complete, preferably a chaned one, how can I do this?
has title: How can I perform a callback from object constructor?
type: AnsweredQuestion
upvote count: 2

http://stackoverflow.com/q/27517621
answer count: 2
has answer: http://stackoverflow.com/a/27517706
score: 1
has title: Console.log returns wrong answer
favorite count: 0
type: UnansweredQuestion
upvote count: 1
has body: I'm new to JS, it's my first logical programming language. For some reason no matter what my income and loanAmount is the else console.log is returned. What can't I get the "Approved" message to show? function LoanApp(personName, income, loanAmount){ this.personName = personName; this.income = income; this.loanAmount = loanAmount; var bankBranch = "New York"; var approvalStatus = "invalid"; this.submit = function (income, loanAmount){ if (income / loanAmount &gt;= 2) { approvalStatus = "Approved"; console.log("Congrats you're approved for " + this.loanAmount + ".") } else { approvalStatus = "On Review"; console.log("Your application needs further review.") }; }; }; var tony = new LoanApp("Tony"5000,1000); tony.submit(); //returns else console.log but should be "Congrats"
has comment: http://stackoverflow.com/comment/43465241
type: Question
has answer: http://stackoverflow.com/a/27517641
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/27551701
has answer: http://stackoverflow.com/a/27612415
has comment: http://stackoverflow.com/comment/43530154
type: Question
type: AnsweredQuestion
tagged with: angular-ui-router
accepted answer: http://stackoverflow.com/a/27612415
has comment: http://stackoverflow.com/comment/43530397
has comment: http://stackoverflow.com/comment/43530339
has comment: http://stackoverflow.com/comment/43530485
answer count: 1
has comment: http://stackoverflow.com/comment/43530589
tagged with: javascript
tagged with: asp.net
has title: AngularJS UI-Router not working unless page is refreshed
score: 0
has body: I'm making a website using ASP.NET and AngularJs. Users start at a login page, and if they enter valid user/pass they're directed to Home/Index using MVC style redirection by return RedirectToAction("Index", "Home");. This is what I have in my Index.cshtml: @{ Response.Headers["X-UA-Compatible"] = "IE=10"; } &lt;div data-ng-app="myapp"&gt; &lt;br /&gt; &lt;div data-ui-view&gt;&lt;/div&gt; &lt;/div&gt; @section Scripts { &lt;script src="/Scripts/jquery-1.10.2.js"&gt;&lt;/script&gt; &lt;script src="/Scripts/bootstrap.js"&gt;&lt;/script&gt; &lt;script src="/Scripts/respond.js"&gt;&lt;/script&gt; &lt;script src="/Scripts/moment.js"&gt;&lt;/script&gt; &lt;script src="/Scripts/bootstrap-datepicker.js"&gt;&lt;/script&gt; &lt;script src="/Scripts/bootstrap-datetimepicker.js"&gt;&lt;/script&gt; &lt;link rel="stylesheet" href="~/Content/jquery-ui.min.css" /&gt; &lt;link rel="stylesheet" href="~/Content/Site.css"&gt; &lt;link rel="stylesheet" href="~/Content/ng-grid.css" /&gt; &lt;link rel="stylesheet" href="~/Content/bootstrap.css"&gt; &lt;link rel="stylesheet" href="~/Content/bootstrap-theme.min.css"&gt; &lt;script src="~/Scripts/tooltip.js"&gt;&lt;/script&gt; &lt;script src="~/Scripts/popover.js"&gt;&lt;/script&gt; &lt;script src="~/Scripts/dropdown.js"&gt;&lt;/script&gt; &lt;link rel="stylesheet" href="~/Content/tooltip.less" /&gt; &lt;link rel="stylesheet" href="~/Content/popovers.less" /&gt; &lt;link rel="stylesheet" href="~/Content/dropdowns.less" /&gt; &lt;link rel="stylesheet" href="~/Content/datepicker.css" /&gt; &lt;link rel="stylesheet" href="~/Content/datetimepicker.css" /&gt; &lt;script src="~/Scripts/angular.js"&gt;&lt;/script&gt; &lt;script src="~/Scripts/angular-route.js"&gt;&lt;/script&gt; &lt;script src="~/Scripts/angular-ui-router.js"&gt;&lt;/script&gt; &lt;script src="~/Scripts/ng-grid.debug.js"&gt;&lt;/script&gt; &lt;script src="//angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.12.0.js"&gt;&lt;/script&gt; &lt;script src="~/Scripts/Controllers/Index.js"…
tagged with: angularjs

http://stackoverflow.com/a/29583834
type: Answer
upvote count: 4
answers question: http://stackoverflow.com/q/27484534
downvote count: 0
has comment: http://stackoverflow.com/comment/48038336
has comment: http://stackoverflow.com/comment/47355372
has body: This really isn't an answer, but an appreciation of the problem: There has yet to be a cogent explanation of why the deprecation occurs, or a newbie explanation of what it is. Specifically, not paragraph saying 'if you do it the old way, it breaks in a subtle way'. The closest is a bug report that, using node, a single symbol is defined in the global namespace (https://github.com/moment/moment/issues/1214), which is mostly philosophy. The deprecation comes on usage, so its unclear to people why. It appears to need be fixed in installation. No one on any chat node has explained it, outside of mirroring the require.js boilerplate. The comment seems to continue as "do it this way and it works". The boilerplate does not cover all users. Some failing lines include simple constructors like moment(value), which is the whole point of the library. It appears the minor version upgrade from moment 2.9.0 to 2.10.0 may have forced deprecated code to break, at least for those using ECMAScript and a fallback. Reverting to 2.9.0 will allow you to keep working for now. If you only had the related breakage of moment.duration.fn disappearing, you can upgrade to 2.10.1 or above.
score: 4
has comment: http://stackoverflow.com/comment/47391286
has comment: http://stackoverflow.com/comment/47398325

http://stackoverflow.com/comment/43645642
has text: groupby just iterates over whatever you pass it and uses the second argument - in your case 'institution' - to group the values it finds. It sounds like you're setting `datasources` as the entire service response, not just the data. Can you paste your service code as well please?
type: Comment
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/27606954

http://stackoverflow.com/a/27570080
score: 10
has comment: http://stackoverflow.com/comment/43590332
has comment: http://stackoverflow.com/comment/43590482
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43571496
type: Answer
accepted answer of: http://stackoverflow.com/q/27569317
answers question: http://stackoverflow.com/q/27569317
upvote count: 10
has body: I don't think it's allowed to change states in the middle of a state transition. So, the way to address it is to have the checkLogin resolve parameter (I changed it below to userId) to be a function that either returns a value or a promise (in this case, a rejected promise, if you can't get the user-id). You'd then need to handle this in $rootScope.$on('$stateChangeError') and check the error code. resolve: { userId: function ($q, $window) { var userId = $window.localStorage.getItem('user-id'); if (!userId) { return $q.reject("signin") } return userId; } } And redirect in the $stateChangeError handler: $rootScope.$on('$stateChangeError', function (event, toState, toParams, fromState, fromParams, error) { if (error === "signin") { $state.go("signin"); } });
has comment: http://stackoverflow.com/comment/43572384

http://stackoverflow.com/comment/43511317
type: Comment
score: 1
type: QuestionComment
has text: You want to get rid of PHP by tagging PHP? ;)
comment on: http://stackoverflow.com/q/27542100

http://stackoverflow.com/comment/43439243
has text: BTW: this line `success: OnSuccess(i, reslength),` (probably) doesnt do what you think it does.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27504393
score: 0

http://stackoverflow.com/comment/43591377
has text: There is an answer for http://stackoverflow.com/questions/17216438/chain-multiple-then-in-jquery-when which might be helpful for your case.
comment on: http://stackoverflow.com/q/27583345
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43390354
has text: Why are you trying to do this? It's not a natural Javascript design pattern. You can force it using various hacks, but it is not the way JS was meant to be written.
type: QuestionComment
comment on: http://stackoverflow.com/q/27478248
score: 0
type: Comment

http://stackoverflow.com/comment/43533423
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27553545
has text: The code snippet doesn't seem to work, probably because StackExchange interferes. See [live demo](http://jsfiddle.net/sn2xntxm/).
score: 0

http://stackoverflow.com/comment/43418068
type: AnswerComment
comment on: http://stackoverflow.com/a/27493112
type: Comment
score: 1
has text: I will be selecting this as my answer when stackoverflow allows me.

http://stackoverflow.com/comment/43591064
type: QuestionComment
type: Comment
score: 1
comment on: http://stackoverflow.com/q/27583251
has text: Why are you creating a date, converting it to a string and then parsing it in again? Just use Date.now().

http://stackoverflow.com/comment/43545518
comment on: http://stackoverflow.com/q/27559549
score: 0
type: Comment
type: QuestionComment
has text: @ChicagoSky...don't forget to read my comment above..there is no need to change submit button just use `event.preventDefault()`

http://stackoverflow.com/a/27488117
downvote count: 0
score: 1
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/27487915
has body: I think this is what you are looking for : http://jsfiddle.net/vgg6q8uL/9/ Popup show only on table click and hide on click anywhere. $(document).ready(function(){ $("table").click(function(){ $(".overlay, .popup").fadeToggle(); return false; }); $("body").click(function () { if($(".popup:visible").length &gt; 0) { $(".overlay, .popup").fadeToggle(); } }); });

http://stackoverflow.com/q/27509438
type: Question
tagged with: masonry
tagged with: internet-explorer
has comment: http://stackoverflow.com/comment/48534083
upvote count: 1
downvote count: 0
tagged with: javascript
has body: I am using the well documented and usually reliable Masonry plugin from Desandro for a project. My elements are fluid in width (25%), but on initial load, there is a uniform gap between all elements (horizontal and vertical), in IE (9 and 10). This gap (only a few pixels) disappears as soon as the window is resized and the grid reformatted. I am already using imagesLoaded to holt the setup until the images are in place. I have also tried to removing custom fonts (via typekit) as this can cause issues from past experience. The layout is perfect and working as it should in Chrome, Firefox and Safari. Also in IE8.
favorite count: 0
answer count: 0
type: UnansweredQuestion
score: 1
has title: Masonry leaves uniform gaps in IE

http://stackoverflow.com/q/27614020
answer count: 2
favorite count: 0
type: UnansweredQuestion
has body: I am writing a Node.js module and I need to pass variable data from the main file to the functions. I am doing this: var region; var api_key; exports.region = region; exports.api_key = api_key; module.exports = { getSummonerId: function(sum, callback) { var summoners = {}; var summoner = sum.replace(/\s+/g, ''); request("https://na.api.pvp.net/api/lol/" + region + "/v1.4/summoner/by-name/" + summoner + "?api_key=" + api_key, function(error, response, body) { summoners[summoner] = JSON.parse(body); callback(summoners[summoner][summoner].id); }); } } And in the main file: var lol = require('./apiwrapper.js'); lol.api_key = "example"; lol.region = "las"; lol.getChampions(function(data) { console.log(data); }) But from apiwrapper.js file, those two variables' value are always "undefined". How can I fix this?
linked to: http://stackoverflow.com/q/7137397
tagged with: node.js
score: 6
has comment: http://stackoverflow.com/comment/43650047
upvote count: 7
has comment: http://stackoverflow.com/comment/43650030
downvote count: 1
has answer: http://stackoverflow.com/a/27614348
type: Question
has answer: http://stackoverflow.com/a/27614508
tagged with: javascript
has comment: http://stackoverflow.com/comment/43650233
has comment: http://stackoverflow.com/comment/43650037
has title: Node.js export variable

http://stackoverflow.com/q/27628464
has title: js-hotkeys adding letter to the middle of a word in a form
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27628550
score: 2
upvote count: 2
has body: I am setting up a form for entering Spanish Verbs. I want to be able to use js-hotkeys plugin to create a shortcut to add accented letters. I have this so far $('#presentTense input').bind('keyup', 'Ctrl+a', function () { this.value = this.value + ('á'); }); which is fine as they are typing and it adds the accented letter to the end of what they have typed. The problem is that if they want to go back and insert an accented letter into the middle of a word that has already been typed to fix an error or omission, this method adds the accented letter to the end of the word. Can anyone tell me a method to use to insert the letter where the cursor is whether at the end or in the middle of a word in an input text field?
has answer: http://stackoverflow.com/a/27637777
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/2897155
type: Question

http://stackoverflow.com/comment/81728593
score: 0
type: Comment
has text: MS Edge writes: Syntax error, unrecognized expression: a[href*=#]:not([href=#])
type: AnswerComment
comment on: http://stackoverflow.com/a/27560834

http://stackoverflow.com/comment/43402809
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27484887
has text: Without your code it's difficult to help you. I think you have just to wrapp your code into a function and execute it when the images are in the DOM
score: 0

http://stackoverflow.com/comment/43449462
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27509569
type: QuestionComment
has text: @AmitJoki I've added some additional info. Thanx for the help.

http://stackoverflow.com/comment/43644268
type: Comment
has text: @sethetter Please create a fiddle to repro the issue. Build it in a different browser if you need to, and test in IE8.
score: 1
comment on: http://stackoverflow.com/a/27610674
type: AnswerComment

http://stackoverflow.com/q/27582965
score: 2
type: AnsweredQuestion
has body: I have a Struts 2 application that use Tiles 3 and Struts 2 Jquery Plugin. In the pom.xml: com.jgeppert.struts2.jquery struts2-jquery-plugin 3.7.1 head.jsp: <%@ page contentType="text/html" pageEncoding="UTF-8" %> <%@ taglib prefix="s" uri="/struts-tags" %> <%@ taglib prefix="sb" uri="/struts-bootstrap-tags" %> <%@ taglib prefix="sj" uri="/struts-jquery-tags" %> <s:head /> <sj:head /> <sb:head /> <!--[if lt IE 9]> <![endif]--> The javascript console of the browser displays the following error: Uncaught TypeError: Cannot set property 'version' of undefined The tag <sj:head /> print the following lines: The line that generate the undefined error is: jQuery.struts2_jquery.version = "3.7.1"; After some javascript debug it seems that the function $.subscribeHandler is not defined.
has title: Struts 2 jquery plugin javascript error
has answer: http://stackoverflow.com/a/27583188
type: Question
tagged with: tiles-3
tagged with: jsp
tagged with: javascript
tagged with: jquery
tagged with: struts2
accepted answer: http://stackoverflow.com/a/27583188
downvote count: 0
answer count: 1
favorite count: 0
upvote count: 2

http://stackoverflow.com/comment/43487946
type: AnswerComment
has text: I dont have a great understanding of prefixes but this should work for all browsers including ie [see fiddle here](http://jsfiddle.net/cy6azatq/2/)
type: Comment
comment on: http://stackoverflow.com/a/27529217
score: 0

http://stackoverflow.com/comment/43390039
type: Comment
comment on: http://stackoverflow.com/a/27478070
type: AnswerComment
score: 0
has text: Exactly what I wanted to know! Thank you

http://stackoverflow.com/comment/43468531
has text: The clean up request won't send if you don't have the pop up because the popup is what's preventing the document from closing and executing your clean up request
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27518005

http://stackoverflow.com/comment/43533738
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27552817
has text: Title, description, Email from the person who created the event and after feed the doc with this information, send the doc to my gmail and then to a database and I dont know if that is possible.
score: 0

http://stackoverflow.com/a/27504970
score: 0
has body: You may add a start/stop variable so as to check the status : [...] var time = 3300; var currentIndex = 0; var stop = 0; function pageChange() { if(currentIndex == 0){ pages = shuffle(pages); console.log(pages); currentIndex = pages.length; } if (stop == 0) { currentIndex--; document.getElementById("frame").src=pages[currentIndex]; console.log(currentIndex); setTimeout(function() { pageChange(); }, time); } }; function startStop() { if (stop == 0){ stop = 1; } else{ stop = 0; pageChange(); } } [...] And then you call startStop() on the click event of the button you want Edit : Here is a jsfiddle
answers question: http://stackoverflow.com/q/27504707
type: Answer
has comment: http://stackoverflow.com/comment/43440122

http://stackoverflow.com/comment/43611408
type: Comment
has text: Do you want to inspect one one, multiple or all attributes at all widths? Why do you want to do this (is it a kind of code quality check) (this might help finding a proper solution)? In/on what browsers should that work?
comment on: http://stackoverflow.com/q/27540082
score: 0
type: QuestionComment

http://stackoverflow.com/q/27539223
has answer: http://stackoverflow.com/a/52172686
possible better answer: http://stackoverflow.com/a/48454664
has comment: http://stackoverflow.com/comment/43506462
has title: Permutations via Heap's algorithm with a mystery comma
has answer: http://stackoverflow.com/a/48454664
tagged with: combinations
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43506642
tagged with: algorithm
has comment: http://stackoverflow.com/comment/43506837
score: 10
has answer: http://stackoverflow.com/a/27540053
upvote count: 10
has comment: http://stackoverflow.com/comment/43506618
type: Question
has body: I have spent the whole day (finally) wrapping my head around a permutation algorithm in practice for an admissions application on Friday. Heap's algorithm seemed most simple and elegant to me. here is an example of it: http://en.wikipedia.org/wiki/Heap%27s_algorithm function permutationArr(num) { var str = num.toString(); var arr = str.split(''); var permutations = []; function getPerm(arr,n){ var localArr = arr.slice(0); var i; var swap; var temp; if(n==1){ permutations.push(localArr.toString()); return; } for(i=0;i&lt;n;i++){ getPerm(localArr,n-1); swap = (n%2 ? i: 0); temp = localArr[swap]; localArr[swap] = localArr[n-1]; localArr[n-1] = temp; } } getPerm(arr,arr.length); console.log(permutations); return; } permutationArr(1234); The log for the final permutations array is here: ["1,2,3,4", "1,3,2,4", "4,2,3,1", "4,3,2,1", "4,1,3,2", "4,3,1,2", "1,,3,4,2", "1,3,,4,2", "4,,3,1,2", "4,3,,1,2", "4,1,3,,2", "4,3,1,,2", "1,2,3,4,", "1,3,2,4,", "4,2,3,1,", "4,3,2,1,", "4,1,3,2,", "4,3,1,2,", "1,,3,4,2", "1,3,,4,2", "4,,3,1,2", "4,3,,1,2", "4,1,3,,2", "4,3,1,,2"] It gets the first 12 permutations alright, and then a ',' gets added mysteriously, and the first 12 permutations are repeated. I'm stumped. EDIT: above is the updated code taking into consideration what comments said to help. Still only getting half the permutations.
accepted answer: http://stackoverflow.com/a/27540053
downvote count: 0
tagged with: javascript
tagged with: permutation
answer count: 3
tagged with: heaps-algorithm
favorite count: 0
has comment: http://stackoverflow.com/comment/43506678

http://stackoverflow.com/comment/133111452
type: Comment
has text: _"[...] as a traditional array"_ — except that you could have a very large number of gaps or very large indices, so a map is probably going to be working better in all cases (and also the index can be a negative decimal number like "-3.3"). But testing with those, it looks like Firefox doesn't show elements other than integer keyed elements as part of the array. Interesting...
comment on: http://stackoverflow.com/a/27537765
type: AnswerComment
score: 0

http://stackoverflow.com/a/27585205
type: Answer
accepted answer of: http://stackoverflow.com/q/27567320
has body: If you modify the HTML as Joel suggests, you need to call WinJS.Binding.processAll on the containing element with its data source to update the actual bindings. That is, the declarative format with data-win-bind are just instructions to processAll for how it uses WinJS.Binding.bind or the data source's bind method (which comes from a mixin) to set up the actual relationships. The former, WinJS.Binding.bind, uses a binding descriptor to set up relationships between arbitrary sources and targets; the instance bind method has the source defined already. Knowing this, you can use one of these bind methods to change the binding at runtime. It's a little too much to describe it here, so your best resource is to look at the Programming binding sample. I also discuss the subject on pages 313-315 of me free ebook, Programming Windows Store Apps with HTML, CSS, and JavaScript, 2nd Edition. (the whole chapter is about data binding). Most likely you'll want to skip the declarative HTML to set up the initial binding, and just do it in code from the get-go. Then you can parameterize that code to just hand it a new source property when you need it.
answers question: http://stackoverflow.com/q/27567320
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/43550433
type: Comment
comment on: http://stackoverflow.com/a/27562309
type: AnswerComment
has text: I think the data is being read from url but the string concatenation function is still not working
score: 0

http://stackoverflow.com/comment/111945791
score: 1
has text: Deprecated indeed. Use `.getAttribue('outerHTML')` and `.getAttribute('innerHTML')`
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27575804

http://stackoverflow.com/comment/43586991
comment on: http://stackoverflow.com/q/27581335
score: 0
type: Comment
type: QuestionComment
has text: What are you trying to achieve by doing that?

http://stackoverflow.com/comment/43451496
has text: Awesome! I'll wait :)
score: 0
comment on: http://stackoverflow.com/q/27509976
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27547608
downvote count: 0
answers question: http://stackoverflow.com/q/27546956
type: Answer
accepted answer of: http://stackoverflow.com/q/27546956
upvote count: 1
has comment: http://stackoverflow.com/comment/43521772
score: 1
has body: Put your buttons in a separate container and then you can set any layout on it that you need. For example: Ext.create('Ext.form.FormPanel', { items: [ { xtype: 'fieldset', title: 'Datos del documento', items: [] }, { xtype: 'fieldset', title: 'Rango de fecha', items: [] }, { xtype: 'container', defaultType: 'button', items: [ { text: 'Limpiar' }, { text: 'Enviar' }, { text: 'Nuevo borrador' } ], // Use any layout here. layout: { type: 'vbox', pack: 'center' } } ] }); You could even use an absolute layout to get perfect positioning.
type: AcceptedAnswer

http://stackoverflow.com/a/27587415
accepted answer of: http://stackoverflow.com/q/27587272
answers question: http://stackoverflow.com/q/27587272
has body: Create an action which will accept parameter and return your partial view. On your client-side place a div for second table and register click handlers: Load table with id = 1 TABLE 2 Jquery $.load function performs http request, receives html of your partial view and places it into
type: AcceptedAnswer
score: 0
type: Answer

http://stackoverflow.com/q/27579455
tagged with: mongodb
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27580180
answer count: 3
possible better answer: http://stackoverflow.com/a/62308739
has answer: http://stackoverflow.com/a/62308739
has body: I'm trying to delete a subdocument in mongoDb but can't succeed in it. I've tried with $update,$push and $pull but I'm not successful. I have the following document: db.users.findOne({"_id": ObjectId("545677a9e4b0e0ef9379993c")}) { "_class" : "com.xxx.xxx.server.da.User", "_id" : ObjectId("545677a9e4b0e0ef9379993c"), "bookSummaries" : [ { "_id" : ObjectId("545677e7e4b0e0ef9379993d"), "isbn" : "2746969644" "title": "test title" }, { "_id" : ObjectId("546a522a44ae4f5e652fdca7"), "loanSummaries" : [ { "loanStatus" : "REQUESTED", "loanId" : "5473992044aec466a619290c" }, { "loanStatus" : "REQUESTED", "loanId" : "5473997d44aec466a619290d" }, { "loanStatus" : "REQUESTED", "loanId" : "547605a744ae0f0d558ae757" } ], "testArray" : [ { "title" : "Back to the future", "id" : "test" }, { "title" : "Back to the future", "id" : "test2" }, { "title" : "Back to the future", "id" : "test3" }, "test ", "test ", "test 2", "test 2", { "loanStatus" : "REQUESTED" } ], "title" : "Back to the future" } ] } and I'm trying to create the queries to: delete the whole "testArray" subdocument for only this specific subdocument delete a specific loanSummaries give its loanId for this specific subdocument Can you help me creating those queries? I've seen several post like this one, but it is not the same problem. Thanks a lot
favorite count: 0
has answer: http://stackoverflow.com/a/27580165
tagged with: spring-data-mongodb
type: AnsweredQuestion
score: 3
has title: Mongodb delete subdocument
upvote count: 3
has answer: http://stackoverflow.com/a/27580180
type: Question

http://stackoverflow.com/comment/43396656
has text: You can change the `style` like this: `style: 'font-weight:bold;fill:#F00;'`. The `fill` element is the one you want to change: http://jsfiddle.net/Yrygy/272/
type: AnswerComment
score: 2
type: Comment
comment on: http://stackoverflow.com/a/27480005

http://stackoverflow.com/comment/43677527
type: AnswerComment
score: 0
has text: If I set this... onSubmit="return false" I can't use <asp:Button ID="btnRemove" runat="server" Text="Remove Track" OnClick="btnRemove_Click" /> <asp:Button ID="btnEmpty" runat="server" Text="Empty Cart" OnClick="btnEmpty_Click" />
type: Comment
comment on: http://stackoverflow.com/a/27611633

http://stackoverflow.com/comment/43484645
type: AnswerComment
has text: @Mathletics Gulp does both sync and async. There is no concept here of the "right way" or the "wrong way". In my use case I'm using it as a design-time client-side build tool only, and as such I truly don't care about speed. I do care about the validity of results, and to get the results I need, I must do sync operations.
type: Comment
comment on: http://stackoverflow.com/a/27512436
score: 0

http://stackoverflow.com/a/27575212
answers question: http://stackoverflow.com/q/27574691
score: 0
has body: For the last part (OP12561): [^_]+$ or "a nonempty string as long as possible, immediately preceding the end, that does not contain the character _" For the second-to-last part (PQRSTUV): (?&lt;=_)[^_]+(?=_[^_]+$) "the longest possible nonempty string that: does not contain the character _ is immediately preceded by _ is immediately followed by _, then a nonempty string not containing _, then end of string. "
type: Answer

http://stackoverflow.com/comment/43574283
comment on: http://stackoverflow.com/q/27574242
has text: How do you debug it? Is error fired? Looks like the contentype doesn't match data passed to server
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27607293
has body: I have a Google +1 button on my site that requires the following script: &lt;script src="https://apis.google.com/js/platform.js" async defer&gt;&lt;/script&gt; The problem is as of today, apis.google.com can't be pinged from everywhere (servers are down) and some of my users don't see a button. I don't always want to use my own copy of the script because I can see that breaking the +1 functionality at some point. I'd like to use something like the solution from this question: my server's fallback copy should be fetched only when the CDN fails. What's a good way to do that for this script? Is there a generic way to do this for any remote script using jQuery or plain js? Thanks in advance. EDIT: I tried jQuery getScript() and wrapped it in a function like this: function fetch_script(script,fallback) { $.getScript( script ) .fail(function() { $.getScript( fallback ); }); }; This does not always work and is not reliable. Two problems I found: 500 errors trigger the fail method, but 404 errors do not and the fallback script is not loaded in these cases. Not sure what happens if the server is just down. Some scripts are fetched (I see this in the console) but are somehow not executed (or they fail silently). Here's a script that doesn't work.
upvote count: 1
has comment: http://stackoverflow.com/comment/43637192
type: Question
linked to: http://stackoverflow.com/q/1014203
tagged with: google-plus-one
tagged with: javascript
has title: fetch a fallback copy of a remote script when its CDN fails
tagged with: cdn
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
tagged with: google-api
type: UnansweredQuestion
answer count: 0
has comment: http://stackoverflow.com/comment/43691134

http://stackoverflow.com/comment/43413624
comment on: http://stackoverflow.com/q/27490369
type: QuestionComment
score: 0
has text: I just need to do a bit of guess work to place them now. Thanks guys!
type: Comment

http://stackoverflow.com/a/27609108
answers question: http://stackoverflow.com/q/27608932
type: AcceptedAnswer
downvote count: 0
score: 18
type: Answer
has comment: http://stackoverflow.com/comment/43671448
accepted answer of: http://stackoverflow.com/q/27608932
has comment: http://stackoverflow.com/comment/43671480
upvote count: 18
has body: I believe ng-style will not work when the object expression's key value contains interpolation and when they are bound asynchronously. Instead you may have to bind the style object itself. Example:- $scope.data.style = {'background-image' : 'url(/path/to/image)'} and Interestingly the following works too: This could be because ngstyle directive sets watch/watchcollection on the attribute. This is causing the issue when the value of the bound ng-style object's key/value has interpolation and that value is bound dynamically, because ngstyle directive will have set the watch on attr.ngStyle which is {'background-image' : 'url()'} because of the interpolation having kicked in prior to ngstyle directive. Hence the watch will not execute for the second time to set the style (even though ng-style directive's value will show the interpolation properly on the view), and the initially set style of element.css({'background-image' : 'url()'}) will render the style with the url as that of the current domain (Which browser does). angular.module('app', []).controller('ctrl', function($scope, $timeout) { $scope.data = {}; $timeout(function() { $scope.data.image = 'http://placehold.it/50x50'; $scope.data.style = { 'background-image': 'url(http://placehold.it/50x50)' } }, 1000) }); .cover-image { height: 100px; width: 100%; display: block; } Will not display Will display with Object binding Will display with string concat

http://stackoverflow.com/comment/43633026
comment on: http://stackoverflow.com/a/27556070
has text: That would be the css Class that has attributes to make the textbox to make the height bigger.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/27623998
tagged with: angularjs
has answer: http://stackoverflow.com/a/27632233
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43672238
has comment: http://stackoverflow.com/comment/43672345
type: Question
has body: Hi I've just came across this tutorial. It's this particular app is what I'm looking for. http://scotch.io/tutorials/angularjs-multi-step-form-using-ui-router However I want this particular view to be in the middle of my already existing app. Is this is known as nested views? However when I tried to implement this app into my website...the page wouldn't load. I think this is due to the routing at script.js? Is it possible to use both $routeProvider and $Stateprovider? //create our angular app and inject ngroute,nganimate and uirouter var financeApp = angular.module('financeApp', ['ngRoute','ngAnimate','ui.router']); // configure our routes financeApp.config(function($routeProvider, $urlRouterProvider, $stateProvider) { $routeProvider // route for the home page .when('/', { templateUrl : 'partials/main.html', controller : 'mainController' }) // route for the about page .when('/about', { templateUrl : 'partials/about.html', }) // route for the contact page .when('/contact', { templateUrl : 'partials/contact.html', }) .otherwise({ redirectTo: '/' }) }); $stateProvider // route to show our basic form (/form) .state('form', { url: '/form', templateUrl: 'form.html', controller: 'formController' }) // nested states // each of these sections will have their own view // url will be nested (/form/profile) .state('form.profile', { url: '/profile', templateUrl: 'partials/form-profile.html' // url will be /form/interests .state('form.interests', { url: '/interests', templateUrl: 'form-interests.html' }) // url will be /form/payment .state('form.payment', { url: '/payment', templateUrl: 'form-payment.html' }); // catch all route // send users to the form page $urlRouterProvider.otherwise('/form/profile'); }) Basically I want a changeable view in the middle of one static page. I'm not quite sure how to go about it. Click on a button in the middle, takes you to another view in the middle, click on a button, takes you to another view in the middle. etc This is my angularjs website W…
tagged with: javascript
has title: Confused with nested views angularJs
has answer: http://stackoverflow.com/a/27624370
score: 0
answer count: 2
linked to: http://stackoverflow.com/q/19888519
has comment: http://stackoverflow.com/comment/43669790
has comment: http://stackoverflow.com/comment/43669544

http://stackoverflow.com/q/27634398
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/27634490
tagged with: javascript
score: 1
tagged with: jquery
favorite count: 0
has title: How to call some value in input element in table by using Class selector and jquery library?
type: Question
possible better answer: http://stackoverflow.com/a/27634492
has answer: http://stackoverflow.com/a/27634492
has body: I can't call value from input in table HTML tag by using siblings() and Jquery for calculate and send result to result selector. This cause might from Siblings() method but I don't know which one of method should be used to select value from table by using Class selector. Here is HTML tag No DESCRIPTION Type QUANTITY UNIT PRICE AMOUNT (USD) <?php echo form_input('vat',set_value('',''), 'class="qty"')?> <?php echo form_input('vat',set_value('',''), 'class="unit"')?> <?php echo form_input('vat',set_value('',''), 'class="amount" readonly')?> <?php echo form_input('vat',set_value('',''), 'class="qty"')?> <?php echo form_input('vat',set_value('',''), 'class="unit"')?> <?php echo form_input('vat',set_value('',''), 'class="amount" readonly')?> Total <?php echo form_input('total',set_value('total',''),'class="result" readonly ')?>$ Here is Javascript using Jquery library and I have try to select some value from input in table element by using Class selector and I will work as well for me if I don't used table. $(function () { $('.unit,.qty').on('change', function () { var unit = $(this).hasClass('unit') ? $(this).val() : $(this).siblings('.unit').val(); var qty = $(this).hasClass('qty') ? $(this).val() : $(this).siblings('.qty').val(); unit = unit || 0; qty = qty || 0; var val = unit >= 1 && qty >= 1 ? parseFloat(unit * qty) : 0; $(this).siblings('.amount').val(val);//parent() var total = 0; var update = false; $('.amount').each(function () { val = parseFloat($(this).val()) | 0; total = val ? (parseFloat(total + val)) : total; }); $('.result').val(total); }); }); How can I do Please help>
accepted answer: http://stackoverflow.com/a/27634490
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/43688372

http://stackoverflow.com/a/27599064
score: 1
has body: The MutationObserver constructor is what you want. Bind it to the parent element or document and filter your mutations from there. // select the target node var target = document.querySelector('#some-id'); // create an observer instance var observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { console.log(mutation.addedNodes); }); }); // configuration of the observer: var config = { attributes: true, childList: true, characterData: true }; // pass in the target node, as well as the observer options observer.observe(target, config); setTimeout(function() { target.appendChild(document.createTextNode('There!')); // later, you can stop observing // observer.disconnect(); }, 1000); Wait for it... Side note: You can use .on() on the document and use a selector to filter the targets similar to .delegate(): $(parentSelectors).on(types, childSelectors, function).
has comment: http://stackoverflow.com/comment/43647033
answers question: http://stackoverflow.com/q/27598865
downvote count: 0
has comment: http://stackoverflow.com/comment/43647308
type: Answer
has comment: http://stackoverflow.com/comment/43646143
upvote count: 1
has comment: http://stackoverflow.com/comment/43647128

http://stackoverflow.com/q/27627053
has comment: http://stackoverflow.com/comment/43801754
tagged with: text
linked to: http://stackoverflow.com/q/18434903
tagged with: select
has title: Javascript/JQuery to sort select element and account for label attribute in options
has answer: http://stackoverflow.com/a/27825781
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43675103
tagged with: label
has comment: http://stackoverflow.com/comment/44056988
has comment: http://stackoverflow.com/comment/44056993
score: 0
has comment: http://stackoverflow.com/comment/44056699
answer count: 1
has body: I noticed the jquery options and examples only accounted for the text and value attributes and when I tried to simply add the label attribute I got errors. I would like the sort to also include the label attribute where the select box does not have a specific id but a unique name (autogenerated). An example with Javascript or Jquery would be fine for this (using the list below) dave matthews john adams justin timbers adam lion june berstein jQuery(document).ready(function(){ // get the selected object by the beginning part of the name var $sls = $('select[name^=staff_user_id_name]'); if ($sls.length > 0) { var selectedVal = $sls.val(); var $options = $('option', $sls); var arrVals = []; $options.each(function () { // push each option value and text into the array arrVals.push({ val: $(this).val(), text: $(this).text(), }); }); arrVals.sort(function (a, b) { if (a.text.toLowerCase() > b.text.toLowerCase()) { { return 1; } else if (a.text == b.text) { return 0; } else { return - 1; } }); // loop through the sorted array and set the text/values to the options for (var i = 0, l = arrVals.length; i < l; i++) { $($options[i]).val(arrVals[i].val).text(arrVals[i].text); } // set the selected value back $sls.val(selectedVal); } } ); // end jQuery
has comment: http://stackoverflow.com/comment/43799804
type: UnansweredQuestion

http://stackoverflow.com/a/27565227
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27564912
has comment: http://stackoverflow.com/comment/43559095
answers question: http://stackoverflow.com/q/27564912
has body: You can do: &lt;ProfileBox editMode={this.state.editingWhatever} onModeChange={this.updateEditingWhatever} editView={ &lt;EditMode&gt;...&lt;/EditMode&gt; } viewView={ &lt;div&gt;&lt;ViewMode&gt;...&lt;/ViewMode&gt;&lt;/div&gt; } /&gt; Or you can conditionally render the EditMode/ViewMode in this code. To make it less ugly, a well designed mixin would do wonders. It's hard to tell what the exact requirements are from your question, but take a look at what all of your &lt;ProfileBox/&gt; uses have in common, and where they differ. In the simpler case shown above, you probably just want to dynamically create the onModeChange handler, and the onChange handler for any inputs children in edit mode.
score: 2
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43577064
type: Answer

http://stackoverflow.com/comment/43594983
has text: I think You need to do it after the user is created. I wonder if this will work: var newUser = Accounts.onCreateUser(function(options, user){ return user; }); var role = ['unselected']; Roles.addUsersToRoles(newUser, role);
comment on: http://stackoverflow.com/a/27585144
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27515552
answers question: http://stackoverflow.com/q/27515226
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43486076
accepted answer of: http://stackoverflow.com/q/27515226
has comment: http://stackoverflow.com/comment/44551392
has body: Let's abstract out the function to break the array into tuples function chunkBy(array, n) { var chunks = []; for (var i=0; i&lt;array.length; i+=n) chunks.push(array.slice(i, n)); return chunks; } and the function that does the work for each item: function tryToLoad(url) { return WinJS.Utilities.Scheduler.schedulePromiseBelowNormal() // not sure .then(function() { return preloadOneAsync(url); }) .then(null, function(error) { if (error.name !== "Canceled") { logger.error("Could not create preloaded " + url, error); } }); } A function that does the work for multiple items in parallel would be just function loadAll(urls) { return WinJS.Promise.join(urls.map(tryToLoad)); } so we can now use this in the generation of the sequence: preloadPromise = chunkBy(urls, 2).reduce(function(p, urls) { return p.then(function(prevResults) { return loadAll(urls).then(function(results) { return prevResults.concat(results); }); }); }, WinJS.Promise.as([])); The array of results is passed through the p chain, always growing after each step.
has comment: http://stackoverflow.com/comment/43494829
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/44559066
score: 2
has comment: http://stackoverflow.com/comment/43494113
has comment: http://stackoverflow.com/comment/43472673

http://stackoverflow.com/q/27585831
has comment: http://stackoverflow.com/comment/44138115
has body: In the process of making a html versions of an app, and one part is a table which can end up having many many cells. Around: 150 columns, with easily up to 10,000 rows. Question is performance, and what would be decent why to be able to style each cell based on content? So in each cell is a number, and the background color filled in based on the percentage that number fits in. For example: have banding 77-100 = red 33 - 77 = blue 0 < 33 = green 0 = black What I have tried on a small table is giving the class to each that I would want to color it. (colors being user changeable, so setting a class, should be able to change class definition) So get something like this: 87.5% 75.0% 0.0% and in CSS, set style for classes. Only 4 styles needed. Now with (150 * 10,000 = ) 1,500,000 cells to be styled, I'm thinking what impact might be like. Table being generated from JavaScript with data. But yeah data in the MB area. Table then rendered client side. So as rendering, decides what class value to set. What other possible ways to style each cell based on content?
tagged with: javascript
tagged with: html-table
has comment: http://stackoverflow.com/comment/43596399
answer count: 1
has title: HTML Table - styling individual many thousands of cells
linked to: http://stackoverflow.com/q/6284408
favorite count: 0
type: UnansweredQuestion
score: 6
tagged with: css
has comment: http://stackoverflow.com/comment/43596106
has comment: http://stackoverflow.com/comment/44995975
has comment: http://stackoverflow.com/comment/43596544
has comment: http://stackoverflow.com/comment/44138391
has comment: http://stackoverflow.com/comment/45060993
upvote count: 7
has comment: http://stackoverflow.com/comment/43596241
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/28359027
has comment: http://stackoverflow.com/comment/43596140
has comment: http://stackoverflow.com/comment/44339263

http://stackoverflow.com/comment/43618976
type: QuestionComment
has text: What have you tried so far? If you want to include the file you can write: `include "../student/index.php";`
comment on: http://stackoverflow.com/q/27597687
score: 0
type: Comment

http://stackoverflow.com/q/27633569
has body: I have the following code in a Backbone View javascript file: var addPlayerView = Backbone.View.extend({ tagName: "div", model: Player, id: 'addPlayerDiv', initialize: function() { console.log('addPlayerView has been created'); //this.listenTo(this.model, "change", this.render); }, render: function (){ this.$el.html(' Add New Player to Roster for Team X ' +' ' +' ' +' ' +' ' +' ' +' ' +' <FORM> ' +' '); return this; } }); Two questions. (1) Is there a better way than just dumping all the html code inside the this.$el.html function? That's really ugly. (2) How do I attach functions to the HTML code inside the this.$el.html function? Is it just hardcoded in there? How do I pass the "addThePlayer(event)" function my player data? This is crazy. I am groping around in the dark.
has title: Backbone - connecting $el.html to a javascript function
has comment: http://stackoverflow.com/comment/43686871
type: Question
has comment: http://stackoverflow.com/comment/43689626
answer count: 2
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27635286
score: 0
has answer: http://stackoverflow.com/a/27635286
tagged with: backbone.js
has answer: http://stackoverflow.com/a/27635622
has comment: http://stackoverflow.com/comment/43686813
accepted answer: http://stackoverflow.com/a/27635622
type: AnsweredQuestion

http://stackoverflow.com/comment/43517764
score: 0
type: Comment
has text: You are trying to do a one pager right? one page with 200images displaying as you scroll down?
type: AnswerComment
comment on: http://stackoverflow.com/a/27531751

http://stackoverflow.com/q/27550973
has comment: http://stackoverflow.com/comment/43529240
has body: Here is my string var str = 'varying Changing or xyz '; And I want to extract "varying" and "Changing or xyz" word from sentence using regular expression in javascript. I want output like this str1 = "varying"; str2 = "Changing or xyz"; Js Fiddle Link
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
score: 1
accepted answer: http://stackoverflow.com/a/27551034
favorite count: 0
has title: extract word using regular expression in javascript
type: Question
has comment: http://stackoverflow.com/comment/43529007
tagged with: regex
has comment: http://stackoverflow.com/comment/43528473
has comment: http://stackoverflow.com/comment/43528434
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/27551034

http://stackoverflow.com/q/27562875
has answer: http://stackoverflow.com/a/27565409
type: Question
has body: I implement socket.io 1.2.1 server script on a Centos server, and open a client window on mozilla firefox (v34.0.5). I see many logs in my firebug console. please see https://dl.dropboxusercontent.com/u/58691844/firebug%20logs.PNG when I copy the socket.io server script to my localhost and run it, and open a client window, I dont see any logs in my firebug.
upvote count: 1
tagged with: firefox
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: node.js
accepted answer: http://stackoverflow.com/a/27565409
tagged with: socket.io-1.0
tagged with: socket.io
has title: Why mozilla firefox log many messages from socket.io 1.2.1
type: AnsweredQuestion
score: 1

http://stackoverflow.com/comment/43615464
type: AnswerComment
has text: I mean like if you are in mypage.com/about/me/family/index.html will /images/background.png get you to mypage.com/images/background.png or to mypage.com/about/me/family/images/background.png ??
type: Comment
comment on: http://stackoverflow.com/a/27595609
score: 0

http://stackoverflow.com/q/27621155
favorite count: 0
has answer: http://stackoverflow.com/a/27621313
has title: Get total addind one checkbox
score: -1
type: UnansweredQuestion
has body: im calculating the total price based in twoo selection boxes, but now i need to add a optional checkbox. When a user check the box it adds a extra 45 €. But i have no idea how can i make the checkbox add inside a different event. To better explain above i leave example of my code. $("#typeRoom").change(function(){ if($(this).val() == "Single room" &amp;&amp; $("#hotel option:selected").val() == "Hotel A") { $('#bookprice').html(67).append("€").append(" (Breakfast included)"); if($("#dinner").is(':checked')){ var din = 45; }else{var din = 0;} var totalPrice = 67 + 195 + din; $('#total').html(totalPrice).append("€"); } I have to have a way in insert above the "if(..#dinner".." dinner code the "$("#typeRoom").change(function(){" to autoupdate the total price, but it doesnt work. Can someone tell me is there a way.
has comment: http://stackoverflow.com/comment/43663202
downvote count: 1
type: Question
tagged with: javascript
upvote count: 0
answer count: 1
tagged with: jquery

http://stackoverflow.com/comment/43488018
type: QuestionComment
has text: Assuming the class is applied at 08:30, does it need to be removed at 08:45? (assuming the user stays on the page for that long)
comment on: http://stackoverflow.com/q/27529554
score: 0
type: Comment

http://stackoverflow.com/comment/43525795
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27533682
has text: @FlavienVolken I made a small edit. This data is returned from the client database; I did not want to operate this data, specially in Javascript. If I have to do so, I wanted to do it in C#. To avoid that, that was why I was looking for the simpler solution possible.

http://stackoverflow.com/comment/43677310
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27627971
type: AnswerComment
has text: I think we are mixing two different questions I submitted today, which are not exactly asking the same thing. In this case what I did not know that 1.) attributes are carried over and 2.) I missed that <some-widget class="orange red"> is invalid HTML and hence the class attribute is ignored, as I understand from PSL's answer in the comments. But your code explains 1.) so I accepted it. Thanks much appreciated.

http://stackoverflow.com/a/27590008
type: Answer
has comment: http://stackoverflow.com/comment/43604432
upvote count: 1
has comment: http://stackoverflow.com/comment/43604368
score: 1
has body: That's because you are creating a jQuery object from a string but you don't store/use the created elements. $(dom) // parse the string and create a jQuery object .find('a') // find the `a` descendants .text('new row') // update their textContent .end() // get the previous jQuery collection .insertAfter('#pivot'); // insert the collection after `#pivot` element
has comment: http://stackoverflow.com/comment/43604495
answers question: http://stackoverflow.com/q/27589965
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27589965

http://stackoverflow.com/comment/43514741
has text: yes, you have to execute the code above after you appended the list items. Otherwise it will not work. I will extend my answer.
type: Comment
comment on: http://stackoverflow.com/a/27543805
type: AnswerComment
score: 0

http://stackoverflow.com/comment/43574513
comment on: http://stackoverflow.com/a/27573786
score: 0
type: AnswerComment
has text: I guess my question is - what is the trigger to re-enable the button.
type: Comment

http://stackoverflow.com/comment/43646143
has text: This method seems promising, but is perhaps incomplete. The `addedNodes` member only contains nodes added as children of the target, so I wrote a flattening function to get all of the descendants of the addedNodes. But when I test this (I'm testing this on Facebook, using `var target = document.querySelector('body');`) I don't see all of the text nodes being added as I scroll down and more content is loaded. Is there possibly some other mechanism for adding to the DOM that `MutationOberver` would not be able to detect?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27599064

http://stackoverflow.com/a/27838697
downvote count: 0
has comment: http://stackoverflow.com/comment/44110439
has comment: http://stackoverflow.com/comment/44109737
has comment: http://stackoverflow.com/comment/44084198
type: Answer
answers question: http://stackoverflow.com/q/27529518
upvote count: 7
score: 7
has comment: http://stackoverflow.com/comment/44110580
has comment: http://stackoverflow.com/comment/44083391
has comment: http://stackoverflow.com/comment/44084706
has comment: http://stackoverflow.com/comment/44153286
has comment: http://stackoverflow.com/comment/44110676
has body: Legacy support script I've extended Function prototype to give access to parameter auto-adoption to all constructors. I know we should be avoiding adding functionality to global objects but if you know what you're doing it can be ok. So here's the adoptArguments function: var comments = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/g; var parser = /^function[^\(]*\(([^)]*)\)/i; var splitter = /\s*,\s*/i; Function.prototype.adoptArguments = function(context, values) { /// Injects calling constructor function parameters as constructed object instance members with the same name. /// The context object (this) in which the the calling function is running. /// Argument values that will be assigned to injected members (usually just provide "arguments" array like object). "use strict"; // only execute this function if caller is used as a constructor if (!(context instanceof this)) { return; } var args; // parse parameters args = this.toString() .replace(comments, "") // remove comments .match(parser)[1].trim(); // get comma separated string // empty string => no arguments to inject if (!args) return; // get individual argument names args = args.split(splitter); // adopt prefixed ones as object instance members for(var i = 0, len = args.length; i < len; ++i) { context[args[i]] = values[i]; } }; The resulting call that adopts all constructor call arguments is now as follows: function Person(firstName, lastName, address) { // doesn't get simpler than this Person.adoptArguments(this, arguments); } var p1 = new Person("John", "Doe"); p1.firstName; // "John" p1.lastName; // "Doe" p1.address; // undefined var p2 = new Person("Jane", "Doe", "Nowhere"); p2.firstName; // "Jane" p2.lastName; // "Doe" p2.address; // "Nowhere" Adopting only specific arguments My upper solution adopts all function arguments as instantiated object members. But as you're referring to CoffeeScript you're trying to adopt just selected arguments and not all. In Javascript identifiers starting with @ are illegal by specific…
has comment: http://stackoverflow.com/comment/44083275
has comment: http://stackoverflow.com/comment/44094631

http://stackoverflow.com/q/27610991
type: Question
upvote count: 2
has answer: http://stackoverflow.com/a/27613534
answer count: 1
has comment: http://stackoverflow.com/comment/43644869
has comment: http://stackoverflow.com/comment/43644891
has body: I would like to use Angular with non-DOM view (using Pixi.js), so I need to instantiate controller manually (analogical to ng-controller attribute), I found something like: $controller('MyController', {$scope: $scope})); but it suppose I have already $scope created. Note: I know Angular is mainly aimed to use DOM element, but for Pixi, it could be a little bit similar, I would use $watch and $apply for attributes like x, y, alpha etc. Thanks.
tagged with: javascript
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/16587961
score: 2
downvote count: 0
favorite count: 0
has title: How to instantiate controller in Angular.js?
tagged with: angularjs

http://stackoverflow.com/q/27611257
has title: How to remove localstorage once per day?
has comment: http://stackoverflow.com/comment/43644911
answer count: 0
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/43644858
has body: I have the following code which caches in local storage a big set of terms from sharepoint. As the source data might change once or twice per day, I would like to include that if its a new day, then it should get fresh data. App is used by 400 people so caching improved it a lot, from 15 seconds load to less than 1 second, but I need to be sure at least once new data is loaded. Question is: How can I invalidate this key each day? function GetAllTermsRecursive(){ if(typeof(Storage) !== "undefined") { //Check if data has been cached. if(typeof(localStorage.Terms) !== "undefined") { var start = new Date().getTime(); var terms=localStorage.Terms; var end = new Date().getTime(); var time = end - start; alert('Execution time with cache: ' + time); } else { var start = new Date().getTime(); //Current Context var context = SP.ClientContext.get_current(); //Current Taxonomy Session var taxSession = SP.Taxonomy.TaxonomySession.getTaxonomySession(context); //Term Stores var termStores = taxSession.get_termStores(); //Name of the Term Store from which to get the Terms. var termStore = termStores.getByName("Taxonomy_kl5tZjInn7STsFTzIE7n3Q=="); //GUID of Term Set from which to get the Terms. var termSet = termStore.getTermSet("31da4bc1-6429-499a-9d5e-be5e18b13c87"); var terms = termSet.getAllTerms(); context.load(terms); context.executeQueryAsync(function(){ var termEnumerator = terms.getEnumerator(); var termList = "Terms: \n"; while(termEnumerator.moveNext()){ var currentTerm = termEnumerator.get_current(); var currentTermPath = currentTerm.get_pathOfTerm().split(';'); var children = tree.children; termList += currentTermPath.get_name(); termList += currentTerm.get_name() + "\n"; } localStorage.Terms = termList; var end = new Date().getTime(); var time = end - start; alert('Execution time: ' + time); },function(sender,args){ console.log(args.get_message()); }); } } else { alert("Cache not sopported in old browsers, please upgrade"); } }
score: 0
type: UnansweredQuestion

http://stackoverflow.com/a/43461163
score: 3
upvote count: 3
has body: Here is a more concise &amp; IMHO clean answer without any recursion. It's using ogen(~46 loc) to transform any generator into an observable. It has a custom built next function that will emit data anytime your function yield something. nb: The original article is worth reading function getPagedItems({offset=0, limit=4}) { paginatedQueryGenerator = function*(someParams offset, limit) { let hasMore = true while(hasMore) { const results = yield YOUR_PROMISE_BASED_REQUEST(someParams, limit, offset) hasMore = results &amp;&amp; results.nextpage !== null offset += limit } } return ogen(paginatedQueryGenerator)(someParams, offset, limit) }
answers question: http://stackoverflow.com/q/27514310
type: Answer
downvote count: 0

http://stackoverflow.com/comment/43562596
type: Comment
comment on: http://stackoverflow.com/a/27568336
score: 0
type: AnswerComment
has text: Great solution, although in my specific situation I don't think it will work. Possibly though, thanks for your time!

http://stackoverflow.com/q/27553125
has comment: http://stackoverflow.com/comment/43532545
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27553366
has title: jQuery script is only getting executed on 2nd event
has body: Code is below, I'm stuck to the reasoning behind this but the focus / blur events are only getting activated on the 2nd time the event happens. I'm not worried about anything else currently but the reasoning as to why this is only getting ran on anything after the first time. JS: var App = function () { this.page = window.location.pathname.split("/public/portal/")[1].split("/")[0]; } $.extend(App.prototype, { // This will set the variables in the box and display / hide setVariables: function (ele, vars) { this.variables = vars || variables; var list = $("#page_variables .text_variables"); // Create the variable box $('li', list).remove(); // first remove all variables currently in the box console.log(ele); ele.bind('focus', function () { list.fadeIn(); }) .bind('blur', function () { list.fadeOut(); }); } }); (function ($, undefined) { $(".tvar_text").focus(function () { port.setVariables($(this), null); }); })(jQuery); HTML: VARIABLES {provider} {date} {callerid} {time} {location} {recipient} {misc1} {misc2} {misc3} {misc4}
type: Question
has answer: http://stackoverflow.com/a/27553366
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/43532798
answer count: 1

http://stackoverflow.com/q/27563947
duplicate of: http://stackoverflow.com/q/5872815
downvote count: 2
upvote count: 1
linked to: http://stackoverflow.com/q/5872815
possible better answer: http://stackoverflow.com/a/27564055
has comment: http://stackoverflow.com/comment/43553388
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
score: -1
type: Question
has title: Load a JSON file from user input
answer count: 2
has answer: http://stackoverflow.com/a/27565017
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/27565017
has body: I want to get and read a JSON file that would be uploaded by the user. I created the html input file: Open a JSON file And now, I don't know how to load the data from the file. I only can get the filename. Here is what I wrote: $(document).ready(function(){ $("#input_open").change(onOpenChange); }) function onOpenChange(e) { var filname = $("#input_open").val(); var fileContent = ... ? var jsonData = JSON.parse(fileContent); } Anyone knows how to get the file content?
has answer: http://stackoverflow.com/a/27564055

http://stackoverflow.com/q/27609921
has title: obj-c method with multiple args in javascript
tagged with: ios
answer count: 1
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27610347
tagged with: xcode
type: UnansweredQuestion
has body: I am working on an appcelerator module in Xcode, written in obj-c. I have a method that takes multiple args, like the one below: -(void)useThis:(NSString*)this withThat:(NSString*)that{} In appcelerator, how would I call that method? What is the proper syntax? var foo = require("module"); foo.useThiswithThat("this","that"); doesnt seem to work.
type: Question

http://stackoverflow.com/comment/43656100
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27617427
score: 0
has text: Where is your `$_FILES["uploaded"]`? Isn't it `$_FILES["file1"]`? you are appending that. Also, you can `var_dump($_FILES)` in your php, to check, what values in it.

http://stackoverflow.com/q/27562417
tagged with: bounding-box
has answer: http://stackoverflow.com/a/35009919
type: Question
has body: My BoundingBox is like : https://i.sstatic.net/IGmxF.png and I don't want to show the triangles inside the box, how can I remove those lines? Thanks. var bbox = new THREE.BoundingBoxHelper(object3d, new THREE.Color(0xFF9900)); bbox.visible = false; bbox.name = "BBOX" bbox.update(); object3d.children[0] = bbox; scene.add(bbox);
tagged with: javascript
has answer: http://stackoverflow.com/a/27568776
score: 0
answer count: 3
has title: three.js BoundingBoxHelper without diagonals
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27568050
tagged with: three.js

http://stackoverflow.com/a/27600953
answers question: http://stackoverflow.com/q/27600871
has body: You could set a base tag in the head of your HTML document: &lt;base href="http://www.rooturl.com/"&gt; ..and then just make sure that all images are linked relative to this URL.
score: 0
type: Answer

http://stackoverflow.com/q/27634251
score: 0
has title: Javascript moment Is within a date range api
answer count: 1
has comment: http://stackoverflow.com/comment/43688318
tagged with: jquery
has answer: http://stackoverflow.com/a/27645296
accepted answer: http://stackoverflow.com/a/27645296
has comment: http://stackoverflow.com/comment/43688088
tagged with: momentjs
type: AnsweredQuestion
has body: Currently using http://momentjs.com/ Is there a function I can use as below to find out if array of dates fall within a single day? Example: Events0 - 21-12-2014 1130 Events1 - 24-12-2014 1030 Events2 - 24-12-2014 1130 Events3 - 24-12-2014 0800 until 26-12-2014 Events4 - 28-12-2014 I want momentjs to return me all events that is within 24-12-2014 So it should return Event1 Event2 Event3 I tried below but not working well var events = calendar.fullCalendar('clientEvents', function (event) { if (event.start.isSame($scope.selectedDate)) { return true; } else { return false; }; });
type: Question
has comment: http://stackoverflow.com/comment/43688594
has comment: http://stackoverflow.com/comment/43688149
tagged with: javascript
has comment: http://stackoverflow.com/comment/43688560

http://stackoverflow.com/a/64014954
upvote count: 1
answers question: http://stackoverflow.com/q/27476566
type: Answer
has comment: http://stackoverflow.com/comment/122781229
downvote count: 0
score: 1
has body: You can use contentEditable let list_1_e = document.getElementById('addNewContext'); list_1_e.contentEditable = true;

http://stackoverflow.com/q/27594668
downvote count: 0
answer count: 1
tagged with: javascript
has body: Im trying to npm install mongodb. It works and tells me that modules are installed, kerberos is in this list. But when im trying to run my app i keep getting this: Error: Cannot find module '../build/Release/kerberos' from '/Users/snorre edwin/Code/raspberry-node- server/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/lib' Error: Cannot find module '../../../build/Release/kerberos' from '/Users/snorre edwin/Code/raspberry-node-server/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/lib/win32/wrappers' Error: Cannot find module '../../../build/Release/kerberos' from '/Users/snorre edwin/Code/raspberry-node-server/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/lib/win32/wrappers' Error: Cannot find module '../../../build/Release/kerberos' from '/Users/snorre edwin/Code/raspberry-node-server/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/lib/win32/wrappers' Error: Cannot find module '../../../build/Release/kerberos' from '/Users/snorre edwin/Code/raspberry-node-server/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/lib/win32/wrappers' It doesnt make sense, since this is a module which comes with the mongodb package. Anyone else experienced this?
has title: Node.js Mongodb - Kerberos module not found
favorite count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: node.js
score: 2
has answer: http://stackoverflow.com/a/27595314
type: Question
tagged with: kerberos
tagged with: mongodb

http://stackoverflow.com/comment/43415425
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27491934
has text: @DanielA.White fwrite($fp, json_encode($jsontext)); in the php file
score: 0

2-way-object-databinding
tags question: http://stackoverflow.com/q/27555767
tag name: 2-way-object-databinding
type: Tag

http://stackoverflow.com/comment/43395125
comment on: http://stackoverflow.com/q/27479030
score: 0
type: Comment
type: QuestionComment
has text: @User2413 just keep your code simple, see my solution

http://stackoverflow.com/q/27529011
type: Question
tagged with: c#
score: 0
has body: I have a table which displays the column "air segments". The air segments come as a JSON array from the server(see picture), I need to display the contents of the air segments column one per line in a table cell. Right now its getting displayed as a complete string with a comma(See picture below). . So the HTML code is as follows: &lt;!-- ko foreach: $parents[0].outputsToDisplay($data) --&gt; &lt;td&gt; &lt;span data-bind="foreach: $data, visible: $parents[2].outputs()[$parent.index()].internalname ==='air_segments', text: splitAirSegments($data)"&gt;&lt;br&gt;&lt;/span&gt; &lt;/td&gt; &lt;!-- /ko --&gt; The outer 'for each' supplies the $data to the td, which are the results to be populated in the table. The visible binding property makes sure that only column air_segments gets populated. The outputs() is an observable array in the js file. I need to code a JS method "splitAirSegments" such that it returns the air segments one by one and with help of 'br' I break the line which would eventually make the air segments appear one per line in a single table cell. What I tried: self.splitAirSegments = function (arr) { return arr; } The way I understood it was, the 'for each' from the 'span' would send each of the air segment to this function and the HTML will display it with line breaks as soon as the function returns the value. What can be the correct approach? Are there any other ways to split the air segments(with delimiter as a comma) which is now displaying all the air segments together with a comma. Kindly help.
answer count: 1
tagged with: javascript
has title: Displaying JSON array results one per line in a table cell
has comment: http://stackoverflow.com/comment/43489872
has comment: http://stackoverflow.com/comment/43487072
has comment: http://stackoverflow.com/comment/43487667
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43492594
has answer: http://stackoverflow.com/a/27532944
has comment: http://stackoverflow.com/comment/43487509
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43489122
has comment: http://stackoverflow.com/comment/43494341
tagged with: knockout.js

flux
tag name: flux
tags question: http://stackoverflow.com/q/27611130
tags question: http://stackoverflow.com/q/27586370
type: Tag

http://stackoverflow.com/q/27517248
type: Question
tagged with: javascript
downvote count: 5
has answer: http://stackoverflow.com/a/27517341
answer count: 3
has answer: http://stackoverflow.com/a/27517339
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27517271
tagged with: http://stackoverflow.com/tag/html
score: -3
has title: href that only runs javascript
upvote count: 2
has body: I have an a tag inside of a form that is used to remove uploaded files. I don't want the a tag to take the user to another section of the page, or try to submit the form or anything like that, I only want it to run a javascript function. How can I accomplish this? I'm not sure what to put in the href?

http://stackoverflow.com/a/27559932
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27559051
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27559051
type: Answer
has body: Consider ... c = c.replace("],[", "]###["); result = c.split("###"); ... by using replace, we are changing the , between the ] [ to something unique that you can then split.
score: 1

http://stackoverflow.com/comment/43558501
score: 0
comment on: http://stackoverflow.com/q/27566770
type: Comment
type: QuestionComment
has text: See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill#Browser_compatibility

http://stackoverflow.com/comment/43652114
has text: good to see .. i need to install phonegap then i can run plugin..yeah?
comment on: http://stackoverflow.com/q/27615118
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27512201
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27512419
answer count: 3
has answer: http://stackoverflow.com/a/27512419
has comment: http://stackoverflow.com/comment/43454709
favorite count: 0
downvote count: 2
has body: I am struggling to get some JavaScript code together that would take in a value from a html input box and would return true if it contained both a letter (A-Z or a-z) and a digit (0-9) in any order. So A1, a1, 1a, 1A, aAaAaA1, 111111a etc would all return true. aa and 11 would return false because they only contain one group and not both. Can anyone suggest how I could make this happen in JavaScript? I'm just stuck at how JavaScript would evaluate the value... everything else is working. Thanks!
has comment: http://stackoverflow.com/comment/43454745
has comment: http://stackoverflow.com/comment/43454731
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27512258
has comment: http://stackoverflow.com/comment/43455242
has title: JavaScript to check if HTML input value contains letter and number
accepted answer: http://stackoverflow.com/a/27512258
type: Question
linked to: http://stackoverflow.com/q/388996
has comment: http://stackoverflow.com/comment/43454710
upvote count: 0
has answer: http://stackoverflow.com/a/27512321
score: -2
has comment: http://stackoverflow.com/comment/43454728

http://stackoverflow.com/q/27547439
has comment: http://stackoverflow.com/comment/43522698
has title: How to show alternative image if Iframe can't load the resource at src ? Using AngularJs?
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
has body: I am using iframe in one of my jsp page and I need to assign an external address as src of this iframe. It is working as expected. However sometimes when the external source is not available I want to show an static image. I have tried a number of ways but couldn't succeed. Than I tried using AngularJS (My latest crush) way to achieve this but looks like I am missing some thing. A piece from my file is attached below :- No such page JS file has myAppName.controller("myAppController", function ($scope, $sce) { $scope.iframesrcurl=$sce.trustAsResourceUrl('http://www.w3schools.com'); console.log('iframesrcurl is '+$scope.iframesrcurl); }); function load(e) { alert("Inside load function"); alert(e); } function loadingError() { alert('Inside error function'); } Problem is onload and onerror functions are never called. Please guide me for this. I am looking for pure html, javascript or Angular ways of doing this but jquery specific tricks too will be appreciated. EDIT This question is similar but it is using knockout.js which I am not allowed to use in my project. Please suggest Angular way of doing this.
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27549650
tagged with: iframe
type: Question
has comment: http://stackoverflow.com/comment/43522784
linked to: http://stackoverflow.com/q/15273042
has comment: http://stackoverflow.com/comment/43521272
tagged with: javascript
linked to: http://stackoverflow.com/q/3922989
score: 4
upvote count: 4
downvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/27549650
tagged with: jquery
has comment: http://stackoverflow.com/comment/43521726
favorite count: 0
linked to: http://stackoverflow.com/q/15882326

http://stackoverflow.com/comment/43425004
score: 0
type: Comment
has text: This might be better suited on Programmers.SE, but still a good question.
type: QuestionComment
comment on: http://stackoverflow.com/q/27496419

http://stackoverflow.com/a/27587939
has body: Assuming about your kitchen layout and wall &lt;body&gt; &lt;div class="kitchen"&gt; &lt;div class="wall"&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; The above should be a prototype of your html Now use: var wallHeight = $('.wall').height(); // Gives wall's height var wallWidth = $('.wall').width(); // Gives wall's width var kitchenHeight = $('.kitchen').height(); // Gives kitchen height var kitchenWidth = $('.kitchen').width(); // Gives kitchen width var leftHeight = kitchenHeight - wallHeight, leftWidth = kitchenWidth - wallWidth; // Gives remaining width and height
upvote count: 2
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/27587844
score: 2
answers question: http://stackoverflow.com/q/27587844

http://stackoverflow.com/comment/43428709
comment on: http://stackoverflow.com/q/27498885
score: 0
has text: your second part of the condition will always be satisfied.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27588934
answers question: http://stackoverflow.com/q/27588861
score: 0
type: AcceptedAnswer
has body: FIRST OPTION: Since the developer is appending the code ... $('#content') .append(' ') ... could't you simply add something like ... $('#content') .append(' ') ... the pbd-break class and this to the CSS code. .pd-break { border-bottom: 1px solid black; } SECOND OPTION: Or, you could simply change the same first line like this ... $('#content') .append(' ') .append(" ") ... you could effectively put whatever HTML you wanted where the is ...
accepted answer of: http://stackoverflow.com/q/27588861
type: Answer

http://stackoverflow.com/comment/43517882
type: Comment
comment on: http://stackoverflow.com/a/27545501
type: AnswerComment
has text: Hi Thanx for your help. But there is one more problem now.The progress bar is not working.
score: 0

http://stackoverflow.com/comment/46248825
score: 1
comment on: http://stackoverflow.com/a/27613830
has text: Here is another example. Edit the tick's line in css -- .tick line{ opacity: 0; }
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/43469422
comment on: http://stackoverflow.com/a/27519003
score: 1
has text: Didn't seem to work. May be I am not doing it correct. Anyway, got a solution and posted it as an answer
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/43555176
has text: Ok DONE, i wrote in a bad way the link xd. Anyway, it worked, it was the server. Thanks too much dudes!
type: QuestionComment
comment on: http://stackoverflow.com/q/27555647
score: 0
type: Comment

http://stackoverflow.com/comment/43660341
comment on: http://stackoverflow.com/q/27611447
score: 0
type: Comment
type: QuestionComment
has text: templates are pure HTML @DaveWalker . Do I need to modify HomeControlers.js ? I leave it blank...

http://stackoverflow.com/q/27512704
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43455864
tagged with: ionic-framework
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/43455778
has answer: http://stackoverflow.com/a/27513149
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/27533579
has body: I'm writing a HTML web app using Ionic. While trying to bind an input element to a $scope var, I'm getting undefined. SignupCtrl.js: angular.module('SUSU.controllers', []) .controller('SignupCtrl', function ($scope) { /* Form entries */ $scope.signupForm = { email: "", emailConfirm: "" }; }); signup.html: &lt;label class="item item-input"&gt; &lt;input type="email" placeholder="Email" ng-model="signupForm.email"&gt; &lt;/label&gt; app.js: angular.module('SUSU', ['ionic','SUSU.controllers']) .config(function ($stateProvider, $urlRouterProvider) { // Set and define states $stateProvider .... .state('tabs.signup', { url: '/signup', views: { 'login-tab': { templateUrl: 'templates/signup.html', controller: 'SignupCtrl' } } }); While debugging I have noticed that the value of signupForm.email is undefined after inserting text to the email input. How can I bind those two and what am I doing wrong?
has comment: http://stackoverflow.com/comment/43455935
has title: Getting undefined ngModel in Ionic AngularJS
tagged with: angularjs

http://stackoverflow.com/a/47785054
has body: when('/catalog/:book', { templateUrl: 'cataloglist.htm', controller: 'catCtrl' }) if your routeparameter book is encrypted it may contain '/' (backslash character), inorder to convert it proper executable in browser you must use encodeURIComponent which converts '/' to '%2F'. $window.location = '/catalog/'+encodeURIComponent(Solution/The%20Beginning);
upvote count: 1
downvote count: 1
score: 0
answers question: http://stackoverflow.com/q/27633195
type: Answer

http://stackoverflow.com/q/27488197
has answer: http://stackoverflow.com/a/27488215
has comment: http://stackoverflow.com/comment/43408510
accepted answer: http://stackoverflow.com/a/27488215
linked to: http://stackoverflow.com/q/24087222
has comment: http://stackoverflow.com/comment/43407990
has comment: http://stackoverflow.com/comment/43408645
tagged with: javascript
has answer: http://stackoverflow.com/a/27488255
possible better answer: http://stackoverflow.com/a/27488250
has answer: http://stackoverflow.com/a/27488250
has comment: http://stackoverflow.com/comment/43408063
has comment: http://stackoverflow.com/comment/43408312
type: AnsweredQuestion
upvote count: 0
tagged with: arrays
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/43407957
score: -2
has comment: http://stackoverflow.com/comment/43407955
tagged with: php
has title: How to create this type of array in PHP?
has body: We can create this type of array in javascript - var locations = [ ['Bondi Beach', -33.890542, 151.274856, 4], ['Coogee Beach', -33.923036, 151.259052, 5], ['Cronulla Beach', -34.028249, 151.157507, 3], ['Manly Beach', -33.80010128657071, 151.28747820854187, 2], ['Maroubra Beach', -33.950198, 151.259302, 1] ]; But, how can we create this type of array in PHP ? And what is this type of array known as ? Thanks,
downvote count: 2
answer count: 3

http://stackoverflow.com/q/27601568
type: UnansweredQuestion
has title: Javascript postMessage between cross domain tabs
upvote count: 1
has body: I am trying to implement PostMessage across popup and window. postMessage works if the popup code is in iframe but not when the same page is opened in popup. The parent code: The Popup code: What am I doing wrong? If this wont work, is there any work around for this across browsers?
score: 1
type: Question
has comment: http://stackoverflow.com/comment/43649447
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43626428
answer count: 0

http://stackoverflow.com/comment/43549325
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27561809
has text: whats in `valuestop`?

http://stackoverflow.com/a/27530676
has comment: http://stackoverflow.com/comment/43501570
has comment: http://stackoverflow.com/comment/43501632
has comment: http://stackoverflow.com/comment/43489961
type: Answer
downvote count: 0
score: 1
has body: concerning click troubles in transparent window default behaviour: the window manager lets clicks through transparent parts => bad for us! :D so we have to cheat him into seeing non-transparent stuff: 1 step modify the contentView to have a CALayer (Do this in InterfaceBuilder) 2 step don't set mainView as your content view but make main view a subview of the content view [[window contentView] addSubview:mainView];//was setContentView call 3 step since the mainView is no longer the windows contentView, the access to the view in AppWindow.m fails. to fix id mainView = [[self.contentView subviews] lastObject]; NoClickWebView *aWebView = [[mainView subviews] lastObject];//used contentView subviews concerning the bad zooming. The Problem that bites us here is that javascript has no typing: the call zoom += percent is treated as a concatenation of string resulting in ~30.1 or 3-0.1 :P to fix it, force JS to treat it as float all the way:
has comment: http://stackoverflow.com/comment/43501555
has comment: http://stackoverflow.com/comment/43501098
has comment: http://stackoverflow.com/comment/43490038
accepted answer of: http://stackoverflow.com/q/27488077
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27488077

http://stackoverflow.com/comment/43698496
score: 0
type: Comment
has text: If you toggle the class on the `body` - then you can get a lot out of it as well, over the page as a whole. : )
comment on: http://stackoverflow.com/a/27639866
type: AnswerComment

http://stackoverflow.com/comment/43520553
comment on: http://stackoverflow.com/q/27546919
has text: "*I know this solustion please do not answer this...*" - *why*? Where does it fail for you, how does it not work? Why is your requirement so unique that it requires a different solution? Why should I, or we re-open your question that *appears to be* a duplicate of many, *many* others?
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/27639241
has body: I'm trying to run this piece of code $('.post').not('.compose').append(''); But the $(this).attr("id"); is returning undefined. I can't quite figure this out. Could anyone help?
type: Question
has comment: http://stackoverflow.com/comment/43697305
tagged with: javascript
score: 0
answer count: 2
tagged with: this
tagged with: jquery
has title: $(this) not working within .append()
has answer: http://stackoverflow.com/a/27639264
has comment: http://stackoverflow.com/comment/43697328
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43697355
has answer: http://stackoverflow.com/a/27639393
tagged with: append
has comment: http://stackoverflow.com/comment/43697302
has comment: http://stackoverflow.com/comment/43697373
has comment: http://stackoverflow.com/comment/43697298

http://stackoverflow.com/q/27546709
type: UnansweredQuestion
tagged with: php
answer count: 0
has body: I'm having a web store, custom built and I'm using PHP SESSIONs to store customer's selected products, quantities and other options. Selected products and options are sent to back-end through jQuery AJAX where PHP takes over, does it's checks (if product is available, does even exists and is there enough quantity left) and then it stores or updates data stored inside SESSION. When customer tries to do a purchase, in some cases the SESSION is lost and I don't know why. I did search for answer/solution for quite some time and I have also tried a few solutions, none of them worked 100%, sessions are still being lost. I found out where exactly and can't solve it. Some code: Redirection happens inside jQuery's $.ajax() call with window.location.href='/url/' (URL is valid, exists and it's on same domain as is the calling page) This is my jQuery code: $('body').on('submit','#some-form-name',function(e){ e.preventDefault(); var el=$(this); $.ajax({ type:'post', dataType:'json', url:'/include/process-sl.php', data:el.serialize()+'&amp;q=updateBasket', beforeSend:function(){ ... some checks to verify if form should be submitted or an friendly error returned }, success:function(json){ if(json.success==true){ ... show friendly success message before redirecting setTimeout(function(){ if(json.payment!=undefined){ if(json.payment=="paypal"){ window.location.href='https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&amp;token='+json.token }else{ window.location.href='/nakup-opravljen/' } } },1000); }else{ ... shows friendly error message } }, error:function(){ ... ajax call failed, show error message } }) }); This is how main PHP files start (index.php, process-sl.php): session_set_cookie_params(172800); session_start(); session_save_path('/home/cheapand/tmp/sessions/'); ini_set("log_errors" , "1"); ini_set("error_log" , "logs/index.php.log"); ini_set("display_errors" , "0"); PHP code which processes the data is a bit long (but will paste it, if asked for), basically it jus…
type: Question
tagged with: session
tagged with: javascript
score: 0
tagged with: jquery
has title: PHP SESSION lost after JavaScript redirect
linked to: http://stackoverflow.com/q/17242346
has comment: http://stackoverflow.com/comment/43520353
tagged with: ajax
has comment: http://stackoverflow.com/comment/43520051

http://stackoverflow.com/a/27641387
type: Answer
has body: First of all, you can only have one ID on an element per page. So, iterating over these and giving them the same ID of "ahhu" is pointless. Select them by class. You can use the Javascript "this" keyword with JQuery and it will maintain the scope in which it is called. For example, &lt;% @posts.each do |post| %&gt; &lt;td class="ahhu"&gt; &lt;%= button_to 'Renew', [:renew, post], method: :post, class: 'my-target' %&gt; &lt;/td&gt; Then, in the JS, you can select the specific post like this: $('.ahhu').click(function() { $(this). // whatever you want to do here. } Try doing "console.log($(this)) and view it in your browser's console. You'll notice that the scope will change and it will only target the specific post you click on. You can do the same on "my-target" or just traverse down the DOM structure until you get the child "my-target." This is a much more dynamic way to handle specific events in javascript than adding ID's that increment in number as it iterates through.
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/27640015
downvote count: 0
has comment: http://stackoverflow.com/comment/43704799

http://stackoverflow.com/comment/43671619
type: Comment
type: QuestionComment
has text: IDs must be unique on document context, use class instead and any transversal method to target the specific one
comment on: http://stackoverflow.com/q/27625552
score: 0

http://stackoverflow.com/q/27495188
has comment: http://stackoverflow.com/comment/43422186
has comment: http://stackoverflow.com/comment/43422045
has comment: http://stackoverflow.com/comment/43422154
has answer: http://stackoverflow.com/a/29185162
has comment: http://stackoverflow.com/comment/43422230
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29185162
has comment: http://stackoverflow.com/comment/43422219
type: Question
has comment: http://stackoverflow.com/comment/43422275
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: ajax
has title: Google ads are not refreshing
has comment: http://stackoverflow.com/comment/43422147
score: 0
has body: So I am using the default system that google provides for refreshing your ads every 30 seconds on my ajax themed website. The ads go through when I am using adblock I can see the ad count updating on the page so it's refreshing them but they don't display at all on the page for some reason. &lt;script&gt; // Load GPT asynchronously var googletag = googletag || {}; googletag.cmd = googletag.cmd || []; (function() { var gads = document.createElement("script"); gads.async = true; gads.type = "text/javascript"; var useSSL = "https:" == document.location.protocol; gads.src = (useSSL ? "https:" : "http:") + "//www.googletagservices.com/tag/js/gpt.js"; var node = document.getElementsByTagName("script")[0]; node.parentNode.insertBefore(gads, node); })(); &lt;/script&gt; &lt;script&gt; googletag.cmd.push(function() { // Define the ad slot var slot1 = googletag.defineSlot("/6931143405/Sound", [728, 90], "leaderboard"). setTargeting("Sound", "refresh"). addService(googletag.pubads()); // Start ad fetching googletag.enableServices(); googletag.display("leaderboard"); // Set timer to refresh slot every 10 seconds setInterval(function(){googletag.pubads().refresh([slot1]);}, 10000); }); &lt;/script&gt; With the javascript above I am almost certain that with the div below it should refresh the ad or at least display the ad in the div. &lt;center&gt;&lt;div id="leaderboard" style="width:728px; height:90px;"&gt;&lt;/div&gt;&lt;/center&gt; Where it says defineSlot("/XXXX/sound" the XXXX should be changed to data-ad-slot="XXXX" This line in google adsenses default code correct?

http://stackoverflow.com/comment/43522516
score: 0
type: AnswerComment
type: Comment
has text: Also note: He wants slow motion, so instead of `slideDown('slow')` he can use `slideDOwn(2000);`
comment on: http://stackoverflow.com/a/27548189

http://stackoverflow.com/a/27505074
has comment: http://stackoverflow.com/comment/43440147
score: -1
has body: Based on your original code. This should work. $pre_schedules =" ";
downvote count: 1
answers question: http://stackoverflow.com/q/27504855
type: Answer
upvote count: 0

http://stackoverflow.com/comment/43654799
type: Comment
has text: Thanks, I was looking for a library (lazy). But I can extend this to my cause.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27614207

http://stackoverflow.com/comment/43577962
comment on: http://stackoverflow.com/q/27575881
score: 0
type: Comment
type: QuestionComment
has text: @epascarello oh. I thought there was. Why am I trying to do this? I'm using the history api to manipulate the URL to pages that don't exist. So on reload, I want it to go to the initial page that does exist.

http://stackoverflow.com/q/27558627
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43543436
accepted answer: http://stackoverflow.com/a/27558673
has comment: http://stackoverflow.com/comment/43543448
upvote count: 1
downvote count: 1
type: Question
has body: Hi I found this code and I'm wondering how to make it stop blinking after 3 seconds function flashit() { var myborder = document.getElementById('my'); if (myborder.style.borderColor=="green") myborder.style.borderColor="red" ; else myborder.style.borderColor="green" ; } setInterval('flashit()', 400) ;
has comment: http://stackoverflow.com/comment/43543441
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/27558673
tagged with: javascript
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/27558684
has title: How to make this change border color animation stop
has answer: http://stackoverflow.com/a/27558684

http://stackoverflow.com/comment/43466494
has text: I get `application/json` in FF34
type: QuestionComment
comment on: http://stackoverflow.com/q/27518238
type: Comment
score: 1

http://stackoverflow.com/comment/43548913
type: Comment
type: QuestionComment
has text: Perhaps making the title shorter would be good idea?
score: 1
comment on: http://stackoverflow.com/q/27561572

http://stackoverflow.com/a/27610183
has comment: http://stackoverflow.com/comment/43642784
has comment: http://stackoverflow.com/comment/43642757
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43642810
downvote count: 0
has comment: http://stackoverflow.com/comment/43642959
type: Answer
score: 9
has body: The idiomatic way to write a loop that iterates over Array elements is forEach. As comments have noted, for... in is for Object keys, not Array elements. fizzPlayers.forEach(function(player) { var val = parseInt(player.value); if (val != 0) { active.push(player); actfact.push(parseInt(player.value)); actname.push(capitaliseFirstLetter(player.id)); } }); You can Array.prototype.forEach in all modern browsers (IE9 +). MDN docs
accepted answer of: http://stackoverflow.com/q/27610117
upvote count: 9
answers question: http://stackoverflow.com/q/27610117

http://stackoverflow.com/comment/43408996
has text: Flame chart is nice. But it lacks a bit of filtering (on method names, js file names, etc) and I don't find its "tree" very clean and powerful. But it remains an interesting solution, thank you.
comment on: http://stackoverflow.com/a/27488561
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43426278
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27494663
has text: HMR, thanks for the link. Its a good one.
score: 0

http://stackoverflow.com/q/27638555
upvote count: 2
answer count: 2
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/43696205
has comment: http://stackoverflow.com/comment/43696151
tagged with: php
score: 2
has body: I am getting no response from ajax request . i am posting a ajax call to processor.php file and the processor.php file is processing the file and sending the processed file back to javascript i am gerring my result in my console log but it is not showing in the html. My javascript code is : function add_to_cart(item_name,item_price){ $('.user-info').slideUp('1200'); $('.cart-status').slideDown('1200'); var dataString = "item_name=" + item_name + "&item_price=" + item_price + "&page=add_to_cart"; $.ajax({ type: "POST", url: "php/processor/processor.php", data:dataString, beforeSend:function(){ $(".cart-show-product").html(' Your Cart Status Please Wait... '); }, success: function(response){ console.log(response); $(".cart-show-products").html(response); } }); } and my php is : if(isset($_POST['item_name']) && !empty($_POST['item_name']) && isset($_POST['item_price']) && !empty($_POST['item_price'])) { $sql = mysqli_query($conn, 'SELECT * FROM products_added where username = "'.mysqli_real_escape_string($conn, $_SERVER['REMOTE_ADDR']).'" and item_added="'.mysqli_real_escape_string($conn, $_POST['item_name']).'"' ); if(mysqli_num_rows($sql) < 1) { mysqli_query($conn, "INSERT INTO products_added values( '', '".mysqli_real_escape_string($conn, $_SERVER['REMOTE_ADDR'])."', '".mysqli_real_escape_string($conn, $_POST['item_name'])."', '".mysqli_real_escape_string($conn, $_POST['item_price'])."', '".mysqli_real_escape_string($conn, '1')."', '".mysqli_real_escape_string($conn, $_POST['item_price'])."' '".mysqli_real_escape_string($conn, date("d-m-Y"))."')" ); ?> Sl.No Item Qty Price Action <?php $sl_no = 1; $sql = mysqli_query( $conn, 'SELECT sum(amount) as grandtotal FROM products_added WHERE username = "'.mysqli_real_escape_string($conn, $_SERVER['REMOTE_ADDR']).'" ORDER BY id' ); $row = mysqli_fetch_array($sql); $grandtotal = strip_tags($row['grandtotal']); $sql = mysqli_query( $conn, 'SELECT id, item_added, price, quantity FROM products_added WHERE username = "'.mysqli_re…
downvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43696545
has title: I am not getting response from ajax request
has comment: http://stackoverflow.com/comment/43696199
type: Question
has comment: http://stackoverflow.com/comment/43696085
has answer: http://stackoverflow.com/a/27638818
has answer: http://stackoverflow.com/a/27638786
has comment: http://stackoverflow.com/comment/43696125

http://stackoverflow.com/comment/43512400
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27540257
has text: I got error in http://code.jquery.com/ui/1.10.3/jquery-ui.js at 455 line

http://stackoverflow.com/a/27557611
has comment: http://stackoverflow.com/comment/43542187
has comment: http://stackoverflow.com/comment/43542313
score: 1
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43567455
has body: On #1, the Angular-UI design is a very "Angular" way to implement it - I don't see any issue with it. The directive takes a list and returns the selected list item. This is how the controller sees it. Put it in other words, another directive, say a typical &lt;select&gt; or a custom infinite scroll or a yelp-style map, would provide a different View behavior, but would be functionally equivalent from the controller's point of view - which keeps the separation of concerns intact, and thus very MVVM-y. I also think that you have some confusion about ng-model. ng-model should be used with input controls (not only &lt;input&gt;) with which the user interacts with directly. In this case, the only input is a typeahead directive. On #2, it depends whether the the "other pertinent details" are natural part of the service API or if they need to be fetched after selection. Assuming the former, the correct place is, in theory, in a service. The controller should only marshal data from Services to the ViewModel and back. For your specific example with the country code, the API returns multiple components in address_components property. The extraction of the country code - as well as checking if it exists or not and other business logic - is best to handle in a service, probably with another service API after selection, or when the original list of addresses is obtained - whatever makes sense for your case. For a simple case in a simple app, like in the example, you could just modify the $scope.getLocation() function to return a list of actual objects that your controller (or rather your ViewModel) actually needs, and then have the View return the selected object (as per #1).
type: Answer
accepted answer of: http://stackoverflow.com/q/27553353
has comment: http://stackoverflow.com/comment/43543694
has comment: http://stackoverflow.com/comment/43543823
answers question: http://stackoverflow.com/q/27553353
upvote count: 1

http://stackoverflow.com/comment/43567208
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27557973
has text: I'm still not sure why you couldn't just do a URL Fetch to do the "import financial statements from 4 URLs" part of what you just described. If you fetch then write in the same script which does the processing you pasted above, you get a guarantee that the data is there when script runs, and you do not have to change anything.
score: 0

http://stackoverflow.com/comment/45954462
type: Comment
comment on: http://stackoverflow.com/a/27596640
type: AnswerComment
score: 2
has text: Tnx, Works perfectly :)

http://stackoverflow.com/a/27541081
has comment: http://stackoverflow.com/comment/43509567
has body: There's no reason why javascript defined through razor should not work on a browser. The only reason is syntax errors which exactly your case... First, You've got a low unclosed parenthesis and curly brackets Then, You've got undefined tokens here... else { $$.removeClass('imageChecked'); $('#1').prop('checked', false); }); $$ is not defined in the else block...it is rather defined in the if block and it goes out of scope as soon as it hits the else block Solution To fix the sytanx errors you have introduced, close the parenthesis and curly brackets and make the $$ variable accessible to the else block... @{ var jqCounter = 1; } @foreach (var img in Model.Render.Images) { var imgName = img.Name.Replace(" ", string.Empty); @:$('#@imgName').on('click', function () { @:var $$ = $(this); @:if (!$$.is('.imageChecked')) { @:$$.addClass('imageChecked'); @:$('#@jqCounter').prop('checked', true); @:} else { @:$$.removeClass('imageChecked'); @:$('#@jqCounter').prop('checked', false); @:}}); jqCounter++; } Update Actually, I think I got a bit dizzy reading the code, the $$ variable is perfectly in scope....just close the else block
upvote count: 1
has comment: http://stackoverflow.com/comment/43509955
score: 1
has comment: http://stackoverflow.com/comment/43509884
has comment: http://stackoverflow.com/comment/43509628
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27540941
downvote count: 0
answers question: http://stackoverflow.com/q/27540941
has comment: http://stackoverflow.com/comment/43509741
type: Answer

http://stackoverflow.com/q/27601793
has comment: http://stackoverflow.com/comment/43626312
has comment: http://stackoverflow.com/comment/43626574
has body: I have been struggling for a some days now and it seems I can't figure out how to make such hover animations. Perhaps I dig in the wrong place and the animations are done with css3. Anyway, that site particularly has the animations I am looking for but when I go through it's code I can't find the answer. Brushed The image hover effects do look like a normal css3 hover animation, but what really intrigued me was the mobile-version of the navigation button, animating from an align-justify icon to a cross icon. Anything would be helpful even just a hint in which direction should I keep on looking. Thank you very much!
type: Question
downvote count: 4
upvote count: 0
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27601930
answer count: 1
has title: jQuery/JS/CSS3 animations and hover effects
favorite count: 0
score: -4
tagged with: animation
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43626454
has answer: http://stackoverflow.com/a/27601930

http://stackoverflow.com/a/27490619
upvote count: 1
has comment: http://stackoverflow.com/comment/43449629
has comment: http://stackoverflow.com/comment/43421568
has body: Try changing the escaped quotes in buf.push(" Login Create an Account "); to buf.push(" Login Create an Account "); because the string is probably passing through two different parsers - the first one interprets \" as ", and the second one gets confused.
has comment: http://stackoverflow.com/comment/43420153
downvote count: 0
answers question: http://stackoverflow.com/q/27485750
has comment: http://stackoverflow.com/comment/43436664
type: Answer
score: 1

http://stackoverflow.com/a/27486619
has comment: http://stackoverflow.com/comment/43406407
score: 1
has comment: http://stackoverflow.com/comment/43405064
answers question: http://stackoverflow.com/q/27486548
has comment: http://stackoverflow.com/comment/43405748
upvote count: 1
type: AcceptedAnswer
has body: The allow-origin will allow server request known as CORS, not inter-frame connections. Try communicating with window messagging, which is designed for that purpose. Example: Parent: myFrame.contentWindow .postMessage("STRING", myFrame.src); myFrame: window.addEventListener("message", function (event) { // Security: Validate message origin if (event.origin !== myVerifiedOrigin) { return; } console.log(event.data); });
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27486548

http://stackoverflow.com/comment/43425710
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27497130
has text: *addEventListener*, *e.target* and *textContent* all fail in IE 8. :-(
score: 0

http://stackoverflow.com/comment/43654008
has text: try{ this is line 83
type: Comment
comment on: http://stackoverflow.com/q/27615657
score: 0
type: QuestionComment

http://stackoverflow.com/a/27517062
answers question: http://stackoverflow.com/q/27516990
type: Answer
upvote count: 1
has body: $(document).ready(function() { //check it! var $rows = $('#table tr'); $('#search').keyup(function() { var val = '^(?=.*\\b' + $.trim($(this).val()).split(/\s+/).join('\\b)(?=.*\\b') + ').*$', reg = RegExp(val, 'i'), text; $rows.show().filter(function() { text = $(this).text().replace(/\s+/g, ' '); return !reg.test(text); }).hide(); }); }); Apple Green Grapes Green Orange Orange
downvote count: 0
score: 1

http://stackoverflow.com/comment/43690834
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27635784
score: 1
has text: @JJRoman It can't be a function, because it comes from `serializeArray()` which is a key = element name, value = element value, which is always a string.

http://stackoverflow.com/comment/43855881
comment on: http://stackoverflow.com/a/27721319
type: AnswerComment
score: 0
type: Comment
has text: So how can I use that approach to escalate permissions as required?

http://stackoverflow.com/q/27492343
tagged with: requirejs
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43416312
has comment: http://stackoverflow.com/comment/43416267
has body: I need to use this library banking.js which uses modules. I have downloaded RequireJS and I have been reading for hours, but I can't seem to find any tutorial that uses simply require('Module') like how it is suggested on the github page, they all use different kind of methods that pass anonymous functions (they didn't work for me either). I constantly get the following error: Uncaught Error: Module name "banking" has not been loaded yet for context: _. Use require([]) I followed the documentation but nothing is working.
score: -1
has comment: http://stackoverflow.com/comment/43416402
type: Question
downvote count: 2
has title: Javascript require(), how to include a simple require('something')
answer count: 1
tagged with: javascript
tagged with: ofx
has comment: http://stackoverflow.com/comment/43416625
upvote count: 1
has comment: http://stackoverflow.com/comment/43416342
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has answer: http://stackoverflow.com/a/27493485
accepted answer: http://stackoverflow.com/a/27493485

http://stackoverflow.com/q/27532937
accepted answer: http://stackoverflow.com/a/27550758
has body: I have a form that I am posting to a mysql database. I wish to override the alert function triggered by the Malsup jQuery Form Plugin with the alert created by Bootbox plugin. Both the bootbox script and the jquery form work just fine but I don't know how to use them together as my knowledge of javascript and jquery is really limited. Many thanks, Julian The Jquery form script. &lt;script&gt; // wait for the DOM to be loaded $(document).ready(function() { // bind 'myForm' and provide a simple callback function $('#myForm').ajaxForm(function() { alert("Your profile has been updated!"); }); }); &lt;/script&gt; The Bootbox script. bootbox.alert("Hello world!", function() { Example.show("Hello world callback"); });
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43500270
tagged with: alert
has comment: http://stackoverflow.com/comment/43527563
has comment: http://stackoverflow.com/comment/43499606
has answer: http://stackoverflow.com/a/27550758
type: Question
tagged with: bootbox
tagged with: javascript
tagged with: jquery
score: 0
has title: How to override alert with Bootbox
answer count: 1

http://stackoverflow.com/comment/43659487
comment on: http://stackoverflow.com/a/27619305
has text: The question is about `I try to find all elements with a particular attribute.`.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/43628354
score: 0
type: AnswerComment
has text: Thanks for your answer.I am talking about ajax.I am adding cities in the pop up box..and on close of that pop up box,i want to populate drop down of cities using ajax? i dont want to refresh my page.Like i just add city in pop up and on closing pop up,i want recently added city in drop down of cities? you get that?
type: Comment
comment on: http://stackoverflow.com/a/27603011

http://stackoverflow.com/comment/43422676
has text: did `console.log('worker ' + worker.process.pid + ' died');` get logged?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27495392

http://stackoverflow.com/q/27584042
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27584165
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/27584165
has comment: http://stackoverflow.com/comment/43599734
accepted answer: http://stackoverflow.com/a/27584056
tagged with: jquery
favorite count: 0
has title: Getting text within a div of a div that is the button
upvote count: 2
downvote count: 2
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has body: Basically, I have some buttons HD5sjW yqWH3X KWZy5V and I wanted to use JavaScript to link to another page and I couldn't find an explanation so this is what I came up with and obviously doesn't work at all - how am I meant to do this? $('.button').click(function () { confirm("http://domain.com/thing?id=" + $(this + " .id").text()); }); The confirm is just for a blatant output As another thing, how should I structure my questions better and type of title?
has answer: http://stackoverflow.com/a/27584056

http://stackoverflow.com/comment/43607256
type: Comment
comment on: http://stackoverflow.com/a/27591523
score: 0
type: AnswerComment
has text: @AmitJoki - what do you mean by checking `.length`?

http://stackoverflow.com/q/27547156
has comment: http://stackoverflow.com/comment/43523141
tagged with: polymer
has answer: http://stackoverflow.com/a/27549041
downvote count: 0
tagged with: javascript
answer count: 2
tagged with: dom-events
favorite count: 0
accepted answer: http://stackoverflow.com/a/27549041
has body: I have an custom event core-transitionend (actually fired by Polymer), and I can set an event handler using document.addEventListener(). But what's the best practice to do it in AngularJS? Or, I can explicitly set a handler in DOM, i.e. &lt;paper-ripple on-core-transitionend="enter()"&gt;&lt;/paper-ripple&gt;, but how to define this function in AngularJS?
tagged with: angularjs
score: 6
upvote count: 6
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27553447
has title: How to bind custom events in AngularJS?
has comment: http://stackoverflow.com/comment/43523905
has answer: http://stackoverflow.com/a/27553447
type: Question

http://stackoverflow.com/q/27592104
has comment: http://stackoverflow.com/comment/43608327
has comment: http://stackoverflow.com/comment/43608198
has body: I have an existing website, which is built on top of HTML/CSS/JS. It has extensive theming, and over 10,000 lines of combined CSS (fancy animations and such). I would like to move it over into my RoR app, however I cannot just drop it in a view because every import statement will break (that I know). How can I move a site with many JS and CSS imports over to a RoR application? If I could drop it somewhere and let it just be as a static site that would be best. It just doesn't work because RoR won't accept the paths for my imports. All help appreciated! Thanks
tagged with: javascript
downvote count: 0
favorite count: 0
tagged with: ruby
has comment: http://stackoverflow.com/comment/43607974
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
score: 2
has comment: http://stackoverflow.com/comment/61365994
answer count: 0
upvote count: 2
has title: Migrating a Static HTML/CSS Site to RoR
tagged with: ruby-on-rails
type: Question

http://stackoverflow.com/q/27497810
has title: Passing a javascript variable to another page through html value field of input tag
downvote count: 5
has body: Below is my code to get row id: &lt;script&gt; function myFunction(x){ alert("row idex="+x.rowIndex); var rowID=x.rowIndex; } &lt;/script&gt; Now I want to pass this row id to another page through input tag of HTML &lt;input type="hidden" name="rowid" value="here i need to pass the javascript variable that contain row id vale" &gt; I'm a beginner here so detailed explanation would be appreciated.
has answer: http://stackoverflow.com/a/27498024
upvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/27497979
answer count: 3
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has answer: http://stackoverflow.com/a/27497992
type: Question
score: -5

http://stackoverflow.com/a/27526165
has comment: http://stackoverflow.com/comment/43491034
has comment: http://stackoverflow.com/comment/43488558
score: 0
answers question: http://stackoverflow.com/q/27525051
has comment: http://stackoverflow.com/comment/43507212
has body: The problem is the name of the controls. Having a control named submit in your form is overriding form.submit(); The error in the browser console is that .submit() is not a function. So please, just change the name of the submit button with something else and it is working good. Remember me Forgot your password? <?php if(isset($_GET['loginFailed']) && !empty($_GET['loginFailed'])) { $msg=$_GET['loginFailed']; echo $msg; } ?> Back Register
type: Answer
has comment: http://stackoverflow.com/comment/43491130
has comment: http://stackoverflow.com/comment/43510907

http://stackoverflow.com/comment/43669710
has text: yep, but questions that have the code pasted directly into the question tend to get a more positive response. In my case, I'm behind a proxy and couldn't view that URL if I tried.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27624285
score: 1

concurrency
tag name: concurrency
tags question: http://stackoverflow.com/q/27584564
type: Tag

http://stackoverflow.com/q/27489224
type: AnsweredQuestion
downvote count: 2
upvote count: 1
type: Question
tagged with: javascript
score: -1
possible better answer: http://stackoverflow.com/a/27489385
has answer: http://stackoverflow.com/a/27489385
answer count: 2
has answer: http://stackoverflow.com/a/27489303
tagged with: jquery
has body: If I had a textarea and a user pasted a paragraph into the textarea, can statistics be run on the input using JavaScript on the client side? I was thinking of using an associative array or hash map so array[word] -> # of occurrences, and iterate through word by word but I'm not sure how to do this using client side JavaScript. I tried searching JavaScript word count but I only get results on counting the total number of words, which is not what I'm looking for. What I am looking for is more keeping a count of each specific word. Can this be done in Javascript or Jquery? If so, how should I go about doing this?
favorite count: 0
accepted answer: http://stackoverflow.com/a/27489303
has title: How can you count the number of occurrences of all of the words in a text area using Javascript?

http://stackoverflow.com/q/27516904
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27518421
upvote count: 2
has body: I have found that when reaching the bottom of the page and then scrolling back up slightly.. the affix'd sidebar will jump back to the top and become static again. Please check demo at jsFiddle. HTML: Header Header Header Header Header Header Header sub menu will go here sub menu will go here sub menu will go here sub menu will go here sub menu will go here sub menu will go here sub menu will go here sub menu will go here sub menu will go here sub menu will go here sub menu will go here sub menu will go here sub menu will go here sub menu will go here sub menu will go here sub menu will go here sub menu will go here sub menu will go here sub menu will go here sub menu will go here sub menu will go here Footer CSS: body { padding-top: 200px; } .test-div { min-height: 400px; border: 1px solid #D1D1D1; margin-bottom: 10px; } .footer { border: 1px solid red; height: 500px; }
has answer: http://stackoverflow.com/a/27518421
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
has title: Why is boostrap affix jumping to the top
tagged with: css
favorite count: 0
score: 2
downvote count: 0
type: Question

http://stackoverflow.com/a/27484594
has comment: http://stackoverflow.com/comment/43423203
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/43519518
has comment: http://stackoverflow.com/comment/43519784
has comment: http://stackoverflow.com/comment/43420679
answers question: http://stackoverflow.com/q/27484016
has comment: http://stackoverflow.com/comment/43521715
has body: New Idea // client side collection, not synchronized with server side... DataListWithAds= new Mongo.Collection(null); Template.DataList.destroyed= function(){ this.observer.stop(); } Template.DataList.created= function(){ // DataList is collection anywhere // get handler of observer to remove it later... this.observer = DataList.find().observe({ // observe if any new document is added // READ : http://docs.meteor.com/#/full/observe addedAt:function(document, atIndex, before){ console.log(atIndex, document, self); // immediately insert original document to DataListWithAds collection DataListWithAds.insert(document); // if some condition is true, then add ad. if(atIndex % 5 == 1){ DataListWithAds.insert({ name:"AD", score:document.score, isAd:true }); } } }) } // use local collection to display items together with ads Template.dataList.helpers({ dataList : function() { return DataListWithAds.find(); }); }) Also template should be tweaked a little bit: &lt;template name="dataList"&gt; {{#each dataList}} {{#if isAd}} ADVERTISEMENT {{else}} &lt;div class="col-xs-3"&gt; {{name}} (and other data) &lt;/div&gt; {{/if}} {{/each}} &lt;/template&gt; Proof of concept can be found here: http://meteorpad.com/pad/SoJe9dgp644HKQ7TE/Leaderboard I think there are still things to resolve, like: - How to make this working together with sorting ? Old Idea Below is an idea how you can achieve result you want. The approach is that client side waits until your list is rendered (happens only once) and then injects an ad at position of your choice. Assumptions: your ad is defined in template adsTemplate items are in div : #listContainer Code: Template.dataList.rendered = function(){ // position after which ads should be added // you can generate random number var adsPosition = 10; // inject HTML from template **Template.adsTemplate** // with data **adsData** // to HTML element #listContainer // after HTML element at position adsPosition Blaze.renderWithData( Template.adsTemplate, adsData, thi…

http://stackoverflow.com/comment/43544067
has text: write code, and post here
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27557888

http://stackoverflow.com/a/27553323
answers question: http://stackoverflow.com/q/27552806
type: AcceptedAnswer
upvote count: 3
has body: Your undefined detection works fine. The "problem" is, that if nothing is selected, option:selected returns the first option, hence typeof .attr('id') is never "undefined". var user_role = $('#user_role option:selected').attr('id'); document.body.innerHTML += user_role; Opt1 Opt3 Opt3 (If you omitted all the options or ids of options, you could enter the if.)
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/43538758
score: 3
accepted answer of: http://stackoverflow.com/q/27552806

http://stackoverflow.com/comment/43400300
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27483820
has text: Then you write `window.location.hash = "id=2";`. If you only want to set the id, you could also omit the id= part and just store the id, this would probably be easier, but will result in a URL like `yoursite.html#2` instead of `yoursite.html#id=2`. You can also read the hash property, and you can set an event listener listening to hashchange so you get notified when the hash changes.
score: 0

http://stackoverflow.com/a/27553371
downvote count: 0
answers question: http://stackoverflow.com/q/27553286
score: 3
has body: Use Array.isArray to check if an object is a multidimensional array instead: if (Array.isArray(ary) &amp;&amp; Array.isArray(ary[0])) { ... } Note that Array.isArray is an ES5 addition, but if you need to support older browsers, jQuery has $.isArray and lodash/underscore.js has _.isArray. If you're not using either of those, MDN has the following polyfill: if (!Array.isArray) { Array.isArray = function(arg) { return Object.prototype.toString.call(arg) === '[object Array]'; }; }
upvote count: 3
type: Answer

http://stackoverflow.com/comment/43499702
comment on: http://stackoverflow.com/q/27535584
type: Comment
type: QuestionComment
score: 0
has text: If you can provide the corresponding HTML, that will help. (p.s., when using id's, you don't need the tag name. So "img#photo1" can just be "#photo1".)

http://stackoverflow.com/comment/43729862
comment on: http://stackoverflow.com/q/27577505
type: QuestionComment
type: Comment
has text: No,My safari isn't in private mode, and cookie policy is "always allow"
score: 2

http://stackoverflow.com/comment/43694859
type: Comment
type: QuestionComment
score: 0
has text: for opening chrome console press F12 while chrome is open and then press console in option
comment on: http://stackoverflow.com/q/27638002

http://stackoverflow.com/q/27558342
type: Question
has comment: http://stackoverflow.com/comment/43543426
tagged with: javascript
has body: I am using the AudioContext() object to create a slight soundtrack for a canvas game I am making. In order to do this, however, I need to play certain events at a certain point in time. I currently have: function playRingTone(){ var osc = ctx.createOscillator(); osc.connect(ctx.destination); osc.start(0); osc.frequency.value = 200; setTimeout(function(o){ console.log(true); o.frequency.value = 300; setTimeout(function(o){ console.log(true); o.frequency.value = 350; setTimeout(function(o){ console.log(true); o.frequency.value = 375; setTimeout(function(o){ console.log(true); o.frequency.value = 400; setTimeout(function(o){ console.log(true); o.frequency.value = 380; setTimeout(function(o){ console.log(true); o.frequency.value = 360; setTimeout(function(o){ console.log(true); o.frequency.value = 375; },600,o); },200,o); },200,o); },200,o); },200,o); },1500,o); },1000,osc); } This, however, is highly cumbersome, and is hard to edit and create. Is there a better way to do it? I am willing to use libraries, but a pure JS way is preferred. Thanks!
score: 0
has comment: http://stackoverflow.com/comment/43543475
has title: Easy way to construct a timeline in JavaScript?
type: UnansweredQuestion
tagged with: audio
has comment: http://stackoverflow.com/comment/43543496
answer count: 0

http://stackoverflow.com/a/27578419
score: 1
answers question: http://stackoverflow.com/q/27578397
downvote count: 0
has body: Please check the following code: $(".read").click(function(e){ //e.preventDefault(); $(this).next('.expand').toggle(); return false; }); .expand{display:none;background:#000;color:white;} Lorem Ipsum Text Read More Lorem Ipsum text again ! Lorem Ipsum Text Read More Lorem Ipsum text again ! Lorem Ipsum Text Read More Lorem Ipsum text again !
type: Answer
upvote count: 1

http://stackoverflow.com/a/27595450
upvote count: 2
type: AcceptedAnswer
type: Answer
score: 2
downvote count: 0
has body: Your problem is you are using text() method which will treat any html entities as text also. Use html() instead since you are including html tags textbox.change(function() { code.html(format(textbox.val())) })
accepted answer of: http://stackoverflow.com/q/27595426
answers question: http://stackoverflow.com/q/27595426

http://stackoverflow.com/q/27498084
possible better answer: http://stackoverflow.com/a/27498144
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/27498144
has answer: http://stackoverflow.com/a/27498118
accepted answer: http://stackoverflow.com/a/27498118
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/43427377
answer count: 2
upvote count: 1
tagged with: jquery
favorite count: 0
tagged with: ajax
has title: Check if Passwords Match
tagged with: php
has body: How do I make sure that password fields match before letting user proceed?
type: AnsweredQuestion

http://stackoverflow.com/comment/43555126
type: QuestionComment
type: Comment
has text: I want to do this by geting the textbox id
comment on: http://stackoverflow.com/q/27564700
score: 0

http://stackoverflow.com/q/27534703
has answer: http://stackoverflow.com/a/27534775
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27534777
accepted answer: http://stackoverflow.com/a/27534835
type: Question
has answer: http://stackoverflow.com/a/27535663
tagged with: javascript
tagged with: jquery
score: 0
has title: Change background color with checkbox, limited number of checkboxes selectable
has answer: http://stackoverflow.com/a/27534835
has answer: http://stackoverflow.com/a/27534865
answer count: 5
has answer: http://stackoverflow.com/a/27534777
tagged with: checkbox
has body: Desired: User can only click on 2 out of 3 displayed checkboxes; when the user clicks on a checkbox, the checkbox background turns orange. Currently: The first checkbox selected acts as desired. The second checkbox ticks, but does not change background color. Upon clicking again, it un-ticks and changes to the desired background color (yet it is not selected). A 3rd checkbox is not selectable whilst two are already selected. Requesting: Help to achieve the desired, thank you! Fiddle: http://jsfiddle.net/0fkn1xs4/ Code: $('input.playerCheckbox').on('change', function(event) { var selectableFriends = 2; if($('.playerCheckbox:checked').length &gt; selectableFriends) { this.checked = false; } numberCurrentlySelected = $('.playerCheckbox:checked').length; if(numberCurrentlySelected &lt; selectableFriends) { $(this).closest("li").toggleClass("checked"); } });

http://stackoverflow.com/a/27574448
downvote count: 3
has comment: http://stackoverflow.com/comment/43574394
upvote count: 0
has comment: http://stackoverflow.com/comment/43574441
has body: Our Story International Blocks How it works The Perfect Gift $('.item').on('click', function(this){ $('.item').removeClass('active'); $(this).addClass('active'); }); actually, I added the same class for every item you click, it is called a global class, then when somebody press this item you just remove the class active from all items that has "item" class. $('.about_nav').onclick didn't work because you was catching the clicks not from ul 'parrent' but form the ul li 'childs'
has comment: http://stackoverflow.com/comment/43574742
type: Answer
answers question: http://stackoverflow.com/q/27574377
score: -3

http://stackoverflow.com/comment/43405117
type: Comment
comment on: http://stackoverflow.com/q/27486452
has text: How about replacing any number of white-spaces with a single white-space of your choice?
score: 0
type: QuestionComment

http://stackoverflow.com/a/27603459
has body: Try this:- arr_obj.sort(function(prev,next){ if(prev.sort1 != next.sort1){ return prev.sort1 &gt; next.sort1; }else{ return prev.sort2 &gt; next.sort2; } });
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27603360

http://stackoverflow.com/a/27494209
score: 14
accepted answer of: http://stackoverflow.com/q/27493773
has body: What Dbugger said is true - you can't animate a background image with css animations. However, you could fake it with a 4 stop gradient (cleverly position your color stops - I suggest using a gradient generator as Colorzilla or similar - will make your work easier ) - since a gradient is treated as a background-image, you can animate it's position by using background-position. In order to animate the position you need to increase it's size so part of the gradient is outside your container. You can use animation-delay to set the initial delay before the animation starts. html, body {width:100%;height:100%;margin:0;} div { width: 100%; height: 100%; background: -moz-linear-gradient(top, rgba(30,87,153,1) 0%, rgba(118,191,36,1) 25%, rgba(224,117,35,1) 50%, rgba(242,38,42,1) 75%, rgba(130,100,70,1) 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(30,87,153,1)), color-stop(25%,rgba(118,191,36,1)), color-stop(50%,rgba(224,117,35,1)), color-stop(75%,rgba(242,38,42,1)), color-stop(100%,rgba(130,100,70,1))); background: -webkit-linear-gradient(top, rgba(30,87,153,1) 0%,rgba(118,191,36,1) 25%,rgba(224,117,35,1) 50%,rgba(242,38,42,1) 75%,rgba(130,100,70,1) 100%); background: linear-gradient(to bottom, rgba(30,87,153,1) 0%,rgba(118,191,36,1) 25%,rgba(224,117,35,1) 50%,rgba(242,38,42,1) 75%,rgba(130,100,70,1) 100%); background-size: 100% 400%; background-position:0 0; -webkit-animation: animateGradient 5s ease 1; -moz-animation: animateGradient 5s ease 1; animation: animateGradient 5s ease 1; -webkit-animation-delay: 2s; -moz-animation-delay: 2s; animation-delay: 2s; } @-webkit-keyframes animateGradient { 0% {background-position: 0 0;} 50% {background-position: 0 100%;} 100% {background-position: 0 0;} } @-moz-keyframes animateGradient { 0% {background-position: 0 0;} 50% {background-position: 0 100%;} 100% {background-position: 0 0;} } @keyframes animateGradient { 0% {background-position: 0 0;} 50% {background-position: 0 100%;} 100% {backgr…
has comment: http://stackoverflow.com/comment/44646240
answers question: http://stackoverflow.com/q/27493773
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 14

http://stackoverflow.com/comment/43660978
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27620100
has text: what if you make 2 clicks on it simultaneously ?
type: Comment

http://stackoverflow.com/a/41583704
type: Answer
answers question: http://stackoverflow.com/q/27581335
score: 4
upvote count: 4
downvote count: 0
has body: For completeness sake, if you want to be able to reference a blob that has as question mark "query string" indicator in it, you can do so in Firefox any way you choose, such as: blob:lalalal?thisworksinfirefox For Chrome, the above will not work, but this will: blob:lalalla#?thisworksinchromeandfirefox And for Safari and Microsaft, nothing really works, so do a pre test like so, then plan accordingly: function initScriptMode() { var file = new Blob(["test"], {type: "text/javascript"}); var url = URL.createObjectURL(file) + "#test?test"; var request = new XMLHttpRequest(); request.responseType = responseType || "text"; request.open('GET', url); request.onload = function() { alert("you can use query strings") }; try { request.send(); } catch(e) { alert("you can not use query strings") } }

http://stackoverflow.com/q/27555699
has comment: http://stackoverflow.com/comment/43540852
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
score: 1
upvote count: 1
has title: jQuery addClass to list item
type: Question
has answer: http://stackoverflow.com/a/27555736
has comment: http://stackoverflow.com/comment/43537680
answer count: 3
has answer: http://stackoverflow.com/a/27555737
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/27555799
tagged with: jquery
has comment: http://stackoverflow.com/comment/43539272
has body: I have multiple pages that all use a simple tab menu at the top. The menu (aka list) is stored in a separate html file: Page1 Page2 Page3 every page has and $('#tabs').load('CommonTabs.html'); Everything works fine, my tabs load into the 'tabs' div. Now I want to set a class of one div on each page to "active", so that the proper style defined in a css can be applied. I tried: $('#tabs').load('CommonTabs.html'); $('#Tab1'.addClass("active"); But that doesn't seem to work. When I do "inspect element" in a browser, the li does not have the "active" class assigned.
has comment: http://stackoverflow.com/comment/43537639
favorite count: 0

http://stackoverflow.com/a/27533529
has body: In your directive, change scope: { foo: '@' }, to scope: { foo: '=' },
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27533196
type: Answer
answers question: http://stackoverflow.com/q/27533196
has comment: http://stackoverflow.com/comment/43526378
has comment: http://stackoverflow.com/comment/43529845
score: 0

http://stackoverflow.com/q/27631308
has answer: http://stackoverflow.com/a/27631463
answer count: 1
tagged with: angular-ui
has title: Resolving dependency for $state.go in Angular UI Router
favorite count: 0
tagged with: angularjs
tagged with: angular-services
has comment: http://stackoverflow.com/comment/43683202
type: AnsweredQuestion
score: 2
downvote count: 0
type: Question
accepted answer: http://stackoverflow.com/a/27631463
has body: I have a provider config which uses $state.go to jump to states. When I use $state as a function parameter it works, but when I try to modify the function parameters to support minification such as .provider('Navigation',["$stateProvider","$state",function($stateProvider,$state) then I get the following resolve dependency error : Uncaught Error: [$injector:modulerr] Failed to instantiate module apfPrototypeJs due to: Error: [$injector:unpr] Unknown provider: $state How to circumvent this problem?
tagged with: javascript
has comment: http://stackoverflow.com/comment/43683115
upvote count: 2

http://stackoverflow.com/a/27607715
type: AcceptedAnswer
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27607584
answers question: http://stackoverflow.com/q/27607584
score: 1
has body: Write a function that displays the next element of the array, and call it every 3 seconds with setTimeout. function Read() { var inputArray = document.getElementById('inputString').value.split(' '); var i = 0, len = inputArray.length; displayCurrent(); function displayCurrent() { if (i &lt; len) { document.getElementById('stringResult').innerHTML = inputArray[i++]; setTimeout(displayCurrent, 3000); } } } &lt;form&gt; &lt;textarea id='inputString'&gt;&lt;/textarea&gt; &lt;br/&gt; &lt;input type='button' value='submit' onclick='Read(); '&gt; &lt;/form&gt; &lt;div id='stringResult'&gt; display res &lt;/div&gt;
upvote count: 1

http://stackoverflow.com/comment/43405858
score: 0
comment on: http://stackoverflow.com/q/27486982
type: Comment
type: QuestionComment
has text: *"...before the doctype tags, have..."* The doctype should always be the *very first* thing in your page. That said, the things you show wouldn't output anything but whitespace to the client, and so shouldn't matter, but still it's best not to leave yourself open to editing errors. Put the doctype on line 1.

http://stackoverflow.com/a/27609474
type: Answer
has body: It looks like you're making ajax calls for your validation. My guess is these are asynchronous calls (which won't work with your code). My guess (sorry, I don't have time to test) is your functions check_username_availability and check_email will immediately return "undefined", which is why your validation is always throwing the alert. Instead, what you'd want to do is make synchronous calls, or use callbacks to invoke the necessary functions.
score: 0
answers question: http://stackoverflow.com/q/27609264

http://stackoverflow.com/comment/43464254
comment on: http://stackoverflow.com/q/27517115
type: Comment
score: 2
has text: You are using document.write() which will wipe out the page if document.load() has not been called according to this thread: http://stackoverflow.com/questions/4511886/document-write-resets-body-once
type: QuestionComment

http://stackoverflow.com/a/46187932
score: 1
has body: Just use CSS, apply different styles to your submenu when "noneStyle" is toggled, under normal style, your submenu should use position: absolute; left: --px; for positioning, and under "noneStyle", it should be position: static to force it display with initial style. and BTW, please do not place tag under , it's not a good way to write HTML, I've changed it for you. var app = angular.module('myApp', []); app.controller('mainCtrl', function ($scope) { $scope.noneStyle = false; $scope.bodyCon = false; $scope.sasd = "asd"; //Toggle the styles $scope.toggleStyle = function () { //If they are true, they will become false //and false will become true $scope.bodyCon = !$scope.bodyCon; $scope.noneStyle = !$scope.noneStyle; } //add class to search box $scope.openSearch = false; $scope.searchToggle = function () { $scope.openSearch = !$scope.openSearch; } }); body{ background:#300F18 !important; } li{ list-style:none; } .rightbar { background: none repeat scroll 0 0 #fff; border-left: 5px solid #ccc; height: 100%; padding-top: 50px; position: fixed; right: 0; width: 60px; z-index: 200; } .rightbar ul li { color: #333; font-weight: 100; padding: 16px 0 21px; /*width: 0;*/ transition:all 0.3s ease; -webkit-transition:all 0.3s ease; -moz-transition:all 0.3s ease; -o-transition:all 0.3s ease; transition:all 0.3s ease; } .rightbar ul li:hover { background:inherit; width:100%; } .rightbar ul li a { color: #8b8b8b; float: right; font-size: 12px; line-height: 23px; padding-right: 54px !important; font-size:0; transition: all 0.2s ease 0s; -webkit-transition:all 0.1s ease; -moz-transition:all 0.1s ease; -o-transition:all 0.1s ease; transition:all 0.1s ease; } .accordion-heading .accordion-toggle{ padding:0; } .rightbar ul li a i{ color: #8b8b8b; float: right; font-size: 22px; position: absolute; right: 15px; transition:all 0.3s ease; -webkit-transition:all 0.3s ease; -moz-transition:all 0.3s ease; -o-transition:all 0.3s ease; transition:all 0.3s ease; } .accordion-group{ border:medium…
answers question: http://stackoverflow.com/q/27578732
downvote count: 0
type: Answer
upvote count: 1

http://stackoverflow.com/q/27526616
has comment: http://stackoverflow.com/comment/43483540
type: Question
has body: For my angularjs app to work I need to get and parse a config file (a json file) when the application starts. This is done by $http.get(url) The URL used when running the app is: localhost:9091/config/config.json What should the URL be when running my Karma tests, config/config.json ? My test hangs at $http.get(url) when running the test. No success and no error. Should I load the config file some other way? Do I need to config my Karma task in my Gruntfile to include this file? Update: I've now included the config.json file in my files list in the Karma task and I can access the file from my browser during the test run on: http://localhost:9876/base/config/config.json. The get request from the test is however still not working (it just hangs). Update 2: When running the tests and looking in the Network tab in Chrome I can see that no request is made to http://localhost:9876/base/config/config.json. Could it be angular-mock that is stopping the request? Karma task in my Gruntfile: karma: { options: { frameworks: ['jasmine'], files: [ //this files data is also updated in the watch handler, if updated change there too '&lt;%= dom_munger.data.appjs %&gt;', 'bower_components/angular-mocks/angular-mocks.js', createFolderGlobs('*-spec.js'), {pattern: 'config/config.json', watched: true, included: false, served: true}, ], logLevel:'ERROR', reporters:['mocha'], autoWatch: false, //watching is handled by grunt-contrib-watch singleRun: true }, all_tests: { browsers: ['PhantomJS','Chrome','Firefox'] }, during_watch: { browsers: ['PhantomJS'] }, },
downvote count: 0
tagged with: javascript
tagged with: karma-jasmine
favorite count: 0
has title: How to load json file in Karma test in angularjs app?
tagged with: karma-runner
answer count: 0
tagged with: angularjs
type: UnansweredQuestion
upvote count: 1
tagged with: unit-testing
score: 1
has comment: http://stackoverflow.com/comment/43481885

http://stackoverflow.com/q/27537374
has answer: http://stackoverflow.com/a/27537599
has answer: http://stackoverflow.com/a/27539747
type: Question
has comment: http://stackoverflow.com/comment/43578817
has comment: http://stackoverflow.com/comment/43550532
has comment: http://stackoverflow.com/comment/43503357
has body: I have a simple HTML file that I am trying to link to a javascript file. Both are in C:\Users\Me\Test (so there's C:\Users\Me\Test\Test.html and C:\Users\Me\Test\test.js) HTML: SoundCloud API EDM classical soundtrack and Javascript: function playSomeSound(genre){ SC.get('/tracks', { genres: genre, bpm: { from: 100 } }, function(tracks){ var random = Math.floor(Math.random()*49); SC.oEmbed(tracks[random].uri, {auto_play: true}, document.getElementById('target')); }); } window.onload = function(){ SC.initialize({ client_id: '*******' }); var menuLinks = document.getElementsByClassName('genre'); for (var i = 0; i < menuLinks.length; i++){ var menuLink = menuLinks[i]; menuLink.onclick = function(e){ e.preventDefault(); playSomeSound(menuLink.innerHTML); }; } }; (Note the Client ID is actually the correct ID in the code.) The HTML correctly displays the three links, but nothing happens when I click them. Am I missing something? For what it's worth, I'm following this tutorial. Thanks for any ideas/tips! Edit: Note, when the HTML page loads, I can View Source, then click the "test.js" and it does actually load the Javascript source...so it is seeing the JavaScript correctly, leading me to think there's something up with the Javascript itself... Edit 2: I was able to get the editor I'm using (SublimeText 2) to build javascript, and get this error: function (tracks){ SyntaxError: Unexpected token ( meaning it's not expecting the "(" after "function"?...maybe that helps? Edit 3: Okay, I've been searching around and was able to get a different error, by adding {} around the BPM: function playSomeSound(genre){ SC.get('/tracks', {genres: genre}, {bpm: { from: 100 }}, function(tracks){ var random = Math.floor(Math.random()*49); SC.oEmbed(tracks[random].uri, {auto_play: true}, document.getElementById('target')); }); console.log(genre); } window.onload = function(){ SC.initialize({ client_id: "6e6078f1408f62443f757b4c34d55e12" }); var menuLinks = document.getElementsByClassName('g…
has comment: http://stackoverflow.com/comment/43503411
has comment: http://stackoverflow.com/comment/43547817
answer count: 2
has comment: http://stackoverflow.com/comment/43503068
has comment: http://stackoverflow.com/comment/43548436
downvote count: 0
has comment: http://stackoverflow.com/comment/43503387
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/43577371
has comment: http://stackoverflow.com/comment/43507171
has comment: http://stackoverflow.com/comment/43503406
has comment: http://stackoverflow.com/comment/43521936
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43578108
has title: Why won't my HTML file find my javascript file?
has comment: http://stackoverflow.com/comment/43507049
has comment: http://stackoverflow.com/comment/43546535
score: 2
has comment: http://stackoverflow.com/comment/43503122
has comment: http://stackoverflow.com/comment/43507874
upvote count: 2
type: UnansweredQuestion

http://stackoverflow.com/a/27544743
has comment: http://stackoverflow.com/comment/43524908
downvote count: 0
answers question: http://stackoverflow.com/q/27539590
type: Answer
score: 1
upvote count: 1
has body: Well I am not sure I have the solution but I have still some remarks. First if you are running this code on the server, your meteor.call is effectively asynchronous. And I do not know what happens at the end of your function for the rendering template. Maybe it renders your precedent template, that is to say login ? But if you want to avoid the flickering of a template the time iron-router is working, the best thing to do is, I think, add a loading template : Router.configure({ loadingTemplate: 'loading' }); &lt;template name='loading'&gt; // some css to render a 'loading feature' &lt;/template&gt; So when you want to go on admin you will have this loading screen instead of login. For the verification, it is true that I would use a hook or a plugin with onBeforeAction to do such thing as verification, I think it is cleaner with iron-router than a method call.

http://stackoverflow.com/comment/43639378
has text: Would it be okay if you had the server check the Referer header, or maybe the Origin header, and set X-Frame-Options based on it?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27552242

http://stackoverflow.com/comment/43525291
type: Comment
type: QuestionComment
has text: Have you tried using the "addEventListener" event?
comment on: http://stackoverflow.com/q/27549432
score: 0

http://stackoverflow.com/q/27614638
type: Question
upvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/27615242
linked to: http://stackoverflow.com/q/11022888
has comment: http://stackoverflow.com/comment/43651095
has title: load more content onclick using javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43651102
downvote count: 2
score: -2
has body: I have a service which gives 20 records per each page, now i want to modify this pagination process to load more content process which means when page is loading it shows first 20 records after click on load more content button it gives first 20 records plus next 20 records(total 40 records). I completely don't know how to do this process.. Can any one suggest me.

http://stackoverflow.com/q/27493824
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27496111
has comment: http://stackoverflow.com/comment/43420098
has comment: http://stackoverflow.com/comment/43420217
score: 0
has comment: http://stackoverflow.com/comment/43419817
has comment: http://stackoverflow.com/comment/43419879
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43419452
has body: I am trying to create an input field that will allow users to input a text string that once submitted is appended to a domain name, taking the user to a page. The process is as follows: User inputs 'foo' into an input box. Once submit is clicked, 'foo' is prefixed by http://example.com/ and (ideally) suffixed by .html (or .php) and the browser resolves to that address, ie http://example.com/foo.html. Is this possible? My form kung foo is (clearly) not very strong, so any help would be appreciated. With help from other Stack users I've got this far:
has comment: http://stackoverflow.com/comment/43420086
has title: Append Page to Domain Name Via The Input Field
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43420984
has comment: http://stackoverflow.com/comment/43419925
tagged with: forms
type: Question
has comment: http://stackoverflow.com/comment/43419840
has answer: http://stackoverflow.com/a/27496111
has comment: http://stackoverflow.com/comment/43420169
answer count: 1

http://stackoverflow.com/q/27622798
accepted answer: http://stackoverflow.com/a/27624349
type: AnsweredQuestion
has body: I am working with ng jsTree component https://github.com/ezraroi/ngJsTree Here is my implementation &lt;div js-tree="treeConfig" ng-model="treeData" tree="treeInstance" tree-events="check_node:getSelectedCategories;uncheck_node:getSelectedCategories"&gt;&lt;/div&gt; JS code in controller $scope.treeConfig = { core : { multiple : true, animation: false, error : function(error) { $log.error('treeCtrl: error from js tree - ' + angular.toJson(error)); }, check_callback : true, worker : true }, types : { default : { icon : 'glyphicon glyphicon-flash' }, star : { icon : 'glyphicon glyphicon-star' }, cloud : { icon : 'glyphicon glyphicon-cloud' } }, version : 1, "checkbox" : { "tie_selection" : false }, plugins : ['types','checkbox'] }; $scope.treeData = [ { id : 'ajson1', parent : '#', text : 'Simple root node', state: { opened: true} }, { id : 'ajson2', parent : '#', text : 'Root node 2', state: { opened: true} }, { id : 'ajson3', parent : 'ajson2', text : 'Child 1', state: { opened: true} }, { id : 'ajson4', parent : 'ajson2', text : 'Child 2' , state: { opened: true}} ]; $scope.getSelectedCategories = function(e, data) { console.log('data: ', data); }; So, when I check 'ajson2' node, data returned with selected attribute is 'ajson2', but when I uncheck 'ajson2', data returned with selected attribute is 'ajson3', 'ajson4'. Looks like this is bug, or am I missing anything?
type: Question
tagged with: jstree
tagged with: javascript
has answer: http://stackoverflow.com/a/27624349
score: 0
has title: ng jsTree returning wrong object as selected nodes
answer count: 1
tagged with: jquery
tagged with: angularjs

http://stackoverflow.com/q/27609024
accepted answer: http://stackoverflow.com/a/27609070
score: 1
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
has answer: http://stackoverflow.com/a/27609094
type: Question
has answer: http://stackoverflow.com/a/27609070
tagged with: javascript
answer count: 2
downvote count: 0
possible better answer: http://stackoverflow.com/a/27609094
favorite count: 0
has body: There is an exception occurring and I am not sure why because I am new to JS. As soon as I reach the line testData["beacons"].append(beacon); My code jumps to catch(e). I am assuming I cant append objects to other arrays? JS: $(document).ready(function() { // Data to describe what kind of test var testData = { "timestamp": "", "hive": 0, "hdfs": 0, // Contains a list of testData objects "beacons":[] }; var testRun = document.getElementById("test-form"); testRun.addEventListener('submit', function(event) { event.preventDefault(); var selectedTest = document.querySelector('input[name=test-select]:checked'); alert(selectedTest); var testType = selectedTest.id; if (testType == "hdfs-test") { testData["hdfs"] = 1; testData["hive"] = 0; } else if (testType == "hive-test") { testData["hdfs"] = 0; testData["hive"] = 1; } else if (testType == "hdfs-hive-test") { testData["hdfs"] = 1; testData["hive"] = 1; } else { // null } var events = document.getElementById("event-textarea").value; // check in valid input var eventSource = events.replace("],[","],,,,["); // beaconLists allows users to submit --&gt; [{beacon1}, {beacon2}, ...], [{beacon3}, {beacon4}, ...] var beaconLists = eventSource.split(",,,,"); for (var i = 0; i &lt; beaconLists.length; i++) { // inspect one list in beaconLists [{beacon1}, {beacon2}, ...] var beaconList = beaconLists[i]; try { // list of JSON objects var beaconObjList = JSON.parse(beaconList); for (var j = 0; j &lt; beaconObjList.length; j++) { var beaconObj = beaconObjList[j]; if (beaconObj["data"] &amp;&amp; beaconObj["application"]) { // successful parse to find events // describe beacon being tested alert("yes"); var beacon = { "app_name": beaconObj["application"]["app_name"], "device": beaconObj["application"]["device"], "device_id": beaconObj["application"]["device_id"], "os": beaconObj["application"]["os"], "os_version": beaconObj["application"]["os_version"], "browser": beaconObj["application"]["browser"], "beacon": beaconObj }; // append to t…
has title: Appending objects to JSON lists
has comment: http://stackoverflow.com/comment/43640300
type: AnsweredQuestion

http://stackoverflow.com/comment/43675987
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27627460
score: 0
has text: @BrianMcCall, yes I don't get any 404's in the console

http://stackoverflow.com/comment/43681881
has text: Great answer. This helps me so much. You're the best.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/27628739
type: AnswerComment

http://stackoverflow.com/a/27580747
upvote count: 1
has body: The problem is that because you make them all global variables the name one clashes with the window.name property. Either using a different variable name, or creating a closure will work
downvote count: 0
answers question: http://stackoverflow.com/q/27580667
type: Answer
score: 1

http://stackoverflow.com/comment/43626496
has text: That's it, thank you very much! So they were pure css3 animations not jQuery as I thought before.
type: Comment
comment on: http://stackoverflow.com/a/27601930
score: 0
type: AnswerComment

http://stackoverflow.com/comment/121072525
score: 0
type: AnswerComment
has text: Basically what I am doing here is we are using regex expression and replace function to mask the input string with spaces. Later prefix and suffix are the substring of first 6 characters and last 4 characters. Then I am replacing the prefix with * character and concatenating the output string.
type: Comment
comment on: http://stackoverflow.com/a/68475020

http://stackoverflow.com/q/27596852
tagged with: html-parsing
downvote count: 1
type: Question
tagged with: phantomjs
type: AnsweredQuestion
answer count: 2
has title: Get generated HTML after JS manipulates the DOM and pass request headers
has answer: http://stackoverflow.com/a/27596962
upvote count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
score: 0
has answer: http://stackoverflow.com/a/27596884
accepted answer: http://stackoverflow.com/a/27596884
tagged with: http://stackoverflow.com/tag/html
has body: I need to get the generated HTML source of the page after JS DOM manipulation has all been done. I was using Phantomas https://github.com/macbre/phantomas for this purpose, but unfortunately it does not provide a way to pass in request headers. Is there a library out there that will allow to pass request headers and then get the generated HTML source code. Any pointers would be greatly helpful
possible better answer: http://stackoverflow.com/a/27596962

http://stackoverflow.com/q/27637980
has title: allow user to login from only one pc
has answer: http://stackoverflow.com/a/27668183
has answer: http://stackoverflow.com/a/27638450
answer count: 3
has answer: http://stackoverflow.com/a/27638227
downvote count: 1
has comment: http://stackoverflow.com/comment/43696183
tagged with: asp.net
has comment: http://stackoverflow.com/comment/43694842
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43696846
has comment: http://stackoverflow.com/comment/43695639
has body: In my WebApp that I was building with C# .net, i want to allow the user to connect only from one pc. so when the users logging-in in the first time i will save the pc details and when i will detect when its another pc they will not able to log in. What I was trying to do: 1) save the ip when the user first log-in and check it every login, the problem: the ip can be change. protected string GetIPAddress() { System.Web.HttpContext context = System.Web.HttpContext.Current; string ipAddress = context.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]; if (!string.IsNullOrEmpty(ipAddress)) { string[] addresses = ipAddress.Split(','); if (addresses.Length != 0) { return addresses[0]; } } return context.Request.ServerVariables["REMOTE_ADDR"]; } 2) save some key in local storage then to check the key every log in, the problem: they can clear the local storage or choose to not use it or the browser will not support local storage. localStorage.setItem("key", "123123"); There is a good and safe way to do it?
upvote count: 0
type: Question
has comment: http://stackoverflow.com/comment/43696057
tagged with: c#
has comment: http://stackoverflow.com/comment/43695667
tagged with: .net
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/43695272

http://stackoverflow.com/q/27545852
favorite count: 0
accepted answer: http://stackoverflow.com/a/27578578
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27578578
downvote count: 0
has body: I am using this gruntfile to change my .less file to .css files. module.exports = function (grunt) { grunt.initConfig({ less: { development: { files: [{ expand: true, cwd: 'assets/less', src: ['*.less'], dest: 'wwwroot/content/css/', ext: '.css' }] }, production: { files: { "wwwroot/content/css/script.css": ["assets/less/*.less"] }, options: { cleancss: true } } } }); grunt.loadNpmTasks("grunt-contrib-less"); }; For my development build if I have ten .less files then this will create ten .css files and then I will be able to view these in the Chrome Development Tools and easily debug. The reason I am doing this is so that I will be able to debug and look at those ten .css files in the Chrome development tools. Is my reasoning correct? I heard about source maps but how could I use these in my development build and if I used these then would I still be able to see the source .css file names or even better the ten .less files?
score: 1
has title: Can I change .less to a.min.css with a source map and still be able to view the .less files in Dev Tools?
tagged with: less
type: Question
tagged with: grunt-contrib-less
tagged with: javascript
tagged with: gruntjs
has comment: http://stackoverflow.com/comment/43524156
upvote count: 1
answer count: 1

http://stackoverflow.com/comment/43535331
comment on: http://stackoverflow.com/q/27554388
score: 0
type: QuestionComment
has text: I believe this is what you are looking for: http://stackoverflow.com/questions/11980087/javascript-words-to-numbers
type: Comment

http://stackoverflow.com/comment/43666634
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27621440
has text: You need to write your own component for that. That doesn't come built-in with React.
type: Comment

http://stackoverflow.com/comment/43666507
type: Comment
comment on: http://stackoverflow.com/a/27622840
has text: Why would I loop in the example code? There are easier ways of getting "a" just like that
type: AnswerComment
score: 0

http://stackoverflow.com/q/27590366
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/43604971
has comment: http://stackoverflow.com/comment/43604739
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/27590414
has body: Hi my first question here on Stack overflow, i want get all links on a page by it's class name, store them in a array and export it as Json format file results.json My Programming Background is PHP, C++ and still in process of learning Javascript here is html structure of document form where i want to extract the links Anchor tage I have done some research on different ways this can be done via queryselectorall() , get element by classname() but what's next i got the elements but how to turn them in text and export to Json File (what is function decode) and any file read function for writing file just like we do in PHP? Any can anyone refer me to function that are going to use with code example of doing this? My Flowchart : Extract the all links from the page with a pacific class name [2] storing them in a Array [3]Encoding the Array to JSON [4]Writing Json to data.Json file I know the how this can be done but having problems FINDING out what method, function needs to use and in what way Thanks in Advance
has answer: http://stackoverflow.com/a/27590414
has answer: http://stackoverflow.com/a/27590566
has comment: http://stackoverflow.com/comment/43604926
tagged with: php
accepted answer: http://stackoverflow.com/a/27590566
type: AnsweredQuestion
score: 3
upvote count: 3
tagged with: http://stackoverflow.com/tag/json
has title: how to get all links in a page by classname and store

http://stackoverflow.com/a/27603395
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27603308
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27603308
has body: You can change your CSS to the below, crucially you need to correctly define positioning, padding and margins to establish the layout in both states: Demo Fiddle #stickyribbon { width:800px; background: orange; border-radius: 5px; position:static; top:0; margin:15px 0; } #stickyribbon ul { display:table; width:100%; list-style-type: none; padding:0; margin:0; } #stickyribbon li { display:table-cell; font-size: 16px; font-weight: bold; vertical-align:middle; padding:0 40px; } #stickyribbon li a { display:block; color: #fff; text-decoration: none; } #stickyribbon li a:hover { color: yellow; }
type: Answer
score: 1

http://stackoverflow.com/q/27533597
tagged with: scroll
has title: Keep document not moving while new DOM element are inserted above it
type: Question
has body: I have a sequence of block elements on the page and new elements are being added at the top all the time, pushing the rest down. I would like to make it so that once a user scrolls down and is above one block element, scrolling position follows that block element so that it does not move, even if new elements are added above te.
tagged with: javascript
has answer: http://stackoverflow.com/a/27533971
score: 0
has comment: http://stackoverflow.com/comment/43495695
answer count: 1
type: UnansweredQuestion

http://stackoverflow.com/q/27520921
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43471567
has body: Is it possible to animate the size of the header in a HeaderFooterLayout? I am trying to change it's size with an animation but I am not seeing any API for this. So I was wondering about a technique for doing it.
tagged with: famo.us
linked to: http://stackoverflow.com/q/23668621
type: Question
answer count: 2
has title: Is there a way to animate the size of the header in the HeaderFooterLayout?
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27769282
has answer: http://stackoverflow.com/a/27559945

http://stackoverflow.com/a/27571751
has body: For this to work as you describe, the if-structure ... if (highestLevel == 2) { $('#button2').show(); } ... must be inside the click function. Try ... $('#button1').click(function () { Check(); highestLevel = 2; $('#button2').show(); }); You really don't need the if-structure doing it this way ... in your code, the if-structure only runs on document-ready (ONE TIME).
answers question: http://stackoverflow.com/q/27571714
downvote count: 0
type: Answer
score: 6
upvote count: 6

http://stackoverflow.com/a/27521264
has body: try using this: Script: function drawImg() { var img = new Image(); //alert(img.src); img.src = "home.png"; console.log(img); if(img.complete) { //check if image was already loaded by the browser callback(img); }else { img.onload = callback; } } var callback = function(img) { var canvas = document.getElementById('mask'); var context = canvas.getContext('2d'); context.drawImage(img, 100, 100); var URL = canvas.toDataURL(); console.log(URL); document.getElementById('main').src = img.src; } html: Green
score: 0
answers question: http://stackoverflow.com/q/27521074
type: Answer

http://stackoverflow.com/comment/43407729
has text: Thanks... Is there a better way to do this with Java than to use JSoup? From what I see now Jsoup is usually based on a full URL. I have not tried using a relative URL from my application, but I hope that works. i.e., my application will be in some folder on my server and ../users/username/data is where the data is.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27478541

http://stackoverflow.com/comment/43396955
type: QuestionComment
comment on: http://stackoverflow.com/q/27482175
has text: I don't want to look through that code. I give all I have to identify the error. How you can see the whole code is commented so will be easy to pass what is not important
score: 0
type: Comment

http://stackoverflow.com/a/27818812
type: Answer
score: 0
has body: Well, I figured it out. Method 1: use directive, and in the link function: element.on('click', function() { element.on('core-transitionend', function() { // method 1 processing }); }); Method 2: &lt;paper-ripple class="recenteringTouch" ng-click="rippleClicked($event)" fit&gt;&lt;/paper-ripple&gt; $scope.rippleClicked = function($event) { angular.element($event.target).on('core-transitionend', function() { // method 2 processing }); } But the two methods are not the same. For method 1, when you click on the element, hold the mouse, and release it outside the element, the method 1 processing will not trigger (I don't know why, it seems like the click event is not triggered), while method 2 will.
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27541764
accepted answer of: http://stackoverflow.com/q/27541764

http://stackoverflow.com/comment/43480033
has text: @CharlotteEden was your question about underscore templates?
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27523208

http://stackoverflow.com/q/27484961
has comment: http://stackoverflow.com/comment/43404497
has answer: http://stackoverflow.com/a/27486801
tagged with: d3.js
has title: How to add legend to an aster plot d3 js?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43404897
type: Question
accepted answer: http://stackoverflow.com/a/27486801
has comment: http://stackoverflow.com/comment/43402985
has comment: http://stackoverflow.com/comment/43402306
has comment: http://stackoverflow.com/comment/43404609
tagged with: javascript
has comment: http://stackoverflow.com/comment/43404308
score: 0
has comment: http://stackoverflow.com/comment/43403478
answer count: 1
has body: I am working on recreating the Aster plot given in the example given below: http://bl.ocks.org/bbest/2de0e25d4840c68f2db1 I changed the coloring of the arcs with the code given below: var fill = d3.scale.category10(); Now I am trying to display the legends of the graph with the code given below. I am not getting the legends plotted. Is there something wrong with my code? var legend = svg.selectAll(".legend") .data(fill.domain()) .enter().append("g") .attr("class", "legend") .attr("transform", function(d, i) { return "translate(0," + i * 20 + ")"; }); // draw legend colored rectangles legend.append("rect") .attr("x", width - 18) .attr("width", 18) .attr("height", 18) .style("fill", fill); // draw legend text legend.append("text") .attr("x", width - 24) .attr("y", 9) .attr("dy", ".35em") .style("text-anchor", "end") .text(function(d) { return d.id;})

http://stackoverflow.com/comment/43447011
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27508322
type: AnswerComment
has text: I think @user2607713 also wants to know how to get the "Arial" part - that is, how to use the selected item from the drop-down list.

http://stackoverflow.com/a/27511287
has body: The name attribute should be person, if you want use that as an index in a POST operation. Given the way your code is now, the index name in the query should be "cart_name"
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27511220

http://stackoverflow.com/comment/43516606
has text: When I say distortion I mean the box shouldn't be a gif file triangle background that just gets stretched to the size of the container.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27544316
type: AnswerComment

http://stackoverflow.com/q/27556492
possible better answer: http://stackoverflow.com/a/27556546
answer count: 2
has body: I need a regular expression (or any other thing) object that will match a character, and multiple instances of the same character following that, until it reaches a new character. Ideally, I need a function that would return an array of all the consecutive characters found in the input string. It should return something like this. &gt; like_characters("Hello?"); Array ["H", "e", "ll", "o", "?"] &gt; like_characters("1234442332111???"); Array ["1", "2", "3", "444", "2", "33", "2", "111", "???"] I don't have to use a regular expression--any way of "splitting" a string by a character change would work. It preferably would be a low-byte code, as I am working on a group project with a limited amount of space. Attempts str.split(/\d*/) str.split(/\d+/) /(\d)+\1/ This is pretty much all I've got (and frankly, I'm surprised I even got this far--the realm of the regular expression is so murky).
has answer: http://stackoverflow.com/a/27556546
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/27556524
accepted answer: http://stackoverflow.com/a/27556524
tagged with: regex
has title: RegExp for the matching of a repeated character
upvote count: 1
type: Question
type: AnsweredQuestion
score: 1

http://stackoverflow.com/q/27597908
has title: send email from bootstrap framework My error in this is i got a message is Mail sent successfully but i didn't receive any mail
type: AnsweredQuestion
tagged with: sendmail
has answer: http://stackoverflow.com/a/27598659
has comment: http://stackoverflow.com/comment/43619905
upvote count: 1
has body: Form to send email from bootstrap frame work is that any thing i need to do extra work like adding phpmailer or need to change in php.ini file or need to setup any mail function html code Send Message js Codes $(function () { $("input,textarea").jqBootstrapValidation({ preventSubmit: true, submitError: function ($form, event, errors) { // additional error messages or events }, submitSuccess: function ($form, event) { event.preventDefault(); // prevent default submit behaviour // get values from FORM var name = $("input#name").val(); var email = $("input#email").val(); var phone = $("input#phone").val(); var message = $("textarea#message").val(); var firstName = name; // For Success/Failure Message // Check for white space in name for Success/Fail message if (firstName.indexOf(' ') >= 0) { firstName = name.split(' ').slice(0, -1).join(' '); } $.ajax({ url: "././mail/contact_me.php", type: "POST", data: { name: name, phone: phone, email: email, message: message }, cache: false, success: function () { // Success message $('#success').html(" "); $('#success > .alert-success').html(" & times; ").append(" "); $('#success > .alert-success').append("Your message has been sent. "); $('#success > .alert-success').append(' '); //clear all fields $('#contactForm').trigger("reset"); }, error: function () { // Fail message $('#success').html(" "); $('#success > .alert-danger').html(" & times; ").append(" "); $('#success > .alert-danger').append("Sorry " + firstName + ", it seems that my mail server is not responding.Please try again later!"); $('#success > .alert-danger').append(' '); //clear all fields $('#contactForm').trigger("reset"); }, }) }, filter: function () { return $(this).is(":visible"); }, }); $("a[data-toggle=\"tab\"]").click(function (e) { e.preventDefault(); $(this).tab("show"); }); }); /*When clicking on Full hide fail/success boxes */ $('#name').focus(function () { $('#success').html(''); }); This is my php file <?php // Check for empty fields if (empty($_POST['…
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/43620025
tagged with: javascript
has comment: http://stackoverflow.com/comment/43619872
has comment: http://stackoverflow.com/comment/43620125
has comment: http://stackoverflow.com/comment/43620096
has comment: http://stackoverflow.com/comment/43620004
accepted answer: http://stackoverflow.com/a/27598659
score: 0
has comment: http://stackoverflow.com/comment/43620295
has comment: http://stackoverflow.com/comment/43619810
has comment: http://stackoverflow.com/comment/43619955
answer count: 1
linked to: http://stackoverflow.com/q/15965376
has comment: http://stackoverflow.com/comment/43620211
favorite count: 0
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/43620082
has comment: http://stackoverflow.com/comment/43620393
has comment: http://stackoverflow.com/comment/43619953
tagged with: php
has comment: http://stackoverflow.com/comment/43620182

http://stackoverflow.com/a/27598796
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/27598697
has comment: http://stackoverflow.com/comment/43620780
answers question: http://stackoverflow.com/q/27598697
has comment: http://stackoverflow.com/comment/43621521
has body: PHP solution To make this work, main.php will have to return only the contents of the div. That means it needs to detect when to render a whole page or just the div's contents. There are a couple of ways to do this. Make a separate php file for the AJAX requests which always only returns that part of the page Use the HTTP_X_REQUESTED_WITH header to detect an AJAX request if ( !empty($_SERVER['HTTP_X_REQUESTED_WITH']) &amp;&amp; strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') { // If you get here, this is an AJAX request. Make sure to only render the div's contents. } Similar to one. Instead of making a separate PHP file, add a query string parameter, so the page will know that it should only return that part. You can even specify in the query string which part, so you can load different parts through the same php file in different intervals. JavaScript solution Alternatively, you can just fetch the entire page, and use jQuery to extract the div's content from it. The load function already has a convenient syntax for this purpose. The .load() method, allows us to specify a portion of the remote document to be inserted. This is achieved with a special syntax for the url parameter. If one or more space characters are included in the string, the portion of the string following the first space is assumed to be a jQuery selector that determines the content to be loaded. The load function allows for an extra selector after the url, the content matching the selector is fetched from the AJAX response and inserted into the specified element in the document. For this reason, the ids should be different, otherwise you will insert an element with the same id inside the existing element, and that's not allowed. So your HTML should look like this: &lt;div id="refreshDataContainer"&gt; &lt;div id="refreshData"&gt; &lt;/div&gt; &lt;/div&gt; Once you've made that change, you can completely replace #refreshData with the following line: $('#refreshDataContainer').loa…
has comment: http://stackoverflow.com/comment/43620835
type: AcceptedAnswer
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/43623590

http://stackoverflow.com/q/27549357
has comment: http://stackoverflow.com/comment/43524905
tagged with: javascript
has title: Using 'this' from a prototype function called from async.series
accepted answer: http://stackoverflow.com/a/27549568
score: 2
tagged with: this
answer count: 1
downvote count: 0
tagged with: asynchronous
favorite count: 0
has comment: http://stackoverflow.com/comment/43524962
tagged with: node.js
type: AnsweredQuestion
upvote count: 2
has comment: http://stackoverflow.com/comment/43524941
type: Question
has comment: http://stackoverflow.com/comment/43525126
has body: I'm trying to access a variable by using 'this' but the context changes because my function is called by async.series. Here is a sample of my code :) var search = function(url) { this.music = url; } search.prototype.test = function() { async.series({ songId: this.getSongId }, function(err, results) {}); }; search.prototype.getSongId = function(callback) { console.log(this.music) // Prints 'undefined' } module.exports = search; When I'm doing var engine = require('./lib/index.js'); var search = new engine('test'); search.test(); I get 'undefined'. Is there a way to bind 'this' to the async.series function or should I just pass my value as an argument?
has answer: http://stackoverflow.com/a/27549568

http://stackoverflow.com/comment/43410122
score: 0
comment on: http://stackoverflow.com/q/27489233
type: Comment
type: QuestionComment
has text: http://php.net/manual/en/function.header.php

http://stackoverflow.com/a/27516855
has comment: http://stackoverflow.com/comment/43463885
downvote count: 1
type: Answer
upvote count: 4
has comment: http://stackoverflow.com/comment/43463983
has comment: http://stackoverflow.com/comment/43463842
answers question: http://stackoverflow.com/q/27516750
score: 3
has comment: http://stackoverflow.com/comment/43464112
has body: Hide all elements with class "row" and then un-hide all elements with class [id of what was clicked] within class "row". $('.list-group-item').click(function(event) { $('.row').addClass('invis'); $('.row.' + event.target.id).removeClass('invis'); });
has comment: http://stackoverflow.com/comment/43463859
has comment: http://stackoverflow.com/comment/43464018

http://stackoverflow.com/comment/43470558
type: QuestionComment
comment on: http://stackoverflow.com/q/27516467
has text: Could you provide some code for us to analyze ?
score: 0
type: Comment

http://stackoverflow.com/q/27523736
has comment: http://stackoverflow.com/comment/43476267
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/27523807
tagged with: javascript
has answer: http://stackoverflow.com/a/27523812
has body: Couldn't think of better title. Important to note: I'm new to js and I guess its the reason I can't figure it out by myself. I have a JSON array returned from a database, the JSON array represent a set of points. Example of the JSON array: var JSON_array = [{lat:1,lng:2}, {lat:1,lng:3},{lat:2,lng:3}...] I want to make a different array whose elements will be a function and the variables of the function will be the elements from the JSON array, like so: var coordinates = [ new google.maps.LatLng(1, 2), new google.maps.LatLng(1, 3), new google.maps.LatLng(2, 3), .... ]; I made a function using forEach that counts the elements of the JSON array (for learning and trying to find a way to what I want) but I cant think of a way make the array mentioned above.
has title: How to make an array from JSON?
possible better answer: http://stackoverflow.com/a/27523847
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27523847
score: 0
has answer: http://stackoverflow.com/a/27523820
accepted answer: http://stackoverflow.com/a/27523812
type: Question
has comment: http://stackoverflow.com/comment/43476656

http://stackoverflow.com/comment/43568542
score: 0
has text: you are correct @Win sorry for the confusion I must have seen it in one of my other projects and the name got stuck in my head.
type: AnswerComment
comment on: http://stackoverflow.com/a/27569950
type: Comment

http://stackoverflow.com/a/27515667
has body: So the issue was due to my template the pub/sub was working fine but in my template helper I had the following which was causing the issue. hasOrganization: function() { var user = Meteor.user(); var organizationsCount = Organizations.find({$or:[{userId: user._id},{**userId**: user.organizationId}]}).count(); console.log(organizationsCount); if (organizationsCount &gt;= 1) { return true } else { return false } Here is the fixed version hasOrganization: function() { var organizationsCount = Organizations.find().count(); if (organizationsCount &gt;= 1) { return true } else { return false } }
score: 0
answers question: http://stackoverflow.com/q/27515309
type: Answer

http://stackoverflow.com/comment/43616316
score: 0
comment on: http://stackoverflow.com/q/27596185
type: Comment
has text: what is the problem with the way jQueryUI inserts the datepicker element? Really not clear what your issue is
type: QuestionComment

http://stackoverflow.com/comment/43686132
type: AnswerComment
has text: http://www.w3schools.com/tags/att_textarea_maxlength.asp - it says "Differences Between HTML 4.01 and HTML5. The maxlength attribute is new for the tag in HTML5."
type: Comment
comment on: http://stackoverflow.com/a/27599768
score: 0

http://stackoverflow.com/a/27536472
has comment: http://stackoverflow.com/comment/43514552
upvote count: 2
has comment: http://stackoverflow.com/comment/43502748
type: Answer
has body: I would guess, that the data you receive through your JavaScript function is already escaped. So when you enter I'm a big fan of cats dog you get I\'m a big fan of cats dogs in your PHP script. When you than use mysqli_real_escape() you are adding another escape character. So you might want to replace the escape character before: $data = stripslashes($_POST['data']); $data = mysqli_real_escape_string($db_con, $data); $data2 = stripslashes($_POST['data2']); $data2 = mysqli_real_escape_string($db_con, $data2); $sql = "INSERT INTO pm(subject, message) VALUES('$data2','$data')"; $query = mysqli_query($db_con, $sql); mysqli_close($db_con); I would not recommend to use htmlentities() but save the data "as is" into the database as otherwise things like full text searches don't work correctly. The issue with the + sign is probably because you send the values as a query string data:"data="+data+"&amp;data2="+data2 and in a URL, a + sign is used for a space. To fix that, you should rather pass the data as an object: type: "POST", url: "pm_system.php", data: { "data": data, "data2": data2 }, That should fix also most of the other problematic characters.
score: 2
has comment: http://stackoverflow.com/comment/43545868
has comment: http://stackoverflow.com/comment/43502954
has comment: http://stackoverflow.com/comment/43503309
answers question: http://stackoverflow.com/q/27536272
downvote count: 0
has comment: http://stackoverflow.com/comment/43502851

http://stackoverflow.com/comment/43519979
type: AnswerComment
comment on: http://stackoverflow.com/a/27531751
type: Comment
has text: I write 200 lines of html code to test if everything is ok, but i face the same problem. Does not diplay all pages and when i tour back the catalogue there is a random display of pictures. It looks like that the pictures can't load. So my question is whether this ebook can work cause i'm frustrated.
score: 0

http://stackoverflow.com/comment/43421087
has text: If your data wasn't redundant, you wouldn't need to run that function that looks for every instance of service. That would mean storing services, providers, and reviews in separate files and then linking them together by id.
comment on: http://stackoverflow.com/q/27494497
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43531869
has text: Why do you need to pass it back to index.js? What are you hoping to do with it? I feel like you're splitting your app up in a very poor way.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27552609
score: 0

http://stackoverflow.com/comment/43584775
has text: did you configured your `asp.net web api` to return `json`? it will help if you include your server side logic
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27580145
score: 0

http://stackoverflow.com/comment/43535473
comment on: http://stackoverflow.com/a/27554403
type: AnswerComment
score: 0
has text: This is a very good answer, but I'm mad that you stole my code before I finished writing it, down to the variable names.
type: Comment

http://stackoverflow.com/q/27581593
favorite count: 0
linked to: http://stackoverflow.com/q/12993629
tagged with: regex
has body: I want to get urls from a bing search. I get the html, and when I do this regex /&lt;h2&gt;&lt;a href="(.*?)"/g it gives me : ["&lt;h2&gt;&lt;a href="https://www.test.com/"", "&lt;h2&gt;&lt;a href="http://fr.wikipedia.org/wiki/Test_(informatique)"", "&lt;h2&gt;&lt;a href="http://www.speedtest.net/"", "&lt;h2&gt;&lt;a href="http://test.psychologies.com/"", "&lt;h2&gt;&lt;a href="http://www.thefreedictionary.com/test"", "&lt;h2&gt;&lt;a href="http://fr.wikipedia.org/wiki/Test"", "&lt;h2&gt;&lt;a href="http://www.wordreference.com/enfr/test"", "&lt;h2&gt;&lt;a href="http://www.sedecouvrir.fr/"", "&lt;h2&gt;&lt;a href="http://www.jeuxvideo.com/tests.htm"", "&lt;h2&gt;&lt;a href="http://en.wikipedia.org/wiki/Test""] For js code, I used match html.match(/&lt;h2&gt;&lt;a href="(.*?)"/g); I only want the urls. The html is here: http://www.bing.com/search?q=test. I've already searched the whole day, and I think maybe I have to use group?
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/3809401
downvote count: 0
score: 1
type: Question
possible better answer: http://stackoverflow.com/a/27581619
tagged with: javascript
has comment: http://stackoverflow.com/comment/43587489
has comment: http://stackoverflow.com/comment/43587708
has answer: http://stackoverflow.com/a/27581837
has title: javascript regex match url
accepted answer: http://stackoverflow.com/a/27581837
answer count: 3
upvote count: 1
has answer: http://stackoverflow.com/a/27581619
has answer: http://stackoverflow.com/a/27581819
has comment: http://stackoverflow.com/comment/43587521
linked to: http://stackoverflow.com/q/520611

http://stackoverflow.com/comment/43582594
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27568087
has text: Or they call the navform midsForm then your code will fail too
type: AnswerComment

file
type: Tag
tags question: http://stackoverflow.com/q/27511088
tag name: file
tags question: http://stackoverflow.com/q/27516037
tags question: http://stackoverflow.com/q/27504283

http://stackoverflow.com/comment/43609103
type: Comment
comment on: http://stackoverflow.com/a/27592711
type: AnswerComment
score: 0
has text: You use parseFloat instead of parseInt

http://stackoverflow.com/q/27481937
has comment: http://stackoverflow.com/comment/43410426
downvote count: 0
tagged with: clock
tagged with: javascript
type: Question
has comment: http://stackoverflow.com/comment/43521262
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43398442
has comment: http://stackoverflow.com/comment/43528469
favorite count: 0
has answer: http://stackoverflow.com/a/27555825
score: 4
has comment: http://stackoverflow.com/comment/43405717
has comment: http://stackoverflow.com/comment/43404941
has comment: http://stackoverflow.com/comment/43528189
answer count: 2
has comment: http://stackoverflow.com/comment/43406616
tagged with: php
tagged with: google-chrome
has body: I'm making a few PHP sites for a client and I have a small problem. I have a JavaScript text clock located at the top and the bottom of the page (each a copy of the other). They work perfectly in Chrome, but on Firefox and IE it sometimes doesn't. I've made a new, clean PHP file and attached the JS to check if the problem is from the Javascript file. It doesn't appear to be. The top clock is GetClock() and the bottom one is GetClockPrint() Here's the Javascript code for the clock: tday=new Array("Domingo","Segunda-feira","Terça-feira","Quarta-feira","Quinta-feira","Sexta-feira","Sábado"); tmonth=new Array("Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"); function GetClock(){ var d=new Date(); var nday=d.getDay(),nmonth=d.getMonth(),ndate=d.getDate(),nyear=d.getYear(),nhour=d.getHours(),nmin=d.getMinutes(),nsec=d.getSeconds(),ap; if(nyear<1000) nyear+=1900; if(nmin<=9) nmin="0"+nmin; if(nsec<=9) nsec="0"+nsec; document.getElementById('clockbox').innerHTML=" "+tday[nday]+", "+ndate+" de "+tmonth[nmonth]+" de "+nyear+", "+nhour+":"+nmin+":"+nsec+" "; document.getElementById('clockbox2').innerHTML=" "+tday[nday]+", "+ndate+" de "+tmonth[nmonth]+" de "+nyear+", "+nhour+":"+nmin+":"+nsec+" "; } function GetClockPrint(){ var c=new Date(); var nday=c.getDay(),nmonth=c.getMonth(),ndate=c.getDate(),nyear=c.getYear(),nhour=c.getHours(),nmin=c.getMinutes(),nsec=c.getSeconds(),ap; if(nyear<1000) nyear+=1900; if(nmin<=9) nmin="0"+nmin; if(nsec<=9) nsec="0"+nsec; document.getElementById('clockbox2').innerHTML=" "+tday[nday]+", "+ndate+" de "+tmonth[nmonth]+" de "+nyear+", "+nhour+":"+nmin+":"+nsec+" "; } window.onload=function(){ GetClock(); } And here's the HTML code for the page itself (no PHP code yet) Recomeçar Imprimir esta página Recomeçar Imprimir esta página Please forgive the Portuguese text. I don't know what's wrong here... I want the clock to show on IE and Firefox as normally as it shows on Chrome. Can y…
has comment: http://stackoverflow.com/comment/43529912
has comment: http://stackoverflow.com/comment/43519938
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43404361
has title: JavaScript clock works on Chrome but doesn't work with Firefox or IE
has comment: http://stackoverflow.com/comment/43405342
upvote count: 4
has answer: http://stackoverflow.com/a/27481997

http://stackoverflow.com/q/27556583
has comment: http://stackoverflow.com/comment/43539437
has body: I am able to save text to a div with this code: var request = $.get("http://localhost:36262/wordlist/list.txt"); request.success(function (result) { $('.dic').text(result); }); after I try to grab the text of that div and am unable. I see the text displayed on screen. var words = $('.dic').text(); when I debug I see the variable is empty but on the screen the text has been added.
tagged with: javascript
tagged with: jquery
score: -1
has answer: http://stackoverflow.com/a/27556629
answer count: 2
possible better answer: http://stackoverflow.com/a/27556683
has answer: http://stackoverflow.com/a/27556683
favorite count: 0
has title: cant grab text of div after ajax query
accepted answer: http://stackoverflow.com/a/27556629
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43539371
downvote count: 1
type: Question
upvote count: 0

http://stackoverflow.com/q/27510937
has comment: http://stackoverflow.com/comment/43452047
type: Question
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I am setting up a gallery and wanted to know if there was a more effective or shorter way of setting this up. all the IDs that are being swapped out are called the same apart from a number at the end and excluding the main menu section. I am mainly asking as it wasn't to bad with nine but if I had 200.... well you get the idea. p.s the code works fine just looking for some tips on shortening or optimizing. thanks in advance $("#next_salud").on('click', function() { if($('#Salud_inner01').is(':visible')) { $("#Salud_inner01").fadeOut(1); $("#Salud_inner02").fadeIn(600); } else if($('#Salud_inner02').is(':visible')){ $("#Salud_inner02").fadeOut(1); $("#Salud_inner03").fadeIn(600); } else if($('#Salud_inner03').is(':visible')){ $("#Salud_inner03").fadeOut(1); $("#Salud_inner04").fadeIn(600); } else if($('#Salud_inner04').is(':visible')){ $("#Salud_inner04").fadeOut(1); $("#Salud_inner05").fadeIn(600); } else if($('#Salud_inner05').is(':visible')){ $("#Salud_inner05").fadeOut(1); $("#Salud_inner06").fadeIn(600); } else if($('#Salud_inner06').is(':visible')){ $("#Salud_inner06").fadeOut(1); $("#Salud_inner07").fadeIn(600); } else if($('#Salud_inner07').is(':visible')){ $("#Salud_inner07").fadeOut(1); $("#Salud_inner08").fadeIn(600); } else if($('#Salud_inner08').is(':visible')){ $("#Salud_inner08").fadeOut(1); $("#Salud_inner09").fadeIn(600); } else if($('#Salud_inner09').is(':visible')){ $(".salud_cont_remove").fadeOut(1); $("#prev_salud,#next_salud").fadeOut(1); $("#salud_menu_holder").fadeIn(600); } });
favorite count: 0
has answer: http://stackoverflow.com/a/27511212
has title: jquery if statement abbreviation with multiple else if
has comment: http://stackoverflow.com/comment/43451997
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43452004
score: -5
has comment: http://stackoverflow.com/comment/43452037
downvote count: 5
accepted answer: http://stackoverflow.com/a/27511212

http://stackoverflow.com/comment/43490476
type: Comment
comment on: http://stackoverflow.com/a/27530577
has text: This is the right solution, but gosh, let's extract the `getElementById` from inside the loop, or preferably just make the element another parameter to the function.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43629003
has text: you missed `.` before `overwise`
comment on: http://stackoverflow.com/q/27603343
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27508684
type: UnansweredQuestion
tagged with: node.js
has comment: http://stackoverflow.com/comment/43447705
has answer: http://stackoverflow.com/a/27508913
downvote count: 0
has comment: http://stackoverflow.com/comment/43447439
score: 1
has body: I am trying to run a polished browser game from Github as I was trying out games made with HTML5 and javascript. Here is the link to the game's Github. This was on the npm debug 237 error 404 Not Found 237 error 404 237 error 404 'websocket-server' is not in the npm registry. 237 error 404 You should bug the author to publish it 237 error 404 It was specified as a dependency of 'BrowserQuest' 237 error 404 237 error 404 Note that you can also install from a 237 error 404 tarball, folder, or http url, or git url. 238 error System Windows_NT 6.2.9200 239 error command "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "-d" 240 error cwd D:\Web\hellophaser\BrowserQuest-master 241 error node -v v0.10.33 242 error npm -v 1.4.28 243 error code E404 as for my package.json package.json { "name": "BrowserQuest" , "version": "0.0.1" , "private": false , "dependencies": { "underscore": "&gt;0" , "log": "&gt;0" , "bison": "&gt;0" , "websocket": "&gt;0" , "websocket-server": "&gt;0" , "sanitizer": "&gt;0" , "memcache": "&gt;0" } } Im guessing that the problem is with the underscore module. How do I download it manually? and how do I add it to my project?
type: Question
tagged with: javascript
upvote count: 1
answer count: 1
favorite count: 0
has title: npm cant install dependencies for my project err 404 on logs
has comment: http://stackoverflow.com/comment/43447683
tagged with: npm

http://stackoverflow.com/comment/43473480
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27521286
has text: My locate button as such: Locate
score: 0

http://stackoverflow.com/a/27631145
type: Answer
answers question: http://stackoverflow.com/q/27631055
score: 1
upvote count: 1
has body: You can compare the total number of the checkboxes with the number that's checked and flip slectAll as necessary: $(function () { var sAll = $('input:checkbox[name=slectAll]'), other = $('#group_1 :checkbox'); sAll.on('change', function() { other.prop('checked', this.checked); }); other.on('change', function() { sAll.prop('checked', other.length === other.filter(':checked').length); }); }); $(function () { var sAll = $('input:checkbox[name=slectAll]'), other = $('#group_1 :checkbox'); sAll.on('change', function() { other.prop('checked', this.checked); }); other.on('change', function() { sAll.prop('checked', other.length === other.filter(':checked').length); }); }); Select All
downvote count: 0

http://stackoverflow.com/q/27570877
has body: I would like to have an image on the web page, which will became transparent on mouse hover, but transparent only in some area nearest to mouse pointer, moving that area with the pointer. Simple opacity transition can be easily achieved with CSS: &lt;style type="text/css"&gt; img.transparent { opacity: 1; -webkit-transition: opacity 1s; -moz-transition: opacity 1s; transition: opacity 1s; } img.transparent:hover { opacity: 0; } &lt;/style&gt; &lt;img class="transparent" src="1.jpg"&gt; That makes image nicely disappearing on mouse on and appearing back on mouse out. But what I would like to achieve is the same effect just for some area near the mouse pointer. So that there would be always transparent area under pointer, while it is moving over the image. Is there a way to achieve that with CSS or JS? Thank you!
has comment: http://stackoverflow.com/comment/43567204
has comment: http://stackoverflow.com/comment/43568484
answer count: 2
downvote count: 0
tagged with: mouse-cursor
favorite count: 0
tagged with: transparency
has comment: http://stackoverflow.com/comment/43567224
has comment: http://stackoverflow.com/comment/43632282
has answer: http://stackoverflow.com/a/27574021
tagged with: css
upvote count: 11
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27574021
has answer: http://stackoverflow.com/a/27573113
has comment: http://stackoverflow.com/comment/43569321
score: 11
has title: Changing image opacity with JS or CSS under mouse pointer?
tagged with: opacity
type: Question
has comment: http://stackoverflow.com/comment/43619303
possible better answer: http://stackoverflow.com/a/27573113
tagged with: javascript

http://stackoverflow.com/q/27590382
tagged with: object-persistence
has body: I would like to persist a complex object tree as a string, that can work in a browser or in nodejs. The most obvious thing to do is to use JSON.stringify and JSON.parse - however I just get the values of the strings and numbers and so on, but what kind of object was persisted is not stored, and so cannot be restored. Or rather the values are restored but not the function bindings. What would be the correct way to do persist objects which have method functions in JavaScript?
tagged with: node.js
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/27590607
upvote count: 3
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/43604685
has answer: http://stackoverflow.com/a/27590663
type: Question
possible better answer: http://stackoverflow.com/a/27590607
has title: How should I persist complex objects as strings in javascript
has comment: http://stackoverflow.com/comment/43604941
has comment: http://stackoverflow.com/comment/43609320
tagged with: javascript
answer count: 2
downvote count: 0
accepted answer: http://stackoverflow.com/a/27590663
favorite count: 0
has comment: http://stackoverflow.com/comment/43604720

http://stackoverflow.com/comment/43909468
has text: You can test with my example link in Firefox, Chrome.. Problem is only in IE
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27593117
type: AnswerComment

http://stackoverflow.com/q/27491963
accepted answer: http://stackoverflow.com/a/27492178
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43415558
tagged with: if-statement
tagged with: math
tagged with: javascript
score: -1
type: Question
upvote count: 2
has body: The JavaScript code below is attempting to calculate values associated with right-angled triangles by using the Pythagorean theorem. I'm having a problem with the part detecting various combinations of inputs which is performed prior to executing the calculations. It's just a series of if statements, and they're all very similar, but the last one won't execute. I made a fiddle, in case some of you would like to mess around with the code. Here's the function I'm having trouble with: function drawNumbers() { if(cathetusAKnown) { cathetusA.value = cathetusANumber; } if(cathetusBKnown) { cathetusB.value = cathetusBNumber; } if(hypotenuseKnown) { hypotenuse.value = hypotenuseNumber; } if(angleAKnown) { angleA.value = angleANumber; } if(angleBKnown) { angleB.value = angleBNumber; } } function calculate() { updateNumbers(); //If CathetusA and B are known, calculate the rest if(cathetusAKnown &amp;&amp; cathetusBKnown) { if(!hypotenuseKnown) { calcHypotenuse(); } if(!angleAKnown) { calcAngleA(); } if(!angleBKnown) { calcAngleB(); } } //If CathetusA and the hypotenuse are known, calculate the rest if(cathetusAKnown &amp;&amp; hypotenuseKnown) { if (!cathetusBKnown) { calcCathetusB(); } if(!angleAKnown) { calcAngleA(); } if(!angleBKnown) { calcAngleB(); } } //If CathetusB and the hypotenuse are known, calculate the rest if(cathetusBKnown &amp;&amp; hypotenuseKnown) { if (!cathetusAKnown) { calcCathetusA(); } if(!angleAKnown) { calcAngleA(); } if(!angleBKnown) { calcAngleB(); } } drawNumbers(); }
answer count: 1
tagged with: web
has comment: http://stackoverflow.com/comment/43415610
favorite count: 0
downvote count: 3
has comment: http://stackoverflow.com/comment/43415585
has comment: http://stackoverflow.com/comment/43415746
has title: If statement not being executed/reached
has answer: http://stackoverflow.com/a/27492178

http://stackoverflow.com/q/27515048
type: UnansweredQuestion
tagged with: settimeout
answer count: 0
score: 1
upvote count: 1
tagged with: sleep-mode
type: Question
tagged with: javascript
has body: I have a WPF C# app with a WebBrowser control. The app gets run on three different tablet configurations: Windows 7 with IE9, Windows 8.0 with IE10 (supports connected standby), and Windows 8.1 with IE11 (also supports connected standby). If we let the tablets go to sleep with our app running for an hour or more and then wake them up, on the Windows 8.0 tablet, Javascript timer callbacks no longer get called. Neither already running timers nor new ones work. (I added some logging and Javascript itself still runs - click handlers and the like). The Windows 8.1 tablet and the Windows 7 tablet are both fine in this scenario. I set up a simple test page with just a 1 hour timer and a button to set a short timeout. (This is similar to the app's timeouts). I see the same behaviour on the test page: on the Win8.1 and Win7 tablets, when you wake them up after sleeping for an hour or more, the 1 hour timer callback is called soon after, and the callback from the button's timeout also works. But on the Windows 8.0 tablet, neither of the timer callbacks run. Test page code: Automatic Hour Counter: 0 Manual Counter: 0 Set timer for manual counter If absolutely necessary we may be able to upgrade the Win8.0 devices, but we're hoping to avoid that for a few reasons. Has anyone seen this? Any ideas? Edit: I tried the test page in IE10 on the Win8 tablet. It works fine, so the issue's only occurring with the WebBrowser control. Edit 2: I found a workaround. If I add a setInterval() call with a short timeout, then after the device wakes up the other timer callbacks all work. 15 seconds works, 30 seconds doesn't, and I'm not going to bother to narrow it down further. I'm going to leave the question open instead of posting this as the answer because I still hope someone has a proper solution. :)
has title: WebBrowser control not processing Javascript timers after sleep on Windows 8.0
downvote count: 0
tagged with: webbrowser-control
favorite count: 0

http://stackoverflow.com/a/27533820
has body: "moreLink" is not a variable, just a string. $(".testSpan a").attr("href", moreLink); The above code should work, but you have to set moreLink before.
has comment: http://stackoverflow.com/comment/43496108
accepted answer of: http://stackoverflow.com/q/27533752
answers question: http://stackoverflow.com/q/27533752
type: AcceptedAnswer
score: 0
type: Answer

http://stackoverflow.com/comment/43668243
has text: Removing 'sPaginationType' and useing your script gives me a void table. I'm getting the same json {"sEcho":0,"iTotalRecords":"35036","iTotalDisplayRecords":"1","aaData":"stuff","stuff","stuff","stuff","stuff","stuff","stuff","stuff","stuff","stuff"}
comment on: http://stackoverflow.com/a/27621518
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27560815
linked to: http://stackoverflow.com/q/1694595
has body: I'm posting this because I can't find the same question elsewhere. I'm trying to trigger the default action of an anchor but calling .click() or .trigger('click') in the click handler of another anchor. Like so: HTML: Click Link 2 JS: $(document).ready(function(){ $('#link1').on('click', function(){ $('#link2').click(); $('#link2').trigger('click'); // Neither work }); }); I feel like such a noob but nothing happens on click. Is this something that is blocked for security or accessibility? I do not want to use window.open(); fiddle: http://jsfiddle.net/0hggdkzb/
type: Question
has answer: http://stackoverflow.com/a/27561315
has answer: http://stackoverflow.com/a/27560838
accepted answer: http://stackoverflow.com/a/27560838
score: 3
has answer: http://stackoverflow.com/a/27560994
has comment: http://stackoverflow.com/comment/43547687
has title: Why can't I trigger the default href on another anchor with JS?
upvote count: 3
answer count: 3
linked to: http://stackoverflow.com/q/5577555
has comment: http://stackoverflow.com/comment/43547753
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/27560994
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43547758
downvote count: 0

http://stackoverflow.com/comment/43496756
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27534168
has text: [typeof](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof) is an operator, not a function. You don't need the brackets, they are being ignored. Compare `var a = 1` with `var a = (1)`.

http://stackoverflow.com/a/27523980
has body: Hmm, I still aren't completely sure about this case. I assume that //= require pining is the file that contains the drawStaticPin, right? There are few options that I can see here: First, Put your "call_pining_function" into the requires of application.js Second, If the call_pining_function is defined after jQuery (DOM) is ready, possibly you could tie the function call to that event jQuery(document).ready(function() { drawStaticPin(); }; Third, Ugly but does the job assuming that the code will eventually be loaded while (typeof drawStaticPin === "undefined"); drawStaticPin();
answers question: http://stackoverflow.com/q/27523678
type: Answer
has comment: http://stackoverflow.com/comment/43476835
score: 0

http://stackoverflow.com/q/27599883
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
type: UnansweredQuestion
has body: I tried below code written on developer.apple.com but it throw error says: TypeError: 'undefined' is not a function (evaluating 'myVideo.canPlayType(myTypes[i])') JavaScript Fallback
has comment: http://stackoverflow.com/comment/43652778
tagged with: safari
has title: HTML5 Video: canPlayType() is not working in safari
score: 1
tagged with: html5-video
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/27615456
upvote count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/27629458

http://stackoverflow.com/a/27506779
answers question: http://stackoverflow.com/q/27505036
score: 2
has body: 1. Include jQueryUI Dialog JS : http://jqueryui.com/dialog/ 2. Append class, data-title attribute to your a link elemenets. HTML: post 23 post 24 3. Javascript: $(".alink").click(function () { var dialog = $(' ').dialog({ autoOpen: false, hide: 'fade', show: 'fade', open: function (event, ui) { $.ajax({ url: $(this).attr('href'), cache: false, success: function (html) { $(dialog).html(html); }, error: function () { $(dialog).remove(); alert("Some Error MSG"); } }); }, close: function () { $(dialog).remove(); }, resizable: false, width: 500, modal: true }); }); Now, Eachtime when you click on your link, a popup will open with fade effect, the title of dialog will come from your data-title attribute, and the dialog will get html from your post.
downvote count: 0
upvote count: 2
type: Answer

http://stackoverflow.com/comment/43659714
comment on: http://stackoverflow.com/a/27619235
score: 0
type: AnswerComment
type: Comment
has text: For the div, I understand the logic. However in my app, the data-test attribute can be on different elements (h1, p, ...)

http://stackoverflow.com/comment/43497800
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27534632
has text: *"parseFloat('mom') is NaN, so +'mom' is also NaN."* Rather *"Number('mom') is NaN, so +'mom' is also NaN."* Because `parseFloat('5foo')` is `5`, but `+'5foo'` is still `NaN`.
score: 4

http://stackoverflow.com/a/27613892
has comment: http://stackoverflow.com/comment/43670093
has comment: http://stackoverflow.com/comment/43670410
has comment: http://stackoverflow.com/comment/43649874
score: 0
has comment: http://stackoverflow.com/comment/43670273
type: Answer
has comment: http://stackoverflow.com/comment/43670188
has comment: http://stackoverflow.com/comment/43669560
answers question: http://stackoverflow.com/q/27613730
has body: I made a pen with code that worked: http://codepen.io/KK4OXJ/pen/Eagjax/ Basically, you can't fade something in that's hidden with CSS, so we need this: $('#teamalpha div').hide(); to hide it, instead of using CSS to hide it. It needs to go right before the mousover thing, and we also need to remove the display: none; line in the CSS. I hope this helps :)

http://stackoverflow.com/a/27585251
has body: You typo-ed, column should be columns data: { columns: [ // &lt;- There is an S on column ['data1', 40, 300, 200, 500, 250, 350], ['data2', 60, 30, 20, 50, 55, 35] ] }
score: 5
type: Answer
upvote count: 5
downvote count: 0
answers question: http://stackoverflow.com/q/27585091

http://stackoverflow.com/a/27520971
upvote count: 2
downvote count: 0
answers question: http://stackoverflow.com/q/27520851
has comment: http://stackoverflow.com/comment/43472386
has comment: http://stackoverflow.com/comment/43471791
has body: You can do $(document).ready(function() { var array = [00, 05, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55]; test(32) test(4) test(100) test(47) test(45) function test(num) { log(num + ' --&gt; ' + closest(num, array)); // display output here } function closest(num, arr) { var curr = Infinity; for (var i = 0; i &lt; arr.length; i++) { if (arr[i] &gt;= num &amp;&amp; curr &gt; arr[i]) { curr = arr[i] } } curr = (curr &gt;= 10) ? curr : '0' + curr; //If result is 5, to display '05' instead of '5' return curr; } }); var log = (function() { var $log = $('#log'); return function(msg) { $('&lt;p/&gt;', { text: msg }).prependTo($log) } })(); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; &lt;div id="log"&gt;&lt;/div&gt;
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/43552367
has comment: http://stackoverflow.com/comment/43552096
has comment: http://stackoverflow.com/comment/43471674
has comment: http://stackoverflow.com/comment/43471285

http://stackoverflow.com/comment/43466964
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27505683
type: Comment
has text: Ok. But is the service running when you are testing? Have you tested your service using WCFTestclient? http://msdn.microsoft.com/en-us/library/bb552364(v=vs.110).aspx. Also Jquery variable url and your local variable seems to be same. Can you please rename your local variable and try?

http://stackoverflow.com/q/27624779
has answer: http://stackoverflow.com/a/27626832
score: 2
type: AnsweredQuestion
downvote count: 0
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/43674009
tagged with: highcharts
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/43674062
accepted answer: http://stackoverflow.com/a/27626832
has title: Highcharts don't hide categories labels on overflow
has comment: http://stackoverflow.com/comment/43674098
has body: I'm using bar chart with Highcharts 4.0.4. When categories labels are to close to each other half of them disappear. I want to disable this behaviour because there is plenty of space. I've tried to search Highcharts documentations with: overflow, crop, clip, hide and so on. Nothing seems to fit in. Examples: height: 260px; http://jsfiddle.net/t1wtLLnc/3/ height: 230px; http://jsfiddle.net/t1wtLLnc/2/ As you can see in second example only 5 of 10 categories are shown.
has comment: http://stackoverflow.com/comment/43670612

http://stackoverflow.com/comment/43667170
has text: @MathijsSegers They're two columns, and it seems their height is dependent on each other; CSS as a rule tends not to allow formatting dependency on previous elements. That said, solving this with JS tends to have risks too.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27623288

http://stackoverflow.com/comment/43456705
comment on: http://stackoverflow.com/q/27512629
score: 0
has text: 'code'var myRegExp = /dog/; var myTextInput = event.value; event.rc = true; if (myTextInput != myRegExp) { app.alert("It's a regex why do I need to input '/dog/'! and not just dog"); } 'code'
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43439981
score: 0
type: Comment
type: QuestionComment
has text: which technology at serverside?
comment on: http://stackoverflow.com/q/27504668

http://stackoverflow.com/q/27490104
upvote count: 2
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/27785060
has title: Trouble hiding/showing inline SVG in mobile Safari
tagged with: mobile
downvote count: 0
tagged with: ios
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: css
has comment: http://stackoverflow.com/comment/59500900
has body: I'm trying to use inline SVG for our icons. Specifically I am: Combining all svg's into an svg sprite with grunt Referencing them inline with the &lt;use&gt; tag ala this article For the most part things are working well. However, I've run into problems on iOS browsers when I try to hide/show them with JS - http://codepen.io/meanspa/pen/vEGERZ $('.expand-link').click(function(){ $('.expand-link').toggleClass('clicked'); }); Because for this codepen the SVG definitions are in the DOM it works fine as-is, but if you move them to an external file and try to use it in mobile Safari, the SVG that's hidden originally (.icon-contract) won't display when you click on it. In fact, the only way I've found to make this work is to set .icon-contract to display:block initially, and then set a delay in JS so that it hides it after a few hundred milliseconds. So just to summarize, it looks like in mobile Safari: If you're using the &lt;use&gt; tag to reference svg's in an external file And if some of those are display:none when the page loads Then they can't be displayed with JS after the fact Has anybody else run into this problem? Thanks. Update: As Salmonface pointed out, only noticing this on iOS 7 and older, looks like it's fixed in newer versions.
score: 2
tagged with: http://stackoverflow.com/tag/svg

http://stackoverflow.com/comment/43409328
comment on: http://stackoverflow.com/q/27488887
has text: Please list only the code that is relevant to your issue. You will get better answers and most likely get them quicker.
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/q/27638233
type: UnansweredQuestion
tagged with: html5-history
score: 1
has title: html5 history API handling urls that does not exist
tagged with: browser-history
type: Question
has body: I'm building a web app that makes use of jquery. For example, when I press a button, all the html in a particular on front page gets cleared and that div is populated with new contents using jquery. I want this "state" to be represented by a different url. I think the following will achieve the result: history.pushState(null, null, "newdiv"); My questions are twofold: There is no resource named "newdiv". The user should be able to achieve the same results as clicking the button (repopulate the div) when he copy pastes the "../newdiv" link on another tab. Usually this gives an error 404 file not found. This should involve calling all the jquery e.t.c. Any examples as to how to do this? Once the new div is populated, the user should be able to go back to the previous state using the back button on the browser. The problem is that the original front page (original div) itself was created using jquery. I read the using "history.popstate()" would achieve this. However, as I am planning to keep separate history for many such jquery calls, I cannot simply redo whatever jquery needs to be done on the original div using history.popstate() For example: window.addEventListener('popstate', function(){ //all the jquery needed to reproduce the original div }); is not desirable because pressing the back button from any state (suppose the user have to fill in a multi-stage form and he presses the back button to get the previous form) in my web app would result in the front page. Is there any way to do these? Parsing the request url in the servlet and redirecting based on that seems possible but sounds like too much work. Just wanted to check before I did something like that.
upvote count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 0

http://stackoverflow.com/q/27562176
has answer: http://stackoverflow.com/a/27591474
accepted answer: http://stackoverflow.com/a/27591474
type: Question
type: AnsweredQuestion
answer count: 1
tagged with: javascript
tagged with: kendo-ui
score: 0
has body: How change navigator selection from api? Tried: var chart = $("#stock-chart").data('kendoStockChart'), select = chart.options.navigator.select; select.from = '2010/01/01'; select.to = '2012/01/01'; chart.refresh(); Example JsFiddle
has title: Kendo UI stock chart navigator api

http://stackoverflow.com/a/27566521
has comment: http://stackoverflow.com/comment/43558027
has comment: http://stackoverflow.com/comment/43558363
has comment: http://stackoverflow.com/comment/43557941
has comment: http://stackoverflow.com/comment/43558017
has comment: http://stackoverflow.com/comment/43559041
score: 0
has comment: http://stackoverflow.com/comment/43558241
has comment: http://stackoverflow.com/comment/43558150
answers question: http://stackoverflow.com/q/27566231
has body: Try it like that way...It will Surely Resolve your issue. $( "tr td:nth-child(5n)" ).each(function() { $(this).append( "HTML" );} ); OR $( "tr td:nth-child(5n)" ).append( "HTML" );
has comment: http://stackoverflow.com/comment/43560565
type: Answer

http://stackoverflow.com/q/27521037
has answer: http://stackoverflow.com/a/27521092
favorite count: 0
has body: I am trying to add few items to a list box from a text box using javascript. but the problem is as soon as I am adding the items, it gets visible in the list box for a second and then gets deleted. Any solution for this? I am adding items from TextBox4 to ListBox1 function AddToList() { // Create an Option object var opt = document.createElement("option"); // Add an Option object to List Box document.getElementById("ListBox1").options.add(opt); opt.text = document.getElementById("TextBox4").value; opt.value = document.getElementById("TextBox4").value; document.getElementById("ListBox1").options.add(opt); }
possible better answer: http://stackoverflow.com/a/27521092
has title: Add items to listbox using javascript
type: AnsweredQuestion
upvote count: 3
has answer: http://stackoverflow.com/a/28105518
type: Question
score: 3
tagged with: javascript
answer count: 2
accepted answer: http://stackoverflow.com/a/28105518
downvote count: 0

http://stackoverflow.com/comment/43559039
type: QuestionComment
has text: You need to wait for the element's `onload` event to fire and then ask the element's `width`
score: 0
comment on: http://stackoverflow.com/q/27567035
type: Comment

http://stackoverflow.com/comment/140206991
type: AnswerComment
score: 0
type: Comment
has text: It still doesn't work correctly on iOS in 2025. If you view the 3rd and 4th data list examples here showing a list of countries it only shows the codes and not the country names making it impossible to know what option is what: https://codepen.io/SitePoint/pen/jOVqGaJ - it works fine in other browsers/systems. I have to use JS to replace searchable data lists with standard selects like I used to have to do with IE.
comment on: http://stackoverflow.com/a/55541258

http://stackoverflow.com/a/28999740
answers question: http://stackoverflow.com/q/27617957
has body: If you need help mocking jQuery ajax calls check this question: How do I verify jQuery AJAX events with Jasmine? It helped me.
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/50745109

http://stackoverflow.com/q/27564741
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27564962
tagged with: scroll
type: Question
possible better answer: http://stackoverflow.com/a/27564969
has title: Why isn't this 'scroll to top' button code working?
has answer: http://stackoverflow.com/a/27564969
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27564962
score: 0
answer count: 2
has body: I coded this "scrollToTop" button, so that when users scroll down, a button shows up that when clicked scrolls the page to the top. But for some reason it's not working. There are no syntax errors being reported to the console... Problem: What I see right now is, the css should be fine, because if I remove the display:none; the styling is all correct and the button shows in the right place, but the problem is, when I do scroll the page down, the button doesn't show, which means the javascript is not applying the fadeIn(); thing, but I do not know why... HTML &lt;a href="#" class="scrollToTop"&gt;&lt;/a&gt; CSS .scrollToTop{ width:75px; height:75px; padding:10px; text-align:center; text-decoration: none; position:fixed; top:100px; right:40px; opacity:0.5; display:none; background: url('images/scroll_up.png') no-repeat 0px 0px; background-size: 75px 75px; -webkit-transition: all 0.3s; /* For Safari 3.1 to 6.0 */ transition: all 0.3s; } .scrollToTop:hover{ text-decoration:none; top:90px; -webkit-transition: all 0.3s; /* For Safari 3.1 to 6.0 */ transition: all 0.3s; } JavaScript/jQuery $(document).ready(function(){ //Check to see if the window is at the top, if not, then display scroll up button if ($(this).scrollTop() &gt; 100) { $('.scrollToTop').fadeIn(); } else { $('.scrollToTop').fadeOut(); } //Click event to scroll up to top $('.scrollToTop').click(function(){ $('html, body').animate({scrollTop : 0},750); return false; }); });
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/43842740
type: Comment
comment on: http://stackoverflow.com/q/27634331
score: 0
has text: Look from **Cleaned Source Code** .
type: QuestionComment

http://stackoverflow.com/comment/43687993
type: Comment
comment on: http://stackoverflow.com/q/27633426
has text: @charlietfl Actually that one is customizing the toolbar button.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/43696323
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27638634
type: Comment
has text: It works on both Chrome 39.0.2171, as well as Firefox 34.0.5. I have checked it. Refer to the updated section.

http://stackoverflow.com/comment/43439043
has text: Hey, i am sorry, because I did not provide enough information about the system I am using your answer does not work for me. I have updated my question. Thanks for your suggestion and effort, I really appreciate this!
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27494884
type: Comment

http://stackoverflow.com/comment/43437491
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27503696
has text: you mean that everything you want is displayed, but with also an undefined ? nothing missing ?
score: 0

http://stackoverflow.com/comment/43528553
score: 0
type: Comment
has text: the client's name prints onto the screen when it doesn't find a record, i.e. it says client name 'Adam Price' not found....so it's going through the query, is that what you mean? Please forgive me I am lost!!
comment on: http://stackoverflow.com/a/27549910
type: AnswerComment

http://stackoverflow.com/q/27478541
answer count: 0
tagged with: java
downvote count: 1
type: Question
tagged with: jsoup
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43395039
has title: How to get the names of files in a folder on your server, and put them into an html list
score: 0
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has body: I have tried looking a few times on Google and didn't really find any answer, so I'm hoping I can get some help here. I am trying to get the contents of a user's folder and display it within an html list. So for example if I have some folder on my server named "Names" and within this folder were 5 different names. I want to take those names, and display them in a list. I originally was accomplishing this task by using http://jsoup.org/ I would go to the folder based on the username they logged in with, grab the data, and display it in a list using JSTL. &lt;c:forEach items="${url.PNV}" var="l" varStatus="stat4"&gt; &lt;li&gt; &lt;a href="#"&gt;${l}&lt;/a&gt; &lt;/li&gt; &lt;/c:forEach&gt; UrlReader.java public class URLReader implements Serializable { private List&lt;String&gt; list = new ArrayList&lt;String&gt;(); private String url = ""; public URLReader() throws IOException { Document doc = Jsoup.connect(url).get(); Elements links = doc.select("a[href]"); for (Element link : links) { if (link.text().contains(".txt")) { list.add(link.text()); } } } } However I have changed my approach and am not using java on my server currently, so I wanted to know if there was another way to do this using JS, Jquery or w/e. If there isn't an easier way, or no other known way, then I will just do with what I have. Thank you all!
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43407729

http://stackoverflow.com/comment/43412479
type: AnswerComment
has text: Thank you for your time. What for I need them I described in details here http://codereview.stackexchange.com/questions/73697/binding-model-to-view
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27490274

http://stackoverflow.com/comment/43457327
comment on: http://stackoverflow.com/q/27513468
score: 0
has text: You can replace "()" with "[]" and "=" with ":" and you will get a JSON object
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27515021
type: Question
upvote count: 2
has answer: http://stackoverflow.com/a/27515284
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/43460616
favorite count: 0
tagged with: regex
has comment: http://stackoverflow.com/comment/43463849
has comment: http://stackoverflow.com/comment/43460809
has body: I am a using DataAnnotation to validate AlphaNumeric characters in MVC for a text box. It works fine, but when I enter ' ' in my text box it doesn't work. [RegularExpression("^([a-zA-Z0-9 .&'-]+)$", ErrorMessage="Illegal character found in name. Please enter a valid name")] public string Name { get; set; } the below is my view code @Html.Raw(Html.TextBoxFor(p => p.Name, new { @class = "k-textbox", @style = "width:400px" })) @Html.Raw(Html.ValidationMessageFor(p => p.Name)) some assistance can be helpful
type: UnansweredQuestion
downvote count: 1
has comment: http://stackoverflow.com/comment/43463533
tagged with: model-view-controller
tagged with: c#
has answer: http://stackoverflow.com/a/27516650
has title: Validating Alphanumeric in MVC
score: 1
has comment: http://stackoverflow.com/comment/43461033

http://stackoverflow.com/a/27476584
score: 5
upvote count: 5
downvote count: 0
answers question: http://stackoverflow.com/q/27476443
type: Answer
has body: It seems somewhere you are using $locationProvider without the $ prefix locationProvider. Can you check.

http://stackoverflow.com/comment/43388834
type: QuestionComment
type: Comment
has text: Display it where? In the alert?
comment on: http://stackoverflow.com/q/27477397
score: 0

http://stackoverflow.com/comment/43654166
type: AnswerComment
has text: did you go through the attached link ??
type: Comment
comment on: http://stackoverflow.com/a/27615529
score: 0

http://stackoverflow.com/comment/80693555
type: AnswerComment
score: 0
type: Comment
has text: This answer does not meet the requirement of the OP. The required format is dd-Mon-yyyy not dd-MM-yyyy
comment on: http://stackoverflow.com/a/44129371

http://stackoverflow.com/comment/43709878
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27641648
type: Comment
has text: YES! Toda! I now understand the concept of using an absolute position within a relative position! :)

http://stackoverflow.com/comment/43619044
type: QuestionComment
has text: @ Milind But it is not working.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27597726

http://stackoverflow.com/comment/43609422
score: 0
type: AnswerComment
type: Comment
has text: but function outputs undefiend and i dont know why ng reapeat works just fine
comment on: http://stackoverflow.com/a/27592896

http://stackoverflow.com/comment/43454964
type: Comment
has text: Just what I was about to write, this is the correct way to go.
comment on: http://stackoverflow.com/a/27512364
score: 0
type: AnswerComment

http://stackoverflow.com/a/47984363
type: Answer
answers question: http://stackoverflow.com/q/27564811
has body: I didn't figure out exactly why you can't replace it with "SOMETHING", because I don't know what the htmlContent variable holds. My guess is that the content that CKEditor generates may contain some white spaces you didn't expect. In that case, you may need to use Regular Expression, like: var replaceString = /&lt;div\s*style="page-break-after:\s*always"&gt;\s*&lt;span\s*style="display:none"&gt;\s*&lt;\/span&gt;\s*&lt;\/div&gt;/; // \s* represents 0 or more white spaces I made an example on JSFiddle. Check it out. https://jsfiddle.net/itanaka/sdbnn76h/4/
score: 0

http://stackoverflow.com/a/27503230
score: 1
has comment: http://stackoverflow.com/comment/43436599
has comment: http://stackoverflow.com/comment/43437373
answers question: http://stackoverflow.com/q/27503090
has comment: http://stackoverflow.com/comment/43436548
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27503090
type: AcceptedAnswer
has body: Demo html &lt;section&gt; &lt;span class="tooltip"&gt;&lt;/span&gt; &lt;!-- Tooltip --&gt; &lt;div id="slider"&gt;&lt;/div&gt; &lt;!-- the Slider --&gt; &lt;span class="volume"&gt;&lt;/span&gt; &lt;!-- Volume --&gt; &lt;/section&gt; jquery $(function () { //Store frequently elements in variables var slider = $('#slider'), tooltip = $('.tooltip'); //Hide the Tooltip at first tooltip.hide(); //Call the Slider slider.slider({ //Config range: "min", min: 1, value: 1, start: function (event, ui) { tooltip.fadeIn('fast'); }, change: function (event, ui) { var value = slider.slider('value'); setVolumeImage(value); }, //Slider Event slide: function (event, ui) { //When the slider is sliding var value = slider.slider('value'); setVolumeImage(value); tooltip.css('left', value).text(ui.value); //Adjust the tooltip accordingly }, stop: function (event, ui) { tooltip.fadeOut('fast'); } }); function setVolumeImage(value) { volume = $('.volume'); if (value &lt;= 5) { volume.css('background-position', '0 0'); $(".ui-slider-range.ui-widget-header.ui-slider-range-min").css('background', 'green'); } else if (value &lt;= 25) { volume.css('background-position', '0 -25px'); $(".ui-slider-range.ui-widget-header.ui-slider-range-min").css('background', 'yellow'); } else if (value &lt;= 75) { volume.css('background-position', '0 -50px'); $(".ui-slider-range.ui-widget-header.ui-slider-range-min").css('background', 'orange'); } else { volume.css('background-position', '0 -75px'); $(".ui-slider-range.ui-widget-header.ui-slider-range-min").css('background', 'red'); } } });
has comment: http://stackoverflow.com/comment/43437283
has comment: http://stackoverflow.com/comment/43437155
type: Answer
downvote count: 0

http://stackoverflow.com/comment/43623190
type: Comment
comment on: http://stackoverflow.com/q/27600113
type: QuestionComment
score: 4
has text: Look into event bubbling / propagation. http://jsfiddle.net/8mzmjn0z/6/

http://stackoverflow.com/a/27661886
answers question: http://stackoverflow.com/q/27621798
upvote count: 1
type: Answer
downvote count: 0
score: 1
has body: With Record Heap Allocation profile type you can get the information about allocated objects. You need to enable "Record heap allocation stack traces" option in the DevTools settings. See screenshot. After that you need to record "Record heap allocations" snapshot type. The recording process may significantly slow down the page because DevTools scans the js stack each time when the page allocates an object. As a result you will get the snapshot which has the information about allocations. In many cases DevTools can detect the class name of the objects. See screenshot. In the snapshot you need to select Allocation view. I think the information in the grid could help you to solve your problem. In the screenshot you can see that there were 41k allocations for a class but only 12k of them still alive. So 29k objects were the garbage. And even if you don't see the name of the object you could jump into sources where the objects were allocated.

http://stackoverflow.com/a/27575065
has comment: http://stackoverflow.com/comment/43635632
answers question: http://stackoverflow.com/q/27548737
has comment: http://stackoverflow.com/comment/43671567
upvote count: 2
has comment: http://stackoverflow.com/comment/43642301
has body: $("#inpDatePicker").val() will return an object with start and end. You can listen to your $("#inpDatePicker")'s change event to see when to get the values. $("#inpDatePicker").daterangepicker({ onChange: function() { StartDate = $("#inpDatePicker").val().start; EndDate = $("#inpDatePicker").val().end; } }
downvote count: 0
has comment: http://stackoverflow.com/comment/43607870
type: Answer
has comment: http://stackoverflow.com/comment/43640150
score: 2
has comment: http://stackoverflow.com/comment/43641801
has comment: http://stackoverflow.com/comment/43637072
has comment: http://stackoverflow.com/comment/43671151

http://stackoverflow.com/q/27563375
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43552457
has comment: http://stackoverflow.com/comment/43552594
accepted answer: http://stackoverflow.com/a/27563484
type: Question
has comment: http://stackoverflow.com/comment/43552611
linked to: http://stackoverflow.com/q/500431
possible better answer: http://stackoverflow.com/a/27563813
has answer: http://stackoverflow.com/a/27563813
tagged with: javascript
has body: I'm trying to create a feature that allows an empty div code snippet to be placed on the page and then for that to be replaced with more complicated markup with Javascript. The problem is that when there are more than one of these empty divs on the page it only displays one and the one it uses seems to be random. I think there is an issue with the loop. I'm using data attributes on the div to store the database id of the required row. &lt;div data-foo="25"&gt;&lt;/div&gt; There can be any number of these on a page so the javascript needs to search for any element with a 'data-foo' attribute and then loop through them. The information is retrieved from the database and the output generated with a php file. This is returned to the javascript and replaces the empty div with the same data-foo id. Javascritp/jQuery var profiles = document.querySelectorAll('[data-foo]'); // console.log(profiles); if(profiles.length) { for(var i = 0; i &lt; profiles.length; i++) { var profileId = profiles[i].dataset.foo; // console.log('[data-foo="' + profileId +'"]'); $.ajax({ url: '/file/path/profile.php', data: { profile: profiles[i].dataset.foo }, type: 'get', success: function(response) { $('[data-foo="' + profileId + '"]').replaceWith(response); } }); } } PHP The php runs for each id found by the js, using the loop above but I'm guessing only one is being output because the loop finishes before displaying it on the page? if(isset($_GET['profile'])) { try { $sth = $dbh -&gt; prepare("SELECT * FROM profiles WHERE id = :profile"); $sth -&gt; bindParam(':profile', $_GET['profile'], PDO::PARAM_INT); $sth -&gt; execute(); } catch(PDOException $e) { pdo_caught($e); } $result = $sth -&gt; fetch(PDO::FETCH_ASSOC); } if(!empty($result)) { echo '&lt;div class="profile"&gt; &lt;img src="/img/'.$result["picture"].'" alt="'.$result['name'].'"&gt; &lt;h3&gt;'.$result["name"].'&lt;/h3&gt; &lt;p&gt;'.$result["quote"].'&lt;/p&gt; &lt;/div&gt;'; }
score: 0
answer count: 3
has title: Replacing multiple empty divs on page with jQuery/AJAX generated markup
has answer: http://stackoverflow.com/a/27563922
tagged with: jquery
has answer: http://stackoverflow.com/a/27563484

http://stackoverflow.com/q/27636472
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/43692356
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27636888
tagged with: http://stackoverflow.com/tag/html
upvote count: 4
downvote count: 0
has comment: http://stackoverflow.com/comment/43693231
has title: How to update ng-option value dynamically with another ng-option selected value?
has answer: http://stackoverflow.com/a/27637362
type: Question
tagged with: javascript
has body: I have 2 select option box in my app. First select option box contains the name of Countries. I want to update second select option box value with respect to value selected in first select box. For example, If I select India, than second select box value should contain all states of India. Similar for other countries also but I am not able to do so. Code: Select Country selectedItem: Select state selectedItem: JS: $scope.country = [ "India", "America", "Nepal", "China" ]; $scope.India = ["Bihar"]; $scope.America = ["Arizona"]; $scope.China = ["Beging"]; $scope.Nepal = ["Dhankuta"];
score: 4
linked to: http://stackoverflow.com/q/16991960
has answer: http://stackoverflow.com/a/27636761
has comment: http://stackoverflow.com/comment/43692495
answer count: 3

http://stackoverflow.com/q/27607179
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27607361
has answer: http://stackoverflow.com/a/27624892
upvote count: 2
has comment: http://stackoverflow.com/comment/43636717
has title: Construct a circle of nested squares
type: Question
possible better answer: http://stackoverflow.com/a/27607361
tagged with: math
has body: I want to construct a circle of nested squares like this: In the moment, I am programming in JavaScript/HTML5 canvas. This is my code: Circle of squares Canvas not supported... But because I don't have a formula for the solution, I use a while-loop to get closer and closer to the solution (until it has reached zero because of float-inaccuracy), that's why it's quite slow. So, what formula can be used to calculate the width of the next square inside the (thought) circle and, if necessary, how could the code be optimized elsewhere?
accepted answer: http://stackoverflow.com/a/27624892
answer count: 2
tagged with: canvas
downvote count: 0

http://stackoverflow.com/comment/43590055
has text: @JoeSamanek this solution doesn't appear to work when applied to the plnkr. It displays that the original value is a duplicate, but doesn't update when the input changes. Admittedly i might be missing something, as i think the original posted plnkr may have been different, so maybe it worked with that? - http://plnkr.co/edit/ZK4CQfFqxFXgxdAHdFkY?p=preview
type: Comment
comment on: http://stackoverflow.com/a/27563770
type: AnswerComment
score: 0

http://stackoverflow.com/comment/43538817
score: 0
type: AnswerComment
has text: Still, partial name matches are returned (Johnathon matching John) -- although that _could_ be the intended behavior the OP is looking for.
type: Comment
comment on: http://stackoverflow.com/a/27556269

http://stackoverflow.com/comment/43515832
type: Comment
has text: Thanks for your answer, but still as the result it is only one input tag even if I have 4 iteration and without text as the value.
comment on: http://stackoverflow.com/a/27544360
score: 0
type: AnswerComment

http://stackoverflow.com/a/52521705
downvote count: 0
answers question: http://stackoverflow.com/q/27514404
upvote count: 1
type: Answer
has body: I'm having the same issue, with a Web Worker that performs a sort of a keep-alive: it periodically pings the server, to inform that the page is still alive. I'm also using console.log in the worker, but i'm sure this is not the cause. After some investigations, I can state that the problem can address two different situations: a long-time UI operation is blocking main thread and worker's requests are not executed. This is the case of sample illustrated by heliotrope. As of September 2018, the problem occurs only on Firefox and IE, since Chrome and Edge can correctly handle activities on worker when the main thread is blocked. To solve this issue, I'm thinking at sending a special ping to the server before starting any long-time operation, to inform that he won't receive anything from me, until the operation is finished. a long-time asynchronous ajax call is being performed by main thread and worker's requests are queued. Some setting on the server is preventing from multiple ajax calls to run in parallel: other requests are queued until the first ajax call completes. The problem is server-specific, hence it does not depend on any browser in particular. This problem is, in my case, due to ASP.NET session state locking: the ASP.NET pipeline will not process requests belonging to the same session concurrently but queues them, and executes them serially. Here is a detailed link: http://tech-journals.com/jonow/2011/10/22/the-downsides-of-asp-net-session-state. Marking controller's session state as ReadOnly will solve the problem, while completely disabling session state in Web.config (&lt;sessionState mode="Off" /&gt;) will seriously improve performance of the whole application.
score: 1

http://stackoverflow.com/q/27534805
has answer: http://stackoverflow.com/a/27534851
has comment: http://stackoverflow.com/comment/43498164
has answer: http://stackoverflow.com/a/27534993
favorite count: 0
has body: var winning = [ [0, 1, 2], [3, 4, 5], [6, 7, 8], [0, 3, 6], [1, 4, 7], [2, 5, 8], [0, 4, 8], [2, 4, 6] ]; //this are all the possible ways to win function checkwin (box) { for (var i = 0; i &lt; winning.length; i++) { if (document.getElementById(box + winning[i][0]).innerHTML &amp;&amp; document.getElementById(box + winning[i][1]).innerHTML &amp;&amp; document.getElementById(box + winning[i][2]).innerHTML);{ alert(innerHTML + 'won') } } } I was attempting to loop through each box to check for a winner I used a for loop to create the boxes and had to use box.id = 'box' + i to give each box an id which are the numbers.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43497995
score: -1
has title: Determining who won in a JavaScript tic-tac-toe game
has comment: http://stackoverflow.com/comment/43498110
tagged with: tic-tac-toe
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/43498098
tagged with: javascript
answer count: 2
upvote count: 0

http://stackoverflow.com/comment/43642527
has text: I have seen that, but those (the top video, with the clickable captions) are more like popups/annotations. I would like subtitles like the ones seen in the lower video, but at the same time being able to click on them (not as a hyperlink)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27609592

http://stackoverflow.com/q/27526411
tagged with: forms
type: Question
tagged with: c#
has comment: http://stackoverflow.com/comment/43482394
tagged with: javascript
tagged with: post
has title: Javascript send an input as array to a C# WebAPI
answer count: 2
has answer: http://stackoverflow.com/a/27544550
has answer: http://stackoverflow.com/a/42292882
possible better answer: http://stackoverflow.com/a/42292882
has comment: http://stackoverflow.com/comment/43481773
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43482256
accepted answer: http://stackoverflow.com/a/27544550
has body: -------------------------EDIT-------------------------------- It's not a duplicate because I can't use an ajax Request, as asked on this question. I'm creating a form in javascript to call a c# WebApi that will return a xls file (that's why I'm creating a form and not an ajax call). The webApi must receive an array of integer, that will correspond to a list of ids of objects. The webApi is the following [Route("getExcel")] [HttpPost] public HttpResponseMessage getExcel([FromBody]int[] ids) { ... } the form I'm building is like this: var form = document.createElement("form"); form.setAttribute('method', "post"); setAttribute('action', baseUrl + "api/processos/getExcel"); form.setAttribute('target', "_blank"); var rows = $("#tbl").dataTable().fnGetNodes(); var arr = []; for (var i = 0; i &lt; rows.length; i++) { ids = $("#tbl").dataTable().fnGetData(i).processosId; var input = document.createElement("input"); input.setAttribute('type', "text"); input.setAttribute('name', "ids[]"); input.setAttribute('value', ids); form.appendChild(input); } document.body.appendChild(form); form.submit(); The ids on the WebApi is empty (but not null)... When watching on Fiddler, the Raw View shows this ids=15&amp;ids=14&amp;ids=13&amp;ids=12&amp;ids=11 which is exactly what I need... Why isn't associating with the WebApi ids ? If I send that exact values in the URL (and changing the [FromBody] to [FromUri] it works... -------------------EDIT------------------------------ this is what is in the array ids on the WebApi when the method is called: ids {int[0]} (as seen while debugging)
linked to: http://stackoverflow.com/q/14208888
score: 0

http://stackoverflow.com/comment/43492508
score: 0
has text: @RokoC.Buljan I updated to be display: none; instead. Thanks.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27531890

http://stackoverflow.com/q/27610184
downvote count: 0
linked to: http://stackoverflow.com/q/26064533
favorite count: 0
type: UnansweredQuestion
upvote count: 1
has body: I'm following along the ReactJS tutorial for creating a Comments section (found here). Everything seems to be working fine except for creating new comments. When I send the POST request by submitting the new comment, the server (Python's SimpleHTTPServer) returns 501: Unsupported method ('POST') Here is the ajax call: handleCommentSubmit: function(comment) { $.ajax({ url: this.props.url, dataType: 'json', type: 'POST', data: JSON.stringify(comment), success: function(data) { console.log("Successful POST to" + this.props.url); this.setState({data: data}); }.bind(this), error: function(xhr, status, err) { console.error(this.props.url, status, err.toString()); }.bind(this) }); } I've been debugging the app for a while and I know the handler is getting called. Firefox's console prints the error message and I've stepped through it with the debugger.
has comment: http://stackoverflow.com/comment/43643414
linked to: http://stackoverflow.com/q/15876926
answer count: 0
score: 1
tagged with: http://stackoverflow.com/tag/json
tagged with: post
type: Question
has title: POST JSON data to file return 501 Unsupported
tagged with: reactjs
tagged with: javascript
tagged with: ajax
has comment: http://stackoverflow.com/comment/43643457
has comment: http://stackoverflow.com/comment/43661118

http://stackoverflow.com/a/43252836
score: 0
type: Answer
has body: $('button').click(function() { var id= 'd' + $(this).text().replace('Background ',''); $('#d1, #d2, #d3').each(function() { $(this).animate({ opacity: this.id===id ? 1 : 0 }); }); }); button { position: relative; } #d1, #d2, #d3 { position: fixed; left: 0px; right: 0px; top: 0px; bottom: 0px; } #d1 { background-image: url("http://images-1.gog.com/23382bd5e4e5deb7036d68e04286120df2a1d424881fcafb21ecd2c9a5c24ab5_bg_1920.jpg"); } #d2 { background-image: url("http://images-2.gog.com/a88f5d7a5161fb204d2f78adf14eea73e03dde54eb8ab516e50b077dcbb72cba_bg_1920.jpg"); } #d3 { background-image: url("http://images-3.gog.com/ab956772ba01063aadfb8cda56d2e9ed3a6e0abd1534ce94b5f3a524e085656f_bg_1920.jpg"); } Background 1 Background 2 Background 3
answers question: http://stackoverflow.com/q/27573807

http://stackoverflow.com/comment/43643308
type: QuestionComment
comment on: http://stackoverflow.com/q/27609687
has text: @Ted :) I'm also agree with charlietfl
score: 0
type: Comment

http://stackoverflow.com/q/27538658
score: 4
upvote count: 4
has body: See the JSFiddle here: http://jsfiddle.net/jL6d2qp6/ I have an animation that is supposed to keep the #top element in a fixed position at the top of the page, except for when the #login element is on the screen. To control this, I am using a javascript function that runs every 10ms and switches out the css class for #top, and when I scroll down, it updates as expected, but when I try to scroll back up, nothing happens. javascript code in question: offScreen = function(id, targetValue) { var offset = $("#top").offset(); var w = $(window); var height = $(id).innerHeight(); var finalOffset = (offset.top + height) - w.scrollTop(); if (finalOffset &lt; targetValue) { return true; } else { return false; } } function updateTopMenu() { if (offScreen("#login", 81) === false) { if($("#top").hasClass("top-bar-absolute") === false) { $("#top").addClass("top-bar-absolute"); console.log("added top-bar-absolute"); } if($("#top").hasClass("top-bar-fixed") === true) { $("#top").removeClass("top-bar-fixed"); console.log("removed top-bar-fixed"); } } if(offScreen("#login", 81) === true) { if($("#top").hasClass("top-bar-absolute") === true) { $("#top").removeClass("top-bar-absolute"); console.log("removed top-bar-absolute"); } if($("#top").hasClass("top-bar-fixed") === false) { $("#top").addClass("top-bar-fixed"); console.log("added top-bar-fixed"); } } } $("#top").ready( function() { setInterval(updateTopMenu, 10); }); Also, if there is a better way to accomplish this, I'd like it because this feels kind of cheaty.
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27541255
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27541255
tagged with: absolute
type: Question
has title: Scroll position based javascript animation does not revert to it's original state when scrolling back up
tagged with: javascript

yammer
type: Tag
tags question: http://stackoverflow.com/q/27596180
tags question: http://stackoverflow.com/q/27603913
tag name: yammer

http://stackoverflow.com/a/27618209
has body: $('.parent > :first-child').each(function() { console.log(this); }); test subtest test subtest test subtest
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27618003
upvote count: 1
type: Answer

http://stackoverflow.com/q/27505345
has answer: http://stackoverflow.com/a/27505608
downvote count: 0
possible better answer: http://stackoverflow.com/a/27505608
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/27508784
score: 1
type: Question
has title: How to write function-y accepting parameter-fct_x which accesses var-a which is required to be defined in function-y?
has answer: http://stackoverflow.com/a/27510351
tagged with: mongodb
answer count: 2
accepted answer: http://stackoverflow.com/a/27510351
tagged with: javascript
upvote count: 1
favorite count: 0
linked to: http://stackoverflow.com/q/10060857
has body: function x() { return a + 1; // it can be anything accessing var-a. } function y(fct_x) { var a = 2; fct_x(); // exception: a is not defined } y(x); // exception: see above // x is any function which will access var-a which is required to be defined in function-y Question: how to write a function-y like above so that calling fct_x() within function-y will not throw exception? Note: fct_x is any function (user given) which accesses var-a. The var-a not defined in function-x, but is required to be defined in function-y. With referring to Is it possible to achieve dynamic scoping in JavaScript without resorting to eval?, I have tried like this, but it does not work. Why I ask above question: This question comes from "MongoDB mapReduce", like this: There are 3 properties and 28 functions available for the map-reduction. One of the 28 function is emit(key,value). (See MongoDB doc). Take this example, function mapFunction() { emit(this.fieldA, this.fieldB) }; db.collection.mapReduce(mapFunction, reduceFunction, {...}); // calling mapReduce-function The emit-function within mapFunction is not defined in mapFunction. It is "provided"/"defined" somewhere within function db.collection.mapReduce. How function-db.collection.mapReduce is written to be able to proivde such emit-function for a user-given-mapFunction to call? [var a] equivalent to [function-emit] [function y] equivalent to [function-mapReduce] [function x] equivalent to [function-mapFunction]

http://stackoverflow.com/a/27583412
has comment: http://stackoverflow.com/comment/47355011
type: Answer
has comment: http://stackoverflow.com/comment/43592090
score: -2
answers question: http://stackoverflow.com/q/27582501
has body: here are few changes in your code. http://plnkr.co/edit/gpc1mPsZrl2QVXbnWZKA?p=preview app = angular.module('testDemo', []); app.controller('submitCtrl',function($scope) { $scope.header={}; $scope.inputHeaders=[]; $scope.addHeader = function() { $scope.inputHeaders.push($scope.header); $scope.header = {}; $scope.header.key=''; $scope.header.value=''; } $scope.log=function(){ //alert('in log'); $scope.inputHeaders.forEach(function (key, value) { console.log(key, value); }); } }); HTML: Add Log =1">
downvote count: 3
upvote count: 1

http://stackoverflow.com/comment/43459768
has text: What else do you expect from converting an **object** to a **string**? `console.log('' + {});`
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27514685

http://stackoverflow.com/comment/43563739
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27569196
has text: Have you tried using `.toggle()` ?

http://stackoverflow.com/comment/43560711
score: 5
has text: No, it is not possible. You'll have to implement your own modal dialog mechanism.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27567834

http://stackoverflow.com/q/27506595
duplicate of: http://stackoverflow.com/q/22937618
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27506728
has answer: http://stackoverflow.com/a/27506728
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/43443313
has comment: http://stackoverflow.com/comment/43443582
has body: I have a regular expression in a code(written by someone else), I am trying to understand what that expression means. var decimal = /^\d[0,1]+(\.\d[1,4])?$/; Can anyone explain to me what it does...
favorite count: 0
has title: Need to understand some regular expression
has comment: http://stackoverflow.com/comment/43443426
tagged with: regex
has comment: http://stackoverflow.com/comment/43443541
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/27506707
has comment: http://stackoverflow.com/comment/43443697
upvote count: 1
linked to: http://stackoverflow.com/q/22937618
type: Question
accepted answer: http://stackoverflow.com/a/27506707

http://stackoverflow.com/a/27501716
type: AcceptedAnswer
has body: Try using for loop: var myObject = { 'prop1': 'value1', 'prop2': 'value2' }; var myFd = new FormData(); for(var propertyName in myObject) { if(myFd.hasOwnProperty(propertyName) == false) { myFd.append(propertyName, myObject[propertyName]); } }
has comment: http://stackoverflow.com/comment/43433833
type: Answer
has comment: http://stackoverflow.com/comment/43433935
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27501629
answers question: http://stackoverflow.com/q/27501629
upvote count: 2
has comment: http://stackoverflow.com/comment/43434068
has comment: http://stackoverflow.com/comment/43433895

http://stackoverflow.com/comment/43621141
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27598951
has text: Thanks that's a Start i can work with. "0." is still accepted, but the Beginning of your Regexp was the thing i needed to work it out. Thanks :)
type: Comment

http://stackoverflow.com/comment/43436518
has text: I tried using the dispatchEvent and it also ONLY triggers the javascript code, which is in this case, the code to open modal dialog/window.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27503012
type: Comment

http://stackoverflow.com/comment/43489610
comment on: http://stackoverflow.com/q/27524614
has text: Maybe this will help. [Touch Events](https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Touch_events)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27519777
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27519474
answers question: http://stackoverflow.com/q/27519474
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: grunt-contrib-concat has a banner and a footerconfig option; you could put these lines of code in there for a simple solution. -OR- you could do something like this with grunt-contrib-concat: compile_js: { src: [ '&lt;%= vendor_files.js %&gt;', 'module.prefix', '&lt;%= build_dir %&gt;/src/**/*.js', 'module.suffix' ], dest: '&lt;%= compile_dir %&gt;/assets/&lt;%= pkg.name %&gt;-&lt;%= pkg.version %&gt;.js' }

http://stackoverflow.com/a/27621578
score: 0
type: AcceptedAnswer
has body: Try to make through this example. Look at messages in the console. &lt;script src="js/controls/EventsControls.js"&gt;&lt;/script&gt; EventsControls = new EventsControls( camera, renderer.domElement ); EventsControls.draggable = false; EventsControls.onclick = function() { console.log( this.focused.name ); } var jsonLoader = new THREE.JSONLoader(); jsonLoader.load( "models/Tux.js", addModelToScene ); function addModelToScene( geometry, materials ) { var material = new THREE.MeshFaceMaterial( materials ); model = new THREE.Mesh( geometry, material ); model.scale.set( 10, 10, 10 ); model.name = 'Tux'; model.rotation.x = -Math.PI/2; model.position.set( 175, 45, 125 ); scene.add( model ); EventsControls.attach( model ); }
answers question: http://stackoverflow.com/q/27612407
type: Answer
accepted answer of: http://stackoverflow.com/q/27612407

http://stackoverflow.com/a/27568736
type: Answer
score: 1
upvote count: 1
has body: Use a for loop like this one. You can change the second array and compare it to the first and see what happens. var cardset = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]; var cardset2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]; for (i = 0; i &lt; cardset.length; i++) { if (cardset[i] !== cardset2[i]) { alert('No match.'); break; } }
downvote count: 0
answers question: http://stackoverflow.com/q/27568586

http://stackoverflow.com/a/27501133
answers question: http://stackoverflow.com/q/27501081
accepted answer of: http://stackoverflow.com/q/27501081
has body: You can use a great tool like Rubular to try your regex: http://rubular.com/ This is meant for regex in Ruby but hey are almost the same than in javascript.
type: AcceptedAnswer
score: 0
type: Answer

http://stackoverflow.com/q/27511968
upvote count: 0
score: -2
has body: I have the following HTML: The game This is rendering a string like "Hello, world! 2014-12-16T18:45:22.022Z" in the browser, but it isn't updating unless I reload the page. How do I get XYZ to load dynamically, in this case so that the date string will be kept up to date (no pun intended)? Thanks,
tagged with: javascript
has comment: http://stackoverflow.com/comment/43811549
accepted answer: http://stackoverflow.com/a/27512552
favorite count: 0
downvote count: 2
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27521893
has title: How do I render afresh in ReactJS?
has answer: http://stackoverflow.com/a/27521893
type: Question
has answer: http://stackoverflow.com/a/27512552
tagged with: reactjs
answer count: 2

http://stackoverflow.com/q/27490581
has answer: http://stackoverflow.com/a/27490926
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43413049
has answer: http://stackoverflow.com/a/27490824
has comment: http://stackoverflow.com/comment/43412933
has answer: http://stackoverflow.com/a/27490941
answer count: 3
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27490941
has title: Change div width every 1 second by 5px
score: 0
has comment: http://stackoverflow.com/comment/43413153
has body: I tried to change div width every 1 second by 5px using JavaScript. How can I make this work? Here's my code: JS Functions
accepted answer: http://stackoverflow.com/a/27490824

http://stackoverflow.com/a/27530198
has comment: http://stackoverflow.com/comment/43489782
accepted answer of: http://stackoverflow.com/q/27530118
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27530118
has comment: http://stackoverflow.com/comment/43489464
has body: You just include a callback as an argument, and perhaps an error argument etc server.prototype.getStatus = function(callback){ this.conn.sendCommand('status', function(err, response){ if(err) { callback( err, null ); } else { callback( null, response['data'] ); } }); }; then you use it socket.on('get status', function(){ server.getStatus(function(err, data) { if (!err) { io.emit('status', data); } }); }); you could even just do server.prototype.getStatus = function(callback){ this.conn.sendCommand('status', callback); } and socket.on('get status', function(){ server.getStatus(function(err, data) { if (!err) { io.emit('status', data['data']); } }); });
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/43500000
type: Comment
has text: See my edit, maybe I'm misunderstanding your question.
score: 0
comment on: http://stackoverflow.com/a/27535540
type: AnswerComment

http://stackoverflow.com/comment/43432840
comment on: http://stackoverflow.com/q/27501054
has text: Yes, (Area of an element inside viewport) / Total area taken by the element. For example there is a whose height is 10px and width is 10px. So, total area is 100 sq unit. Now, the area of the inside viewport is (height * width) inside viewport.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27558186
has comment: http://stackoverflow.com/comment/43544664
has comment: http://stackoverflow.com/comment/43544506
type: Answer
has comment: http://stackoverflow.com/comment/43544038
score: 2
has comment: http://stackoverflow.com/comment/43542795
has comment: http://stackoverflow.com/comment/43551331
has comment: http://stackoverflow.com/comment/43544878
has comment: http://stackoverflow.com/comment/43544610
has comment: http://stackoverflow.com/comment/43544483
upvote count: 2
has comment: http://stackoverflow.com/comment/43544778
downvote count: 0
has body: If you set the scroll_speed to 0 it should prevent the scroll effect. $(document).foundation({ offcanvas : { open_method: "move", close_on_click : true } joyride : { scroll_speed: 0; } }); $(document).foundation('joyride', 'start');
answers question: http://stackoverflow.com/q/27557994

http://stackoverflow.com/comment/43703927
type: Comment
score: 0
type: AnswerComment
has text: Post your updated code so we can see where you're going wrong.
comment on: http://stackoverflow.com/a/27640287

http://stackoverflow.com/q/27563263
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27564861
has comment: http://stackoverflow.com/comment/43557998
has title: Q - Javascript promises wait for array to be filled
type: Question
tagged with: javascript
has body: I'm new to the Q library and I have understanding problems with the Q's promises for array methods. I have a array with various key strings to be replaced by a delayed function. After the passed in array got successfully replaced, I need to go on with the now fulfilled array. How do I wait to for the array to be replaced in this case? Output looks like key: "p", text: "Good morning %text%", inside: key: "p" text: "Good afternoon user" inside: key: "p" text: "This user has to be replaced." As you can see not all keys got replaced. Code sample var object = []; object.key = "p"; object.text = "Good morning %text%"; object.inside = []; object.inside.key = "p"; object.inside.text = "Good afternoon %text%"; object.inside.inside = []; object.inside.inside.key = "p"; object.inside.inside.text = "This %text% has to be replaced."; goDeep(object, 0); console.log(object); function goDeep(data) { if (data instanceof Object) { Object.keys(data).forEach(function(key) { if (data[key] instanceof Object) { goDeep(data[key]); } else if (data[key].inside) { goDeep(data[key].inside); } else { var match = scanText(data[key]); if (match &amp;&amp; !(match instanceof Boolean)) { getServerData(match.input).then (function(response) { var splitData = data[key].match(/%.*%/)[0].split(","); for (ii = 0; ii &lt; splitData.length; ++ii) { splitData[ii] = splitData[ii].trim(); var replaceData = data[key].replace(splitData[ii], response); // Data gets replaced here data[key] = replaceData; }; }); } } }); } } function scanText(data) { var match = data.match("(%.*%)", "/g"); if (match) { return match; } else { return false; } } function getServerData(data) { return Q.delay(1000).thenResolve("user"); }
tagged with: http://stackoverflow.com/tag/q
score: 0
upvote count: 1
answer count: 1
downvote count: 1
tagged with: asynchronous
favorite count: 0

http://stackoverflow.com/q/27618197
tagged with: angularjs
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27620094
has title: AngularJS directive with replacing
type: Question
tagged with: angularjs-directive
has body: I've developed AngularJS directives to add rectangle into SVG document: &lt;svg version="1.1" width="200" height="100"&gt; &lt;g&gt; &lt;!-- Works --&gt; &lt;g dir-rect1="" viz-settings="settings.rect1" /&gt; &lt;!-- Doesn't work --&gt; &lt;g dir-rect2="" viz-settings="settings.rect2" /&gt; &lt;/g&gt; The only difference is between the directives is that the dir-rect1 directive doesn't use replace and the dir-rect2 directive use: app.directive('dirRect2', function($compile) { return { restrict: 'AE', scope: { vizSettings: '=', }, replace:true, // &lt;--- DOESN'T WORK template: '&lt;rect fill="{{vizSettings.fill}}" stroke="{{vizSettings.fill}}" width="{{vizSettings.width}}" height="{{vizSettings.height}}" /&gt;', link: function($scope, elem, attr, ctrl) { console.debug($scope); } }; }); Why when I use replacing in my dirRect2 directive, I cannot see a rect? It seems that generated code is right in both cases. You can see example on plunker.
has comment: http://stackoverflow.com/comment/43660796
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/27619425

http://stackoverflow.com/comment/43696618
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27638892
type: AnswerComment
has text: @LeeTaylor Please don't include `document.write` in my answers.

http://stackoverflow.com/q/27581050
score: 0
answer count: 2
tagged with: fetch
has answer: http://stackoverflow.com/a/27585378
accepted answer: http://stackoverflow.com/a/27585378
has comment: http://stackoverflow.com/comment/43586535
tagged with: javascript
tagged with: jquery
tagged with: string
has answer: http://stackoverflow.com/a/27581255
tagged with: php
type: AnsweredQuestion
has title: Fetching a jquery DYNAMIC value from website
has body: Title is pretty much self explanatory... I'm getting the source code of the website but the value that I want to fetch is made dynamically via jQuery. Let's assume that this is the source code of example.com &lt;div id="currentTime"&gt;&lt;/div&gt; &lt;script&gt; var myVar = setInterval(function(){ myTimer() }, 1000); function myTimer() { var d = new Date(); var t = d.toLocaleTimeString(); document.getElementById("currentTime").innerHTML = t; } function myStopFunction() { clearInterval(myVar); } &lt;/script&gt; Yes, to get the source code is very easy but how do I fetch what's going on in between : &lt;div id="currentTime"&gt;{This is what I'm looking for}&lt;/div&gt; So... Iow... Fetching the value that have been made via javescript (or jQuery) in between the #currentTime div. Thanks!
type: Question
possible better answer: http://stackoverflow.com/a/27581255

http://stackoverflow.com/comment/43521262
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27481937
has text: Is this a public site that we can visit and see the problem?

http://stackoverflow.com/comment/43608723
has text: Why not use the `event.shiftKey` flag instead?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27592480

http://stackoverflow.com/comment/43759679
score: 0
type: AnswerComment
has text: Well, the controller itself doesn't have any event listeners, but some of the many views that this controller creates use this.listenTo... I've been having issues destroying one of these views, which I think is probably the real issue here. Should I explicitly say onClose -> this.stopListening() on all of the views this controller is creating?
type: Comment
comment on: http://stackoverflow.com/a/27629371

http://stackoverflow.com/comment/43478857
has text: this is what i was about to post.
type: Comment
score: 1
comment on: http://stackoverflow.com/a/27525163
type: AnswerComment

http://stackoverflow.com/a/27573824
has body: The if statement in the function explains everything. If the url hasn't changed then it tacks the param/value onto the end. Sounds like you want to also check that the value isn't already in there, like: if(newUrl == currentUrl &amp;&amp; newUrl.indexOf(paramName+'='+paramValue) === -1) { //... } Here's an updated jsfiddle
answers question: http://stackoverflow.com/q/27573474
accepted answer of: http://stackoverflow.com/q/27573474
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/q/27493578
answer count: 1
tagged with: highcharts
tagged with: javascript
has comment: http://stackoverflow.com/comment/43418994
favorite count: 0
has body: I have a highchart that is displaying columns of data, fed in as an array of 2 index arrays. Those 2 indexes are a label (a string) and a number value. With less than ~800 columns, highcharts displays this perfectly. Once more columns than that are fed in, highcharts shows a blank screen, as if there was no data. Has anyone run in to this issue? Is it a known issue in highcharts?
score: -1
type: UnansweredQuestion
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27502103
has title: Highcharts: Failure to render large number of columns
upvote count: 0

http://stackoverflow.com/a/27551920
has comment: http://stackoverflow.com/comment/43536991
type: Answer
has comment: http://stackoverflow.com/comment/43537253
has comment: http://stackoverflow.com/comment/43536747
has comment: http://stackoverflow.com/comment/43709811
upvote count: 1
has comment: http://stackoverflow.com/comment/43531828
score: 1
has comment: http://stackoverflow.com/comment/43630070
has comment: http://stackoverflow.com/comment/43535856
has comment: http://stackoverflow.com/comment/43535729
downvote count: 0
has comment: http://stackoverflow.com/comment/43531987
has comment: http://stackoverflow.com/comment/43532648
has body: Instead of hadouken.rad = Math.atan2(dy, dx); I'd code it that way: // time_elapsed is time since previous animation state update (in time units) // angular_speed is max turning speed in radians per time unit var dest_angle = Math.atan2(dy, dx); // normalize destination vector dx,dy var nx = Math.cos(dest_angle); var ny = Math.sin(dest_angle); // calc current vector var cx = Math.cos(hadouken.rad); var cy = Math.sin(hadouken.rad); // calc cross product, its sign will tell ya which direction we should turn var crp = cx*ny - cy*nx; var ang_ofs = angular_speed * time_elapsed; if ( crp&gt;0 ) // shoud turn clockwise hadouken.rad += ang_ofs; else if ( crp&lt;0 ) // shoud turn counter clockwise hadouken.rad -= ang_ofs; // dont let it over-turn cx = Math.cos(hadouken.rad); cy = Math.sin(hadouken.rad); var crp2 = cx*ny - cy*nx; if (crp*crp2&lt;0) // sign changed! hadouken.rad = dest_angle;
has comment: http://stackoverflow.com/comment/43631008
answers question: http://stackoverflow.com/q/27551659
has comment: http://stackoverflow.com/comment/43587599
has comment: http://stackoverflow.com/comment/43531896
has comment: http://stackoverflow.com/comment/43586754

http://stackoverflow.com/comment/44301521
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27480479
has text: Maybw silly suggestion, but can't you put the settings of each tab and tabs outside the iframe? That way you will be able to control it

http://stackoverflow.com/comment/43690351
comment on: http://stackoverflow.com/a/27635499
score: 0
type: Comment
type: AnswerComment
has text: @Leonidas that's true, it doesn't matter if the user holds the button for 2 seconds or 60 seconds, after the user releases the button, the event must start

http://stackoverflow.com/a/27638046
has comment: http://stackoverflow.com/comment/43695203
has comment: http://stackoverflow.com/comment/43695451
answers question: http://stackoverflow.com/q/27638002
has comment: http://stackoverflow.com/comment/43695259
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43694921
has comment: http://stackoverflow.com/comment/43695005
has body: The reason is that jsfiddle is running your code within a function like the following: window.onload=function(){ var a = 10; function x() { a = 20; alert(this.a); } x(); } Therefore, your var a is local to the onload function, but this inside of x points to the global window object If you change your fiddle settings to No wrap - in &lt;head&gt; (or in &lt;body&gt;), it will work as you expect. http://jsfiddle.net/mendesjuan/4a42n8g8/1/ Question 1 var a is not a global because it's within a function, if it was outside of any functions, it would be global. Question 2 Same as question one, var a actually is defined in a function.
has comment: http://stackoverflow.com/comment/43695049
type: Answer
has comment: http://stackoverflow.com/comment/43694912
has comment: http://stackoverflow.com/comment/43695045
has comment: http://stackoverflow.com/comment/43695517
score: 2
has comment: http://stackoverflow.com/comment/43695094
downvote count: 0
has comment: http://stackoverflow.com/comment/43695828
accepted answer of: http://stackoverflow.com/q/27638002
has comment: http://stackoverflow.com/comment/43694980

http://stackoverflow.com/a/27598653
upvote count: 1
score: 0
downvote count: 1
accepted answer of: http://stackoverflow.com/q/27598536
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27598536
has comment: http://stackoverflow.com/comment/43621083
has body: Try using date.getTime() instead: EDIT var daysTillNow = function(str) { var today = new Date(); //time stamp is taken for testing var course_time = new Date(str); //difference in mili seconds var diff = today.getTime() - course_time.getTime(); //round off mili-sec to days diff = Math.round(diff / (1000 * 60 * 60 * 24)); return diff + " day(s)"; }; console.log(daysTillNow('Thu Dec 11 2014 05:30:00 GMT+0530 (IST)')); //11 days console.log(daysTillNow('Mon Dec 22 2014 11:13:21 GMT+0530 (IST)')); //0 days open console... F12
type: Answer

http://stackoverflow.com/comment/43676887
has text: @PSL yes that's sort of confusing if it is than OP has got other problem not this one :)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27623660

http://stackoverflow.com/comment/61992725
type: Comment
score: 0
comment on: http://stackoverflow.com/a/37229443
type: AnswerComment
has text: This is a very low quality answer: please provide explanation of what your code does. Also, this code does not take parameter, but does expect a global variable `d`. Finally, it does not answer OPs question: YYYY/MM/DD is not the same as DD-Mon-YYY that was asked for.

http://stackoverflow.com/q/27485750
upvote count: 6
tagged with: node.js
has comment: http://stackoverflow.com/comment/43403924
type: UnansweredQuestion
score: 6
has answer: http://stackoverflow.com/a/27490619
has title: Node Jade Unexpected character # expected ` `, `\n`, `,`, `!` or `=`
has body: I am using jadeify with browserify to use jade templates in my frontend. Gulp Setup gulp.task('browserify', function () { var bundler = browserify({entries: ['./frontend/js/app.js']}); var bundle = function () { return bundler .transform(jadeify) .bundle() .pipe(source('app.js')) .pipe(gulp.dest('./public/js')) }; if (global.isWatching) { bundler = watchify(bundler); bundler.on('update', bundle); } return bundle(); }); The jade file .header h1 Login .content div input(placeholder="Username", name="uname", type="text") input(placeholder="Password", name="pword", type="password") .footer a(href="/signup") span Create an Account require for the jade file require('../../views/index.jade')({jamie:'hello'}) Output inside app.js module.exports = function template(locals) { var buf = []; var jade_mixins = {}; var jade_interp; buf.push(" Login Create an Account ");;return buf.join(""); }; Everything is good Error from gulp when changing anything in the jade file [14:36:14] gulp-notify: [Compile Error] C:\var\www\mywarhammer.co.uk\frontend\views\index.jade:8 6| var jade_interp; 7| > 8| buf.push(" Login <input placeholder=\"Username\" name=\"uname\" the an Account ");;return buf.join(""); 9| }; Unexpected character h expected ` `, `\n`, `,`, `!` or `=` while parsing file: C:\var\www\mywarhammer.co.uk\frontend\views\index.jade How can I stop this breaking? Edit I have since added more output from gulp-notify on these errors... They actually don't help me a whole lot. It seems to me that they are coming from the original jade file :/ Unexpected character h expected ` `, `\n`, `,`, `!` or `=` while parsing file: C:\var\www\mywarhammer.co.uk\frontend\views\home.jade [ { [Error: C:\var\www\mywarhammer.co.uk\frontend\views\home.jade:8 6| var jade_interp; 7| > 8| buf.push(" Login ate an Account " + (jade.escape((jade_interp = locals.jamie) == null ? '' : jade_interp)) + " ");;return buf.join(""); 9| }; Unexpected character h expected ` `, `\n`, `,`, `!` or `=` while parsing file: C:\…
has comment: http://stackoverflow.com/comment/43403556
type: Question
has comment: http://stackoverflow.com/comment/43403497
tagged with: pug
downvote count: 0
answer count: 1
linked to: http://stackoverflow.com/q/24994830
tagged with: javascript
tagged with: gulp
favorite count: 0
tagged with: browserify

http://stackoverflow.com/q/27560886
has comment: http://stackoverflow.com/comment/43549779
type: Question
has comment: http://stackoverflow.com/comment/43547874
has comment: http://stackoverflow.com/comment/43577628
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27565210
has comment: http://stackoverflow.com/comment/43567827
has comment: http://stackoverflow.com/comment/43577621
score: 0
has body: I'm writing a Chrome extension for which I remotely load CSS and JavaScript files. I'm looking for a tool that will combine and minify my CSS files into 1 file and my JS files into 1 file. Bonus points if it can automatically detect changed files and minify on its own so that all I have to do is upload the files to my server for testing without having to explicitly process the files via the command line or some such. Does anyone have any favorite tools that can do this?
has comment: http://stackoverflow.com/comment/43547984
has comment: http://stackoverflow.com/comment/44100734
tagged with: google-chrome-extension
answer count: 1
tagged with: minify
has answer: http://stackoverflow.com/a/27565210
has comment: http://stackoverflow.com/comment/43548051
favorite count: 0
has comment: http://stackoverflow.com/comment/43567840
tagged with: web-deployment
has comment: http://stackoverflow.com/comment/43548108
tagged with: css
has comment: http://stackoverflow.com/comment/43567754
linked to: http://stackoverflow.com/q/27576034
type: AnsweredQuestion
upvote count: 3
has title: Combining and minifying CSS/JS files
downvote count: 3

http://stackoverflow.com/comment/43559118
has text: But because jquery.rulers.js shows CSS pixels and coordinates, I don't think there is bugless method for that. Try using restricting zoom ratio to 1 and than apply formula from above link
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27566729
score: 0

http://stackoverflow.com/comment/43726098
comment on: http://stackoverflow.com/a/27634418
type: Comment
has text: I should have made myself clear: you should not use your javascript, but instead use media rule.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43555204
comment on: http://stackoverflow.com/a/27563124
has text: Thanks. But when I did that it says "Cordova is not recognized as an internal or external command, operable program or batch file."
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/q/27568945
has comment: http://stackoverflow.com/comment/43563735
has comment: http://stackoverflow.com/comment/43563427
has comment: http://stackoverflow.com/comment/43563988
tagged with: global-variables
type: Question
has comment: http://stackoverflow.com/comment/43563392
answer count: 2
has answer: http://stackoverflow.com/a/27569284
upvote count: 0
tagged with: arrays
has comment: http://stackoverflow.com/comment/43563299
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27569094
score: -3
has comment: http://stackoverflow.com/comment/43563143
has body: I'm not able to access the updated global array (a1), it shows an empty array. &lt;script type="text/javascript"&gt; var video_object = { title1:"", desc:"", link1:"",url1:""}; var a1 = []; alert(a1.toSource()); // Inital array Value $(function() { $("#upload1").click(function(){ video_object.title1 = $("#title1").val(); video_object.desc = $("#desc1").val(); video_object.link1 = $("#extra1").val(); video_object.url1 = $("#path1").val(); a1.push(video_object); alert(a1.toSource()); // Array Value updated initially (but gets null value afterwards) }); }); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/43563621
has comment: http://stackoverflow.com/comment/43563360
has comment: http://stackoverflow.com/comment/43563493
has comment: http://stackoverflow.com/comment/43563473
has title: How to update Javascript Global Array?
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43563579
tagged with: javascript-objects
has comment: http://stackoverflow.com/comment/43563600
has comment: http://stackoverflow.com/comment/43563390
has comment: http://stackoverflow.com/comment/43563543
has comment: http://stackoverflow.com/comment/43563479
has comment: http://stackoverflow.com/comment/43563369
downvote count: 3

http://stackoverflow.com/q/27517603
upvote count: 1
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: textbox
has title: Get info from textbox without submit button in JavaScript?
favorite count: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27517611
score: 1
has body: How can I do this? I basically want to call a function where I get the info from the textbox once the user is done entering info. I.e., after they click off of the text box. I couldn't find the clear way to do this. Is there an API for event/actions and what you can do on each input?
accepted answer: http://stackoverflow.com/a/27517611
type: Question

http://stackoverflow.com/comment/43544076
comment on: http://stackoverflow.com/q/27558959
type: QuestionComment
has text: This is extremely easy - taking any web development course should have been enough to figure it out. Simply check for the value upon onclick using getElementById and use an if statement.
type: Comment
score: 0

http://stackoverflow.com/comment/43668135
score: 1
has text: By the way, [`replace` is deprecated...](https://github.com/angular/angular.js/commit/eec6394a342fb92fba5270eee11c83f1d895e9fb)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27623660

http://stackoverflow.com/a/27564930
upvote count: 1
answers question: http://stackoverflow.com/q/27556672
has body: At this moment the highcharts supports only width parameter, not maximum width. In other cases you need to wrap function and prepare your own solution.
score: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/27556672

http://stackoverflow.com/q/27612546
has body: Here is the site. I have an unordered list containing a group of photos. The navigation is set up like a filter so that if I click on X, only the photos in the X category get displayed, etc. All of the photos are initially set with the 'visible' class like this: photo photo photo etc. When a certain filter is clicked, the photos that are not in that category get the 'visible' class removed causing them to fade out. However, while the photos get faded out, they still take up the same amount of space causing large amounts of empty space to appear. I am trying to get rid of this empty space. My idea was to write code that says: iflidoes not have the 'visible' class, then hide. else, show. Below is my attempt. However, this causes none of the photos to show up. Where have I gone wrong? jQuery(document).ready(function($){ if (!$( '#gallery-wrap li' ).hasClass( 'visible')) { this.hide(); } else { this.show(); } });
has title: If element does not have class, don't show; otherwise, show?
tagged with: jquery
has comment: http://stackoverflow.com/comment/43647392
has answer: http://stackoverflow.com/a/27612715
tagged with: css
possible better answer: http://stackoverflow.com/a/27612567
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27612567
has answer: http://stackoverflow.com/a/27612740
type: Question
linked to: http://stackoverflow.com/q/133051
accepted answer: http://stackoverflow.com/a/27612715
has comment: http://stackoverflow.com/comment/43647348
tagged with: javascript
score: 0
answer count: 3

http://stackoverflow.com/q/27583255
tagged with: javascript
score: 12
tagged with: boolean
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/43591044
favorite count: 0
has comment: http://stackoverflow.com/comment/43591009
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43591553
has comment: http://stackoverflow.com/comment/43591128
has body: I found out the hard way that bitwise operators on bools don't return bools in JavaScript. I thought it must be a bug, but I looked it up in the ECMAScript spec, and sure enough, it says that the bitwise operators return numbers, not bools. It doesn't say a word about the weirdness that results when you're using them on boolean values. Why is it done this way? I've used this technique for years in other languages, so I'm totally baffled why it does something different in JavaScript. Any ideas? Is it just because no one ever uses bitwise operators in this way (except me), or is there a technical reason? I can't imagine it would be hard to check the type and return a boolean. For reference, the following code: var found = false; console.log(found, typeof(found)); found |= true; console.log(found, typeof(found)); found = true; console.log(found, typeof(found)); Produces the following output: false 'boolean' 1 'number' true 'boolean' Edit: By request, I have used this in C, C++, and I'm pretty sure PHP, although I wouldn't swear on it. Yes, I realize that C/C++ are typed, so it would be different internally. I'm just wondering why JavaScript would behave differently. By request, an example of how I would typically use |= var foundLowest = false; for(var k = 0; k &lt; someLength; ++k) { foundLowest |= someFunctionThatReturnsTF(k); } if(foundLowest === true) { /* do stuff */ }
has comment: http://stackoverflow.com/comment/43591026
tagged with: numbers
has answer: http://stackoverflow.com/a/27583329
has comment: http://stackoverflow.com/comment/43591202
type: Question
has title: JavaScript: why does bitwise OR of booleans return a number instead of a boolean?
upvote count: 12

http://stackoverflow.com/q/27520024
type: Question
tagged with: firefox
answer count: 1
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/27520373
tagged with: selenium
has body: I am trying to automate few web pages i.e. Case creation, Accounts and Contacts creation through my developer login at www.salesforce.com. I am using Mozilla Firefox 34.0.5 alongwith Eclipse Luna and Java for automation using Selenium WebDriver. I am also using JExcel API for reading data from excel file in hard disk. System Specifications are Windows7 Ultimate 32 bit. My automation code is working fine with Google Chrome but in Firefox certain fields on webpage such as dropdown menu Boxes, popup windows &amp; switching control to new popup window are not working. I have not found any solution to this problem. I can't understand the reason for failure of selenium command : "selectByVisibleText(String)". The dropdown menu list is displayed and the specified option is also highlighted but then click/select action is aborted and default value is selected. With popup windows, selenium command : "driver.switchTo().window(windowhandle)" is not working. New pop window opens and window handle is generated but the error displayed is "Unable to locate window {window Handle String}". I can't figure out why it can't locate the window by window handle and switch to it in firefox if it works fine in other browsers ?? Below is my Complete Code public class PoiExcelCase { WebDriver driver; FileInputStream fis; HSSFWorkbook wb; HSSFSheet sh; @BeforeTest public void login() throws BiffException, IOException { driver = new FirefoxDriver(); //System.setProperty("webdriver.chrome.driver", "D:/chromedriver_win32/chromedriver.exe"); //driver = new ChromeDriver(); driver.manage().window().maximize(); driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS); fis = new FileInputStream(new File("D:/Salesforce.xls")); wb = new HSSFWorkbook(fis); sh = wb.getSheet("Sheet1"); driver.navigate().to("http://www.salesforce.com/in/?ir=1"); driver.findElement(By.xpath(".//*[@id='button-login']")).click(); driver.findElement(By.xpath(".//*[@id='username']")).sendKeys(sh.getRow(1).getCell(0).getSt…
has title: Dropdown Menu and switch to new Window in Selenium Webdriver not working in Firefox
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27520373
tagged with: java
tagged with: eclipse

http://stackoverflow.com/q/27615311
has answer: http://stackoverflow.com/a/27615368
has body: I have the following AJAX function that has 2 variables i.e. sTitle, sValue. I need these two variables to be added to an Array in the format of ArrayName[sTitle, sValue]. I have tried this using a for loop but couldn't get the result I expected. I'm hoping to use this array to draw a Google chart. The data source is an XML. I'm trying to implement this For Loop and array within the AJAX Call. So how can I solve this matter? AJAX Function $(document).ready(function() { $.ajax({ type: "GET", url: "ChartData.xml", dataType: "xml", success: function(xml) { $(xml).find('Pie').each(function() { var sTitle = $(this).find('Title').text(); var sValue = $(this).find('Value').text(); }); }, error: function() { alert("An error occurred while processing XML file."); } }); });
accepted answer: http://stackoverflow.com/a/27615368
has comment: http://stackoverflow.com/comment/43652552
type: AnsweredQuestion
tagged with: javascript
type: Question
score: 0
answer count: 1
tagged with: arrays
has title: Creating An Array within AJAX Function Feeding Value Using For Loop
tagged with: jquery
tagged with: ajax

http://stackoverflow.com/comment/43398317
type: AnswerComment
comment on: http://stackoverflow.com/a/27482596
score: 0
type: Comment
has text: I'm going to try to bind the hover to the like you said. Btw the solution you suggested in jsfiddle doesn't work, I made some changes to get it to work properly. http://jsfiddle.net/Gargaroz/3dr7n8b7/2/

http://stackoverflow.com/comment/43683979
type: Comment
type: QuestionComment
has text: You might consider writing a small directive for this, if you're looking for reusability. I don't think filters can be asynchronous.
comment on: http://stackoverflow.com/q/27631681
score: 0

http://stackoverflow.com/a/27606971
has comment: http://stackoverflow.com/comment/43667442
has comment: http://stackoverflow.com/comment/43686668
answers question: http://stackoverflow.com/q/27578897
has comment: http://stackoverflow.com/comment/43667377
score: 3
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27578897
downvote count: 0
type: Answer
has body: There is always a chance that their is a leak in one of the drivers installed on your system that causes this. However, when looking at that javascript code there is a pattern that caused issues in the past and has a resolution now. The main loop of the Gadget looks like this: function paintGadget() { // repaint/rebuild all UI elelments // remove all elements targets.innerHtml = ''; // buildup var o = document.createElement('DIV'); o.onclick = openDrive; targets.appendChild(o); } function openDrive() { } window.setInterval(paintGadget, 2500); which basically means: call paintGadget every 2.5 seconds, for ever This should be fine if the javascript engine and its resources are garbage collected when they are no longer in any scope. And this where things might go wromg due to sloppy programming. Based on the answer from user dsg we learn that eventlisteners are a root cause for garbage collection to fail. To overcome this problem we have to replace the line targets.innerHtml = ''; in the function paintGadget with an implementation that removes the eventhandlers on every element before removing the element it self, like so: while(targets.firstChild) { var ch = targets.firstChild; ch.onclick = null; targets.removeChild(ch); } As said in the introduction, paintGadget does more in particular with the canvas where it follows a similar pattern, remove everything and recreate. If there is a leak in there a reimplementation of that is needed as well.
upvote count: 3
has comment: http://stackoverflow.com/comment/43667127

ui-select2
tags question: http://stackoverflow.com/q/27623490
tag name: ui-select2
type: Tag

http://stackoverflow.com/q/27622515
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27622664
accepted answer: http://stackoverflow.com/a/27622664
has body: Below is the script, currently what it does is create a drop down box as you type in using the var search index, what i want to accomplish is to be able to click on the word google in that drop down and go to google.com, i know this can be accomplished in html using &lt; a href="google.com" > google &lt; /a> how can i make that work in JS? &lt;script&gt; var searchIndex = ["google","apple","iPhone","ipad"]; var input = document.getElementById("searchBox"), ul = document.getElementById("searchResults"), inputTerms, termsArray, prefix, terms, results, sortedResults; var search = function() { inputTerms = input.value.toLowerCase(); results = []; termsArray = inputTerms.split(' '); prefix = termsArray.length === 1 ? '' : termsArray.slice(0, -1).join(' ') + ' '; terms = termsArray[termsArray.length -1].toLowerCase(); for (var i = 0; i &lt; searchIndex.length; i++) { var a = searchIndex[i].toLowerCase(), t = a.indexOf(terms); if (t &gt; -1) { results.push(a); } } evaluateResults(); }; var evaluateResults = function() { if (results.length &gt; 0 &amp;&amp; inputTerms.length &gt; 0 &amp;&amp; terms.length !== 0) { sortedResults = results.sort(sortResults); appendResults(); } else if (inputTerms.length &gt; 0 &amp;&amp; terms.length !== 0) { ul.innerHTML = '&lt;li&gt; &lt;strong&gt;' + inputTerms + '&lt;/strong&gt; is not a valid part number &lt;br&gt;&lt;small&gt;&lt;a &gt;&lt;/li&gt;'; } else if (inputTerms.length !== 0 &amp;&amp; terms.length === 0) { return; } else { clearResults(); } }; var sortResults = function (a,b) { if (a.indexOf(terms) &lt; b.indexOf(terms)) return -1; if (a.indexOf(terms) &gt; b.indexOf(terms)) return 1; return 0; } var appendResults = function () { clearResults(); for (var i=0; i &lt; sortedResults.length &amp;&amp; i &lt; 5; i++) { var li = document.createElement("li"), result = prefix + sortedResults[i].toLowerCase().replace(terms, '&lt;strong&gt;' + terms +'&lt;/strong&gt;'); li.innerHTML = result; ul.appendChild(li); } if ( ul.className !== …
type: AnsweredQuestion
type: Question
answer count: 1
tagged with: javascript
score: 0
has title: How do I insert a url into text in a Javascript var index?

http://stackoverflow.com/q/27622636
score: 0
tagged with: ecmascript-harmony
has comment: http://stackoverflow.com/comment/44200974
has body: I am experimenting with ES6. In particular, classes and inheritance. In class Apple, it extends Polygon. I want to extend Polygon's method sayName() and have it go to console.log. When I run it through traceur, I get undefined for console.log(foo); class Polygon { constructor(height, width) { //class constructor this.name = 'Polygon'; this.height = height; this.width = width; } sayName() { //class method return 'Hi, I am a', this.name + '.'; } } class Apple extends Polygon { constructor(length) { super(length, length); //call the parent method with super this.name = 'apple'; } sayName() { var foo = super(); console.log(foo); } } let d = new Apple(5); d.sayName(); Traceur: System.register("class", [], function() { "use strict"; var __moduleName = "class"; function require(path) { return $traceurRuntime.require("class", path); } var Polygon = function Polygon(height, width) { this.name = 'Polygon'; this.height = height; this.width = width; }; ($traceurRuntime.createClass)(Polygon, {sayName: function() { return 'Hi, I am a', this.name + '.'; }}, {}); var Apple = function Apple(length) { $traceurRuntime.superConstructor($Apple).call(this, length, length); this.name = 'apple'; }; var $Apple = Apple; ($traceurRuntime.createClass)(Apple, {sayName: function() { var foo = $traceurRuntime.superConstructor($Apple).call(this); console.log(foo); }}, {}, Polygon); var d = new Apple(5); d.sayName(); return {}; }); System.get("class" + ''); How can I super sayName() in Apple class and make the console.log(foo) show the value? I thought traceur would show me the compiled code, but it is not really. For instance, $traceurRuntime.createClass() isn't helping me see how it is creating these constructors. Am I using traceur incorrectly to view the compiled code?
has title: ES6 Classes with Inheritance issue and Traceur Not Showing Compiled Code
type: AnsweredQuestion
tagged with: traceur
has comment: http://stackoverflow.com/comment/43666698
type: Question
tagged with: ecmascript-6
answer count: 1
has answer: http://stackoverflow.com/a/27900647
accepted answer: http://stackoverflow.com/a/27900647
tagged with: javascript

http://stackoverflow.com/comment/43493195
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/27532302
has text: Not a solution, but a little tip: look into function parameters.

http://stackoverflow.com/a/27503767
score: 1
has body: I've found a solution using a different method with if statements, and 2 variables (flag_top &amp; flag_bottom) . here is my code, maybe it can help : function pre_scroll_cartouche_top(){ var cartouche_bottom_position = $(window).height() - $('.top_table').height() - $('.layout_bottom').height(); var cartouche_fixed_H = $('.cartouche_fixed').height(); var cartouche_top_position = - ($('.cartouche_top').height()-$('.top_table').height()); var flag_top = 0; /*----------------------------- TOP ---------------------------------------------------*/ $('.cartouche_top').on("mouseenter", function(){ if(flag_top==0){ $('.cartouche_top').stop().animate({top : -$('.cartouche_top').height()+$('.cartouche_fixed').height()}); $('.archives_open').on('click', function(){ flag_top = 1; $('.cartouche_top').stop().animate({top : '0px'},function(){ $('.cartouche_fixed').addClass('active'); }); $('.archive_close').css('opacity','1'); }); $('.archive_close, .index_tableau a').on('click', function(){ flag_top = 0; $('.archive_close').css('opacity','0'); $('.cartouche_fixed').removeClass('active'); $('.cartouche_top').stop().animate({top : cartouche_top_position}); }); } }); $('.cartouche_top').on("mouseleave", function() { if(flag_top==0){ $('.cartouche_fixed').removeClass('active'); $('.cartouche_top').stop().animate({top : cartouche_top_position}); } }); } function bottom_cartouche(){ /*----------------------------- PRE SCROLL BOTTOM ---------------------------------------------------*/ var cartouche_bottom_position = $(window).height() - $('.top_table').height() - $('.layout_bottom').height(); var cartouche_fixed_H = $('.cartouche_fixed').height(); var cartouche_top_position = - ($('.cartouche_top').height()-$('.top_table').height()); var flag_bottom = 0; /*----------------------------- MOUSEENTER ---------------------------------------------------*/ $('.cartouche_bottom').on("mouseenter", function(){ if(flag_bottom==0) { $('.layout_bottom').slideUp(); $('.cartouche_bottom').stop().ani…
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/27493463
downvote count: 0

http://stackoverflow.com/comment/43394033
comment on: http://stackoverflow.com/a/27480455
type: Comment
has text: Yes exactly! Thanks so much, that's the perfect solution!
score: 0
type: AnswerComment

phantomjs
tags question: http://stackoverflow.com/q/27484554
tags question: http://stackoverflow.com/q/27596852
type: Tag
tags question: http://stackoverflow.com/q/27487724
tags question: http://stackoverflow.com/q/27625935
tags question: http://stackoverflow.com/q/27491841
tags question: http://stackoverflow.com/q/27523113
tags question: http://stackoverflow.com/q/27523682
tags question: http://stackoverflow.com/q/27594251
tags question: http://stackoverflow.com/q/27611303
tag name: phantomjs
tags question: http://stackoverflow.com/q/27477868
tags question: http://stackoverflow.com/q/27586592
tags question: http://stackoverflow.com/q/27597535
tags question: http://stackoverflow.com/q/27581193

http://stackoverflow.com/comment/43619217
comment on: http://stackoverflow.com/q/27597889
score: 0
has text: what js have u included ?
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27488618
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27488551
has body: Only option in html is the mailto protocol: mailto:email@example.com?subject=xxx&amp;body=xxx This will open op the users mail client, with pre filled values for subject and body. As you can see this is not always the optimal solution, instead you can use server side scripts to send the mail. As you mention you dont want the page to change etc.. Look at AJAX which is a method to send data from the client -> server without a full page refresh. For ease you maybe want to look at jQuery's implementation of ajax
downvote count: 0
has comment: http://stackoverflow.com/comment/43409395
type: Answer

http://stackoverflow.com/comment/43460463
type: Comment
score: 1
comment on: http://stackoverflow.com/q/27514963
type: QuestionComment
has text: What errors does your console / network tab give you?

http://stackoverflow.com/a/27557884
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/43543877
downvote count: 0
answers question: http://stackoverflow.com/q/27557747
has comment: http://stackoverflow.com/comment/43542908
accepted answer of: http://stackoverflow.com/q/27557747
has body: I believe that you can send an ajax request to python when the page loads. If you are using a PHP backend, you can have PHP edit a file every time the page is loaded and you can then view this file using python.
score: 1
has comment: http://stackoverflow.com/comment/43542911
has comment: http://stackoverflow.com/comment/43543907
upvote count: 1

http://stackoverflow.com/q/27498938
has comment: http://stackoverflow.com/comment/43432401
answer count: 1
tagged with: javascript
score: 0
has body: Im working in MVC5 entity framework. Here some fields have date fields so I need to set data format. Here I using script and datepicker. Now I got a problem if I set after date of 12. I got error like "enter valid date" Script used in views:- $('#datepick').datepicker({ dateFormat: 'dd/mm/yy', minDate: 0 }); Code used in views &lt;div class="row form-group"&gt; &lt;div class="col-md-4"&gt; Due Date: &lt;/div&gt; &lt;div class="col-md-8"&gt; @Html.TextBoxFor(model =&gt; model.goodreceipt.Due_Date, new { @Value = DateTime.Now.ToString("MM/dd/yyyy"), @class = "form-control control-text ", @id = "datepick" }) @*@Html.ValidationMessageFor(model =&gt; model.goodreceipt.Due_Date)*@ &lt;/div&gt; &lt;/div&gt; I got error Like this"Enter valid date" the date must be with in 12, after 12 (i.e 13-12-2014) error will occur so onlyIi comment validation message but here I itself I got this error. Here i want to finish this task.
has comment: http://stackoverflow.com/comment/43428819
has comment: http://stackoverflow.com/comment/43428799
has answer: http://stackoverflow.com/a/27498986
linked to: http://stackoverflow.com/q/27285458
type: UnansweredQuestion
type: Question
tagged with: model-view-controller
tagged with: c#
tagged with: entity-framework
tagged with: asp.net-mvc
has comment: http://stackoverflow.com/comment/43428888
has comment: http://stackoverflow.com/comment/43435020
has comment: http://stackoverflow.com/comment/43429209
has title: how to resolve date picker format in mvc5

http://stackoverflow.com/comment/43391338
comment on: http://stackoverflow.com/q/27478734
has text: Since you are using an ajax solution, why not break your `sendMail.php` into 2 parts, one that displays the data for preview with hidden form inputs and confirm button, then when hit confirm it calls itself again but with a new check variable that uses the code you currently have?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43623400
comment on: http://stackoverflow.com/q/27600066
type: Comment
has text: Is there any specific reason for not using the standard onclick, ondblclick events for this purpose?
score: 0
type: QuestionComment

http://stackoverflow.com/q/27601485
tagged with: javascript
type: AnsweredQuestion
tagged with: iron.io
downvote count: 0
score: 1
linked to: http://stackoverflow.com/q/6587221
favorite count: 0
has body: How do I submit a json formatted string to the following script with a webhook? Below is my script on iron.io that I want to read the payload. import sys, json sys.argv[8] payload_file = None payload = None for i in range(len(sys.argv)): if sys.argv[i] == "-payload" and (i + 1) &lt; len(sys.argv): payload_file = sys.argv[i + 1] with open(payload_file,'r') as f: payload = json.loads(f.read()) print "printing resulting payload: " + str(payload) break When I queue a json formatted string within the platform, I get the desired outcome which you can see below: json formatted string that I inputed {u'env': u'production'} Log shown in Iron.io printing resulting payload: {u'env': u'production'} I'd like to accomplish the same result via a webhook call with the following javascript. post('https://worker-aws-us-east-1.iron.io/2/projects/PROJECTKEY/tasks/webhook?code_name=CODENAME&amp;oauth=OAUTH', { payload: { "tasks": [{ "code_name": "firebase_email_webhook", "payload": "{u'env': u'production'}" }] } }) function post(path, params, method) { method = method || "post"; // Set method to post by default if not specified. var form = document.createElement("form"); form.setAttribute("method", method); form.setAttribute("action", path); for (var key in params) { if (params.hasOwnProperty(key)) { var hiddenField = document.createElement("input"); hiddenField.setAttribute("type", "hidden"); hiddenField.setAttribute("name", key); hiddenField.setAttribute("value", params[key]); form.appendChild(hiddenField); } } document.body.appendChild(form); form.submit(); } The webhook call works fine, but the issue is that I get the following error: Traceback (most recent call last): File "firebase_email_webhook.py", line 32, in &lt;module&gt; payload = json.loads(f.read()) File "/usr/lib/python2.7/json/__init__.py", line 326, in loads return _default_decoder.decode(s) File "/usr/lib/python2.7/json/decoder.py", line 366, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/py…
type: Question
has answer: http://stackoverflow.com/a/27602703
tagged with: webhooks
upvote count: 1
tagged with: python
has title: How do I pass a json formatted string as a payload to an iron.io worker via a webhook?
tagged with: http://stackoverflow.com/tag/json
answer count: 1
accepted answer: http://stackoverflow.com/a/27602703

http://stackoverflow.com/comment/43566280
score: 0
type: Comment
type: QuestionComment
has text: RegExp is purposed to handle _regular_ expressions, HTML is not regular.
comment on: http://stackoverflow.com/q/27564811

http://stackoverflow.com/comment/43637614
comment on: http://stackoverflow.com/q/27607585
has text: Check your server configuration. And please explain how you know it's `index.php`? Also: Have you tried removing `index.php` by deleting it? What does happen then?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27589568
answer count: 3
downvote count: 0
has title: Why parameters in JavaScript functions doesn't need var as type?
has answer: http://stackoverflow.com/a/27589795
favorite count: 0
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/27589613
upvote count: 3
has comment: http://stackoverflow.com/comment/43603229
possible better answer: http://stackoverflow.com/a/27589746
accepted answer: http://stackoverflow.com/a/27589613
type: Question
has answer: http://stackoverflow.com/a/27589746
has comment: http://stackoverflow.com/comment/43603402
linked to: http://stackoverflow.com/q/1470488
tagged with: javascript
has comment: http://stackoverflow.com/comment/43603308
has body: I know it seems silly question but I'm actually confused with following scenario which as follows... I understood that for every variable we need to specify datatype as var or though it's not a good practice we can go without var as well. For instance We can either use var name = "kishore"; or simply name = "kishore"; But, when it comes to variables that we are passing as parameters in functions, Why doesn't they accept var? If I'm not wrong, I think those are just like other variable which has to store some value that can be accessible in that function. If I specify var it gives error. I just want to know what's going on there..?

http://stackoverflow.com/comment/43475292
comment on: http://stackoverflow.com/q/27523040
type: QuestionComment
has text: In fact, it is a payment webview from Atos so i'm not sure i'm allowed to post html
score: 0
type: Comment

http://stackoverflow.com/q/27547684
has title: Styling radio button label inside just one table row
tagged with: radio-button
has answer: http://stackoverflow.com/a/27547765
answer count: 1
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27547765
has body: Here is the thing, I have one table with multiple rows containing radio buttons, i want to achieve this: When i check a radio button the adjacent label changes color, and all other labels in THAT single row loose the color. Right now im close but im missing some jquery skills to remove the color properly on other radio buttons of the same row. Here is the fiddle, worth more than thousand words. Any help is much appreciated. http://jsfiddle.net/cos33qvk/ Javascript: $('input:radio').change(function(){ if($('input:radio').is(":checked")) { $(this).parent().find('label i').addClass("on"); } else { $(this).parent().find('label i').removeClass("on"); } });
type: AnsweredQuestion
type: Question
tagged with: styling
tagged with: javascript
tagged with: label
score: 0

http://stackoverflow.com/comment/43558555
type: QuestionComment
comment on: http://stackoverflow.com/q/27566813
has text: You make two different event listeners who both call the method.
score: 0
type: Comment

http://stackoverflow.com/a/29626208
answers question: http://stackoverflow.com/q/27577572
upvote count: 2
downvote count: 2
score: 0
has body: go through this http://zabuto.com/dev/calendar/examples/action.html. it contains your answer.
type: Answer

http://stackoverflow.com/a/27532708
has comment: http://stackoverflow.com/comment/43494548
type: Answer
accepted answer of: http://stackoverflow.com/q/27532566
has body: If your goal is to update the entries from OldVariants that have the same Id as the entries in RequestVariants, calling their Quantity method with the Quantity property of the requested variants, then you either need a loop of loops: function Compare(){ var OldVariants = Variants(); var RequestVariants = ProductRequests(); RequestVariants.forEach(function(req) { OldVariants.some(function(variant) { if (variant.Id == req.Id) { variant.Quantity(req.Quantity); return true; // Stops the inner loop } }); }); } ...or you'll want to build a temporary Id-&gt;Variant map and then use that: function Compare(){ var OldVariants = Variants(); var RequestVariants = ProductRequests(); var VariantMap = {}; OldVariants.forEach(function(variant) { VariantMap["x" + variant.Id] = variant; }); RequestVariants.forEach(function(req) { var variant = VariantMap["x" + req.Id]; if (variant) { variant.Quantity(req.Quantity); }); }); }
answers question: http://stackoverflow.com/q/27532566
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/43440966
comment on: http://stackoverflow.com/q/27505333
type: Comment
has text: What do you mean with "validations doesn't work"? It doesn't show messages? It simply doesn't heck for the conditions?
type: QuestionComment
score: 0

css-animations
tags question: http://stackoverflow.com/q/27610683
tags question: http://stackoverflow.com/q/27490151
type: Tag
tag name: css-animations
tags question: http://stackoverflow.com/q/27585511
tags question: http://stackoverflow.com/q/27576368

http://stackoverflow.com/a/27628731
answers question: http://stackoverflow.com/q/27628675
upvote count: 3
has comment: http://stackoverflow.com/comment/133119951
has body: have you tried this ? koa-passport
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43678438
type: Answer
score: 3
has comment: http://stackoverflow.com/comment/49374364
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27628675

http://stackoverflow.com/a/27574013
has comment: http://stackoverflow.com/comment/43574368
has comment: http://stackoverflow.com/comment/73471911
answers question: http://stackoverflow.com/q/27573017
has comment: http://stackoverflow.com/comment/73560676
has comment: http://stackoverflow.com/comment/121316920
type: AcceptedAnswer
score: 122
accepted answer of: http://stackoverflow.com/q/27573017
type: Answer
has body: I believe this is an issue with the target origin being https. I suspect it is because your iFrame url is using http instead of https. Try changing the url of the file you are trying to embed to be https. For instance: '//www.youtube.com/embed/' + id + '?showinfo=0&amp;enablejsapi=1&amp;origin=http://localhost:9000'; to be: 'https://www.youtube.com/embed/' + id + '?showinfo=0&amp;enablejsapi=1&amp;origin=http://localhost:9000';
has comment: http://stackoverflow.com/comment/43574274
has comment: http://stackoverflow.com/comment/73562503
upvote count: 127
has comment: http://stackoverflow.com/comment/69419110
downvote count: 5
has comment: http://stackoverflow.com/comment/73560689
has comment: http://stackoverflow.com/comment/70555975
has comment: http://stackoverflow.com/comment/55773877

http://stackoverflow.com/a/27483819
answers question: http://stackoverflow.com/q/27483550
score: 1
accepted answer of: http://stackoverflow.com/q/27483550
type: AcceptedAnswer
downvote count: 0
has body: You can create a strecth type image with the codelines below; var createButton = new SMF.UI.Image(); createButton.image = "answer.png"; createButton.top = 5; createButton.width = 38; createButton.height = 38; createButton.left = 5; createButton.imageFillType = SMF.UI.ImageFillType.stretch; createButton.onShow = function(e) { alert("object created"); }; You can check more info from : http://docs.smartface.io/?topic=html/M_SMF_UI_Image__ctor.htm Smartface.io Team
type: Answer
upvote count: 1

http://stackoverflow.com/comment/43512718
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27542025
type: Comment
has text: @Ginden In this case it is not the `Object.prototype` but the `Object` itself. But yes neither the `prototype` nor the Object itself of a standard Object should be changed/modified unless it is a poly-fill.

http://stackoverflow.com/comment/43675670
comment on: http://stackoverflow.com/a/27627445
type: AnswerComment
has text: @TristanWarren You probably would have noticed this if you looked at your browser's JavaScript debug console. It would be confused the first time it tried to use the jQuery library and give you an error.
score: 0
type: Comment

http://stackoverflow.com/comment/43568624
comment on: http://stackoverflow.com/a/27566579
has text: Great I got your point. can you please suggest me what can I do to overcome this problem.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/27478981
type: Answer
score: 0
has body: A simple example of putting two divs next to each other #class1 { width:200px; height:200px; background:#f0f0f0; } #class2 { position:absolute; top: 10px; left:220px; width:200px; height:200px; background:red; } &lt;div id="class1"&gt; Div1 &lt;/div&gt; &lt;div id="class2"&gt; Div1 &lt;/div&gt; http://jsfiddle.net/4n6mq14d/
answers question: http://stackoverflow.com/q/27478493

variables
tag name: variables
tags question: http://stackoverflow.com/q/27570718
tags question: http://stackoverflow.com/q/27496018
tags question: http://stackoverflow.com/q/27593486
type: Tag
tags question: http://stackoverflow.com/q/27579781
tags question: http://stackoverflow.com/q/27528364
tags question: http://stackoverflow.com/q/27589494
tags question: http://stackoverflow.com/q/27564513
tags question: http://stackoverflow.com/q/27621162
tags question: http://stackoverflow.com/q/27627306
tags question: http://stackoverflow.com/q/27614200
tags question: http://stackoverflow.com/q/27611112

http://stackoverflow.com/q/27553335
type: Question
accepted answer: http://stackoverflow.com/a/27553449
tagged with: javascript
has body: I need help with a reset button that will clear all the values selected or entered by the user. My code example is below. I have used JS before to reset all the values from a form but in this case i only need to clear a section of the form. My code is below: So each Fieldset has either text box or drop down. New Item *Item Name *Item Type Select Cash/Certificate Jewelry Clothing/Home Products Arts/Crafts Media, Music/Video Electronics Computers Collectibles Sports Equipment Liquor/Wine Animals Document Reconstruction Firearm Hazardous Material Event Tickets Other *Other Item Type *Item Description *Purchase Date (mm/dd/yyyy) If there was no purchase date, use the date the item was shipped. *Amount Requested $ // Button to clear the form.
has title: How to clear user selected values with a reset button
score: 0
has comment: http://stackoverflow.com/comment/43532990
answer count: 1
tagged with: jsp
tagged with: jquery
has comment: http://stackoverflow.com/comment/43532976
has comment: http://stackoverflow.com/comment/43533158
has comment: http://stackoverflow.com/comment/43533075
linked to: http://stackoverflow.com/q/47824
has answer: http://stackoverflow.com/a/27553449
type: AnsweredQuestion

http://stackoverflow.com/q/27616592
favorite count: 0
has comment: http://stackoverflow.com/comment/43656923
has title: Messing with jquery produced an unexpected outcome
has body: Before reading, please note I am a beginner in terms of jquery, html, and css. Before installing jquery into my site, I had a header and footer in fixed positions such that they stuck to the top and bottom of the browser. When I installed jquery, the header and footer dissapeared for some reason. The jquery functions work fine as I tested it with my functions. Anyone have any insight on why my header and footer dissapear while using jquery? Thanks: Ignore most of the code, just look at this jsfiddle: http://jsfiddle.net/w1bpmkn5/ Html: &lt;div class="header"&gt;&lt;/div&gt; &lt;div class="footer"&gt;&lt;/div&gt; &lt;script src="jquery-2.1.3.min.js"&gt;&lt;/script&gt; &lt;script src="script.js"&gt;&lt;/script&gt; css: .header { position:fixed; top:0; left:0; width:100%; height:50px; background-color: 1a1a1a; z-index: 100; } .footer { position:fixed; bottom:0; left:0; width:100%; height:50px; background-color: 1a1a1a; z-index: 100; } jquery (script.js) if needed: $(document).ready(function(){ $(".box").mouseenter(function(){ $(this).fadeTo("slow", 1); }); $(".box").mouseleave(function(){ $(this).fadeTo("slow", 0.5); }); });
upvote count: 2
has comment: http://stackoverflow.com/comment/43654560
type: UnansweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/43654602
has comment: http://stackoverflow.com/comment/43654558
has answer: http://stackoverflow.com/a/27617862
downvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/43654766
has comment: http://stackoverflow.com/comment/43655351
has comment: http://stackoverflow.com/comment/43672271
has comment: http://stackoverflow.com/comment/43654747
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/43657183

http://stackoverflow.com/a/27745464
type: Answer
score: 23
upvote count: 23
has comment: http://stackoverflow.com/comment/107539348
has body: You most likely have another tooltip library still in use (like JQueryUI/Tooltip) OR you're trying to attach a tooltip directly to the document element. Please look into your code for something like: $(document).tooltip or something like that, and remove it in order to make things work again. Be sure to review every other .tooltip() call you might already have, since they'll most likely not work anymore: you'll need to manually port them to Bootstrap in order to make them work again. If you want to keep both Bootstrap/Tooltip and JQueryUI/Tooltip (assuming that's your scenario), you can use $.widget.bridge to manually change the JQueryUI tooltip plugin name: // Change JQueryUI/tooltip plugin name to 'uitooltip' to fix name collision with Bootstrap/tooltip $.widget.bridge('uitooltip', $.ui.tooltip); You need to to this AFTER importing the JQueryUI js file and BEFORE importing the Bootstrap js file: while you're at it I also suggest you to do the same with button/uibutton to solve the exact same problem. The result code will look like that: &lt;script type="text/javascript" src="path/to/jqueryui.js" /&gt; &lt;script type="text/javascript"&gt; // Change JQueryUI plugin names to fix name collision with Bootstrap: $.widget.bridge('uitooltip', $.ui.tooltip); $.widget.bridge('uibutton', $.ui.button); &lt;/script&gt; &lt;script type="text/javascript" src="path/to/bootstrap.js" /&gt; Then you can just re-route your $(document).tooltip call to $(document).uitooltip to make everything work. Alternatively, if you don't find the offending js code and/or you don't want to use $.widget.brige, you can always manually patch bootstrap.js to avoid this kind of error. This can be done by replacing the following line (#1384 in bs 3.3.1): var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]) with this line: var inDom = $.contains((this.$element[0].ownerDocument || this.$element[0]).documentElement, this.$element[0]) Keep in mind, tho, that you'll still …
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27482695
answers question: http://stackoverflow.com/q/27482695

http://stackoverflow.com/a/27604326
has body: You could use google Markers in conjunction with Google InfoWindows: This is used to create a marker with an infowindow on it: var marker = new google.maps.Marker({ position: myLatLng, map: map, title: "Your custom title here"+i }); var infoWindow = new google.maps.InfoWindow({ content: infowindows[i]; }); If you make an array or something to hold your custom info: var infowindows = ["&lt;Your custom info here&gt; 1","&lt;Your custom info here&gt; 2","&lt;Your custom info here&gt; 3"] function createMarkersWithInfo(){ for (var i = 0; i &lt; result.length; i++) { var loacations = result[i].routes[0]; var myLatLng = new google.maps.LatLng(locations[1], locations[2]); var markers[]; markers.push( new google.maps.Marker({ position: myLatLng, map: map, title: "Your custom title here"+i }) ); //This is from the you.arenot.me reference for(var i = 0 i&lt; markers.length; i++){ google.maps.event.addListener(marker, 'click', function () { infowindow.setContent(infoWindows[i]); infowindow.open(map, this); }); } } } I haven't tested this but this is to give you an idea, i've modified the examples of Google a bit too show you how it could be done. Take a closer look at the Google API reference: InfoWindow and Marker and A solution sample with more than 1 marker
answers question: http://stackoverflow.com/q/27602324
score: 0
type: Answer

http://stackoverflow.com/a/27566321
has body: How to block selecting the desired options if the quantity is not selected. you don't need to do that, see demo below Is there a way to auto-update/live-update the price/calculations for selected type of paper option when the quantity is changed? yes, you have just to keep values of these inputs Why in my example do I need to press double-click on the desired paper option button to re-calculate the correct price for subtotal? If I press it once the subtotal price is not changing. this is normal, because you put two events on the same button "onclick" + "bind" that's what you need to do var selectedPaper = null; function subtotal(){ var price= $("#quantity option:selected").attr("data-price"); if($("#quantity").val() == 0){ $("#papertype").text("0.00"); $("#extraoptions").text("0.00"); $("input[type=radio]").attr('checked',false) selectedPaper = null; } flyersprice = $("#quantity").val() * price; $("#flyers").text(flyersprice.toFixed(2)); var sum = 0; $('.sum').each(function() { sum += +$(this).text(); }); $("#subtotal").text(sum.toFixed(2)); } $(function(){ $("#quantity").on('change',function(){ if(selectedPaper){ $(".paper li").eq(selectedPaper).trigger('click'); } subtotal(); }); $(".paper li").on('click',function(){ if($("#quantity").val() != 0){ var paperoptions = $(this).data("price") * $("#quantity").val(); $("#papertype").text(paperoptions.toFixed(2)); selectedPaper = $(".paper li").index(this); subtotal(); }else{ $("#papertype").text("0.00"); selectedPaper = null; } }); $("input[type=radio]").on('change',function(){ if($("#quantity").val() != 0){ var extraoptions = $(this).data("price"); $("#extraoptions").text(extraoptions); subtotal(); }else{ $("#extraoptions").text("0.00"); selectedPaper = null; } }); }) This a DEMO
type: Answer
has comment: http://stackoverflow.com/comment/43559989
has comment: http://stackoverflow.com/comment/43558794
has comment: http://stackoverflow.com/comment/43559423
accepted answer of: http://stackoverflow.com/q/27565791
answers question: http://stackoverflow.com/q/27565791
has comment: http://stackoverflow.com/comment/43559899
score: 0
has comment: http://stackoverflow.com/comment/43559613
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43557744

http://stackoverflow.com/comment/43390922
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27478624
has text: this cannot work, cause as soon as the while loop passes only once $exists is true
type: AnswerComment

http://stackoverflow.com/a/27619943
answers question: http://stackoverflow.com/q/27619308
has body: Solution was not to call {{myDoc}} in html directly but inside a template. app.directive("testMe", function () { return { restrict: 'E', template: '&lt;div&gt;Testdirective: {{myDoc}}&lt;div&gt;', scope: { myDoc: '=myModel' }, link: function(scope, elem, attrs){ } } }); See updated jsfiddle: http://jsfiddle.net/kx97y93k/18/ Many thanks to @Mr_Green for that hint
has comment: http://stackoverflow.com/comment/43660671
score: 3
has comment: http://stackoverflow.com/comment/43661151
downvote count: 0
upvote count: 3
type: Answer

http://stackoverflow.com/a/73762785
answers question: http://stackoverflow.com/q/27580173
has body: The following code worked for me: Passport config: passport.use('local-signup', new localStrategy({ usernameField: 'email', passwordField: 'password' }, async (email, password, done) => { try {const user = await UserModel.create({ email, password }) console.log(`Welcome!`) return done(null, user); } catch (error) { console.log(`Signup error: ${error}`) done(error) } })); Node js route: router.post( '/signup', function (req, res, next){ passport.authenticate('local-signup', { session: false }, async function (err, user, info) { try { await UserModel.findOneAndUpdate({email: req.body.email}, { firstName: req.body.firstName, lastName: req.body.lastName }, {new: true}); await req.login( user, { session: false }, (err) => { if (err) { return next(err); } const payload = { id: user._id, email: user.email }; const token = jwt.sign( payload, process.env.JWT_TOKEN_SECRET); console.log('JWT signed.'); res.status(200).json({ success: true, token: `Bearer ${token}`, user: { id: user.id, email: user.email, firstName: user.firstName, lastName: user.lastName } }); }); } catch (err) { console.log('Passport Signup err: ' + err) res.send('Sign up error: ' + err) return next(err); } } )(req, res, next) }) In few words, I used "Model.findOneAndUpdate" inside the sign-up route to update the user's document with their first and last names.
score: 0
type: Answer

http://stackoverflow.com/q/27586444
has body: I realize similar question had earlier been answered on stack overflow a few times. I checked all the questions and none were similar to mine. I have a html form that has some radio buttons. In my validation I want to check if atleast one of the radio buttons are checked. My approach so far: All radio buttons have same class All radio buttons have same name I need to check if atleast one of the radio button is selecetd read the value of selected button. My Javascript so far function supportFormValidation(){ var isChecked = $('.radioButton').attr('checked')?true:false; alert(isChecked); return false;} This always returns false. But when I try to read vale by individual IDs of each radio button it returns true. Is there any way I can check if a radio button is checked by using the class name. JSFiddle: http://jsfiddle.net/evj9nch3/
type: Question
has answer: http://stackoverflow.com/a/27586478
tagged with: javascript
has comment: http://stackoverflow.com/comment/43597333
has answer: http://stackoverflow.com/a/71192130
score: 0
answer count: 3
has title: JQuery: Check if any radio button is checked using radio button class name
has answer: http://stackoverflow.com/a/27586528
tagged with: jquery
linked to: http://stackoverflow.com/q/16051491
type: UnansweredQuestion

http://stackoverflow.com/q/27619382
has comment: http://stackoverflow.com/comment/43660968
has comment: http://stackoverflow.com/comment/43659851
has comment: http://stackoverflow.com/comment/43660001
tagged with: razor
linked to: http://stackoverflow.com/q/5181789
accepted answer: http://stackoverflow.com/a/27619695
has body: I have the following JavaScript to setup a progress bar for an upload process $(document).ready(function () { $("#uploadButton").click(function (event) { var http = new XMLHttpRequest(); var data = new FormData(); var files = $("#fileSelector").get(0).files; //data.append(files[0].name, files[0]); for (var i = 0; i &lt; files.length; i++) { data.append(files[i].name, files[i]); } http.upload.addEventListener("progress", progressHandler, false); http.addEventListener("load", completeHandler, false); http.open("POST", "./Tools/Upload"); http.send(data); event.preventDefault(); }); }); function progressHandler(event) { var percent = (event.loaded / event.total) * 100; $('.bar').width(percent); } function completeHandler() { $('.bar').width(100); } The controller method is [HttpPost] public async Task&lt;ActionResult&gt; Upload(HttpContext context) { ... } Now, when I click on my button the JavaScript fires and I can see the file name in my data FormData object. However, I get a HTTP/1.1 500 Internal Server Error When I change the method signature to [HttpPost] public async Task&lt;ActionResult&gt; Upload(IEnumerable&lt;HttpPostedFileBase&gt; files) { ... } The method gets called but the files parameter is null. What parameter type should I be using with my http.send(data); call? Thanks for your time.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43660120
has comment: http://stackoverflow.com/comment/43660018
has title: Send of XMLHttpRequest not Binding with Controller Method
has comment: http://stackoverflow.com/comment/43660660
type: Question
tagged with: c#
tagged with: asp.net-mvc-5
tagged with: asp.net-mvc
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27619695
answer count: 1

http://stackoverflow.com/a/27562703
type: Answer
score: 1
answers question: http://stackoverflow.com/q/27562639
upvote count: 1
has comment: http://stackoverflow.com/comment/85706317
has body: You may try conditional comments, without javascript: <!--[if IE]> Not for IE <![endif]--> And more: <!--[if IE]> According to the conditional comment this is IE <![endif]--> <!--[if IE 6]> According to the conditional comment this is IE 6 <![endif]--> <!--[if IE 7]> According to the conditional comment this is IE 7 <![endif]--> <!--[if IE 8]> According to the conditional comment this is IE 8 <![endif]--> <!--[if IE 9]> According to the conditional comment this is IE 9 <![endif]--> <!--[if gte IE 8]> According to the conditional comment this is IE 8 or higher <![endif]--> <!--[if lt IE 9]> According to the conditional comment this is IE lower than 9 <![endif]--> <!--[if lte IE 7]> According to the conditional comment this is IE lower or equal to 7 <![endif]--> <!--[if gt IE 6]> According to the conditional comment this is IE greater than 6 <![endif]--> <!--[if !IE]> --> According to the conditional comment this is not IE 5-9 <!-- <![endif]-->
downvote count: 0
has comment: http://stackoverflow.com/comment/43551301

http://stackoverflow.com/comment/43501431
score: 0
type: AnswerComment
type: Comment
has text: @ChrisFranklin no, it does not resolve the variable when using `terms.currentTerm` but is just taking `currentTerm` as a key. You are right though, if you want to use 'day' as the key you either have to use `terms.day` or, especially when it is in a variable `terms['day']` (or accordingly `terms[currentTerm]`.
comment on: http://stackoverflow.com/a/27536301

http://stackoverflow.com/q/27628938
favorite count: 0
downvote count: 0
has answer: http://stackoverflow.com/a/27629334
accepted answer: http://stackoverflow.com/a/27629334
has body: I am trying to render a GeoJSON polygon from a variable called data using the Google Javascript API. The overlay does not render properly and I do not know why. Can somebody please show me how to render a polygon on the map?
tagged with: geojson
type: Question
type: AnsweredQuestion
answer count: 2
score: 5
tagged with: google-maps
has title: using Google Map Javascript API to render a GeoJSON Polygon overlay from JavaScript Variable
tagged with: javascript
has answer: http://stackoverflow.com/a/42136161
upvote count: 5
possible better answer: http://stackoverflow.com/a/42136161

http://stackoverflow.com/comment/43486076
type: AnswerComment
has text: Only one of [those guys](http://stackoverflow.com/tags/promise/topusers) :-) Yes, `join` fails if any of the promises in the array fails, but that's not relevant here - `tryToLoad` *never* fails, as it catches all errors. The error handler may return an object that indicates which URL failed, though.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27515552

http://stackoverflow.com/comment/43505492
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27537663
type: Comment
has text: Loops are fast, you might find `sum.push(...)` faster than `sum[j] = ...`.

http://stackoverflow.com/comment/43660660
type: Comment
type: QuestionComment
has text: Should be no different than a standard submit with ` ` which will bind to your controller, but if you changed it to ` ` it wont. (but it will still be in `Request.Files`)
score: 0
comment on: http://stackoverflow.com/q/27619382

http://stackoverflow.com/q/27518931
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/27519930
answer count: 2
has answer: http://stackoverflow.com/a/27519003
upvote count: 5
possible better answer: http://stackoverflow.com/a/27519003
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27519930
type: AnsweredQuestion
downvote count: 0
favorite count: 0
tagged with: angularjs
type: Question
score: 5
tagged with: http://stackoverflow.com/tag/html
has title: redirecting from a modal using ng-click and the data-dismiss doesn't work
tagged with: css
has body: I was trying to navigate from a modal in a page to another page by adding a function to ng-click. When I remove the function assigned to ng-click, the data-dismiss works properly and the modal gets removed. But when I use the ng-click with a function, which redirects to an alternative page, it gets directed to the page, but the modal has not been dismissed. (the new page seems in the disabled state) Add Project The addNewProject() function redirects to the other page and adds the details in the modal to the database. I would like to know a way to get the page which was loaded later, in the editable way. (the modal should be completely removed.)
linked to: http://stackoverflow.com/q/15399958

http://stackoverflow.com/comment/43666218
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27622683
has text: I am not seeing any relevant code edition. But you can check this, use inspect element to check, div content has been replaced.

http://stackoverflow.com/q/27550050
answer count: 1
has title: Sign in with LinkedIn - button not showing
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27550250
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/43526403
tagged with: javascript
score: -1
has body: We used "Sign in with LinkedIn" for my client's website. This has worked well. But now the button does not show on Internet Explorer (I am using IE9). But the button appears on Chrome? We are using Umbraco as the CMS but I am not sure this has anything to do with the problem. When I 'View Source' in IE, I can see all the javascript but the button is just not displaying. I am going bonkers... all ideas would be welcome.
upvote count: 0

http://stackoverflow.com/comment/43445333
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/27507547
has text: If you want the same colours, I would use another array and refill it like that. But if you do want the same colours, why not just cycle through the array then?

http://stackoverflow.com/comment/43500211
comment on: http://stackoverflow.com/a/27492555
type: Comment
score: 0
type: AnswerComment
has text: Edited my answer with the stuff from your comments and your edited answer. Hopefully it helps you fixing your problem :)

http://stackoverflow.com/q/27559421
tagged with: angularjs
answer count: 0
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/43559069
score: 1
has title: Trouble to fetch data from an object in Ionic Framework
tagged with: angularjs-scope
tagged with: ionic-framework
type: Question
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/43545118
has comment: http://stackoverflow.com/comment/43698834
tagged with: angularjs-ng-repeat
has body: I have an angular controller which returns an object from which I need to show data using ng-repeat in ionic framwork. But I am facing issues while doing so. Below is my controller.js file. .controller('CardCtrl', function($scope) { var Cards = Parse.Object.extend("cards"); var User = Parse.Object.extend("User"); var query = new Parse.Query(Cards); query.equalTo("mobile", XXXXXXXXX); query.equalTo("status", true); query.find({ success: function(results) { $(".success").show(); for (var i = 0; i &lt; results.length; i++) { var object = results[i]; var id = object.id; var expiry = object.get('cardExpiry').toString(); var number = object.get('cardNumber').toString(); //checks for card type if(number.substr(0,1) === '4') { var cardType = 'Visa'; } else if(number.substr(0,1) === '5') { var cardType = 'Master'; } $scope.cards = object; console.log($scope.cards); } }, error: function(model, error) { $(".error").show(); } }); This is my code for ionic. &lt;div class="card"&gt; &lt;ion-list&gt; &lt;ion-item ng-repeat="card in cards" href="#/app/cards/{{card.id}}"&gt; {{card.cardExpiry}} &lt;/ion-item&gt; &lt;/ion-list&gt; &lt;/div&gt; I am attaching the screenshot(https://i.sstatic.net/nAHna.png) of the page I am getting. Those blank lists are coming because of the elements in the object (https://i.sstatic.net/wWo8z.png) I suppose. Again, the values I am fetching is repeating. It should be 102017 and 102018 respectively nut 102018 twice. Where am I going wrong?
favorite count: 0
has comment: http://stackoverflow.com/comment/43545023

http://stackoverflow.com/q/27627936
downvote count: 0
score: 7
tagged with: gulp-less
tagged with: less
type: Question
has body: I'm trying to compile my LESS files using the gulp-useref plugin, but it is as if the gulp-less plugin never outputs a compiled version of my LESS files in the pipeline. The LESS files get concatenated with the other CSS files without being compiled. I tried compiling my LESS separately using only gulp-less and it is working well, but I have no idea why it seems to conflict with the gulp-useref plugin. Here is my gulpfile : var gulp = require('gulp'); var rm = require('gulp-rimraf'); var gulpif = require('gulp-if'); var less = require('gulp-less'); var cssmin = require('gulp-minify-css'); var useref = require('gulp-useref'); gulp.task('clean', function () { return gulp.src(['public']) .pipe(rm({force: true})); }); gulp.task('refs', ['clean'], function () { var assets = useref.assets({searchPath: '.'}); return gulp.src(['templates/**/*.html']) .pipe(assets) .pipe(gulpif('*.less', less())) .pipe(gulpif('*.css', cssmin())) .pipe(assets.restore()) .pipe(gulpif('*.html', useref())) .pipe(gulp.dest('public/templates')); }); Thanks in advance for answers!
tagged with: javascript
favorite count: 0
possible better answer: http://stackoverflow.com/a/27651181
answer count: 3
upvote count: 7
accepted answer: http://stackoverflow.com/a/27671579
tagged with: gulp
has title: Compiling LESS using gulp-useref and gulp-less?
has answer: http://stackoverflow.com/a/27651181
has answer: http://stackoverflow.com/a/27671579
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/41246159

http://stackoverflow.com/comment/43602262
type: Comment
comment on: http://stackoverflow.com/q/27588979
score: 0
type: QuestionComment
has text: Not understood what you want to do.

http://stackoverflow.com/q/27548505
tagged with: ajax
has body: I am calling ajax call to add a single track to existing playlist. Whenever this call is made the token is immediately expired and throwing error for me. Please look into the below code: $.ajax({ url: baseUrl + '/users/' + encodeURIComponent(username) + '/playlists/' + encodeURIComponent(playlist) + '/tracks?position=0&amp;uris=' + encodeURIComponent("spotify:track:" + track), type: "POST", dataType: "text", async: false, headers: { 'Authorization': 'Bearer ' + Auth.getAccessToken() } }).success(function (r) { console.log('added track to playlist', r); ret.resolve(r); }).error(function (jqXHR, textStatus, errorThrown) { console.log(jqXHR); }); Please help me in this so that I can fix this problem. Thanks
score: 0
has comment: http://stackoverflow.com/comment/43545364
has comment: http://stackoverflow.com/comment/43821980
tagged with: playlist
has comment: http://stackoverflow.com/comment/43555122
answer count: 0
has comment: http://stackoverflow.com/comment/43525430
has comment: http://stackoverflow.com/comment/43790033
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/45225209
has title: Spotify Web API: Adding tracks to a playlist causes the access token to expire and returns an error
has comment: http://stackoverflow.com/comment/43550459
has comment: http://stackoverflow.com/comment/44674644
has comment: http://stackoverflow.com/comment/44748313
tagged with: spotify
tagged with: asp.net-web-api
tagged with: javascript

http://stackoverflow.com/a/27610388
has comment: http://stackoverflow.com/comment/43643483
answers question: http://stackoverflow.com/q/27610356
has comment: http://stackoverflow.com/comment/43643118
has comment: http://stackoverflow.com/comment/43643369
has body: Try using this inside the onclick() &lt;a id="${advisor.getAdvisorId()}" href="#" onclick="GetAdvisorReview(this)" data-toggle="modal" data-target="#datepay"&gt;img src="assets/img/services/Icon_Reviews.png" width="50" alt=""&gt;/a&gt; And the Js should be: function GetAdvisorReview(e){ alert(e.id); //Get the Id } Where the e is the element that fired the event.
downvote count: 0
type: Answer
score: 3
upvote count: 3

http://stackoverflow.com/q/27481353
has comment: http://stackoverflow.com/comment/43395897
has title: prop() takes too long
has comment: http://stackoverflow.com/comment/43395436
downvote count: 1
type: AnsweredQuestion
score: -1
type: Question
has body: I have a &lt;select&gt; element displaying values from a big database. Using jQuery I need to select the relevant items. The problem is that when I have large amount items to select, about 60,000, the time that $(options2select).prop('selected',true), can take too long, about 50 seconds! Note: I used the attr() method before, but read somewhere that prop() is faster, and it's not! I'm searching for a way to optimize this task but I can't find any. Any advice will be appreciated.
upvote count: 0
has comment: http://stackoverflow.com/comment/43395487
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43395761
has answer: http://stackoverflow.com/a/27481457
has comment: http://stackoverflow.com/comment/43395506
accepted answer: http://stackoverflow.com/a/27481457
favorite count: 0

http://stackoverflow.com/a/27556444
answers question: http://stackoverflow.com/q/27553985
score: 0
has body: If the problem is that your function only runs once when the page loads, then what you need is an event handler: function updateDisabledStatus() { if($("#acronyms").children("option:selected").length &lt; 1) { $("#createEditListSaveBtn").addClass("state-btn-disabled") .attr("disabled", "disabled"); } else { $("#createEditListSaveBtn").removeClass("state-btn-disabled") .removeAttr("disabled"); } } updateDisabledStatus(); $("#acronyms").on('change', updateDisabledStatus); Unlike captain theo's answer, this doesn't waste the user's processing power checking the status 10 times a second. Incidentally, do you really need to have a CSS class and a disabled attribute?
type: Answer

http://stackoverflow.com/a/27560952
has comment: http://stackoverflow.com/comment/43547884
type: Answer
has body: How you respond from HTTP server isn't relevant to this question as what you are asking is client-side code for that. Also this can be seen as duplicate of multiple questions from which you can get the answer to this like this (has nice overview of the idea). You can also check these two parts of jQuery for actual code examples: AJAX &amp; DOM manipulation
score: 0
has comment: http://stackoverflow.com/comment/43547906
answers question: http://stackoverflow.com/q/27560720

http://stackoverflow.com/a/27563419
has comment: http://stackoverflow.com/comment/43552389
score: 3
has comment: http://stackoverflow.com/comment/43552384
has comment: http://stackoverflow.com/comment/43552338
upvote count: 4
has body: I'd expect that you'll need to trigger click event on 'add_distribution_list' using .trigger() $('#add_distribution_list').trigger('click'); Then use a jasmine spy to monitor the method being called. There is a good post here on testing dom events with jasmine 2.x and there is a cheetsheet on using jasmine spies here There is a similar question relating to .trigger on jasmine test that may also help here
has comment: http://stackoverflow.com/comment/43552444
has comment: http://stackoverflow.com/comment/43557004
type: Answer
answers question: http://stackoverflow.com/q/27563356
has comment: http://stackoverflow.com/comment/43555426
has comment: http://stackoverflow.com/comment/43555579
downvote count: 1

http://stackoverflow.com/comment/43604597
has text: This question appears to be off-topic because it is in reality nothing more than a bug report, with two of the three questions this post asks being primarily opinion-based.
type: Comment
comment on: http://stackoverflow.com/q/27568249
type: QuestionComment
score: 9

http://stackoverflow.com/a/27480349
has comment: http://stackoverflow.com/comment/108511650
downvote count: 4
upvote count: 30
type: Answer
has comment: http://stackoverflow.com/comment/92010592
has comment: http://stackoverflow.com/comment/108511737
answers question: http://stackoverflow.com/q/27480262
score: 26
has body: Use the Moment.js library http://momentjs.com/ It will save you a LOT of trouble. moment().format('DD-MMM-YYYY');
has comment: http://stackoverflow.com/comment/91995443

http://stackoverflow.com/comment/43589172
has text: if I do a console.log() on the ajax outputHandler it appears to take the same amount of time.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27582255

http://stackoverflow.com/comment/45347138
has text: I used **JSHint** and **JSCS** together, so my setting was `"linting.prefer": ["JSHint", "JSCS"]`.
type: AnswerComment
comment on: http://stackoverflow.com/a/27612348
type: Comment
score: 2

http://stackoverflow.com/comment/43684612
type: Comment
comment on: http://stackoverflow.com/a/27632022
type: AnswerComment
has text: I guess they made an improvement not to watch for stateless, and kept the watch for stateful.
score: 0

http://stackoverflow.com/comment/43439367
has text: No, you're assigning the *result* of your `OnScuccess` method to the callback (having executed it immediately) - I assume you want the `OnSuccess` Method to only execute when your ajax request completes!
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27504393
score: 0

http://stackoverflow.com/q/27587453
has body: Here is my condition I need to draw circles based on user's input ( the number of circles). I have a problem in placing those circles in the svg container. My referral code is---http://bl.ocks.org/cjrd/6863459 If I try placing more circles in the svg , the circles get transformed to the x and y co-ordinate supplied in the nodes array. How do I go about positioning as many circles as I want without hampering the usability and the ui of the container? Lets say this is my node array:--> nodes = [{title: "Activity1", id: 0, x: xLoc, y: yLoc}, {title: "Activity2", id: 1, x: xLoc+200,y: yLoc}, {title: "Activity3", id: 2, x: xLoc+400,y: yLoc}, {title: "Activity4", id: 3, x: xLoc+600,y: yLoc}, ]; This piece of code define the circles thisGraph.circles= thisGraph.circles.data(thisGraph.nodes, function(d){ console.log("Id of the circles"+d.id); return d.id;}); And this piece of code illustrates the placement of circle in the svg var newGs= thisGraph.circles.enter() .append("g") .attr("transform", function(d){return "translate(" + d.x + "," + d.y + ")";}); The circles get transformed to d.x i.e xLoc and yLoc The alternative i tried was using: Math.random * svgHeight for cx attribute and Math.random * svg Width for cy attribute. But the circles seemed to be scattered around rendering a scattered graph!. any help would be highly appreciated@!
downvote count: 0
has title: Positioning circles in svg using d3.js
has comment: http://stackoverflow.com/comment/43601023
has comment: http://stackoverflow.com/comment/43622288
favorite count: 0
tagged with: d3.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43638714
has comment: http://stackoverflow.com/comment/43665327
score: 2
tagged with: http://stackoverflow.com/tag/svg
answer count: 0
has comment: http://stackoverflow.com/comment/43663656
type: Question
has comment: http://stackoverflow.com/comment/43622685
tagged with: javascript
upvote count: 2

http://stackoverflow.com/comment/43779447
comment on: http://stackoverflow.com/q/27613481
type: Comment
type: QuestionComment
has text: @WouterHuysentruit Thanks for the comment, I've updated the post. Both outputs are using [**`QScriptEngine::evaluate`**](http://qt-project.org/doc/qt-4.8/qscriptengine.html#evaluate).
score: 0

http://stackoverflow.com/a/27598310
upvote count: 1
score: 1
has body: It is simple that your service "messageModalService" is not returning the method 'showMessageModal', try to return form the methd messageModalService like below sample, it should work :) return{ showMessageModal: showMessageModal };
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27597990

http://stackoverflow.com/a/27568766
downvote count: 0
has body: In views/things/upvoterandom.js.erb you're trying to render @randajax like so: $('#randomajax').html("&lt;%= j(render(@randajax)) %&gt;"); But I don't see @randajax being assigned anywhere, which means that it's nil. Trying to render nil is the cause of this issue. But do confirm this by doing the following the first: $('#randomajax').html("&lt;%= j(render(nil)) %&gt;"); If it returns the same error, then we've found the culprit. Either assign @randajax something prior to rendering it or simply use: $('#randomajax').html("&lt;%= j(render(path_to_partial)) %&gt;");
type: Answer
answers question: http://stackoverflow.com/q/27520053
upvote count: 2
score: 2

http://stackoverflow.com/q/27479496
score: 0
tagged with: forms
has comment: http://stackoverflow.com/comment/43392255
tagged with: javascript
type: UnansweredQuestion
has title: Mouse click not triggering multiple actions in JavaScript
has body: i got a doubt in my booking form. i had created date picker &amp; No.of adults and room type in it. i'm calculating all no. of days using datepicker &amp; getting no.of rooms based on no.of.adult input - 4person per room if no. of adult is more than 4 rooms will be changed to 2. so what is the problem is i want to calculate the amount to be payed by mouse click events. i'm having an function for no.of.adults code below: function calc() { var textValue1 = document.getElementById('rent_room').value; var textValue2 = document.getElementById('id_days').value; var textValue3 = document.getElementById('id_rooms').value; document.getElementById('total_id').value = textValue1 * textValue2 * textValue3; var textValue4 = document.getElementById('total_id').value; var textValue5 = document.getElementById('tax_id').value; document.getElementById('tax_id').value = textValue4 / 100 * 17.5; document.getElementById('total_amount').value = ((+textValue4) + (+textValue5)).toFixed(); } but if some one changes the value of no.of days (or) room type, the calculation is not updating. i have to click on no.of adults to carry on the calculation. so i assigned same function like above to all buttons. but it is not working..it is happening like this.. Steps to reproduce the problem. click no.of.days -> room type -> no.of .adults -> value calculated. change the value of days -> no.of days got incremented(but final value is not calculated) so click on the no.of.days again -> trigger works and final value is calculated. the value is updated. but again click on the button only makes it to calculate. i need if i click on any button the value should be changed and at the same time using the new value the final amount should be calculated. form link here: http://postlor.byethost7.com/booking/ form index page code link here: http://postlor.byethost7.com/booking/index.txt kindly help me with the problem. Thanks in Advance. :)
type: Question
has answer: http://stackoverflow.com/a/27479759
tagged with: php
answer count: 1

http://stackoverflow.com/a/27526958
has comment: http://stackoverflow.com/comment/43483081
has comment: http://stackoverflow.com/comment/43483948
answers question: http://stackoverflow.com/q/27526588
has comment: http://stackoverflow.com/comment/43482799
type: Answer
has comment: http://stackoverflow.com/comment/43483721
has comment: http://stackoverflow.com/comment/43482965
has body: The trick is with this line ( issue of datatype): document.getElementById("map-txt").value = document.getElementById("map-directions").innerHTML; you are getting the data and putting in a text box which is being saved as string variable. In short. var start = [51.6111056367416, 0.08299685083337408]; //data type array start[0] will give you 51.6111056367416 where as document.getElementById("map-txt").value = [51.6111056367416, 0.08299685083337408] var start = document.getElementById("map-txt").value; //data type string start[0] will give you 5 instead of 51.6111056367416. Hope it will help,
has comment: http://stackoverflow.com/comment/43483177
has comment: http://stackoverflow.com/comment/43482547
score: 0
has comment: http://stackoverflow.com/comment/43482834
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/43483258

http://stackoverflow.com/q/27574691
has answer: http://stackoverflow.com/a/27575162
tagged with: regex
has comment: http://stackoverflow.com/comment/43576283
downvote count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/43574835
has answer: http://stackoverflow.com/a/27575212
type: Question
has body: I am brand new to regex and need some assistance in how to write an expression to pull the value after the third _ and fourth _ within my URL: http://www.companyA.com?scid=sm_aw_ban_PQRSTUV_OP12561 I just want to find "PQRSTUV" (which will be different for every URL), and then using a separate regex find the value "OP12561" (which will also be different for every URL)
has comment: http://stackoverflow.com/comment/43575001
has comment: http://stackoverflow.com/comment/43575045
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/43575023
has comment: http://stackoverflow.com/comment/43575132
has answer: http://stackoverflow.com/a/27574991
answer count: 3
has title: Pull value from specified place in URL using Regex
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/43559069
type: QuestionComment
has text: You are logging $scope.cards. It would be helpful to see this. To see if the cards collection contain the correct data to start with?
score: 0
comment on: http://stackoverflow.com/q/27559421
type: Comment

http://stackoverflow.com/a/27506213
type: Answer
has body: Do this: while(sir1.length &lt; width) { var randomNumber = Math.floor(Math.random()*101); if (sir1.indexOf(randomNumber) == -1) sir1.push(randomNumber); } while(sir2.length &lt; width) { var randomNumber = Math.floor(Math.random()*101); if ((sir2.indexOf(randomNumber) == -1) &amp;&amp; (sir1.indexOf(randomNumber) == -1)) sir2.push(randomNumber); } This way, you're first filling sir1 with unique values and then separately filling sir2 with unique values that are also not in sir1.
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27506063
upvote count: 2
answers question: http://stackoverflow.com/q/27506063
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43442564

http://stackoverflow.com/a/27510281
type: Answer
has body: localStorage is not a function. It's a simple object, which can be "stringified". To set storage value, write : localStorage[ "Storage" ] = { name: "Bob", age: 30 }; To get it, write : var Store = JSON.stringify( localStorage[ "Storage" ] ); Then to print it : document.getElementById("myElement").innerHTML = Store;
score: 0
answers question: http://stackoverflow.com/q/27509624

http://stackoverflow.com/q/27572197
favorite count: 0
linked to: http://stackoverflow.com/q/12661124
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43570515
answer count: 0
has title: ng-mouseover not calling my function when canvas overlay
tagged with: coffeescript
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/43571001
tagged with: javascript
score: 0
has body: I'm trying to implement some javascript code I found with coffeescript and angular for practice. Here is that code on stackoverflow: area-hovering However, whenever I append the canvas to the the image, my ng-mouseover function does not get called. My only guess is that overlaying the canvas somehow blocks angular from seeing my mouse over over the area polygon. Here is the code so far: AngularJS Coffeescript Code angular.module 'myApp' .controller 'myCtrl', ($scope) -&gt; context2d = {} $scope.onInit = -&gt; img = document.getElementById 'img-map' can = document.getElementById 'myCanvas' x = img.offsetLeft y = img.offsetTop w = img.offsetWidth h = img.offsetHeight imgParent = img.parentNode #imgParent.appendChild can can.style.zIndex = 1 can.style.left = x + 'px' can.style.top = y + 'px' can.setAttribute 'width', w + 'px' can.setAttribute 'height', h + 'px' context2d = can.getContext '2d' context2d.fillStyle = 'red' context2d.strokeStyle = 'red' context2d.lineWidth = 2 console.log 'safe' $scope.onEnter = -&gt; console.log 'test1' Regular HTML Snippet &lt;div class="img-map-container" ng-init="onInit()"&gt; &lt;center canvas id="myCanvas"&gt;&lt;/canvas&gt; &lt;img src="assets/images/map.png" width="640" height="512" alt="da map" id="img-map" usemap="#mymap"&gt; &lt;map name="mymap"&gt; &lt;area shape="poly" ng-mouseover="onEnter()" coords="385,140,410,245,425,255,510,255,510,140" href="" alt="" title="" class="img-map-area" id="img-map-area-1" /&gt; &lt;/map&gt; &lt;/div&gt; Any help is greatly appreciated. :)
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/27500786
type: Answer
has comment: http://stackoverflow.com/comment/43435628
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43436666
has body: Datetime configuration uses UTC numbers not YYMMDD! You should pass your datetime data with Date.UTC(year,month,day,hour,minute,second) in Series data with the format: series: [ {name:'...', data: [ [ Date.UTC(year,month,day,hour,minute,second), value ], [ Date.UTC(year,month,day,hour,minute,second), value ], ... ] } ] so you should get the year,month,... out of your json date and put it with the corresponding value in json values. Each in one array, not apart in separate arrays.
accepted answer of: http://stackoverflow.com/q/27499167
answers question: http://stackoverflow.com/q/27499167
has comment: http://stackoverflow.com/comment/43435782
has comment: http://stackoverflow.com/comment/43437850
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/q/27594903
has body: I want to do that when you click on the link scroll smoothly moves up. But somehow setTimeout does not work. Here's the code: window.onscroll = function(e) { var a = document.getElementsByTagName('a')[0]; a.style.opacity = (window.pageYOffset &gt; document.documentElement.clientHeight) ? 1 : 0; } document.getElementsByTagName('a')[0].onclick = top; function top() { if(window.pageYOffset != 0){ window.scrollBy(0, -10); setTimeout(top, 100); } } Link to the sandbox: http://jsfiddle.net/b7by1so8/
favorite count: 0
has answer: http://stackoverflow.com/a/27595102
accepted answer: http://stackoverflow.com/a/27595102
has title: Smooth scrolling does not work
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27595045
upvote count: 0
type: Question
answer count: 2
tagged with: javascript
score: -1
possible better answer: http://stackoverflow.com/a/27595045
downvote count: 1

http://stackoverflow.com/comment/43423226
type: QuestionComment
has text: Nah turned out to be my nginx config. That's awesome! I can't wait to make use of this software in other situations.
comment on: http://stackoverflow.com/q/27494562
score: 0
type: Comment

http://stackoverflow.com/a/27599916
score: 0
type: Answer
has body: try this eventDesktop = function() { $('header').unbind('click').click(function() {// here it will removes all old click events assigned to this element. console.log('Desktop'); }); }; eventPhone = function() { $('header').unbind('click').click(function() {// here it will removes all old click events assigned to this element. console.log('Phone'); }); }; eventWitch = function() { if (window.innerWidth &gt; 480) { eventDesktop(); } else { eventPhone(); } }; eventWitch(); $(window).resize(function() { eventWitch(); });
answers question: http://stackoverflow.com/q/27599684

http://stackoverflow.com/q/27496673
tagged with: drupal
type: Question
tagged with: drupal-7
answer count: 1
tagged with: javascript
tagged with: jquery
has title: Drupal theme custom js not executing on /user pages only
has body: I have a custom script.js in my drupal theme. One of it's functions is to toggle a class on the offcanvas navigation when a button is clicked. It works perfectly on all pages of the site...apart from those at: /user/login /user/pass /user/register /user when not logged in (which has the same form therefore as user/login). /user when logged in (profile page) and user profiles at their proper urls (eg. /user/1) work perfectly fine. I don't have separate page templates for the pages that aren't working. I do however have templates for the forms on each of those pages (login, register, password request) that were done using this method. It feels like that's relevant even though they are templates for the form and not the actual page. The script js is loading fine and it's not throwing any errors. Example of it working: http://charityapprentice.org/ (and all other pages you can browse) Example of it not working: http://charityapprentice.org/user/login
has answer: http://stackoverflow.com/a/27501487
score: 0
type: UnansweredQuestion

web-scraping
tags question: http://stackoverflow.com/q/27593651
tags question: http://stackoverflow.com/q/27557767
tags question: http://stackoverflow.com/q/27621959
tags question: http://stackoverflow.com/q/27506705
tag name: web-scraping
tags question: http://stackoverflow.com/q/27491625
type: Tag

http://stackoverflow.com/comment/43640052
has text: What error are you getting to lead you to believe that `xmlStartTime` is not a Date object? You do reassign its type in your code but the final result looks like a Date object.
score: 1
comment on: http://stackoverflow.com/q/27608578
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27490284
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43412552
answer count: 0
linked to: http://stackoverflow.com/q/10752055
has body: I was trying to display a changing temperature value, in an html file, using the js. But all I got was a blank page. I included the jQuery library in the same directory, in addition to the txt file I was trying to parse. Also tried changing the txt file to a php file like in the original code I got from here. Apparently there was nothing wrong with my code. So what could be the matter? Auto-Refresh DIV After getting this response from my console: XMLHttpRequest cannot load file:///C:/foo/load.txt. Cross origin requests are only supported for protocol schemes: http, data, chrome-extension, https, chrome-extension-resource.jquery-1.11.1.min.js... I tried loading the page through localhost, as this post suggested. But the page was still blank...
type: Question
tagged with: refresh
duplicate of: http://stackoverflow.com/q/10752055
has comment: http://stackoverflow.com/comment/43417781
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/43412414
has comment: http://stackoverflow.com/comment/43420657
has comment: http://stackoverflow.com/comment/43417809
tagged with: jquery
has title: Automatically parse file with jQuery

http://stackoverflow.com/q/27527427
has comment: http://stackoverflow.com/comment/43483574
tagged with: javascript
score: -1
upvote count: 2
has body: I am trying to find out if two given milli seconds have same dates regardless of time... This is what I am getting, var getCurrentMS = Date.now(); // output : 1418825132083 var someDateMS = Date.Parse("17 December 2014 18:00"); // output: 1418839200000 now I want to compare both Milli seconds if it's today's date or not..
has answer: http://stackoverflow.com/a/27527474
answer count: 3
has comment: http://stackoverflow.com/comment/43483409
downvote count: 3
has answer: http://stackoverflow.com/a/27527480
accepted answer: http://stackoverflow.com/a/27527480
has title: Comparing two mill i seconds in JavaScript to find out if dates are same
favorite count: 0
possible better answer: http://stackoverflow.com/a/27527474
has answer: http://stackoverflow.com/a/27527581
type: AnsweredQuestion
type: Question

http://stackoverflow.com/a/27571426
upvote count: 1
type: AcceptedAnswer
has body: Try adding @JavascriptInterface to your test() method http://developer.android.com/reference/android/webkit/JavascriptInterface.html Need the annotation starting with JellyBean
type: Answer
answers question: http://stackoverflow.com/q/27568990
has comment: http://stackoverflow.com/comment/43568467
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27568990
score: 1

http://stackoverflow.com/q/27592526
tagged with: php
linked to: http://stackoverflow.com/q/11941123
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/27592663
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has title: Auto updating a php image every x seconds
type: UnansweredQuestion
has body: So I have div which contains a php as body background. Let's say it's image.php image.php display's a different image depending on the hour/day/month Now if my website remains open for more than an hour the same image is still displayed which is.. well not how it should be. However displaying the image works, It doesn't update and frankly, I don't quite know how to approach this. So here I'm not asking for someone to make this script for me, but rather point me in the correct direction to have a script that reloads the php file completely. Thank you in advance! EDIT: Sorry for making it unclear, I really need only the specified div bg to completely reload, not the entire webpage. That's where I get stuck on creating this. I know how to update an image but as far as I know, that image is already loaded on entering the website so it won't update furtheron, Reloading the entire page is also no-go since the image is placed in the header, and the header is not updating on page navigation since it contains an audio player
has answer: http://stackoverflow.com/a/27592543

http://stackoverflow.com/q/27554672
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27555995
tagged with: internet-explorer-10
type: Question
has title: Internet explorer 10 issues with arcgis javascript library
answer count: 2
tagged with: internet-explorer
tagged with: javascript
tagged with: esri
has answer: http://stackoverflow.com/a/28589526
has body: I am using javascript api from arcgis to have map functionality in my application. the script works fine in all browsers(google chrome, firefox, ie7,8,9). But throws access denied errors in IE 10 and errors look like below. i am not posting any code due to security reasons, and the problem is only with IE 10, so this must be a browser specific issue. Has anyone ran into this issue before? Error: Access is denied. Error: Access is denied. k (http://js.arcgis.com/3.11/:161:153) at xhr (http://js.arcgis.com/3.11/:195:207) at xhrGet (http://js.arcgis.com/3.11/:195:483) at y (http://js.arcgis.com/3.11/:876:354) at c (http://js.arcgis.com/3.11/:878:207) at x (http://js.arcgis.com/3.11/:884:43) at addressToLocations (http://js.arcgis.com/3.11/esri/tasks/locator.js:8:26) at _performTask (http://js.arcgis.com/3.11/esri/dijit/Geocoder.js:30:238) at _query (http://js.arcgis.com/3.11/esri/dijit/Geocoder.js:26:47) at _findQuery (http://js.arcgis.com/3.11/esri/dijit/Geocoder.js:19:440)
score: 0
tagged with: arcgis-js-api

http://stackoverflow.com/comment/43691713
comment on: http://stackoverflow.com/a/27635930
score: 0
type: AnswerComment
has text: Ok - so make a screenshot of the console with your first version of the code.
type: Comment

http://stackoverflow.com/a/27497090
score: 1
answers question: http://stackoverflow.com/q/27496813
upvote count: 1
has comment: http://stackoverflow.com/comment/43434329
downvote count: 0
type: AcceptedAnswer
type: Answer
has body: I'm assuming your question is about how to set things up so your proposed syntax can work exactly as you specified: var Mark = new Employee(id).WorkerBee(project).Engineer(); So this post is not about the philosophy of inheritance, whether JS does or not have classes, or is classical inheritance a good thing, or hey you should use class system XYZ, or anything else, but specifically about how to achieve your syntax. In a nutshell, your syntax is going to be tricky to implement if you try to adhere to "classical" inheritance. Your Employee constructor, when called with new, is going to need to return something, but at that point it knows nothing about what the object is going to end up being. Once the object is created as an Employee, it can't easily be transformed into a subclass, such as WorkerBee or Engineer, although I suppose one could muck about with setPrototypeOf. Instead, you could use a kind of vaguely parasitical approach to inheritance: function Employee(id) { this.id = id; this.WorkerBee = function(project) { this.project = project; this.Engineer= function() { ... return this; }; return this; }; } This is not the inheritance model that your Dad used to program in Java. There is only one constructor, for Employee. Whether an object is an Engineer or anything else is purely a matter of what properties or methods it happens to contain, which may be placed there by convenience methods provided such as WorkerBee. There is no actual WorkerBee "class", or constructor, or prototype underlying its instances. This may well bother people coming from languages like Java or C++, but there is nothing really wrong with it, and some people might even say it is more JavaScript-like. There are well-known issues such as the fact that methods reside in the instances, rather than the prototypes. However, if you really want the syntax you proposed, you're going to need to go in this direction or something similar.
accepted answer of: http://stackoverflow.com/q/27496813

http://stackoverflow.com/a/27596977
answers question: http://stackoverflow.com/q/27596652
has comment: http://stackoverflow.com/comment/60918412
accepted answer of: http://stackoverflow.com/q/27596652
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/61354418
type: Answer
upvote count: 13
has body: The trick is to load your svg as XML via XHR and manipulate it any way you want, then create your image out of it using data:image format. E.g. $.get('img/bottomLeftTop.svg', function(svgXml) { var img = new Image(); var coloredSvgXml = svgXml.replace(/#3080d0/g,'#e05030'); img.onload = () => context.drawImage(img,0,0); img.src = "data:image/svg+xml;charset=utf-8,"+coloredSvgXml; }); Here is a snippet I created to demonstrate the manipulation principle. It uses in-html hidden svg node to draw on 2d canvas, then changes the color via regexp and draws on the same canvas again: var canvas = document.getElementById("canvas"); var context = canvas.getContext("2d"); var svg = document.getElementById('tmpSvg') var blueCircle = (new XMLSerializer).serializeToString(svg); var img = new Image(); img.onload = () => context.drawImage(img, 0, 0, 160, 120); img.src = "data:image/svg+xml;charset=utf-8;base64, " + btoa(blueCircle); redCircle = blueCircle.replace(/#3080d0/g, '#e05030'); var img2 = new Image(); img2.onload = () => context.drawImage(img2, 10, 10, 160, 120); img2.src = "data:image/svg+xml;charset=utf-8;base64, " + btoa(redCircle); .wrapper { display: none; } #canvas { width: 400px; height: 300px; } <circle id="my-circle" cx="50" cy="50" r="30" /> Of course, nothing prevents you from using JavaScript built-in XML parser and XPath-based node manipulation. But in this particular case and for particular colors, regexp is probably more efficient.
score: 13

http://stackoverflow.com/a/27547180
has body: I just did this like 2 days ago for a site i'm creating. So what you want to do is set up session variables and check to see if they are there or not. I assume you have the login functionallity working, Where it checks the database to see if the user name and password match. If it does, you send them to the myResume.php. The next step under login.php would be to set up a $_SESSION['user_id'] variable in php. This matches the session of a user to a serverside session. This variable is help on the server side with an access key stored in local cookies to match the session to the user. What is a Session? The next thing you will want to do is add an if and header to every file on your site that should only be allowed access to logged in users. session_start(); if(empty($_SESSION['user_id'])){ header('Location: login.php'); } If you want to log out you do something like this. You send them to a logout.php and in the logout.php file you simple have this statement. session_start(); session_destroy(); header('location: login.php'); you have to allways start your session on each page before you can, use, set, destroy session variables.
accepted answer of: http://stackoverflow.com/q/27546984
answers question: http://stackoverflow.com/q/27546984
score: 2
type: AcceptedAnswer
downvote count: 0
upvote count: 2
type: Answer

http://stackoverflow.com/comment/51979847
type: AnswerComment
score: 0
type: Comment
has text: ...and than suddenly `$(dom)` :)
comment on: http://stackoverflow.com/a/27487590

http://stackoverflow.com/comment/43660723
type: AnswerComment
type: Comment
has text: This makes sure that the files are sent correctly to the server.
comment on: http://stackoverflow.com/a/27619695
score: 0

http://stackoverflow.com/comment/43395792
type: Comment
has text: it worked. I had at the top, which i din't observed. Thanks again.
type: AnswerComment
comment on: http://stackoverflow.com/a/27478860
score: 0

http://stackoverflow.com/comment/43685184
has text: Yes. you have to put over else if block where you check that extension is xml. Problem is part of code not entire code.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27632448

http://stackoverflow.com/comment/43494723
score: 1
comment on: http://stackoverflow.com/a/27533153
type: AnswerComment
has text: this will work, but will also prevent the select's value from being submitted - disabled elements are not submitted with the rest of a form.
type: Comment

http://stackoverflow.com/comment/43610350
score: 0
has text: You need to fetch the id from url by server, then your server will catch it and show it at the slider. In which framework/language you backend is? or you can use cookies/localStorage to show the image.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27593280

http://stackoverflow.com/q/27623340
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
score: 2
answer count: 0
upvote count: 2
type: Question
has comment: http://stackoverflow.com/comment/43674828
tagged with: javascript
downvote count: 0
has title: How can I copy the contents of clipped HTML canvas region?
favorite count: 0
has body: I am trying to copy the contents of a clipped canvas region. I am using a onmousemove listener to capture a given region, and would like to copy its contents upon the occurence of an onclick event: var started = false; editor_canvas.onmousemove = function (e) { e = e || window.event; var x = event.pageX; var y = event.pageY; if (!started) { editor_context.beginPath(); editor_context.moveTo(x, y); started = true; return; } var rect = editor_canvas.getBoundingClientRect(); x = x - rect.left; y = y - rect.top; editor_context.lineWidth = 5; editor_context.strokeStyle = 'red'; editor_context.lineTo(x, y); editor_context.stroke(); }; editor_canvas.onclick = function(e) { editor_context.clip(); } JSFiddle here: http://jsfiddle.net/0nn78uxr/

http://stackoverflow.com/comment/43463260
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27516458
has text: Not sure if I can do this from codebehind directly or need javascript

http://stackoverflow.com/q/27554559
tagged with: crossfilter
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: d3.js
type: UnansweredQuestion
has title: Multiline Chart
upvote count: 1
has body: I'm trying to create a composite multi-line chart using dc.js' composite charts. My data is in the following format: var indexData = [ {id: "1", weekNumber: 1, topic:12}, {id: "2", weekNumber: 7, topic:2}, {id: "3", weekNumber: 5, topic:7}, ] I'm trying to create the chart, such that on X-Axis I have week number, and on Y-Axis I have frequency of records. I want to have a line for each topic (there are 20 topics, hence 20 lines) showing the number of records for each week that have that topic value. This is what my code looks like: var topicTimeChart = dc.compositeChart("#topicsLineChart"); var crossFilterObj = crossfilter(indexData); var all = crossFilterObj.groupAll(); var weekSelection = crossFilterObj.dimension(function(d){ return d.weekNumber;}); var dateDimension = weekSelection.group().reduceCount(function(d){return d;}); var topicSelection = crossFilterObj.dimension(function(d){return d.topic;}); var topic0 = topicSelection.group().reduceCount(function (d){ if (d == 0) { return d; } }); topicTimeChart.width(1200) .height(300) .margins(margin) .dimension(dateDimension) .transitionDuration(500) .elasticY(true) .brushOn(false) .valueAccessor(function (d) { return d.value; }) .title(function(d){return "\nNumber of documents: " + d.key;}) .x(d3.scale.linear().domain([0, maxWeekNumber])) .compose([ dc.lineChart(topicTimeChart).group(topic0) ]); dc.renderAll(); Currently I was only trying to render the line for topic=0 but it doesn't seem to work. Any idea where I am going wrong?
has answer: http://stackoverflow.com/a/27556380
score: 1
has answer: http://stackoverflow.com/a/27622601
tagged with: dc.js
type: Question

http://stackoverflow.com/comment/43602241
score: 0
has text: Can you give a sample input and desired output?
comment on: http://stackoverflow.com/q/27589013
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27614200
has answer: http://stackoverflow.com/a/27614250
accepted answer: http://stackoverflow.com/a/27614250
has answer: http://stackoverflow.com/a/27617539
has comment: http://stackoverflow.com/comment/43650376
tagged with: typescript
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/2999604
has body: I have a variable oneDay for which I have assigned an integer number var oneDay = 24 * 60 * 60 * 1000; // hours*minutes*seconds*milliseconds I'm releasing the memory occupied by oneDay using the below syntax at the end of the function termination in which the code has been declared. var oneDay=null; The error that I'm getting : error TS2134: Subsequent variable declarations must have the same type. Variable 'oneDay ' must be of type 'Date', but here has type 'null'. What could be the possible solution for this??Thanks
tagged with: memory-management
score: -4
has comment: http://stackoverflow.com/comment/43651070
has comment: http://stackoverflow.com/comment/43650401
has comment: http://stackoverflow.com/comment/43650492
type: Question
has comment: http://stackoverflow.com/comment/43650762
has comment: http://stackoverflow.com/comment/43650445
has comment: http://stackoverflow.com/comment/43651656
has comment: http://stackoverflow.com/comment/43650421
has comment: http://stackoverflow.com/comment/43650417
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43650433
downvote count: 6
has comment: http://stackoverflow.com/comment/43650411
has comment: http://stackoverflow.com/comment/43650415
upvote count: 2
answer count: 2
has comment: http://stackoverflow.com/comment/43650413
has comment: http://stackoverflow.com/comment/43650407
tagged with: variables
has title: Memory deallocation in TypeScript
favorite count: 0
has comment: http://stackoverflow.com/comment/43650405
has comment: http://stackoverflow.com/comment/43650374
possible better answer: http://stackoverflow.com/a/27617539
has comment: http://stackoverflow.com/comment/43650392

http://stackoverflow.com/a/27515101
has comment: http://stackoverflow.com/comment/43460784
answers question: http://stackoverflow.com/q/27515031
score: 0
has comment: http://stackoverflow.com/comment/43460753
has body: No shorthand in ECMAScript 5 (the current version), but you can make a method function createObject(key, value /*, key, value, ... */ ) { var object = {}; for (var i = 0; i &lt; arguments.length; i = i + 2) { object[arguments[i]] = arguments[i+1]; } return object; } Then you can call it like this var obj = createObject(key, value, 'anotherKey', 'anotherVal');
type: Answer

http://stackoverflow.com/a/27583621
accepted answer of: http://stackoverflow.com/q/27577099
upvote count: 2
answers question: http://stackoverflow.com/q/27577099
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/43601356
score: 2
has body: it is because your req.body contains address: '{}' which is string not array and not object if you write var body={ name: 'santhu', address: []}; //and not { name: 'santhu', address: '{}'} var employee = new Employee(body); it will work fine
has comment: http://stackoverflow.com/comment/43605260
has comment: http://stackoverflow.com/comment/43601475
has comment: http://stackoverflow.com/comment/43601376

http://stackoverflow.com/comment/43658170
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27618551
has text: Yeah, good old `watch` was a Netscape extension that (as far as I know) was never implemented by any other vendor. I'm curious about Node.

http://stackoverflow.com/a/27535569
has body: I'm just a beginner with proxies, but as far as I know, the proxy cannot do what you need. It just gives you back the property you're looking for, it can't know how you're going to use it.
score: 2
downvote count: 0
type: Answer
upvote count: 2
answers question: http://stackoverflow.com/q/27532794

http://stackoverflow.com/comment/43459398
has text: @GVashist thank you so much, I feel like such an idiot after re-reading that once I read your comment. Thank you to the both of you for helping me fix it! It is honestly greatly appreciated! I can finally hand in my Computer Science coursework! :D
comment on: http://stackoverflow.com/a/27513982
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/43536094
type: QuestionComment
comment on: http://stackoverflow.com/q/27554831
score: 0
type: Comment
has text: In place of 'else {clearTimeout(animator);}', try 'else {scrollY = currentY-distance; window.scroll(currentY, scrollY);}'

http://stackoverflow.com/comment/43427455
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27492332
type: QuestionComment
has text: I don't see where or at what point you're attaching this `` block in your view. Could you show when this is inserted into the DOM?

http://stackoverflow.com/comment/43623556
score: 0
has text: I know this. My question is not only for this scenario, but to know if there is option in angular itself.
type: QuestionComment
comment on: http://stackoverflow.com/q/27600010
type: Comment

zurb-reveal
tags question: http://stackoverflow.com/q/27530335
type: Tag
tag name: zurb-reveal

http://stackoverflow.com/q/27511153
has title: Fill SVG element with a repeating linear gradient color
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/43452660
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
score: 16
has comment: http://stackoverflow.com/comment/43455673
accepted answer: http://stackoverflow.com/a/27515025
has answer: http://stackoverflow.com/a/34402934
has body: I have an SVG element - a rectangle. Now, to color this element, I use fill attribute that works with any color. Now, I am trying to give it a stripes color by using this property fill: repeating-linear-gradient(-45deg, #cc2229, #ffffff 4px, #cc2229 2px, #ffffff 8px); This works for normal DOM elements when assigned to background attribute. But, IT DOESN'T WORK WITH SVG ELEMENT. How can i achieve that? - this is how i am trying my SVG element to look like (I am using d3.js)
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27515025
type: Question
answer count: 2
downvote count: 0
upvote count: 16
tagged with: javascript
favorite count: 0
possible better answer: http://stackoverflow.com/a/34402934

http://stackoverflow.com/a/27618038
type: Answer
has comment: http://stackoverflow.com/comment/43657194
has body: There are two main issues with your code. Firstly, you are constructing an array incorrectly. In order to construct an array based on the checkbox value, you do not construct it literally (i.e. by inserting , between values). Instead, you use .push(), i.e.: var value = [], count = 0; $('#map-canvas input:checked').each(function() { value.push($(this).attr('value')); count++; }); $('#cmpIds').val(value); Secondly, you should also avoid using inline JS for the delete function. Use .on() if you want to bind event handlers to dynamically added elements. Therefore, for the injected markup, simply remove the inline JS reference: Remove Also, I have used $(this).closest('.media') to find the .parent().parent(), as it is more verbose. You can cache this selector so jQuery wouldn't have to comb through the DOM repeatedly within the same click event: $(document).on('click', '.text-success', function() { var $parent = $(this).closest('.media'); // Remove listing $parent.remove(); // Uncheck associated textbox var parentID = $parent.attr('id'), checkboxID = parentID.split('_'); $('#'+checkboxID).prop('checked', false); }); Working fiddle here: http://jsfiddle.net/teddyrised/z0Lkbmyh/4/ Additional notes: your value array and count variable are reset every time a change event is registered on your checkbox. I suspect, although I cannot confirm, that this is not the desired behavior — I believe you want to keep track of checked properties on the go. Therefore, you should declare both of them outside the .change() handler: var value = [], count = 0; $(document).on('change', '.wrapmap-gist input:checkbox', function() { $('#map-canvas input:checked').each(function() { value.push($(this).attr('value')); count++; }); $('#cmpIds').val(value); // Rest of your code here });
has comment: http://stackoverflow.com/comment/43657417
has comment: http://stackoverflow.com/comment/43657274
answers question: http://stackoverflow.com/q/27617798
accepted answer of: http://stackoverflow.com/q/27617798
has comment: http://stackoverflow.com/comment/43657247
has comment: http://stackoverflow.com/comment/43657351
score: 0
type: AcceptedAnswer

http://stackoverflow.com/a/27492547
accepted answer of: http://stackoverflow.com/q/27483711
has body: Magento never uses the prices that are displayed on the product view to charge customers, otherwise you could come in with firebug and get stuff for free, instead the values on the frontend are there just for display purposes, Magento will go recalculate the price of the product before it's added to the cart. You can hook into an event to change the price of the Item before it is added to the Quote. <sales_quote_add_item> <priceupdate_observer> singleton mymodule/observer updatePrice </priceupdate_observer> </sales_quote_add_item> And then on the observer class public function updatePrice($observer) { $event = $observer->getEvent(); $quote_item = $event->getQuoteItem(); $new_price = <insert logic> $quote_item->setOriginalCustomPrice($new_price); $quote_item->save(); } On $new_price you will set the value you want. Shamelessly stole code from the following answer Changing the price in quote while adding product to cart: magento
upvote count: 2
type: AcceptedAnswer
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/27483711

http://stackoverflow.com/a/27632549
has comment: http://stackoverflow.com/comment/43687971
has comment: http://stackoverflow.com/comment/102075618
answers question: http://stackoverflow.com/q/27632391
type: AcceptedAnswer
downvote count: 0
score: 72
upvote count: 72
has comment: http://stackoverflow.com/comment/43688545
type: Answer
accepted answer of: http://stackoverflow.com/q/27632391
has comment: http://stackoverflow.com/comment/56996710
has comment: http://stackoverflow.com/comment/102084034
has body: This is because the Abstract Equality Comparison Algorithm requires that if Type(x) or Type(y) is a Boolean in the expression x == y then the Boolean value should be coerced to a number via ToNumber, which converts true to 1 and false to +0. This means that any comparison of true == something or something == true results in 1 == something or something == 1 (replacing true and 1 with false and +0 for false). The Null type does not compare as equal to either 1 or +0 (in fact, null is only comparable to undefined in the Abstract Equality Comparison Algorithm). There is a detailed discussion of all of the different kinds of equality in JavaScript on MDN that is well worth looking at if you want to know more. However, if you coerce null to a number it is coerced to +0 so +null == false actually returns true.

http://stackoverflow.com/comment/43638665
score: 1
has text: In your example you pass a valid number (the result of a mathematical expression) to CDec() so there is no point in calling CDec() in the first place. For other unknown values, deal with a leading `-`
comment on: http://stackoverflow.com/q/27608009
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43637752
has text: To be honest it's not so much a practical issue as an experiment in type assertion. I'm investigating possibilities for creating functions which can be said to conform to certain expectation at run-time, eg is this an `eventHandler` or a `getterSetter` etc.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27591932

http://stackoverflow.com/q/27571467
has title: Google Map not centering properly when in a scaling circle
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: I have been trying to get my head around this issue for hours now - no result so far, so I am turning to you now. I have embedded a google map in my website. Then I gave the div a border-radius of 100% in order to make the map appear circular. So far, so good. But when I wanted to make the circle scalable/responsive, I tried to use the old padding-bottom css-hack which I found ages ago here on stack overflow. Thanks to this trick, the circular map scales perfectly well now. However, this also seems to set the map off center and I cannot figure out why or come to a fix. I am really looking forward to any solution here ... Best regards, Jan I have a fiddle demonstrating the issue here (With complete HTML/JS/CSS) CSS below: .cms-map-wrapper.circular { width: 50%; margin: auto; background-color:red; } .cms-map { border: solid 5px blue; border-radius: 100%; padding-bottom: 100%; margin-bottom: 20px; }
tagged with: css
accepted answer: http://stackoverflow.com/a/27571742
type: AnsweredQuestion
tagged with: responsive-design
has answer: http://stackoverflow.com/a/27571742
linked to: http://stackoverflow.com/q/12121090
type: Question
tagged with: google-maps

http://stackoverflow.com/comment/43665591
type: Comment
has text: What's the error message from `logs/error.log`?
type: QuestionComment
comment on: http://stackoverflow.com/q/27618366
score: 0

http://stackoverflow.com/q/27513315
answer count: 2
tagged with: for-loop
has answer: http://stackoverflow.com/a/27513380
accepted answer: http://stackoverflow.com/a/27513380
possible better answer: http://stackoverflow.com/a/27513386
has answer: http://stackoverflow.com/a/27513386
tagged with: php
has title: Javascript and PHP using For loop
type: AnsweredQuestion
tagged with: mysql
tagged with: loops
type: Question
has body: I have the following code that will output a line chart as follows : &lt;script class="code" type="text/javascript"&gt; $(document).ready(function(){ var line1=[['2008-08-12 ',14], ['2008-09-12 ',6.5], ['2008-10-12 ',5.7], ['2008-11-12 ',9], ['2008-12-12 ',8.2]]; var plot1 = $.jqplot('chart1', [line1], { title:'Daily Sales', axes:{ xaxis:{ renderer:$.jqplot.DateAxisRenderer } }, series:[{lineWidth:4, markerOptions:{style:'square'}}] }); }); &lt;/script&gt; The output for the above code is correct, but i want to insert a PHP loop to select data from mysql and place it insde var line1 as an array So I created a test code as follows : &lt;script class="code" type="text/javascript"&gt; $(document).ready(function(){ &lt;?php $date = date('Y-m-d'); for($i=1;$i&lt;6;$i++){ $newdate = strtotime ( '+1 month' , strtotime ( $date ) ) ; $newdate = date ( 'Y-m-j' , $newdate ); ?&gt; var line1='&lt;?php echo $newdate; ?&gt; ',&lt;?php echo $i ?&gt;; &lt;?php $date = $newdate; } ?&gt; var plot1 = $.jqplot('chart1', [line1], { title:'Daily Sales', axes:{ xaxis:{ renderer:$.jqplot.DateAxisRenderer } }, series:[{lineWidth:4, markerOptions:{style:'square'}}] }); }); &lt;/script&gt; This outputs the last value which is 2015-5-16 and 5 all i want is to output all the result from 1 to 5 and having dates incremented by each month 2014-12-16 to 2015-5-16. I hope this makes sense ! Thank You
tagged with: javascript
score: 0

http://stackoverflow.com/comment/43476055
score: 0
has text: It doesn't fire for me if I render it locally - also, I didn't think script placed inside an `input` would be executed by the browser? (escaped or not)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27523030

http://stackoverflow.com/a/27633817
answers question: http://stackoverflow.com/q/27633761
type: Answer
downvote count: 0
upvote count: 4
has body: Your binding is not correct, Change the line $("li").on("click", ".anadir", function() { to $(".tree").on("click", ".anadir", function() { Working Demo
score: 4

http://stackoverflow.com/comment/43691192
comment on: http://stackoverflow.com/q/27631022
type: Comment
type: QuestionComment
score: 0
has text: The code you show in your question won't execute, and this is quite independent from RequireJS.

http://stackoverflow.com/comment/43602160
type: Comment
comment on: http://stackoverflow.com/a/27588908
score: 2
type: AnswerComment
has text: I'll update in a sec. getPosition gets the value relative to the page, not the window.

http://stackoverflow.com/q/27605683
possible better answer: http://stackoverflow.com/a/27606097
has answer: http://stackoverflow.com/a/27606097
score: 0
upvote count: 1
accepted answer: http://stackoverflow.com/a/27605795
downvote count: 1
has answer: http://stackoverflow.com/a/27606287
tagged with: c#
has answer: http://stackoverflow.com/a/27605767
has body: I need to send an array of objects to asp.net mvc 2 through json, but i am not getting null in the mvc controller The object is like this entries[1].date = "12/22/2014" entries[1].Ref = "0002" entries[1].Credit = "100" entries[2].date = "12/22/2014" entries[2].Ref = "0002" entries[2].Credit = "150" later before send, i do this JSON.stringify(entries) My data in Json looks like this [{"date":"12/22/2014","RefNo":"0002","Credit":"100"},{"date":"12/22/2014","RefNo":"0002","Credit":"150"}] my controller in asp.net method looks like this [HttpPost] public ActionResult Save(MyDataModel[] entries) { } and my jquery send code $.ajax({ // create an AJAX call... type: 'post', // GET or POST url: url, // the file to call dataType: 'json', data: JSON.stringify(entries), // get the form da }) The MyDataModel is a model class with the properties of the entries More data public class MyDataModel { public string Date { get; set; } [Required(ErrorMessage = "RefNo is required", AllowEmptyStrings = false)] [StringLength(40, ErrorMessage = "RefNo Must be Under 40 characters long", MinimumLength = 1)] public string RefNo { get; set; } // Credit [Required(ErrorMessage = "Credit is required", AllowEmptyStrings = false)] [Range(typeof(Decimal), "1", "999999999999", ErrorMessage = "Credit Must be a number and non zero")] public decimal? Credit { get; set; } } But the entries is always null, why?
tagged with: asp.net-mvc
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
answer count: 4
type: AnsweredQuestion
tagged with: jquery
favorite count: 0
has title: objects array data in asp.net mvc is always null
has comment: http://stackoverflow.com/comment/43635993
has answer: http://stackoverflow.com/a/27605795
type: Question
has comment: http://stackoverflow.com/comment/43633569
has comment: http://stackoverflow.com/comment/43633529
has comment: http://stackoverflow.com/comment/43633585
has comment: http://stackoverflow.com/comment/43634820

http://stackoverflow.com/comment/43695746
comment on: http://stackoverflow.com/q/27638476
type: Comment
type: QuestionComment
has text: Show your example in a fiddle.
score: 5

http://stackoverflow.com/comment/43438700
type: QuestionComment
comment on: http://stackoverflow.com/q/27503555
score: 0
has text: See second answer on this question: http://stackoverflow.com/q/1305397/87015
type: Comment

http://stackoverflow.com/comment/43399844
score: 0
has text: Please edit your answer in order to add a context to the code (the comments are ok but it's not sufficient).
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27483369

http://stackoverflow.com/tag/csv
type: Tag
tag name: csv
tags question: http://stackoverflow.com/q/27529589
tags question: http://stackoverflow.com/q/27608644
tags question: http://stackoverflow.com/q/27537354
tags question: http://stackoverflow.com/q/27567437
tags question: http://stackoverflow.com/q/27588199
tags question: http://stackoverflow.com/q/27559351

http://stackoverflow.com/comment/43582442
has text: Can you please add some more details to your question.?? Could not understand it. what does `"" inside ""` mean?
comment on: http://stackoverflow.com/q/27578889
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/43649895
has text: That's actually two comma expressions, equivalent to `((1, 2), 3)`, just as `1 + 2 + 3` is two addition expressions.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27613929

http://stackoverflow.com/a/27617565
score: 0
has comment: http://stackoverflow.com/comment/43656302
has comment: http://stackoverflow.com/comment/43656346
type: Answer
has body: Try this... &lt;script&gt; $.ajax({ type: "POST", url: "../actions/selectReferenceOrder.php", data: "{'product_name':" + product_name + ", 'product_size':" + product_size+ "}", cache: false, dataType: "html" success:function(html) { document.getElementById('outputReference').innerHTML = html; } }); &lt;/script&gt;
answers question: http://stackoverflow.com/q/27616870

http://stackoverflow.com/q/27493070
favorite count: 0
has comment: http://stackoverflow.com/comment/43418303
has comment: http://stackoverflow.com/comment/43418115
has body: In the following code, is there a way to allow everything to receive the event minus the div, when the Hello is clicked? HTML : Hello JavaScript : window.addEventListener("load", function () { var els = document.querySelectorAll("*"); for (var i = 0; i < els.length; i++) { els[i].addEventListener("click", function () { alert('Click event fired on the ' + this.nodeName + ' element'); }); } }); JSFiddle
upvote count: 1
accepted answer: http://stackoverflow.com/a/27493112
has comment: http://stackoverflow.com/comment/43418129
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/27493166
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/27493166
has comment: http://stackoverflow.com/comment/43417960
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27493112
has comment: http://stackoverflow.com/comment/43417828
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43417835
tagged with: css
has title: Is there a way to prevent jQuery event bubbling to a particular div?

http://stackoverflow.com/q/27601224
favorite count: 0
has comment: http://stackoverflow.com/comment/43624921
has title: How to parse xml string that contains the attribute on client using $.parseXML?
has body: How to parse xml string that contains the attribute on client? I have tried this code and it does not work: $.parseXML(' Stuff Stuff ') But this code works fine: $.parseXML(' Stuff Stuff ')
has answer: http://stackoverflow.com/a/27601355
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43625441
upvote count: 1
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/27601355
score: 0
tagged with: xml-parsing
has comment: http://stackoverflow.com/comment/43625000
has comment: http://stackoverflow.com/comment/43625119
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/27552832
has body: The latest version of jquery.pep.js has a startPos option, or it will auto-detect the left and top css properties. Either way, all you need is an upgrade to the plugin. http://jsfiddle.net/mblase75/haskbkqz/1/
has comment: http://stackoverflow.com/comment/43541716
type: Answer
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/43543320
answers question: http://stackoverflow.com/q/27551401
has comment: http://stackoverflow.com/comment/43562558
downvote count: 0

http://stackoverflow.com/a/27510911
has body: Your code to grab the title link is selecting the h1 element instead of the anchor within it. Change: var link = $('#NewsContent .p-name').attr("href"); to: var link = $('#NewsContent .p-name a').attr("href"); Then you need to properly concatenate that variable in your string: $(this).html('&lt;span&gt;' + txt.substring(0, 5) + '&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;a href="'+link+'"&gt; Read More&lt;/a&gt;'); jsFiddle example
answers question: http://stackoverflow.com/q/27510653
type: Answer
score: 5
upvote count: 5
downvote count: 0

http://stackoverflow.com/comment/44171863
type: Comment
comment on: http://stackoverflow.com/a/27656705
type: AnswerComment
has text: Kriggs, thanks for your comment - "referencing instead of cloning" allowed me to sort things out. The error lay in using .valueOf() instead of .slice() when pushing the array.
score: 0

http://stackoverflow.com/comment/43575777
type: QuestionComment
comment on: http://stackoverflow.com/q/27574620
has text: @AWolf, I got it work now. Thanks for that example!
score: 0
type: Comment

http://stackoverflow.com/q/27636569
has comment: http://stackoverflow.com/comment/43692246
tagged with: javascript
score: 4
accepted answer: http://stackoverflow.com/a/27636750
tagged with: events
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27636750
has body: I have a DIV with 9 images and I would like to change CSS property of 8 images unlike one that user is hovering. Here is what I have: HTML: &lt;div class="gallery"&gt; &lt;a href="#" class="gallerie-image"&gt;&lt;img src="http://i.utdstc.com/icons/256/google-chrome-mac.png" class="image-hover" onmouseover="return hoverPics()" onmouseout="return changeMeBack()" /&gt;&lt;/a&gt; &lt;a href="#" class="gallerie-image"&gt;&lt;img src="http://i.utdstc.com/icons/256/google-chrome-mac.png" class="image-hover" onmouseover="return hoverPics()" onmouseout="return changeMeBack()" /&gt;&lt;/a&gt; &lt;/div&gt; JS: function hoverPics() { $(".image-hover").css("filter", "gray").css("-webkit-filter", "grayscale(100%)"); $(this).css("-webkit-filter", "grayscale(0%)"); } function changeMeBack() { $(".image-hover").css("-webkit-filter", "grayscale(0%)"); } Actual page The best example of what I'm looking for is Gallery at the bottom of the page after age validation. Here Cheers
has answer: http://stackoverflow.com/a/27636740
has answer: http://stackoverflow.com/a/27636716
upvote count: 4
has title: Change CSS of sibling image on hover
tagged with: css
answer count: 4
has comment: http://stackoverflow.com/comment/43692264
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/43692297
possible better answer: http://stackoverflow.com/a/27636740
type: Question
has answer: http://stackoverflow.com/a/27636763
tagged with: mousehover

http://stackoverflow.com/a/76253046
type: Answer
answers question: http://stackoverflow.com/q/27573017
has body: I use The Angular Youtube component here and this is what they have said about this run time error: i.e. no solution yet. I've seen this occasionally in our dev app as well, but I don't think that we can do much about it since it comes from YouTube's code that's isolated inside of the iframe. Ref: https://github.com/angular/components/issues/22835#issuecomment-853176948
score: 0

http://stackoverflow.com/a/27506232
has comment: http://stackoverflow.com/comment/43443088
has body: If I remember correctly if you specify a scope for your directive you create an isolated-scope which means that you can no longer access the parent scope. You could get the rownum like this without creating an isolated-scope: prototypeApplication.directive('cell', function() { return { restrict: 'E', replace: true, transclude: true, templateUrl: 'views/prototype/booking/templates/table-row.html', link: function(scope, element, attrs) { scope.rownum = scope.$eval(attrs.rownum); } }; });
answers question: http://stackoverflow.com/q/27505588
score: 0
type: Answer

http://stackoverflow.com/comment/43533012
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27533785
score: 0
has text: If you can, try submitting this issue at their issue tracker https://code.google.com/p/gwt-google-apis/issues/list If simple usage of MapTypeStyleFeatureType throws a NPE, there might be something wrong with their implementation itself :|

http://stackoverflow.com/comment/43502002
has text: This works fine. Note to other answerers: I may have been unclear, but this was not a timing issue. I wasn't trying to access the value right after its assignment. The real problem is right here.
comment on: http://stackoverflow.com/a/27536777
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/comment/43488591
score: 0
comment on: http://stackoverflow.com/a/27529552
type: Comment
has text: Thanks! So, I suppose that means the callback queue waits to push a new frame to the call stack until there is only that one main() frame left.
type: AnswerComment

http://stackoverflow.com/q/27618175
tagged with: javascript
tagged with: jquery
score: 0
linked to: http://stackoverflow.com/q/5874652
answer count: 1
has answer: http://stackoverflow.com/a/27618216
tagged with: checkbox
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43657347
has body: I'm facing the following issue; the submit button should be enabled only when any checkbox is clicked. Using jQuery the code I have is: $(document).ready(function() { var the_terms = $("#pricingTierId"); the_terms.click(function() { if ($(this).is(":checked")) { $("#submitBtn").removeAttr("disabled"); } else { $("#submitBtn").attr("disabled", "disabled"); } }); }); &lt;c:if test="${fn:length(incentiveList) gt 0}"&gt; &lt;input type='button' name="submit" id = "submitBtn" value='Submit Incentives' onClick='execute();' /&gt; &lt;/c:if&gt; However in the checkbox code I have the following &lt;td&gt; &lt;s:checkbox name="checkboxes[%{#stat.index}]" theme="simple" id="%{pricingTierId}"/&gt; &lt;/td&gt; my id attribute is defined as id="%{pricingTierId}" so I cannot really pass that in the jQuery function as shown above. Please suggest the suitable way
type: Question
accepted answer: http://stackoverflow.com/a/27618216
has title: The submit button should be enabled only when any checkbox is clicked using jQuery

http://stackoverflow.com/comment/43487499
type: Comment
has text: Thanks @Varedis. I am not sure who down voted for u answer, but it totally works the way I wanted it to.
score: 0
comment on: http://stackoverflow.com/a/27529104
type: AnswerComment

http://stackoverflow.com/comment/43507250
comment on: http://stackoverflow.com/a/27539773
score: 0
type: AnswerComment
type: Comment
has text: http://stackoverflow.com/questions/3582619/how-to-change-css-display-none-or-block-property-using-jquery

http://stackoverflow.com/a/27697301
score: 0
has body: Hi you can do that by using the Image Map Type API by implementing the mapType interface. Please refer to this link and implement the code in the way given in the example, replacing details with your specifications. Hope this will help!!
type: Answer
answers question: http://stackoverflow.com/q/27611656

http://stackoverflow.com/a/27512110
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: This should solve it, using javascript only: var a = document.getElementById('user_current_password'); a.setAttribute('size','auto'); // &lt;&lt;&lt; set size as wished Or, to remove it: a.removeAttribute('size'); Please note to place this code within window.onload = function() { /* code */ } as the DOM has to be loaded in order to let the code find the Elements
accepted answer of: http://stackoverflow.com/q/27512073
score: 2
answers question: http://stackoverflow.com/q/27512073
has comment: http://stackoverflow.com/comment/43459483
upvote count: 2

http://stackoverflow.com/q/27624742
type: UnansweredQuestion
downvote count: 1
score: -1
type: Question
upvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27624820
tagged with: ajax
has title: jQuery $.when(...).done(...) not working as desired
answer count: 1
favorite count: 0
has body: I have a timing critical function that cannot be executed until a couple of Ajax calls have been completed. The Ajax calls issue requests from the server for data required to populate fields on initial page load. My Ajax calls are working, but they are not completing before the critical function GetUserDefaults() is called. No matter where I set a breakpoint (using Firefox) I am seeing that _MasterRules is always initialized as expected, but without a breakpoint GetUserDefaults() gets called before GetMasterRules() is completed. Can anyone tell me what is wrong with the code in document.ready? Here is an example of my code: _MasterRules = null; _UserDefaults = null; $(document).ready(function () { $.when( GetMasterRules() ) .done(function () { GetUserDefaults() // &lt;&lt;== MUST NOT call until GetMasterRules() is complete }); }) // Initialize Master Rules function GetMasterRules() { $.ajax({ type: "GET", url: "/GetMasterRules", dataType: "json" }) .done(function (data) { _MasterRules = data; }) } // _MasterRules must be initialized before calling function GetUserDefaults() { if (_MasterRules == null) { alert("_MasterRules == null"); } $.ajax({ type: "GET", url: "/GetUserDefaults", dataType: "json" }) .done(function (data) { _UserDefaults = data; }) }

http://stackoverflow.com/comment/43667715
type: Comment
type: QuestionComment
score: 0
has text: @symcbean My example does not create an extension. It uses WebRTC ICE Gathering (which sends UDP packets in order to determine the possible candidates for a media-session). Or am I misunderstanding something?
comment on: http://stackoverflow.com/q/27556937

http://stackoverflow.com/comment/43438834
has text: Nope. Multithreading is different than asynchronous. Sure, the requests are happening in theory *simultaneously* but Javascript works on one single threaded event loop, so all of `OnSuccess` is executed in one go. Unlike multithreading, where each atomic statement inside `OnSuccess` could be executed in an arbitrary fashion
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/27504393
type: Comment

http://stackoverflow.com/comment/73327673
comment on: http://stackoverflow.com/a/27491596
score: 0
type: AnswerComment
type: Comment
has text: You should probably mention that flexbox is not supported with IE < 10 and even > 9 there are a lot of bugs.

http://stackoverflow.com/comment/43564913
has text: this is not really an answer. This belongs in the comments. Answers should have specific advice on how to solve a given issue, and not ask a question themselves.
comment on: http://stackoverflow.com/a/27564381
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/43410444
score: 0
type: Comment
type: QuestionComment
has text: Oh nice. Think I totally missed the point of that other link. Now I can loop thru my eventsource array and add them with AddEventSource. Thanks!
comment on: http://stackoverflow.com/q/27487864

http://stackoverflow.com/a/27491644
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/43414922
answers question: http://stackoverflow.com/q/27491371
has body: Hmm... forgot the hyphen, it doesn't look like it's needed. Maybe in Android XML layouts, but not in HTML. http://davidwalsh.name/disable-autocorrect (Also I'm recommending you Google search, it found your answer in 10 seconds.)

http://stackoverflow.com/q/27623660
favorite count: 0
has body: I have the following custom directive: angular.module('app', []) .directive('smartWidget', function () { return{ restrict: 'E', replace: true, template: ' This is the template ' } }); for the html: blah blah with the css: .orange{ background:orange; } What I don't understand is that, when I set replace:true the widget shows with the orange background, and with replace:false it does not. I expected this to work the other way around, as in: with true: This is the template and with false: This is the template , but i am obviously wrong about this! Can anyone shed light on this please?
has comment: http://stackoverflow.com/comment/43668418
has comment: http://stackoverflow.com/comment/43668135
tagged with: angularjs
has comment: http://stackoverflow.com/comment/43676887
has comment: http://stackoverflow.com/comment/43668523
has comment: http://stackoverflow.com/comment/43677029
has title: How exactly replace:true works with element directives?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43677919
score: 0
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/43668095
has answer: http://stackoverflow.com/a/27627971
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/43667855
tagged with: javascript
has comment: http://stackoverflow.com/comment/43668381
has comment: http://stackoverflow.com/comment/43676756
has comment: http://stackoverflow.com/comment/43676827
answer count: 1
accepted answer: http://stackoverflow.com/a/27627971

http://stackoverflow.com/q/27550920
tagged with: dojo
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43529639
tagged with: widget
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/43528658
downvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/27558353
favorite count: 0
has body: hi all i have created a custom widget which in the future will contain more than a data grid however i have had considerable difficulty trying to get the data grid to render. I have no errors and all the following seems to be being called as i suspect; perhaps it is an asynch issue? Any help on this would be great, my code as followed. AssetGridWidget.js define([ "dojo/_base/declare", "dojo/_base/fx", "dojo/_base/lang", "dojo/dom-style", "dojo/mouse", "dojo/on", "dijit/_WidgetBase", "dijit/_TemplatedMixin", "dojo/text!./templates/AssetGridWidget.html", "dojox/grid/DataGrid", "dojo/data/ItemFileWriteStore", "dojo/store/Memory", "dojo/data/ObjectStore"] , function(declare, baseFx, lang, domStyle, mouse, on, _WidgetBase, _TemplatedMixin, template, DataGrid,ifilereadstore, Memory, ObjectStore){ return declare([_WidgetBase, _TemplatedMixin], { widgetInTemplate : true, templateString: template, postCreate: function(){ this.layout = [ { name: 'Name', field: 'name', width: '100px' }, { name: 'Color', field: 'color', width: '100px' } ]; this.data = { data : {items :[ { name : 'John Doe', color: 'green' }, { name : 'Jane Doe', color: 'red' } ], label:'name', identifier:'color' } }; this._employeeStore = new Memory({data: this.data, idProperty: "name"}); this._dataStore = ObjectStore({objectStore: this._employeeStore}); this.grid = new DataGrid ( { noDataMessage: "Hazza", store: this._dataStore, query: { id: "*" }, autoRender : true, structure: this.layout }, "grid" ); this.inherited(arguments); }, startup: function() { this.grid.startup(); } }); }); my template is as follows: AssetGrididget.html finally the page i am calling it from Index.html I have been smacking my head against a brick wall for hours on this so any help is greatly appreciated!
upvote count: 2
accepted answer: http://stackoverflow.com/a/27558353
has title: dojo data grid in custom widget is not rendering

http://stackoverflow.com/a/27622600
has comment: http://stackoverflow.com/comment/43666477
type: AcceptedAnswer
downvote count: 0
has body: var items = [ { "lastname":"Apple" }, { "lastname":"Banana" }, { "lastname":"Box" }, { "lastname":"Bump" }, { "lastname":"Can" }, { "lastname":"Switch" } ]; var lastC = null; //holds current title var updated = []; //where the updated array will live for( var i=0;i&lt;items.length;i++) { var val = items[i]; //get current item var firstLetter = val.lastname.substr(0,1); //grab first letter if (firstLetter!==lastC) { //if current title does not match first letter than add new title updated.push({title:firstLetter}); //push title lastC = firstLetter; //update heading } updated.push(val); //push current index } console.log(updated);
type: Answer
has comment: http://stackoverflow.com/comment/43666412
has comment: http://stackoverflow.com/comment/43666609
accepted answer of: http://stackoverflow.com/q/27622444
upvote count: 5
answers question: http://stackoverflow.com/q/27622444
score: 5

http://stackoverflow.com/comment/43560411
has text: Why didn't you implement it with css?
type: QuestionComment
type: Comment
score: 2
comment on: http://stackoverflow.com/q/27567672

http://stackoverflow.com/a/27587740
has body: In addRecord you need reset property chosen $scope.addRecord = function () { $scope.recordlist.push({ pax: angular.copy($scope.paxlist) }); jsonToRecordLocalStorage($scope.recordlist); $scope.editItem = false; $scope.paxlist = []; $scope.stafflist.forEach(function (el) { el.chosen = false; }); }; Demo: http://plnkr.co/edit/vV8OuKiTKYkFyy7SrjOS?p=preview
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27587556
accepted answer of: http://stackoverflow.com/q/27587556
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/43584515
has text: So why if you disagree did you change your answer?
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27579873
type: Comment

http://stackoverflow.com/q/27600299
tagged with: javascript
score: 0
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/31440228
accepted answer: http://stackoverflow.com/a/31440228
favorite count: 0
tagged with: angularjs
tagged with: symfony
tagged with: php
has answer: http://stackoverflow.com/a/27601549
type: AnsweredQuestion
tagged with: twig
has body: I'm new to Angular and Symfony and I'm asking if variables that I give to the view with twig can be used by an angular controller? Here is an example : PHP Controller: return $this-&gt;render('view.html', array('variable' =&gt; $value)); Angular Controller: var data = 'variablefromtwig'; Anyone knows how to do it?
possible better answer: http://stackoverflow.com/a/27601549
type: Question
answer count: 2
has title: Pass parameters from twig to angular

http://stackoverflow.com/comment/43554646
type: Comment
has text: var myvar = myarr[0] + ex; .. myArr is an array dude =)
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/27564700

http://stackoverflow.com/comment/43404314
type: Comment
type: QuestionComment
score: 4
has text: http://api.jquery.com/jquery.ajax/
comment on: http://stackoverflow.com/q/27486244

http://stackoverflow.com/q/27525829
has comment: http://stackoverflow.com/comment/44003652
has title: Combo box do not select Value from drop down
has comment: http://stackoverflow.com/comment/43894741
has comment: http://stackoverflow.com/comment/44001946
favorite count: 0
has comment: http://stackoverflow.com/comment/43988298
has comment: http://stackoverflow.com/comment/44000961
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27798883
has answer: http://stackoverflow.com/a/27530181
has comment: http://stackoverflow.com/comment/44002614
has answer: http://stackoverflow.com/a/27722380
has comment: http://stackoverflow.com/comment/44001363
has comment: http://stackoverflow.com/comment/44002030
has comment: http://stackoverflow.com/comment/43832935
type: Question
score: 5
upvote count: 5
tagged with: javascript
has comment: http://stackoverflow.com/comment/44002473
has body: I am using ExtJs to create a combobox. Here is my code: Ext.define('Form.FormTypeDialog', { extend : 'Ext.Window', id: 'formTypeDialog', formId: null, callbackFunction : null, modal: true, statics : { show : function(formId, callback) { Ext.create(Form.FormTypeDialog", { formId : formId, callbackFunction : callback }).show(); } }, constructor : function(config) { var me = this; Ext.apply(this, { buttons : [ { text:"#{msgs.form_create_dialog_button_cancel}", cls : 'secondaryBtn', handler: function() { me.close(); } }, { text:"#{msgs.form_create_dialog_button_next}", handler: function() { // Get selected form type } } ] }); this.callParent(arguments); }, initComponent:function() { this.setTitle("#{msgs.form_create_dialog_title}"); this.setHeight(175); this.setWidth(327); var formTypeStore = Mystore.Store.createRestStore({ url : getRelativeUrl('/rest/form/formTypes'), root: 'objects', fields: ['name','value'] }); this.form = new Ext.form.Panel({ style:'padding:15px;background-color:#fff' , border:false, bodyBorder:false, items:[ new Ext.form.Label({ text: "#{msgs.form_create_dialog_select_type_label}", margin: "25 10 25 5" }), new Ext.form.ComboBox({ id: 'createformTypeCombo', margin: "8 10 25 5", allowBlank: false, forceSelection: true, editable:false, store: formTypeStore, valueField: 'value', displayField: 'name', width: 260, emptyText: '#{msgs.form_create_dialog_select_type}' }) ] }); this.items = [ this.form ]; this.callParent(arguments); } }); I am creating this window on a xhtml page on a button click using : Form.FormTypeDialog.show(null, showFormWindowCallBack); It works fine and combo box is displayed and I can select value. But if I open and close it 4 times, then in next show it shows the values but It do not allow me to select the last two value. I can only select first value. Please suggest. Note: I have tried copying and executing this code in forms of other pages of my application. But behavior is same in all cases. This combobox is on a Ext.Window. EDI…
tagged with: extjs
has comment: http://stackoverflow.com/comment/43484360
answer count: 3
has comment: http://stackoverflow.com/comment/44002068
has comment: http://stackoverflow.com/comment/44001441
has comment: http://stackoverflow.com/comment/44000581
downvote count: 0

http://stackoverflow.com/comment/43696774
type: QuestionComment
has text: The `defer` attribute doesn't work for inline script blocks.
type: Comment
comment on: http://stackoverflow.com/q/27638990
score: 0

http://stackoverflow.com/comment/43401049
type: AnswerComment
has text: @ItsGreg Could you please help me with that code? Iam still a newbie when it comes to PHP.
type: Comment
comment on: http://stackoverflow.com/a/27481799
score: 0

http://stackoverflow.com/q/27626823
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/27627858
score: 0
has body: I love the book 'Effective Javascript 68 ways to harness.....'. Although at this point, I feel it's bit out of my scope(start talking about canvas and others). And I ran into Item 38: Call Superclass Constructors from subclass constructors. And while getting graph on web is not the point of the item(or maybe it is), I got curious and wanted it to work but one thing I don't understand is what I need to pass as 'scene' when I construct the Actor. Is this example from some other library that I am missing or am I missing some chunk of code to construct 'scene' object... ? Below is the code. function Scene(context, width, height, images) { this.context = context; this.width = width; this.height = height; this.images = images; this.actors = []; } Scene.prototype.register = function(actor) { this.actors.push(actor); }; Scene.prototype.unregister = function(actor) { var i = this.actors.indexOf(actor); if ( i &gt;= 0 ) { this.actors.splice(i,1); } }; Scene.prototype,draw = function() { this.context.clearRect(0,0, this.width, this.height); for (var a = this.actors, i = 0, n = a.length; i &lt; n; i++) { a[i].draw(); } }; function Actor(scene,x,y) { this.scene = scene; this.x = x; this.y = y; scene.register(this); } Actor.prototype.moveTo = function(x,y) { this.x = x; this.y = y; this.scene.draw(); }; Actor.prototype.exit = function() { this.scene.unregister(this); this.scene.draw(); }; Actor.prototype.draw = function() { var image = this.scene.images[this.type]; this.scene.context.drawImage(image, this.x, this.y); }; Actor.prototype.width = function() { return this.scene.images[this.type].width; }; Actor.prototype.height = function() { return this.scene.images[this.type].height; }; function SpaceShip(scene,x,y) { Actor.call(this.scene,x,y); this.points = 0; } SpaceShip.prototype = Object.create(Actor.prototype); SpaceShip.prototype = new Actor('jot', 3,2); SpaceShip.prototype.type = "spaceShip"; SpaceShip.prototype.scorePoint = function() { this.points++; }; SpaceShip.prototyp…
type: Question
type: AnsweredQuestion
tagged with: scene
has title: While perusing "effective javascript" book, do not understand Item 38(scene)
tagged with: graph
accepted answer: http://stackoverflow.com/a/27627858

http://stackoverflow.com/q/27480625
tagged with: javascript
has title: Adding a DOT (.) to Regular Expression
favorite count: 0
has body: I'm looking to add a (.) to the allowed characters in my function below: $(id).bind('keypress', function(event) { var regex = new RegExp("[()a-zA-Z0-9 ?,/-]"); var key = String.fromCharCode(!event.charCode ? event.which : event.charCode); if (!regex.test(key)) { event.preventDefault(); return false; } }); However, every time I add it it comes up with the error: Uncaught SyntaxError: Invalid regular expression: /[()a-zA-Z0-9 ?,/-.]/: Range out of order in character class I've tried adding just (.) &amp; also tried adding it with (\.) but still the same error. Please can you assist to where I need to add this (.) ?
upvote count: 3
downvote count: 1
tagged with: regex
tagged with: asp.net
score: 2
has answer: http://stackoverflow.com/a/27480651
accepted answer: http://stackoverflow.com/a/27480651
type: AnsweredQuestion
type: Question
answer count: 1

http://stackoverflow.com/comment/43690574
score: 0
comment on: http://stackoverflow.com/a/27635231
type: Comment
has text: Yes - adjust "top" property of img element. it can be negative ie. top:-25px; http://jsfiddle.net/pn41ymgv/1/
type: AnswerComment

http://stackoverflow.com/comment/43622228
has text: @MuzamilRafique, I have updated my answer. jQuery tabs does everything you need out of the box. Just cut and paste the code above into your view (this is copied from my test project which is working fine). You don't need any scripts except `$("#tabs").tabs();`
type: Comment
comment on: http://stackoverflow.com/a/27589303
type: AnswerComment
score: 0

http://stackoverflow.com/comment/43448035
comment on: http://stackoverflow.com/a/27508913
score: 1
type: AnswerComment
type: Comment
has text: @Gokigooooks Yeah, test @Timespace suggestion, it really might work. Just change the `websocket-server` string in the `package.json` file to `node-websocket-server` and rerun `rnpm install`

http://stackoverflow.com/a/27623558
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/43696344
has comment: http://stackoverflow.com/comment/43895614
has comment: http://stackoverflow.com/comment/43825452
downvote count: 0
answers question: http://stackoverflow.com/q/27623527
type: Answer
has comment: http://stackoverflow.com/comment/43825480
has body: When you want to look up an element by id in jQuery (or in any CSS selector), the id has to be preceded by #: $("#" + addPartnerDialog.getId()).css('overflow','hidden'); Alternatively, if you can get a DOM element reference from whatever sort of object "addPartnerDialog" refers to, you can pass that directly to jQuery and avoid the (not really expensive) id lookup.
has comment: http://stackoverflow.com/comment/43827524

http://stackoverflow.com/q/27530329
has comment: http://stackoverflow.com/comment/43489323
has comment: http://stackoverflow.com/comment/43489276
type: Question
tagged with: javascript
has title: Why is my JS putting a prefix to my links (localhost:3000/mylink)?
score: 0
has body: My JS is putting a prefix to my links, and it shouldn't, because it's pure html + js. var source3 = ' ' + ' ' + ' ' + tooltipsInfo[2].name + ' ' + 'de ' + '' + tooltipsInfo[2].location + ' ' + tooltipsInfo[2].price + '' + ' Mimub' + '' + ' ' + ' '; When clicking in my link , the following URL is rendered: http://localhost:3000/http://clk.tradedoubler.com/ Thanks
has answer: http://stackoverflow.com/a/27530430
answer count: 1
has comment: http://stackoverflow.com/comment/43489304
has comment: http://stackoverflow.com/comment/43489345
has comment: http://stackoverflow.com/comment/43489309
accepted answer: http://stackoverflow.com/a/27530430
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43489271

http://stackoverflow.com/comment/43402528
type: AnswerComment
comment on: http://stackoverflow.com/a/27484891
type: Comment
has text: let me understand this syntax: var id = $(this).data('id'); , .data('id') is data-id from the tr?
score: 0

http://stackoverflow.com/comment/43482461
type: Comment
comment on: http://stackoverflow.com/q/27526930
type: QuestionComment
has text: You can just do `Math.max.apply(Math, '1234'.split(''));`
score: 0

http://stackoverflow.com/a/27602652
accepted answer of: http://stackoverflow.com/q/27524002
answers question: http://stackoverflow.com/q/27524002
score: 3
upvote count: 3
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43660278
has comment: http://stackoverflow.com/comment/43660226
type: Answer
has body: I found a workaround to resolve the problem. I won't say this is a direct solution.(I haven't check for IE) Once I create bookmark, It will return JSON object as follows {collapsed: true, endNode: undefined, serializable: undefined, startNode: CKEDITOR.dom.element} And you can get the reference element by var spanRef = object.startNode.$; And a custom attribute. $(spanRef).attr('data-selection-bookmark','1')//here value '1' doesn't mean anything And do the following thing in config.js config.extraAllowedContent = "span[data-selection-bookmark]" When you ask the editor content by using editor.getData(), It will return the following &lt;p&gt;one&lt;/p&gt; &lt;p&gt;two&lt;span data-selection-bookmakr="1" style="display:none"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;three&lt;/p&gt; The Next Half ( After Reload or Reinit) var editor = CKEDITOR.replace( 'editor_textarea'); editor.on( 'contentDom', function(){ var ifrWin = getIframeWindow(); //You need write a code to get iframe window of CKEditor var range = document.createRange(); var sel = ifrWin.getSelection(); var doc = editor.document.$; var $span = $( doc.body ).find( 'span[data-selection-bookmark]' ); range.selectNode( $span[ 0 ] );// To move the cursor before range.collapse(true); sel.addRange(range); $span.remove(); ifrWin.document.getElementsByTagName('body')[0].focus(); });
downvote count: 0

http://stackoverflow.com/comment/43396788
has text: did you consider using ng-if ? you would not have to change your tags, just add one around
score: 0
comment on: http://stackoverflow.com/q/27481984
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43668418
score: 1
has text: @Crocodile Just use inspector in your browser to see what it renders. But generally if you understand the idea of how the directive works you generally do not have to inspect the element to see how it will be rendered.
comment on: http://stackoverflow.com/q/27623660
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43688610
type: Comment
comment on: http://stackoverflow.com/q/27634486
type: QuestionComment
has text: try this `callback=JSON_CALLBACK`
score: 0

http://stackoverflow.com/q/27479189
answer count: 1
downvote count: 0
tagged with: nested
has body: I am working on a Web Application that uses many modal dialogs to take inputs. The issue started when I started making the app compatible with IE11 (it works perfectly fine in IE8). The Modal Dialog boxes return values perfectly when when called from the main page, but when I create a Modal Dialog from a Modal Dialog, the value is returned but is not caught and is taken as undefined. //calling the values var ret = ShowDialogOpen(pageUrl, width, height); function ShowDialogOpen(PageName, strWidth, strHeight) { var DialogOptions = "Center=Yes; Scrollbar=No; dialogWidth=" + strWidth + "; dialogTop=150px; dialogHeight=" + strHeight + "; Help=No; Status=No; Resizable=Yes;"; var OpenUrl = PageName; var ret = window.showModalDialog(OpenUrl, "Yes", DialogOptions); return ret; } //Dialog returning values function ReturnValues() { var lstBox = document.getElementById("lst_Name"); var texts = ""; var values = ""; for (i=0; i&lt;lstBox.options.length; i++) { texts = texts + lstBox.options[i].text + "!"; values = values + lstBox.options[i].value + "!"; } window.returnValue = texts + "$" + values; Close(); return false; } This code works perfectly when used via main-page, but when I use it from a Modal Dialog page the returnValue is lost.
favorite count: 0
has answer: http://stackoverflow.com/a/27484244
accepted answer: http://stackoverflow.com/a/27484244
type: AnsweredQuestion
tagged with: showmodaldialog
tagged with: internet-explorer-8
tagged with: internet-explorer-11
has title: ie11 issues with Nested showModalDialog
upvote count: 10
type: Question
score: 10
tagged with: javascript
has comment: http://stackoverflow.com/comment/43391882

http://stackoverflow.com/comment/43510299
comment on: http://stackoverflow.com/a/27541483
score: 0
type: Comment
has text: Depends on the engine's algorithms, but I'm guessing that the time for pre-population is O(n), and the time for lookup is around O(1) or slightly worse.
type: AnswerComment

http://stackoverflow.com/q/27546566
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I have an array which picks a movie at random and below I have movie posters , I just click on the poster and it brings me to the movie on netflix, it would be great if the surrounding color of the movie poster changed to green so that it would be easier to find. javascript function GetValue() { var myarray= new Array("13 assassins"); // just an example var random = myarray[Math.floor(Math.random() * myarray.length)]; document.randform.randomfield.value = random; } &lt;/script&gt; html &lt;body&gt; &lt;Div id=maincontent&gt; &lt;section id="topcontent"&gt; &lt;form name="randform"&gt; &lt;input type="button" id="btnSearch" value="Click for a random movie" onclick="GetValue();" /&gt; &lt;input type="text" name="randomfield" value="" size="50"&gt; &lt;/form&gt; &lt;section id="movies"&gt; &lt;!--13 assassins --&gt; &lt;div id="movie"&gt; &lt;a href="link to film"&gt; &lt;img src="images/13.jpg" alt="player" width="225" height="325"&gt; &lt;/a&gt; &lt;/div&gt; css #movie{ margin-top:5%; width:225px; height:325px; float:left; background-color:whitesmoke; //want this to be green when the movie is picked border-radius:5px; margin-left:2%; padding:2% 3%; margin-bottom:2%; margin-right:2%; }
score: 1
tagged with: css
has title: how to change the background color of a html section depending on the result of an array
favorite count: 0
type: Question
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/27547199
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27547191
accepted answer: http://stackoverflow.com/a/27547199
has answer: http://stackoverflow.com/a/27547191

http://stackoverflow.com/comment/43581634
has text: I would assume that `div.addEvent...` is for a `div`, which shouldn't affect an `li`. The best way to debug something like that is by using `console.log` to track where the code stops.
comment on: http://stackoverflow.com/a/27573850
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27625441
has title: Getting form's parent data with ajax / javascript
has answer: http://stackoverflow.com/a/27894813
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27639861
accepted answer: http://stackoverflow.com/a/27639861
tagged with: ajax
score: 0
type: AnsweredQuestion
tagged with: dom
tagged with: dynamics-crm-2013
type: Question
answer count: 2
has body: In CRM DYNAMICS 2013, I'm trying to get the contents of a few text fields of a parent form, after a user opens a child form. On the OnLoad event of the child form, I have this code: var objvsdsassignedto = document.parentWindow.parent.parent.opener.Xrm.Page.data.entity.attributes.get("address1_line1"); The error I get is: I have also tried: var objvsdassignedto = window.top.opener.Xrm.Page.getAttribute("address1_line1").getValue(); The error I get is: How do I get the contents of fields using the child form? here's a larger version of the screenshot above: http://screencast.com/t/KHrtREYn3tL Just wanted to update this question with more of the things I've tried: var objvsdsassignedto = window.parent.Xrm.Page.data.entity.attributes.get("address1_line1").getValue(); var objvsdsassignedto = document.parentWindow.parent.parent.opener.Xrm.Page.data.entity.attributes.get("address1_line1"); var objvsdsassignedto = window.top.opener.Xrm.Page.getAttribute("address1_line1").getValue(); var objvsdsassignedto = parent.window.Xrm.Page.data.entity.attributes.get("address1_line1").getValue(); var objvsdsassignedto = window.parent.Xrm.Page.getAttribute("address1_composite"); var parentWindow = window.dialogArguments; alert( parentWindow.Xrm.Page.data.entity.attributes('address1_composite').getValue()); var parentForm = window.top.opener.parent.Xrm.Page.getAttribute("address1_composite").getValue(); alert(parent.window.Xrm.Page.getAttribute('address1_line1').getValue()); var title = window.parent.opener.Xrm.page.ui.controls.getAttribute('address1_composite').getValue(); alert(title);
possible better answer: http://stackoverflow.com/a/27894813

http://stackoverflow.com/q/27601824
has answer: http://stackoverflow.com/a/27602436
tagged with: javascript
score: 0
upvote count: 1
has body: I am preloading images in my code . i want to traverse only first five object , how can I do that? Can I start traversing Object from some particular point length? http://jsfiddle.net/pvuvkzgt/ Code: for (var key in detailes_obj) { if (detailes_obj.hasOwnProperty(key)) { // do something with albums[key] console.log(detailes_obj[key].poster); } }
downvote count: 1
answer count: 1
favorite count: 0
type: UnansweredQuestion
tagged with: javascript-objects
has title: Object Traversing from specific Point
type: Question

openlayers-3
type: Tag
tag name: openlayers-3
tags question: http://stackoverflow.com/q/27492156
tags question: http://stackoverflow.com/q/27501026

http://stackoverflow.com/comment/43559470
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27567127
has text: Are you handling `$_GET` variables to compute the URLs? If you're not getting them on subsequent requests I bet that you're not adding them to hyperlinks.

http://stackoverflow.com/q/27538119
has comment: http://stackoverflow.com/comment/43504859
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/27538724
has answer: http://stackoverflow.com/a/27538157
possible better answer: http://stackoverflow.com/a/27538203
has body: Booleans will work before setting variables inside a function but not after? The variables are all taken from forms except "status". Here is the function: function signup(){ // if(1==1){ -----When I place this here, the alert comes up. // alert("yes"); // } var u = _("username").value; var e = _("email").value; var p1 = _("pass1").value; var p2 = _("pass2").value; var c = _("country").value; var g = _("gender").value; var a = _("age").value; var o = _("occ").value; var status = _("status"); // Nothing below here works if(u == "" || e == "" || p1 == "" || p2 == "" || c == "" || g == "" || a == "" || o == ""){ status.innerHTML = "Fill out all of the form data"; alert("true"); } else if(p1 != p2){ status.innerHTML = "Your password fields do not match"; } else if( _("terms").style.display == "none"){ status.innerHTML = "Please view the terms of use"; } else { _("signupbtn").style.display = "none"; status.innerHTML = 'please wait ...'; var ajax = ajaxObj("POST", "signupfront.php"); ajax.onreadystatechange = function() { if(ajaxReturn(ajax) == true) { if(ajax.responseText != "signup_success"){ status.innerHTML = ajax.responseText; _("signupbtn").style.display = "block"; } else { window.scrollTo(0,0); _("signupform").innerHTML = "OK "+u+", check your email inbox and junk mail box at "+e+" in a moment to complete the sign up process by activating your account. You will not be able to do anything on the site until you successfully activate your account."; } } } ajax.send("u="+u+"&e="+e+"&p="+p1+"&c="+c+"&g="+g+"&a="+a+"&o="+o); } } This function is called by a button, and I want the function to return the messages alongside the button. Create Account main.js contains the following: function _(x){ return document.getElementById(x); } Any help with this would be greatly appreciated as I have been looking at it for hours and cannot figure it out. Thanks in advance Here is the html as requested: Create Account Username: Email Address: Create Password: Confirm Password: Age: Occu…
has answer: http://stackoverflow.com/a/27538203
upvote count: 1
tagged with: php
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/43504510
type: Question
has answer: http://stackoverflow.com/a/27538724
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
has title: Very strange javascript issue with booleans
answer count: 3

http://stackoverflow.com/comment/43694836
type: Comment
score: 2
comment on: http://stackoverflow.com/a/27638007
has text: I was about to recommend the same, then I found this answer: http://stackoverflow.com/questions/8840257/jquery-ajax-handling-continue-responses-success-vs-done This says, that done is the preferred way. (Although I don't know why isn't it working)
type: AnswerComment

http://stackoverflow.com/comment/43392177
has text: firstly you need to append the pobj then only append imgico to pobj...
comment on: http://stackoverflow.com/q/27479449
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43439672
comment on: http://stackoverflow.com/q/27504797
score: 0
type: Comment
type: QuestionComment
has text: http://www.appelsiini.net/projects/lazyload/enabled_background.html

http://stackoverflow.com/q/27538494
type: Question
has title: VBA: Find and update Input field in HTML form
tagged with: javascript
has answer: http://stackoverflow.com/a/27538992
score: 0
accepted answer: http://stackoverflow.com/a/27538992
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: vba
has body: I am trying to access and enter a text string in the address field in an HTML form, then click the submit form button. I tried using: Set ObjCollection = ObjIE.Document.getElementsByTagName("input") but this doesn't work because it only finds input tags and my input field seem to be part of a list. Here is the HTML source which seems to be in Javascript: <script type="text/javascript" I'm trying to access the input id="addressID" and submit using the input type="button" id="SubmitForm" (lines 5 and 6): Locate address Address Create SolarView Latitude Longitude Panel tilt (degrees)-optional Panel bearing (degrees)-optional Image title I want to use this sort of method to update the field and click on the button: SiteAddress = ActiveSheet.Range("B3").Value & ", " & ActiveSheet.Range("B4").Value & ", " & ActiveSheet.Range("B5").Value Set ObjCollection = ObjIE.Document.getElementsByTagName("input") i = 0 While i < ObjCollection.Length If ObjCollection(i).Name = "address" Then ObjCollection(i).Value = SiteAddress Else If ObjCollection(i).Type = "button" And _ ObjCollection(i).ID = "SubmitForm" Then Set objElement = ObjCollection(i) End If End If i = i + 1 Wend objElement.Click I have been trying to gather a collection of tags to loop through the fields using this code: Set ObjCollection = ObjIE.Document.All.searchbar.getElementsByTagName("input") I got this idea from a very good post here: VBS: target fields by div and tabIndex from external .vbs and I sense that it's closer to solving my problem, although this still only comes up with the same result as: Set ObjCollection = ObjIE.Document.getElementsByTagName("input") A big part of the problem for me seems to be not asking the right question, so I've spent ages trying to find an answer to this problem and I would be hugely grateful for a suitable answer.
linked to: http://stackoverflow.com/q/15945820
type: AnsweredQuestion
tagged with: forms

http://stackoverflow.com/comment/43536667
comment on: http://stackoverflow.com/q/27545235
score: 0
type: Comment
type: QuestionComment
has text: Now I've got it. Strange, and what is strange also that only the keydown. If you add one more input, then that keydown will fired. So it seems, always the last fired. Maybe you should ask this on a microsoft forum.

http://stackoverflow.com/comment/43704195
type: AnswerComment
has text: "I have a good internet connection and it's not always" - I meant, I do have good internet connection and opentok works most of the time. But, sometimes it's not able to load the opentok resources. At that moment, I cross checked with other websites, and I was able to access other sites. So, wondering what might be the issue. I'm using free trial account. Are there different urls, for paid / subscribed accounts ?
score: 0
comment on: http://stackoverflow.com/a/27628891
type: Comment

http://stackoverflow.com/comment/43651597
type: QuestionComment
comment on: http://stackoverflow.com/q/27614665
score: 0
type: Comment
has text: quite difficult to understand, are you trying to get which submit button is clicked by user?

http://stackoverflow.com/a/27615415
score: 0
has body: Use the CSS jQuery method, specifying only the CSS value you want var width = $('div').css("width"): console.log(width); Specifying only the first parameter gets the value, setting a second value in .css() will overwrite the value of the css property specified in the first parameter. Maybe you have some box-sizing set which is changing the rendered value
answers question: http://stackoverflow.com/q/27615396
type: Answer
has comment: http://stackoverflow.com/comment/43652689

http://stackoverflow.com/q/27561386
answer count: 2
possible better answer: http://stackoverflow.com/a/27561816
has comment: http://stackoverflow.com/comment/43549110
has answer: http://stackoverflow.com/a/27561816
has comment: http://stackoverflow.com/comment/43548636
has comment: http://stackoverflow.com/comment/43548692
tagged with: javascript
has comment: http://stackoverflow.com/comment/43548578
has comment: http://stackoverflow.com/comment/43548610
has comment: http://stackoverflow.com/comment/43548951
type: AnsweredQuestion
tagged with: function
has title: Checking if an image is present within tag
has body: I am checking on clicking a button that image is present within an &lt;ul&gt; tag or not. For that I am using this function : function check_image_exists(){ $('ul#show_uploaded_images').each(function() { if ($(this).find('img').length) { return true; }else{ return false; } }); } Now if I put this thing within the clicking function it is working... function insert_product(){ $('ul#show_uploaded_images').each(function() { if ($(this).find('img').length) { alert("Image found"); }else{ alert("Not found"); } }); } But if I separate the two and try to use only the return value to decide my condition then it is not working. : function check_image_exists(){ $('ul#show_uploaded_images').each(function() { if ($(this).find('img').length) { return true; }else{ return false; } }); } function insert_product(){ var image_exist = check_image_exists(); if(image_exist == false){ alert("not found") }else{ do the rest..... } }
tagged with: jquery
has comment: http://stackoverflow.com/comment/43549234
has answer: http://stackoverflow.com/a/27561722
type: Question
has comment: http://stackoverflow.com/comment/43548862
accepted answer: http://stackoverflow.com/a/27561722
has comment: http://stackoverflow.com/comment/43549018
tagged with: return-value
score: 0

http://stackoverflow.com/comment/43469228
comment on: http://stackoverflow.com/q/27518993
has text: Did you try using [DataTables](http://www.datatables.net) ?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27585823
has comment: http://stackoverflow.com/comment/43596590
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27585816
has comment: http://stackoverflow.com/comment/43596119
answers question: http://stackoverflow.com/q/27585816
has body: The timer variable is scoped to your success function, so it's always null when your code to clear the old timeout is reached. Move the declaration of timer outside your AJAX call, and it should work. var timer = null; $.ajax({ beforeSend: function() { ... }, success: function(data) { if(timer) { clearTimeout(timer) }; timer = setTimeout(myfunction, 10000); } });
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/43596245
upvote count: 2
has comment: http://stackoverflow.com/comment/43596264
has comment: http://stackoverflow.com/comment/43596125

http://stackoverflow.com/comment/43458050
type: Comment
has text: You're totally right, I completely missed the attribute application. Thanks @voithos !
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27511207

http://stackoverflow.com/a/27532944
score: 0
type: Answer
has body: On the lines of user @Origineil's fiddle the below worked for me:
answers question: http://stackoverflow.com/q/27529011

http://stackoverflow.com/comment/43609565
score: 0
comment on: http://stackoverflow.com/q/27592823
type: Comment
type: QuestionComment
has text: querySelector returns only one element, use querySelectorAll and iterate through matched elements to add event listener. Or use jQuery as your tag suggests it

ember.js
tags question: http://stackoverflow.com/q/27488524
tags question: http://stackoverflow.com/q/27526451
tags question: http://stackoverflow.com/q/27636167
tags question: http://stackoverflow.com/q/27626106
tags question: http://stackoverflow.com/q/27545327
tags question: http://stackoverflow.com/q/27572696
tags question: http://stackoverflow.com/q/27523769
tags question: http://stackoverflow.com/q/27488451
tags question: http://stackoverflow.com/q/27597790
type: Tag
tag name: ember.js
tags question: http://stackoverflow.com/q/27630975
tags question: http://stackoverflow.com/q/27490819
tags question: http://stackoverflow.com/q/27497501
tags question: http://stackoverflow.com/q/27494698
tags question: http://stackoverflow.com/q/27490514
tags question: http://stackoverflow.com/q/27495293
tags question: http://stackoverflow.com/q/27497195
tags question: http://stackoverflow.com/q/27628925
tags question: http://stackoverflow.com/q/27498487
tags question: http://stackoverflow.com/q/27629728
tags question: http://stackoverflow.com/q/27491495
tags question: http://stackoverflow.com/q/27601175
tags question: http://stackoverflow.com/q/27536005
tags question: http://stackoverflow.com/q/27517597

http://stackoverflow.com/a/27476769
type: Answer
downvote count: 0
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/27476020
has comment: http://stackoverflow.com/comment/46044548
has body: The reason the DBGeography object is immutable, meaning that you can't write to it once it has been created. When you instantiate your MapShape class in the model binder, the MyGEO property is null. In other words, you are trying to set a property on a null object. The only way to "create" a DBGeography object is using one of the factory methods like: FromText - Creates a new DbGeometry value based on the specified well known text value. http://msdn.microsoft.com/en-us/library/hh673669(v=vs.110).aspx So, to pass in the Title and WellKnownText values to you controller, I suggest creating a Data Transfer Object (DTO) to act as proxy for the information. public class MapShapeDTO { public string Title { get; set; } public string WellKnownText { get; set; } } Your Ajax gets simplified like this $.ajax({ url: '/api/map', type: 'POST', data: { Title: 'My Title', WellKnownText: 'POLYGON ((30 10, 10 20, 20 40, 40 40, 30 10))' } }); And your controller, you can use the DTO to create the MapShape object. [HttpPost] [Route("map")] public JsonResult Post(MapShapeDTO dto) { MapShape m = new MapShape() { Title = dto.Title, MyGEOG = System.Data.Entity.Spatial.DbGeography.FromText(dto.WellKnownText) }; ... }

http://stackoverflow.com/comment/43641896
score: 0
comment on: http://stackoverflow.com/a/27584217
type: AnswerComment
type: Comment
has text: Thank you for your help. i just don't get why do i need box-sizing: border-box; if i remove the whole thing is off. is it possible do tho it without box-sizing: border-box; @user2570380

http://stackoverflow.com/a/27583592
has comment: http://stackoverflow.com/comment/79853687
type: Answer
score: 3
has comment: http://stackoverflow.com/comment/79870495
upvote count: 3
accepted answer of: http://stackoverflow.com/q/27583345
answers question: http://stackoverflow.com/q/27583345
type: AcceptedAnswer
downvote count: 0
has body: jQuery's ajax functions already return a promise. So you do not need to create new deferred objects if you are using jquery's ajax functions. To get your functions called in succession: call the .then method for however many functions you need to call. If one or more of your functions need to do some async task then just return a promise, the deferred object will wait to call the next then callback till the returned promise resolves. Each then callback will get passed the data returned in the previous then (or in the case of returned promise the resolved data) $.getJSON(rgUrl1,function(json1){ rgJson1 = json1; ...etc. }).then(combineJason) .then(divideArray) .then(doOtherStuff); //#2 function combineJason(someData) { //code to combine return $.getJSON("url to some other json endpoint"); } //#3 function divideArray(someData) { //code to divide stuff //this function is sync so just return some data return someNewData; } //#4 function doOtherStuff(someData) { //code to do some other stuff //this function is async so return a promise; return $.getJSON("url to some other json endpoint"); } JSFiddle Demostrating mixed async/sync succession

http://stackoverflow.com/q/27627029
tagged with: closures
tagged with: javascript
answer count: 3
upvote count: 1
downvote count: 0
possible better answer: http://stackoverflow.com/a/27627103
has answer: http://stackoverflow.com/a/27627202
favorite count: 0
has body: I ran into an issue when I expect a member in a returned object to have the correct value of a variable defined in the parent scope. However, the value of this member never changes and I had to make a getter method to retrieve the correct value. For a trivial example, below is a subset of an Adjacency Matrix representation of a graph: function AdjacencyMatrix() { // Here is the set of Vertices var V = [1, 2, 3]; // Here's some functionality that will remove a vertex at some point, // right now we're just concerned with updating what V is equal to function removeVertex(v) { V.push(4); V = []; console.log(V); } // A "getter" method for the list of vertices function getVertices() { return V; } // Ran when the Adjacency Matrix is initialized console.log(V); return Object.freeze({ // Member that holds a reference to V vertices: V, // Methods that will be used later removeVertex: removeVertex, getVertices: getVertices }); } // Initially logs [1, 2, 3], which is expected var M = AdjacencyMatrix(); // Logs [], which is expected M.removeVertex(); // Logs [1, 2, 3, 4], which is unexpected. // Instead, it should log [] console.log(M.vertices); // Logs [], which is expected console.log(M.getVertices()); Shouldn't the vertices member in the returned object always maintain a reference to what the variable V points to? Instead, in this example, accessing the vertices member on M maintains a reference to the array initially assigned to the variable V and ignores any reassignment of variable V. Or, when assigning the vertices member to V, does it hold a reference to the value of V instead of whatever value the variable has? Sorry if the wording of this problem is difficult to understand, I tried my best to state my expectations and results.
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/27627103
type: Question
has answer: http://stackoverflow.com/a/27627167
has title: Unexpected behavior from variable reference in a closure
accepted answer: http://stackoverflow.com/a/27627167

http://stackoverflow.com/a/27596810
type: Answer
score: 1
upvote count: 1
has body: Yes. It's possible.. With setInterval (there is a 1 second delay at the beggining which can be fixed if needed) var stuff= ["cat","dog","parrot","wolf"]; var output = ""; var i = 0; var interval = setInterval(function(){ output += stuff[i] + "&lt;/br&gt;"; document.getElementById("result").innerHTML = output; i++; if (i==stuff.length){ clearInterval(interval); } },1000); &lt;div id="result"&gt;&lt;/div&gt; OR You can use the loop with setTimeout function. var stuff= ["cat","dog","parrot","wolf"]; var output = ""; for(var i = 0; i &lt; stuff.length; i++){ (function(i){ setTimeout(function(){ output += stuff[i] + "&lt;/br&gt;"; document.getElementById("result").innerHTML = output; },1000*i); })(i); } &lt;div id="result"&gt;&lt;/div&gt;
downvote count: 0
answers question: http://stackoverflow.com/q/27596759

http://stackoverflow.com/q/27555729
type: Question
has body: I have a small script and what I'm trying to do is to write one value from 'Sheet 1' to 'Sheet 2'. Wait for the results to load and compare the cells to see if it is above 10% or not. I have some =importhtml functions in the spreadsheet and it takes along time to load. I've tried sleep, utilities sleep, and flush. None have been working, maybe because I might be putting it in the wrong area.. function compareCells() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var listSheet = ss.getSheetByName('Stocks'); var dataSheet = ss.getSheetByName('Summary'); var listSheetLastRow = listSheet.getLastRow(); var currRow = 1; for (i = 1; i &lt;= listSheetLastRow; i++) { if (listSheet.getRange(1, 3).getValue() == 'asd') { var ticker = listSheet.getRange(currRow, 1).getValue(); dataSheet.getRange(5, 4).setValue(ticker); var value1 = dataSheet.getRange(15, 4).getValue(); var value2 = dataSheet.getRange(22, 4).getValue(); SpreadsheetApp.flush(); if (value1 &gt; 0.10 &amp;&amp; value2 &gt; 0.10) { listSheet.getRange(currRow, 8).setValue('True'); listSheet.getRange(currRow, 9).setValue(value1); listSheet.getRange(currRow, 10).setValue(value2); } else { listSheet.getRange(currRow, 8).setValue('False'); } } else { Browser.msgBox('Script aborted'); return null; } currRow++; } }
tagged with: google-apps-script
has answer: http://stackoverflow.com/a/27570842
answer count: 3
tagged with: google-sheets
tagged with: javascript
has answer: http://stackoverflow.com/a/27557973
has comment: http://stackoverflow.com/comment/43543836
score: 0
has title: Google Spreadsheet App Script will not wait for results to load
has comment: http://stackoverflow.com/comment/43541260
linked to: http://stackoverflow.com/q/7854573
has answer: http://stackoverflow.com/a/34113220
type: UnansweredQuestion

http://stackoverflow.com/comment/43681990
comment on: http://stackoverflow.com/q/27630657
score: 0
type: Comment
type: QuestionComment
has text: can it be like, initially i will just have the structure and then i can grow depending on the requirement?

http://stackoverflow.com/a/27558174
type: Answer
upvote count: 1
has body: http://jsfiddle.net/1vshky4s/ Ultimately your problem is that you are assigning the texb var the value of the text box, then overriding it with a concatenated string, then doing nothing at all with the results. function testFunction() { var first = document.getElementById("fname").value; var last = document.getElementById("lname").value; var textb = first + " " + last; document.getElementById("textbox").value = textb; } actually do something with the textb var and you should be good to go. Check the fiddle.
accepted answer of: http://stackoverflow.com/q/27558049
answers question: http://stackoverflow.com/q/27558049
type: AcceptedAnswer
downvote count: 0
score: 1

http://stackoverflow.com/comment/43691436
type: AnswerComment
comment on: http://stackoverflow.com/a/27636091
type: Comment
has text: Do you want to remove the link tag or prevent the loading of the link?
score: 0

http://stackoverflow.com/comment/43631533
has text: Maybe hash of the file?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27604489

http://stackoverflow.com/comment/43469132
comment on: http://stackoverflow.com/q/27519571
has text: @Playmaker i get the desired o/p via jquery
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43600375
comment on: http://stackoverflow.com/a/27583329
type: AnswerComment
has text: @GreatBigBore: Type coercion can indeed be tricky, but the truthy/falsey subset of it is quite straightforward: The falsey values are `0`, `NaN`, `""`, `null`, `undefined`, and of course, `false`; everything else is truthy.
type: Comment
score: 1

http://stackoverflow.com/comment/43601071
score: 0
type: Comment
type: QuestionComment
has text: it does not seem to have any problem. might help if you show more code details. I am guessing the problem is in HTML
comment on: http://stackoverflow.com/q/27588461

http://stackoverflow.com/comment/43573757
type: Comment
has text: This is where a directive helps.
comment on: http://stackoverflow.com/q/27574145
score: 0
type: QuestionComment

http://stackoverflow.com/q/27592557
tagged with: javascript
score: 0
has body: Still have a big trouble on working with highcharts datalabels. Now I need to show and hide datalabels by clicking on the points. Tried this: plotOptions: { series: { allowPointSelect : true, point: { events: { select /*click*/: function () { this.options.dataLabels.enabled = !this.options.dataLabels.enabled; this.update(); } } } } } But get Uncaught TypeError: Cannot set property 'enabled' of undefined. There're point events at PlotOptions level as point.select and point.click but from examples given at highcharts.com I can't get any help. Also I can't figure out should I work with point or maybe with the certain serie through the array access like series[0].data[1] etc.? Thank you.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27594716
accepted answer: http://stackoverflow.com/a/27594716
type: Question
tagged with: charts
has title: Highcharts show/hide datalabel of selected point
tagged with: highcharts
answer count: 1

http://stackoverflow.com/comment/43629471
comment on: http://stackoverflow.com/q/27601264
type: Comment
type: QuestionComment
has text: @Mouser - Changed doctype, but the problem is not him. Do you have any idea how to make JavaScript to work?
score: 0

http://stackoverflow.com/comment/43627270
type: AnswerComment
has text: comment.replace('rutus', 'rendan'); Jus joking, I'm fan of stars.
comment on: http://stackoverflow.com/a/27600435
score: 0
type: Comment

http://stackoverflow.com/a/27518986
type: Answer
has body: Try this: $('#test-'+i).text(txt);
score: 2
answers question: http://stackoverflow.com/q/27518973
downvote count: 0
upvote count: 2

http://stackoverflow.com/q/27605459
tagged with: highcharts
tagged with: javascript
type: UnansweredQuestion
has title: Highcharts donut ring coloring only selective part
type: Question
answer count: 1
score: 0
has answer: http://stackoverflow.com/a/27605652
has body: I have created a highcharts ring using donut visualization. The jsfiddle is here Now, I want to color 25% of the grey arc with same blue color as that of other 2 arcs. How can I do that ? The code that would essentially need to be changed is here : data: [{ name: 'fire', x: "Firefox", y: 33, color: 'grey' }

http://stackoverflow.com/a/27574427
score: 1
answers question: http://stackoverflow.com/q/27549075
upvote count: 1
has body: Stop doing: throw new UnsupportedOperationException("Not supported yet."); in the listener and that will work :-)
type: Answer
downvote count: 0

http://stackoverflow.com/comment/43490522
comment on: http://stackoverflow.com/a/27509716
type: AnswerComment
score: 0
has text: This one works too. And I like it because it is more understandable to a newbie like me but I accepted the other answer because when testing this one I noticed that you if click the different sections fast enough you can make it so that two sections are highlighted at the same time and that doesn't work for my purposes. Thank you for your help though!
type: Comment

http://stackoverflow.com/a/27601909
has comment: http://stackoverflow.com/comment/43626490
type: Answer
has comment: http://stackoverflow.com/comment/43626936
has comment: http://stackoverflow.com/comment/43627328
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43626737
answers question: http://stackoverflow.com/q/27601739
has body: I'm afraid you forgot to set the 'value' option, e.g.: data-bind="dxSelectBox: { dataSource: [ { val: true, text: 'Yes' }, { val: false, text: 'No' }], valueExpr: 'val', displayExpr: 'text', value: visible }" For your context: var viewModel = { themes: [ ...array of themes... ], selectedThemeId: 1, display: function () { console.log(themesArray); themes: themesArray } }; data-bind="dxSelectBox: { dataSource: themes, valueExpr: 'themeId', displayExpr: 'name', value: selectedThemeId }" I tired the following code: var themesArray = [ { themeId: 1, name: "Android (Dunkel)" }, { themeId: 2, name: "Desktop" }, { themeId: 3, name: "iOS" }, { themeId: 4, name: "Windows 8" }, { themeId: 5, name: "Windows Phone 8" }, { themeId: 6, name: "Tizen" } ]; var modifiedthemesArray = [ { themeId: 1, name: "a (Dunkel)" }, { themeId: 2, name: "b" }, { themeId: 3, name: "c" }, { themeId: 4, name: "Windows 8" }, { themeId: 5, name: "Windows Phone 8" }, { themeId: 6, name: "Tizen" } ]; var themes = new DevExpress.data.DataSource(themesArray); var viewModel = { themes: themesArray, selectedThemeId: 1, display: function (e) { console.log(e); themes: modifiedthemesArray } }; return viewModel; You can use observableArray to change collection object. I tired the following code and it works for me: var themesArray = [ { themeId: 1, name: "Android (Dunkel)" }, { themeId: 2, name: "Desktop" }, { themeId: 3, name: "iOS" }, { themeId: 4, name: "Windows 8" }, { themeId: 5, name: "Windows Phone 8" }, { themeId: 6, name: "Tizen" } ]; var viewModel = { themes: ko.observableArray(), display: function() { console.log(themesArray); viewModel.themes(themesArray); } }; return viewModel;
score: 0
accepted answer of: http://stackoverflow.com/q/27601739
has comment: http://stackoverflow.com/comment/43626793
has comment: http://stackoverflow.com/comment/43627426
has comment: http://stackoverflow.com/comment/43627169

http://stackoverflow.com/q/27606220
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43634785
downvote count: 1
has answer: http://stackoverflow.com/a/27606255
has comment: http://stackoverflow.com/comment/43634633
has title: Loop over array with JQuery
score: 1
type: Question
answer count: 2
linked to: http://stackoverflow.com/q/111102
tagged with: arrays
has answer: http://stackoverflow.com/a/27606417
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/43634715
has body: I'm having a little group iterating over an array with Jquery. I have an array and I want each item in the array to fade in and out (and switch to the next while it's faded out). I can make it loop the appropraite amount of times, but the for loop always shows the last variable, not each one in order. var x = [1,2,3,4,5]; $("#test").text("test"); var y = 0; for(var i = 0; i&lt;x.length;i++){ $("#test").delay(1000).animate({opacity:'0'},function(){ $(this).text(i) }).delay(1000).animate({opacity:'1'}); } So, the p tag this refers to starts off as "text", then flashed '5' five times instead of counting. I thought the delay would work, but the for loop finishes and doesn't wait for the jquery to complete.

http://stackoverflow.com/a/27564962
has comment: http://stackoverflow.com/comment/43555537
has comment: http://stackoverflow.com/comment/43556129
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27564741
answers question: http://stackoverflow.com/q/27564741
type: Answer
score: 2
downvote count: 0
has body: You have to check the current scroll position after every scroll event: $(document).ready(function(){ //Check to see if the window is at the top, if not, then display scroll up button $(window).scroll(function() { if ($(this).scrollTop() &gt; 100) { $('.scrollToTop').fadeIn(); } else { $('.scrollToTop').fadeOut(); } }); //Click event to scroll up to top $('.scrollToTop').click(function(){ $('html, body').animate({scrollTop : 0},750); return false; }); }); EXAMPLE

http://stackoverflow.com/q/27522730
has comment: http://stackoverflow.com/comment/43474430
tagged with: http://stackoverflow.com/tag/html
has body: this is my javascript: $(document).ready(function(){ $('.lroom ,.rroom').click(function(){ $(this).toggleClass('ROOMon'); }); $('.AC').click(function(){ $(this).toggleClass('ACon'); }); }); this my html: when I press on AC div , it takes affect on the AC and on the lroom too. I want that this will affect only the specific AC that I press. ROOMon and ACon are calsses that changes the background-color thanks
type: UnansweredQuestion
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/43474386
has answer: http://stackoverflow.com/a/27522867
has comment: http://stackoverflow.com/comment/43474370
type: Question
score: 0
has comment: http://stackoverflow.com/comment/43475438
answer count: 1
tagged with: javascript
has title: How to affect a specific div in jquery
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/43588030
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27581018
has text: It may be a good idea to also elaborate on why you want to explicitly handle it on the click event yourself
type: Comment

http://stackoverflow.com/comment/43434312
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27500481
has text: @ArvindBishnoi OK, got it (see answer). It's a good question but your approach with propagation of click wasn't the right one.
score: 0

http://stackoverflow.com/q/27476465
answer count: 1
score: 0
has body: My anchor element is dynamically created when my document is ready: var editLink = $('&lt;a&gt;', {html: 'Quick Edit', href: '#'}); $(editLink).click(editGameFunction(game.id, tr)); editGameFunction then contains code to invoke a JSON URL and perform some handling of this JSON The problem is that editGameFunction is being invoked on launching of my document. How do I set this such that it is not eagerly invoked? Also, is there a better way to achieve what I'm doing without having to set the href attribute to be a dummy value?
has answer: http://stackoverflow.com/a/27476497
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/15002306
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27476497
duplicate of: http://stackoverflow.com/q/15002306
type: Question
has title: JQuery: Adding onClick function to anchor element

http://stackoverflow.com/comment/43542035
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27538380
has text: This is really good but when I select a submarket with no child levels like Comics I get the dreaded 'TypeError: Cannot read propoerty 'length' of undefined'. Would a try catch help trap that as the ones I am looking for are those elements where there are no children?
type: Comment

http://stackoverflow.com/a/27612807
has body: What do you see in the popup window after you try to sign in? Can you confirm that your redirect URI defined when registering your application is the same as the index.html page hosting the picker?
has comment: http://stackoverflow.com/comment/43649574
answers question: http://stackoverflow.com/q/27597573
type: Answer
has comment: http://stackoverflow.com/comment/43650368
score: 0

http://stackoverflow.com/comment/43513739
type: QuestionComment
comment on: http://stackoverflow.com/q/27543351
score: 1
type: Comment
has text: Do you get any errors? Does the `echo $degree` work?

http://stackoverflow.com/q/27495849
has title: Programmatically declaring variables based on indexed array ( working with google site list page )
score: 0
has answer: http://stackoverflow.com/a/27507640
tagged with: google-sites
has comment: http://stackoverflow.com/comment/43423666
has body: imagine I have an excel like grid that consists of two parts. A column and a list. The column is the columns and the list is the entire collection of the all of the rows. I can get my columns list with a .length and a .length on the list gives me the number of rows. So I have my x and my y now. I want to create an object out of this that would work something like this: var = ObjList { row0 = [], row1 = [], row2 = [], column = [], }; The issue is that the list can be modified in length. The only way i see to approach this is to programmatically create variables. Like so ( psuedo code ) //Variables var itemName //Get Column Names for (var j in columns) { //columns is an object/array var cName =columns[j].getName(); //I have to get the name otherwise cName just returns as ListItem columnList.push(cName); //Push cName to my own array so I have an array of strings } for (var i in listItems) { //Again working with an object array item = listItems[i] //Creating an easier reference variable for (var j = 0; j &lt; columnList.length - 1;j++){ //now I have to use the length of the Column array to find out how wide our list is itemName = item.getValueByName(columnList[j]); //turning the listitem into a string row(i).push(itemName); //the is the programmatic variable. } } The problem is I'm not sure where I would declare the variable. Is there some other way for me to loop through the List array and match each index of the listItems array to the index of the column which I am doing here with the getValueByName(columnList[j]). ******************************Edit******************************** An example was requested and I can see how this would be confusing. This is dealing with google sites specifically. I added comments to the above code as well. We have a grid.This grid is actually two parts. The column is an object which is why I am creating another array and putting the names into the array. The list is another object. ( LI = lineItem ) |Col1|Col2|Col3|Col4|&lt;~~~ Column O…
has comment: http://stackoverflow.com/comment/43424060
type: AnsweredQuestion
type: Question
tagged with: google-apps-script
accepted answer: http://stackoverflow.com/a/27507640
answer count: 1
tagged with: arrays
tagged with: javascript

http://stackoverflow.com/comment/43387655
type: QuestionComment
comment on: http://stackoverflow.com/q/27476086
has text: Well.. mostly because I am new to this and I am not exactly sure I know what to do... Following various tutorials... Piecing it together with what little I know.
score: 0
type: Comment

http://stackoverflow.com/q/27541827
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/43511163
has title: Creating an auto populating javascript array
type: UnansweredQuestion
has body: I want to populate two arrays in javascript to simulate timely updating chart. For this I want two charts to be populate. var array1 = [1,2,3,...] //time in seconds var array2 = [10,15,12,...] //any random number Each element should be pushed to the arrays with one second of interval. Tried this but arrays are not getting updated as I want. var time = []; var value = []; $(document).ready(function() { update(); }); function update() { var index = 0; setTimeout(function () { index++; time.push(index); value.push(Math.random() * (0 - 200)); console.log(time) console.log(value) update(); }, 1000); }
has answer: http://stackoverflow.com/a/27541887
has comment: http://stackoverflow.com/comment/43510990
type: Question
has answer: http://stackoverflow.com/a/27541880
answer count: 3
has comment: http://stackoverflow.com/comment/43510908
tagged with: arrays
has answer: http://stackoverflow.com/a/27541877

postback
tag name: postback
type: Tag
tags question: http://stackoverflow.com/q/27545418

http://stackoverflow.com/comment/43535373
has text: Cool idea, but you're more likely to get advice if you post something you've tried yourself.
comment on: http://stackoverflow.com/q/27554418
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/43413996
score: 0
has text: @diego.greyrobot alert('hi') rendering to browser as HTML/text instead of executing the javascript
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27490851

http://stackoverflow.com/comment/43421222
comment on: http://stackoverflow.com/a/27479561
score: 0
type: AnswerComment
has text: Ah this is great! Do I then use the new X and Y coordinates to help resize/crop the image to make it permanent?
type: Comment

http://stackoverflow.com/comment/43503720
score: 0
comment on: http://stackoverflow.com/a/27537686
type: Comment
has text: @Pointy In that case, an integer index should be handled as a string, as it is a property of the array, which is a special type of JS object.
type: AnswerComment

http://stackoverflow.com/a/27487169
has body: You must wait until the execution of the slideUp function is completed (by default the duration is 400ms) before you test if the next element is visible or not. $(document).ready(function(){ $("#accordian h3").click(function(){ //slide up all the link lists $("#accordian ul ul").slideUp(); //slide down the link list below the h3 clicked - only if its closed var $elemH3 = $(this); setTimeout(function() { if(!$elemH3.next().is(":visible")) { $elemH3.next().slideDown(); } }, 401); }) }) You can use some CSS to do this easily see this example : http://jsfiddle.net/nx2LkoLd/ You hide all sections but not the active one : css code li.active ul { display:block; } li ul { display: none; } The js and html code still the same. Hope it's clear and will help you resolve your problem.
upvote count: 1
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/27486369
answers question: http://stackoverflow.com/q/27486369
type: AcceptedAnswer

http://stackoverflow.com/q/27564639
favorite count: 0
has comment: http://stackoverflow.com/comment/43554829
has body: I am trying to pick up value from datetimepicker tetxbox and compare those values with current time. JSFiddle //startTime textbox text = 19/12/2014 03:58 PM var startTime = Date.parse($('[id$=txtStartDate]').val().toString()); //endTime textbox text = 19/12/2014 04:58 PM var endTime = Date.parse($('[id$=txtEndDate]').val().toString()); var currentTime = Date.now(); alert(startTime); alert(endTime); alert(currentTime); if (currentTime &gt;= startTime &amp;&amp; currentTime &lt;= endTime) { alert(); } Date.parse() is used fro converting string to milliseconds since Jan 1 1970. Date.now() returns current date milliseconds since Jan 1 1970. But the above conversion methods are not working properly. What should be logic to compare datetime by first sonverting string in format like 19/12/2014 03:58 PM to Date object and then do comparing.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43554750
has title: Convert string to datetime in javascript and compare with current time
downvote count: 0
has answer: http://stackoverflow.com/a/27564758
score: 1
has comment: http://stackoverflow.com/comment/43554627
accepted answer: http://stackoverflow.com/a/27564722
tagged with: string-to-datetime
type: Question
has answer: http://stackoverflow.com/a/27564722
tagged with: javascript
answer count: 3
possible better answer: http://stackoverflow.com/a/27564878
upvote count: 1
has answer: http://stackoverflow.com/a/27564878
tagged with: jquery

http://stackoverflow.com/a/27581659
has comment: http://stackoverflow.com/comment/43595843
type: Answer
score: 1
upvote count: 1
has body: You can find more details about the ECMA spec here. As a general rule, functions within a block scope should always be defined at the top. I've never ran into this problem before because I've always followed that rule (perhaps from being burned in the early days). This issue you're facing is because of the way firefox implements function hoisting in block scopes. You will face this problem not only in try-catch, but any block scope in Firefox. Example of the issue in another block scope: if(somevar==1) { somefunction(); // Will fail in Firefox function someFunction() { alert('Execute!'); } } Workarounds: 1. Move function declarations to the beginning of the block try { function someFunction() { alert('Execute!'); } somefunction(); // Works in all browsers } catch(e) { alert(e); } 2. Wrap the entire block in an Immediately Invoked Function Expression (IIFE) try { (function() { function someFunction() { alert('Execute!'); } somefunction(); // Works in all browsers })(); } catch(e) { alert(a); } Example fiddle: http://jsfiddle.net/zz5mj7c2/6/
answers question: http://stackoverflow.com/q/27581205
downvote count: 0

http://stackoverflow.com/a/27636743
has comment: http://stackoverflow.com/comment/43694178
has comment: http://stackoverflow.com/comment/43692582
has comment: http://stackoverflow.com/comment/43898170
has comment: http://stackoverflow.com/comment/43898243
upvote count: 2
has comment: http://stackoverflow.com/comment/43692533
answers question: http://stackoverflow.com/q/27636463
has comment: http://stackoverflow.com/comment/43695507
has body: Steps to solve this problem. Use input type file in HTML file. &lt;input id="upload_images" type="file" multiple="multiple"&gt; Add event listener to the change event of the input type file. if(document.addEventListener) { document.getElementById("upload_images").addEventListener("change", function(e){ uploadImages(e); }); } else { document.getElementById("upload_images").attachEvent("onchange", function(e){ uploadImages(e); }); } When the file is selected by the user, create a form data and using ajax send it to the server (Mutipart Data). function uploadImages(e) { var uploadedFiles = e.target.files; var xhrObj = new XMLHttpRequest(); xhrObj.open('POST', "&lt;&lt;your node&gt;&gt;/&lt;&lt;request URI&gt;&gt;", true); xhrObj.onreadystatechange = function () { if(this.readyState == this.DONE) { if(this.status != 200) { // Show Error } else { var returnedResponse = xhrObj.responseText; if(returnedResponse == 'success') { // check your returned data like I was returning "success" // Success - Do the tasks } } } }; var requestFormData = new FormData(); for(var i=0; i&lt;uploadedFiles.length; i++) { requestFormData.append('data', uploadedFiles[i]); } xhrObj.send(requestFormData); } On server(nodejs) use formidable to receive the file/files uploaded and store it wherever you want. // require formidable // require imagemagick function processUploadImages(req, res) { var form = new formidable.IncomingForm(); form.uploadDir = __dirname+'/uploaded_images/; form.maxFieldsSize = 20 * 1024 * 1024; form.keepExtensions = true; form.onPart = function(part) { form.handlePart(part); } form.on('file', function(name, file) { // Handle file data like: // file.path // file.name }); form.on('end', function() { //show complete }); form.parse(req, function(error, fields, files) { // create thumbnail images // return response }); } On server(nodejs) create a thumbnail image using imagemagick and store it in a folder which can be located anywhere. Send the saved (image and thumbnail) links b…
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27636463
has comment: http://stackoverflow.com/comment/43948509
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/comment/43418494
has text: @yefrem is this a stab at the readability of my code style? :)
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27492698
type: QuestionComment

http://stackoverflow.com/comment/53835006
comment on: http://stackoverflow.com/q/27572021
has text: I stumbled upon this Stackoverflow Q when wondering why my slider wasn't firing its slidestop event. Turns out it was - but for the second slider that had been initialized programmatically instead, thus my event handler was not attached to the right slider! Thanks!
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/27481400
upvote count: 0
type: Answer
score: -2
has body: Correct is: p = null; undefined is reserved for when variables are not initialised or for empty promises.
downvote count: 2
has comment: http://stackoverflow.com/comment/43395572
answers question: http://stackoverflow.com/q/27481241
has comment: http://stackoverflow.com/comment/43395785

http://stackoverflow.com/comment/71617858
score: 2
comment on: http://stackoverflow.com/a/27492162
has text: MattJohnson's answer works for this scenario: A user registers to an app in New York. Then he moves to the California. If we use MongoDB date object to store his date of birth value, we should handle use users position (country or utc info) data to show and evaluate right date value in the app. Otherwise if user's dob value is "1972-01-01T00:00:00", when the app running in California, dob seems as "1971-12-31T21:00:00". So there are two choices to store date , 1. store as a string 2. store as an ISODate object, also store registering the position of the user to show right dob date.
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/71217159
has text: @KamilTomšík So your recommendation is that we should use a webpack plugin to avoid webpack plugins? (Just kidding. I got your point.)
score: 12
type: Comment
comment on: http://stackoverflow.com/a/27651720
type: AnswerComment

http://stackoverflow.com/comment/43402833
comment on: http://stackoverflow.com/q/27485356
type: Comment
type: QuestionComment
score: 0
has text: Off topic - but a good demonstration of why mixing JS into HTML is generally best avoided

http://stackoverflow.com/comment/43578726
comment on: http://stackoverflow.com/q/27576695
score: 0
has text: The expected value is 'iframe'.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43645989
type: Comment
score: 2
comment on: http://stackoverflow.com/q/27611820
has text: The average human lifespan is around 30,000 days. In practical terms how does your solution differ from 'forever'?
type: QuestionComment

http://stackoverflow.com/q/27594453
tagged with: webiopi
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27612482
score: 0
has comment: http://stackoverflow.com/comment/43616023
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/43615321
has body: I'm very new to programming with webiopi and very new to the raspberry pi in general. Me and my brother are planning to build a robot running on a raspbery pi. We're planning to build a camera on the robot. We would stream the camera through our raspberry pi and controll the robot, both through the same website. However, here's my problem: I downloaded and installed webiopi for my raspberry pi. And with that webiopi comes an example code which he will execute. These are simple html files. If i make any change to them the raspberry pi just shows the original file. Here's the first original: Webiopi Here is the version I want to upload(for a test): Webiopi Testesttestest I don't know if any of you guys ever had this problem. But I can't continue my project if i can't update my webpage. Thanks for u're help Justin
tagged with: gpio
has comment: http://stackoverflow.com/comment/43614970
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27612482
has comment: http://stackoverflow.com/comment/43636269
type: Question
has title: Can't manage to update raspberry pi, gpio-header html file
tagged with: raspberry-pi
has comment: http://stackoverflow.com/comment/43615326

http://stackoverflow.com/comment/43397343
has text: In your template, I don't see where $scope.columns is used...
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27480677

http://stackoverflow.com/comment/43401136
type: Comment
has text: it shows ` Failed to load resource: net::ERR_FILE_NOT_FOUND file://cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js Failed to load resource: net::ERR_FILE_NOT_FOUND file://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js Failed to load resource: net::ERR_FILE_NOT_FOUND file://cdnjs.cloudflare.com/ajax/libs/jquery-scrollTo/1.4.11/jquery.scrollTo.min.js Failed to load resource: net::ERR_FILE_NOT_FOUND file://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js Failed to load resource: net::ERR_FILE_NOT_FOUND index.html:30 Uncaught SyntaxError: Unexpected end of inpu`
comment on: http://stackoverflow.com/a/27484490
score: 0
type: AnswerComment

http://stackoverflow.com/a/33109045
answers question: http://stackoverflow.com/q/27538529
score: 0
has body: Define Angular Material Dependencies BEFORE creating your angular module : Button I'm a link I'm a disabled button
type: Answer

http://stackoverflow.com/q/27566236
answer count: 4
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/43557391
type: Question
has title: Place a div pop up just below the input box through javascript
has answer: http://stackoverflow.com/a/27566634
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27566346
has body: I have this input box: and the div pop-up: Increase Decrease Move Items Change Status The javascript function is as follows: function showHideChangePopUp(e){ //alert('here') if ( event.clientX ) { // Grab the x-y pos.s if browser is IE. CurrentLeft = event.clientX + document.body.scrollLeft; CurrentTop = event.clientY + document.body.scrollTop; } else { // Grab the x-y pos.s if browser isn't IE. CurrentLeft = e.pageX ; CurrentTop = e.pageY ; } //if ( CurrentLeft < 0 ) { CurrentLeft = 0; }; //if ( CurrentTop < 0 ) { CurrentTop = 0; }; document.getElementById('div_change_qty').style.display = 'block'; document.getElementById('div_change_qty').style.top = CurrentTop ; document.getElementById('div_change_qty').style.left = CurrentLeft ; return true; } On click inside the input box, I need to place this div popup just below the input box. The above function places the div wherever we click inside the input box, but not at the bottom of the input box, which is what i want. How can i change the JS function to do the required task.
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43559334
has comment: http://stackoverflow.com/comment/43557481
downvote count: 0
has answer: http://stackoverflow.com/a/27566741
favorite count: 0
has answer: http://stackoverflow.com/a/27566348
type: UnansweredQuestion
tagged with: css

http://stackoverflow.com/comment/43904712
type: AnswerComment
comment on: http://stackoverflow.com/a/27534724
type: Comment
has text: Thanks! I had to then make further adjustments for cross-browser support.
score: 0

http://stackoverflow.com/a/27543938
answers question: http://stackoverflow.com/q/27542507
has body: 1. Calling response.send() in two places Each http request made to the node.js server expects a single response, after which the connection is ended. If you want to send multiple pieces of information you can open up a websocket connection (http://socket.io/ - makes this very easy). http://maxogden.com/node-streams.html response.send([status], body) is an alternative to response.end() (more information) From the node.js docs: response.end([data], [encoding]) This method signals to the server that all of the response headers and body have been sent; that server should consider this message complete. The method, response.end(), MUST be called on each response. If data is specified, it is equivalent to calling response.write(data, encoding) followed by response.end(). If this wasn't the case, every time a http request is made, the requester doesn't know when to stop listening for a response and disaster ensues. If you want to send various pieces of information from different places (i.e. from different places within your application), I would recommend collection all the information from said various places and then wrapping up and sending the information in one fell swoop. 2.When to use app.get and app.set Use app.set when you want to set application wide property and use app.get when you want to retrieve said property's value. .e.g app.set('port', config.port); and then later on app.listen(app.get('port'), function(){ ... }); In my opinion the use of app.get('/', function(req, res){ ... }) is a confusing piece of over-loading. I believe a better option use something of this format: app.route('/my-objects') .get(function(request, response){ /* handle get request (maybe get a list of said objects) */ }) .post(function(request, response){ /* handle post request (maybe create a new object)*/ }) .put(function(request, response){ /* handle put request */ }) .delete(function(request, response){ /* handle delete request */ }); or better still imo (although this is just how I…
downvote count: 0
type: Answer
upvote count: 3
score: 3

http://stackoverflow.com/comment/43656544
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27617326
type: Comment
has text: @user2861226 Indeed interesting. Look a the code edit.

http://stackoverflow.com/a/27605806
score: 4
has body: The .click() function only accepts one function argument. Also, you need to use .closest() to traverse up the DOM first, and then .find() to go back down. You can do this instead: $('.toggle-it').click(function () { $(this).closest('.te').find('.show-more').slideToggle(250); }); jsFiddle example
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43634505
type: Answer
has comment: http://stackoverflow.com/comment/43634452
accepted answer of: http://stackoverflow.com/q/27605726
upvote count: 4
answers question: http://stackoverflow.com/q/27605726
downvote count: 0

http://stackoverflow.com/q/27562172
tagged with: php
answer count: 1
has body: I've transferred my PHP code with the data array the code receives (a JSONP call) to JSfiddle (with 'local' data array). Strangely, while it works in PHP, it doesn't in fiddle. Must be something with the data array, I guess, but not sure. $(function () { var options = { chart: { renderTo: 'container', type: 'spline', marginBottom: 50 }, xAxis: { labels: { formatter: function () { return Highcharts.numberFormat(this.value, 0, '', ''); // Remove the thousands separator } }, tickWidth: 0, endOnTick: true, showLastLabel: true }, title: { text: "Title", align: "center", y: 20, style: { fontFamily: "Arial", fontSize: "20px", fontWeight: "bold", color: (Highcharts.theme &amp;&amp; Highcharts.theme.textColor) || "black" } }, credits: { text: " Source: UNEP (2014): The UNEP Environmental Data Explorer, as compiled from XXXXXX. United Nations Environment&lt;br /&gt;Programme. http://geodata.grid.unep.ch. ", url: "", position: { align: "left", x: 80, y: -15 }, style: { fontSize: "9px", lineHeight: "9px" } }, legend: { layout: "vertical", align: "center", verticalAlign: "bottom", backgroundColor: "#efefef", borderWidth: 0, floating: false, y: -50, title: { text: ":: Legend ::" }, floating: true, draggable: true, zIndex: 20 }, tooltip: { shared: true, crosshairs: true }, plotOptions: { series: { marker: { enabled: false } } }, series: [{}] }; /* This would come from my JSON call */ data = '[{"name":"France","data":[[1960,520325],[1961,548976],[1962,585604],[1963,616918],[1964,657130],[1965,688528],[1966,724428],[1967,758391],[1968,790691],[1969,845964],[1970,894468],[1971,942148],[1972,984897],[1973,1050000],[1974,1099250],[1975,1086890],[1976,1134560],[1977,1175100],[1978,1220870],[1979,1262980],[1980,1283650],[1981,1296210],[1982,1327540],[1983,1343900],[1984,1363980],[1985,1385940],[1986,1417210],[1987,1451060],[1988,1518790],[1989,1582390],[1990,1623850],[1991,1640720],[1992,1664970],[1993,1653860],[1994,1691030],[1995,1725650],[1996,1744070],[1997,1782150],[1998,1842360],[1…
tagged with: highcharts
tagged with: javascript
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27562229
accepted answer: http://stackoverflow.com/a/27562229
score: 0
has title: Highcharts code with same set of code/data works in PHP but does not work in JSfiddle

http://stackoverflow.com/comment/80211512
type: Comment
comment on: http://stackoverflow.com/a/37901590
has text: as simple as that, tks!
type: AnswerComment
score: 0

http://stackoverflow.com/comment/43707822
score: 1
comment on: http://stackoverflow.com/q/27549268
type: Comment
type: QuestionComment
has text: see first http://www.trirand.com/jqgridwiki/doku.php?id=wiki:frozencolumns#limitations

http://stackoverflow.com/comment/43665556
comment on: http://stackoverflow.com/q/27610738
score: 0
type: Comment
type: QuestionComment
has text: ok. still working on my code. i'm not getting sleep as i want to achieve it...

http://stackoverflow.com/comment/43502322
type: Comment
score: 0
has text: @AnnieC use the tools that were popular for web development back in 2009 and build something that works in IE8. No one working on modern frameworks in 2014 cares that you have clients stuck in the past.
comment on: http://stackoverflow.com/a/27531586
type: AnswerComment

http://stackoverflow.com/comment/49888379
type: AnswerComment
has text: I just saw, that you figured that out... fail. :)
type: Comment
comment on: http://stackoverflow.com/a/30925815
score: 0

http://stackoverflow.com/comment/43594713
type: Comment
score: 0
comment on: http://stackoverflow.com/a/27584995
type: AnswerComment
has text: but you don't use artist variable.

http://stackoverflow.com/q/27600552
tagged with: jquery
has body: I am currently working on a function, which should disable weekends and holidays in the jQuery datepicker. My function looks like this function calendarDateDisabled(date) { //disable saturday (6) and sunday (0) dmy = date.getDate() + "-" + (date.getMonth() + 1) + "-" + date.getFullYear(); if (date.getDay() == 6 || date.getDay() == 0 || ($.inArray(dmy, unavailableDates) == -1)) { return true; } else { return false; } } The error is the $.inArray. The console says Uncaught TypeError: Cannot read property 'inArray' of undefined. The var unavailableDates is defined above the function like this var unavailableDates = ["1-5-2015", "25-12-2014","12-12-2014"]; The function is implemented like this disabled: function(date) { return calendarDateDisabled(date); } Anyone got an idea what's wrong? *Edit: The syntax of ($.inArray(dmy, unavailableDates == -1) to ($.inArray(dmy, unavailableDates) == -1)
type: Question
tagged with: datepicker
has title: Datepicker error with $.inArray()
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/27600644
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/comment/43422505
has text: I said in OP i use json_encode and it looses its formatting. var_dump also
comment on: http://stackoverflow.com/q/27495351
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/43514718
type: Comment
type: QuestionComment
score: 1
has text: check out this question: http://stackoverflow.com/questions/1144783/replacing-all-occurrences-of-a-string-in-javascript
comment on: http://stackoverflow.com/q/27543945

http://stackoverflow.com/comment/43443470
comment on: http://stackoverflow.com/q/27493054
score: 0
has text: That's fine. What I mean is that `color()` should return the same value regardless of the number of times you call it. If this doesn't work, create another method, like `lastGeneratedColor()`.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27635754
has comment: http://stackoverflow.com/comment/43691241
score: 0
answers question: http://stackoverflow.com/q/27635665
type: Answer
has body: In registerCtrl.js, the first line actually instantiate your module again. what you meant was : var myApp = angular.module('dreamflow'); Also, I don't see a .run() on your module, which mean to me that your app is not running.

http://stackoverflow.com/q/27509329
tagged with: javascript
has comment: http://stackoverflow.com/comment/43449040
has body: I am sorry for the terrible question, hopefully someone can help me rephrase it, but check out my code: jQuery(document).ready(function($) { var content = $('.content'); var text = content.html(); console.log(text); text = text.replace(//g, ''); text = text.replace(/<\/span>/g, ''); content.html(text); console.log(text, content.html()); }); http://jsfiddle.net/tikitariki/cttmngzq/ Basically, I'm removing some HTML to clear up some styling. I use the replace() method to remove these span tags. However, from reading the docs, I don't understand why it doesn't remove the inside tag in . I didn't want to remove it, that's my goal, but the code explicitly says to remove all . In other words, it is working too well for what I want to use it for and I am not sure if this is expected behavior or not. I'm using jQuery and Wordpress. I wasn't sure if they were related to this "bonus" feature. Hey You I'm Special The reason this is a question is because no documentation seems to reference this HTML tag protection ability of replace(). I like to use Mozilla's docs. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace
answer count: 2
tagged with: jquery
has comment: http://stackoverflow.com/comment/43448732
has answer: http://stackoverflow.com/a/27509445
favorite count: 0
has comment: http://stackoverflow.com/comment/43449797
has comment: http://stackoverflow.com/comment/43448757
has comment: http://stackoverflow.com/comment/43449311
has title: JavaScript replace method doesn't erase closing tags, as coded in the regex, if it breaks nesting
type: AnsweredQuestion
upvote count: 2
score: 1
possible better answer: http://stackoverflow.com/a/27509425
accepted answer: http://stackoverflow.com/a/27509445
tagged with: wordpress
has answer: http://stackoverflow.com/a/27509425
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/43449355

http://stackoverflow.com/a/27521960
score: 5
has body: A simple solution : var arr = []; for (var k in obj) arr.push([+k, obj[k]]); +k is used to convert the key from a string (all object keys are strings) to a number.
has comment: http://stackoverflow.com/comment/43473164
answers question: http://stackoverflow.com/q/27521930
accepted answer of: http://stackoverflow.com/q/27521930
type: AcceptedAnswer
upvote count: 5
type: Answer
downvote count: 0

http://stackoverflow.com/comment/44293982
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27528542
has text: At the load of the page, it should show the results for **all** German states. It should show the same results as when I manually select "Alle" from the dropdown list. I don't know if that is a "filter" or "no filter". :-\
score: 0

http://stackoverflow.com/a/27514506
answers question: http://stackoverflow.com/q/27514339
score: 0
type: AcceptedAnswer
has body: I would guess similar solutions are found a lot, here is mine: Select Roses are blue Roses are red
type: Answer
accepted answer of: http://stackoverflow.com/q/27514339

http://stackoverflow.com/q/27540478
has comment: http://stackoverflow.com/comment/43508748
has comment: http://stackoverflow.com/comment/43509131
has comment: http://stackoverflow.com/comment/43509292
has comment: http://stackoverflow.com/comment/43509800
tagged with: magento-1.9
type: Question
tagged with: magento
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/27560957
tagged with: ajax
score: 0
has body: I have a magento 1.9 site, My onepage checkout was working perfectly till today morning. WHen I tried to do checkout procces, I can enter billing address, but when I click in continue button nothing happens other than loading image appears. I have googled it and checked many tutorials even in stackoverflow, still couldn't get an answer. I had a look in google console and didn't shown any error , only one warning about webkit animation. Anyone can help me please?
type: UnansweredQuestion
has title: Magento 1.9 shipping not showing in checkout

http://stackoverflow.com/comment/43687187
type: AnswerComment
score: 0
type: Comment
has text: @WillerjaneAyawan of course it doesn't work 1. it's a piece of code you can't just tear it from your source 2. you have a lot of mistakes in it, e.g. `,` ending and `:` assigning 3. you didn't enable jQuery in fiddle 4. `a` and `aingFA.tueds` is checked there, but you don't create any variable 5. You don't even call it!!! 6. etc., etc.
comment on: http://stackoverflow.com/a/27632192

http://stackoverflow.com/comment/43489170
has text: Did you debug and see what is not being called correctly? console.log is your friend.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27530110

http://stackoverflow.com/q/27628998
score: 0
has title: Backbone.js - Destroying a Marionette Controller
answer count: 1
tagged with: backbone.js
type: UnansweredQuestion
tagged with: marionette
has body: I'm having issues destroying a Marionette controller. I'm still wrapping my brains around Marionette, and more specifically Backbone garbage collection.... This controller instantiates several views, each of which may have several bound event listeners. The code looks something like this: myController.js --------------- Marionette = require('backbone.marionette'); MyView = require('path/to/myView'); var MyController = Marionette.Controller.extend({ initialize: function(options) { console.log('init'); } onDestroy: function() { console.log('should be destroyed'); } showData: function() { console.log('create view'); myView = new MyView(); } }); appController.js ---------------- MyController = require('path/to/myController'); var controller = new MyController() controller.showData(); controller.destroy(); output: //init //create view //should be destroyed Controller is still around, even though onDestroy does fire.. Could this be an issue with views still having bound event listeners? My apologies if the code looks weird... translating this from coffeescript.
has answer: http://stackoverflow.com/a/27629371
type: Question
tagged with: javascript

http://stackoverflow.com/a/27614311
downvote count: 0
has body: It just means that you're linking something incorrectly. Make sure to check your src and hrefs are valid.
has comment: http://stackoverflow.com/comment/43650668
has comment: http://stackoverflow.com/comment/43650600
upvote count: 2
has comment: http://stackoverflow.com/comment/43650619
has comment: http://stackoverflow.com/comment/43650565
has comment: http://stackoverflow.com/comment/43650819
has comment: http://stackoverflow.com/comment/43650577
type: Answer
score: 2
answers question: http://stackoverflow.com/q/27613855

http://stackoverflow.com/a/27492379
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27492245
has body: Another way... use the contains selector to search for a DOM elem by its content. $('select&gt;option:contains("My Custom Value 2")').prop('selected', true);
has comment: http://stackoverflow.com/comment/43416862

http://stackoverflow.com/a/27632836
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27631785
has body: What you wanted is that on change of value of first input box, get this value and set it for second input box and give alert. In this case onchange event will not get fired. For this you need to manualy call the onchange event of the second input box. &lt;script&gt; function fn_1() { var aaa = document.getElementById('one').value; var second_input_elem = document.getElementById("two"); second_input_elem.value = aaa; second_input_elem.onchange(); } Try this fiddle http://jsfiddle.net/u09Lurvr/
downvote count: 0

http://stackoverflow.com/q/27621174
has body: I want to hide a table row (with input fields inside) when a checkbox is checked. I found something that works: HTML Hide inputs Script $(document).ready(function () { $('#checkbox').change(function () { if (!this.checked) $('#row').fadeIn('slow'); else $('#row').fadeOut('slow'); }); }); Fiddle But this only works if the checkbox is not checked already. So if the checkbox is checked at the beginning, I want the table row to be hidden. How do I do this? Please note that I don't know much about JavaScript, but I really need this
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27621222
has answer: http://stackoverflow.com/a/27621222
has answer: http://stackoverflow.com/a/27621356
type: Question
accepted answer: http://stackoverflow.com/a/27621214
tagged with: javascript
tagged with: jquery
tagged with: show-hide
score: 4
has comment: http://stackoverflow.com/comment/43662902
has comment: http://stackoverflow.com/comment/43662942
favorite count: 0
has title: Show or hide table row if checkbox is checked
answer count: 9
has answer: http://stackoverflow.com/a/54166668
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/35947698
has answer: http://stackoverflow.com/a/27621448
tagged with: checkbox
has comment: http://stackoverflow.com/comment/43663261
upvote count: 6
has answer: http://stackoverflow.com/a/27621771
has answer: http://stackoverflow.com/a/27621410
has answer: http://stackoverflow.com/a/27621241
has answer: http://stackoverflow.com/a/27621214
downvote count: 2

http://stackoverflow.com/a/27628891
answers question: http://stackoverflow.com/q/27621934
has comment: http://stackoverflow.com/comment/43704195
score: 0
type: AcceptedAnswer
has body: I think you are running into some intermittent network connectivity issues. You mentioned: I have a good internet connection and it's not always Which I understood to mean that you don't always get the errors. This is what I believe is happening: because you have the opentok.min.js file downloaded locally, you are able to obtain this resource every single time; even when your network connectivity is down. However, this file also obtains other files that are hosted on TokBox servers dynamically. Namely, the dynamic_config.min.js and ot.min.css files. When those resources are requested and are not able to be obtained, you get the network timeout error. As for best practices, TokBox recommends that you not locally download the OpenTok.min.js file, but instead use: &lt;script src='//static.opentok.com/webrtc/v2.2/js/opentok.min.js'&gt;&lt;/script&gt; This won't solve the problem if it is in fact due to network issues, but it will fail fast for your debugging purposes.
type: Answer
has comment: http://stackoverflow.com/comment/45491893
accepted answer of: http://stackoverflow.com/q/27621934

http://stackoverflow.com/comment/43583427
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27579371
has text: Best practice is to avoid assigning functions with inline attributes. Give the button an `id="yourIdName"` attribute instead and put a corresponding function call at the bottom of the `body`: ` `

http://stackoverflow.com/comment/43632576
has text: I have added more detail.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27605011

http://stackoverflow.com/a/27521590
answers question: http://stackoverflow.com/q/27520889
type: AcceptedAnswer
downvote count: 0
has body: Putting your code through the JavaScript beautifier (it's always good to do it to your code that you post to make it easier to understand) gives this: $(function () { $(".links") .click(function () { $('.slider') .stop(true, false) .animate({ right: "0" }, 800, 'easeOutQuint'); }, function () { $(".slider") .stop(true, false) .animate({ right: "-200" }, 800, 'easeInQuint'); }, 1000); }); You're trying to pass two handlers to .click() and something that looks like a timeout or duration (1000). Try something like this: $(function () { var toggle; $(".links") .click(function () { toggle = !toggle; if (toggle) { $('.slider') .stop(true, false) .animate({ right: "0" }, 800, 'easeOutQuint'); } else { $(".slider") .stop(true, false) .animate({ right: "-200" }, 800, 'easeInQuint'); } }); }); Update: To make it slide when you click anywhere on the page it's slightly more complicated: $(function () { var toggle; $(document).click(function () { if (toggle) { toggle = !toggle; $(".slider") .stop(true, false) .animate({ right: "-200" }, 800, 'easeInQuint'); } }); $(".links") .click(function (e) { e.stopPropagation(); toggle = !toggle; if (toggle) { $('.slider') .stop(true, false) .animate({ right: "0" }, 800, 'easeOutQuint'); } else { $(".slider") .stop(true, false) .animate({ right: "-200" }, 800, 'easeInQuint'); } }); $(".slider") .click(function (e) { e.stopPropagation(); }); }); This part: $(".slider") .click(function (e) { e.stopPropagation(); }); is there to not hide the slider when you click on the slider (and not somewhere else on the page, outside of the slider) but if that's not what you want then you can remove it. (The code could be refactored to remove duplication and to avoid running the selectors multiple times but it serves the purpose of this example. Also, you can't have more than one such slider on a page right now because all will slide at the same time but I guess that's ok.) See DEMO. It would be simpler for older jQuery versions with the toggle method but …
type: Answer
accepted answer of: http://stackoverflow.com/q/27520889
score: 3
upvote count: 3

http://stackoverflow.com/comment/43555309
type: AnswerComment
has text: These details should had been part of the original question. I suggest you edit your question to have all necessary explanations and complete code (embedded view).
type: Comment
score: 2
comment on: http://stackoverflow.com/a/27562260

http://stackoverflow.com/a/27634865
upvote count: 1
score: 1
downvote count: 0
type: Answer
has body: I have updated it. Please check and give me feedback. http://jsfiddle.net/4cncLor7/4/ jQuery('.dynamic').html(' info ');
answers question: http://stackoverflow.com/q/27634763

leaflet
tags question: http://stackoverflow.com/q/27577273
type: Tag
tags question: http://stackoverflow.com/q/27545098
tags question: http://stackoverflow.com/q/27584615
tags question: http://stackoverflow.com/q/27610078
tags question: http://stackoverflow.com/q/27509325
tags question: http://stackoverflow.com/q/27528867
tags question: http://stackoverflow.com/q/27575761
tags question: http://stackoverflow.com/q/27597259
tags question: http://stackoverflow.com/q/27610708
tags question: http://stackoverflow.com/q/27609294
tags question: http://stackoverflow.com/q/27546215
tags question: http://stackoverflow.com/q/27561211
tag name: leaflet

http://stackoverflow.com/comment/43571811
comment on: http://stackoverflow.com/q/27573118
has text: Where is the Crossfader code? What values to the variables `index` and `af11 and `af2` have?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43524145
comment on: http://stackoverflow.com/a/27548813
type: AnswerComment
has text: I need it for the whole body, not for the navigation background
score: 0
type: Comment

http://stackoverflow.com/a/27478047
score: 0
has comment: http://stackoverflow.com/comment/43391367
has comment: http://stackoverflow.com/comment/43391803
has body: Im not sure where you're setting the IconURL, but something along the lines of this should do it. var marker = data[i].marker; var url = "legends/" + marker + ".jpg";
type: Answer
has comment: http://stackoverflow.com/comment/43391941
has comment: http://stackoverflow.com/comment/43391285
answers question: http://stackoverflow.com/q/27477936

http://stackoverflow.com/q/27494395
type: Question
has answer: http://stackoverflow.com/a/27494609
tagged with: javascript
has body: I am trying to use this code to creating a count down timer from an html element.. however i don't want 2 timers to be running on the same element so i tried to create a 2D Array that stores the setInterval functions and their corresponding elements so that i can clearInterval when another one is being set on the same element here is the code i tried but doesn't work (always returns -1) function formatTime(seconds) { var h = Math.floor(seconds / 3600), m = Math.floor(seconds / 60) % 60, s = seconds % 60; if (h &lt; 10) h = "0" + h; if (m &lt; 10) m = "0" + m; if (s &lt; 10) s = "0" + s; return h + ":" + m + ":" + s; } var timers = new Array(); function timer(count, element) { var n = timers.indexOf(element); if (n &gt; -1) { clearInterval(timers[n][1]); } timers.push([ element, setInterval(function() { if (isNaN(count)) return false; count--; if (count &lt; 0) return clearInterval(interval); element.text(formatTime(count)); return true; }, 1000) ]); }
has title: Javascript Using 2d Array
has comment: http://stackoverflow.com/comment/43420654
has answer: http://stackoverflow.com/a/27494636
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/43420567
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43420606
has comment: http://stackoverflow.com/comment/43420675

http://stackoverflow.com/q/27510609
type: Question
has body: var test = function () { var my_array =[1,2,3]; my_function = function (my_array) { my_array = global_fun().slice(); console.log(my_array.length); // &gt;&gt; 10 !!!!!! } my_function (my_array); console.log(my_array.length); // &gt;&gt; 3 !!!!!! // my_array keeps being 1,2,3 } var global_fun = function () { var array =[]; array=[9,8,7,6,5,4,3,2,1,0]; return array; } Please, copy this code and run test(); You can see how my_array keeps being the same . Why this does not work ? I dont want to push values, I want a complete array change. I feel like a st....
tagged with: arrays
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27510753
linked to: http://stackoverflow.com/q/13104494
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/27510753
has answer: http://stackoverflow.com/a/27510912
favorite count: 0
has comment: http://stackoverflow.com/comment/43451455
has comment: http://stackoverflow.com/comment/43451656
has title: Why I can't save a returned array inside another existing array
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27510912
upvote count: 1
downvote count: 1

http://stackoverflow.com/comment/43387828
type: QuestionComment
comment on: http://stackoverflow.com/q/27476650
score: 0
has text: Laravel already made all this work for you - your page has ` ` all, that you need, pass it while ajax.
type: Comment

http://stackoverflow.com/q/27611027
accepted answer: http://stackoverflow.com/a/27611101
score: 1
favorite count: 0
type: Question
upvote count: 1
tagged with: arduino
has title: How to send serial output from arduino to textbox with ajax jquery
answer count: 1
tagged with: javascript
tagged with: jquery
has body: Would anyone happen to know how to receive a usb serial output from a device and send it to an html textbox using jQuery? I understand how to send a command using ajax and jQuery to a serial device, but I cannot figure out how to receive a message sent back from the device? The following javascript is what I use for sending a message to the device, Arduino, from a button click: &lt;!-- Arduino Serial Connection --&gt; &lt;script type='text/javascript'&gt; jQuery(function() { jQuery('#contact_form').on('click', '.button',function (e) { e.preventDefault(); //prevents the default of submitting the form jQuery.ajax({ type: "POST", url: '/test/SubmitFormWORefresh.php', data: "rcmd="+jQuery(this).val(), success: function() { alert('Enroll Your Finger Now'); } }); return false; }); }); &lt;/script&gt; And here is the SubmitFormWORefresh.php: &lt;?php $verz="1.0"; $comPort = "/dev/ttyACM0"; /*change to correct com port */ $PHP_SELF="index.php"; //This php file locate it from root if (isset($_POST["rcmd"])) { $rcmd = $_POST["rcmd"]; switch ($rcmd) { case "Stop": $fp =fopen($comPort, "w"); sleep(2); fwrite($fp, 1); /* this is the number that it will write */ fclose($fp); break; case "Enroll": $fp =fopen($comPort, "w"); sleep(2); fwrite($fp, 3); /* this is the number that it will write */ fclose($fp); break; default: die('Crap, something went wrong. The page just puked.'); }/*end switch case*/ }/*end if statemen t*/ ?&gt; The following code is from the index.html page that displays the button that javascript manipulates, and also the textbox that I want the output of the serial device to display to. &lt;!----This is the button that I first send a message to the device --&gt; &lt;div id="contact_form"&gt; &lt;form name="contact" action=""&gt; &lt;fieldset&gt; &lt;input type="submit" name="rcmd" class="button" id="submit_btn" value="Enroll" /&gt; &lt;/fieldset&gt; &lt;/form&gt; &lt;/div&gt; &lt;!----This is the textbox I need to send incoming data to--&gt; &lt;input type="text" …
has answer: http://stackoverflow.com/a/27611101
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
downvote count: 0

http://stackoverflow.com/comment/43392519
type: Comment
score: 2
has text: simply do `var num3 = num+1;`
type: QuestionComment
comment on: http://stackoverflow.com/q/27479640

http://stackoverflow.com/q/27537287
type: Question
tagged with: javascript
score: 0
has title: modbus rtu slave not responding to request and C-ERR light coming on slave
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43503378
has body: Situation I have a oriental motors LSD-KD Stepper motor driver, I'm connecting Through a PC -> USB -> RS232 -> RS485 -> Driver. The Driver uses RS485 Modbus RTU, and is sent with transmision speed of 38400, databits of 8, stopbits of 1, parity of even, and slave number of 2. Im sending trying to send out 0x02,0x06,0x02,0x4b,0x00,0x50,0xf8,0x6b which should right a register. and im not getting any response, and the C-DAT/C-ERR goes red. I have this bit of Javascript code var crc = require('crc'); var SerialPort = require("serialport").SerialPort var serialPort = new SerialPort("/dev/cu.usbserial", { baudrate: 38400, databits: 8, stopbits: 1, parity: 'even' }); var buff = new Buffer([0x02,0x06,0x02,0x4b,0x00,0x50,0xf8,0x6b]); console.assert(crc.crc16modbus(buff) == 0); serialPort.open(function () { serialPort.on('data', function(data) { console.log("recieving:", data); }); setInterval(function() { console.log("writing", buff) serialPort.write(buff); },1000); }); When running the code I see: writing &lt;Buffer 02 06 02 4b 00 50 f8 6b&gt; recieving: &lt;Buffer 02&gt; recieving: &lt;Buffer 06&gt; recieving: &lt;Buffer 02&gt; recieving: &lt;Buffer 4b&gt; recieving: &lt;Buffer 00&gt; recieving: &lt;Buffer 50&gt; recieving: &lt;Buffer f8&gt; recieving: &lt;Buffer 6b&gt; which is excepted as the RS485 has an echo. but im not receiving any thing back from the slave. EDIT: more on the configuration. on the RS232 &lt;-> RS485 convertor its set to 'T.ON R.ON' and 'DCE' it is this device. a device page. on the driver it is set as so: SW1 is set to 2, SW1 corresponds to slave number SW2 is set to 2, SW2 with a value of two indicates a transmission rate of 38400 SW3 is set to '1: off, 2: on, 3: off, 4: on' No.1: Set the address number, this causes the slave address to be 16 values higher No.2: Set the protocol, this sets it to use the ModBus Protocol No.3: Not used No.4: Set the termination resistor (120 Ω) Output port of RS232 &lt;-> RS485 convertor is connected to driver. the out…
tagged with: serial-port
has comment: http://stackoverflow.com/comment/43505089
tagged with: rs485
answer count: 0
tagged with: modbus
tagged with: signal-processing

http://stackoverflow.com/a/27535865
accepted answer of: http://stackoverflow.com/q/27534811
answers question: http://stackoverflow.com/q/27534811
type: AcceptedAnswer
downvote count: 0
has body: Backbone.js (and javascript in general) does everything by reference, so models will never be cloned unless explicitly done so. You can clone a model by calling .clone() on the model/collection, or by passing a Backbone.Model into another model constructor (new Backbone.Model(model)). In Backbone, You can move models between collections, arrays, objects, anything and they won't get cloned along the way. http://jsfiddle.net/CoryDanielson/Lj3r85ew/ var origModel = new Backbone.Model({ id: 0 }); // where and findWhere return the model instance, not clones. var collection = new Backbone.Collection([origModel]), where = collection.where({ id:0 })[0], findWhere = collection.findWhere({ id:0 }); where === origModel; // true findWhere === origModel; // true - // Cloning a model var copy1 = origModel.clone(), copy2 = new Backbone.Model(origModel.toJSON()), copy3 = new Backbone.Model(origModel); copy1 === origModel; // false copy2 === origModel; // false copy3 === origModel; // false
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/a/27514570
has body: The problem was that your .item has a float property. connectWith doesn't work with floated elements. Just remove float: left; from .item. See the fiddle: http://jsfiddle.net/hhxpw882/2/
answers question: http://stackoverflow.com/q/27511369
score: 0
accepted answer of: http://stackoverflow.com/q/27511369
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43459629
type: Answer

http://stackoverflow.com/a/27543464
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27543119
downvote count: 0
type: Answer
has body: The reason that the expression allows the single hyphen is that the first part allows the hyphen without digits, and the second part is optional. Rearrange the parts, so that you allow either a number that is at least one digit without the fraction, or a number with at least zero digits with the fraction: ^-?(([0-9]{1,4})|([0-9]{0,4}\.[0-9]{1,4}))$ Demo: function validate(s) { var ok = /^-?(([0-9]{1,4})|([0-9]{0,4}\.[0-9]{1,4}))$/.test(s); // show result in Stackoverflow snippet document.write(s + ' : ' + (ok ? 'allowed' : 'not allowed') + '&lt;br&gt;'); } validate('-'); validate('1234'); validate('1234.123'); validate('1234.12345'); validate('12345'); validate('.123'); validate('.12345'); validate('-1234'); validate('-1234.123'); validate('-1234.12345'); validate('-12345'); validate('-.123'); validate('-.12345');

http://stackoverflow.com/comment/43523274
comment on: http://stackoverflow.com/a/27548211
score: 0
type: Comment
has text: If you wanted to have a simple function, your structure should make easy to get from a cell to the nearby cells. That can be accomplished, for example, by having the ids with a sequential numerical part (for example from 'c1' to 'c25'), so that to get the one above I just have to add 5 or subtract 5. Obviously there are many other ways to do that.
type: AnswerComment

http://stackoverflow.com/q/27581519
type: Question
has comment: http://stackoverflow.com/comment/43587399
downvote count: 0
has body: I have an application that reads from one regularly updating public flickr feed (e.g. https://api.flickr.com/services/feeds/photos_public.gne?tags=christmas&amp;tagmode=all&amp;format=json). When you click on an item it goes to a separate view displaying information regarding that particaular item. These are my 2 controllers both loading data from the same service flickrImages imageFeedControllers.controller('ImageListController', ['$scope','flickrImages', function ($scope,flickrImages) { $scope.imagesData = flickrImages.load({ tags: tag }); }]); imageFeedControllers.controller('ImageDetailsController', ['$scope', '$routeParams', 'flickrImages', '$sce', 'descriptionOnlyFilter', function ($scope, $routeParams, flickrImages, $sce, descriptionOnlyFilter) { $scope.imagesData = flickrImages.load({ tags: tag }, function (images) { var imageId = $routeParams.imageId; $scope.imageData = images.items[imageId]; }); }]); my service imageFeedServices.factory('flickrImages', ['$resource', function ($resource) { var publicPhotoBaseUrl = 'https://api.flickr.com/services/feeds/photos_public.gne'; return imagesData = $resource(publicPhotoBaseUrl, { tagmode: 'all', format: 'json', jsoncallback: 'JSON_CALLBACK' }, { load: { method: 'JSONP'} }); My problem is that by the time I click on an item in the image list the feed has updated therefore the image details view displays a different image to the one I clicked on. Does anybody have a solution for this?
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/43589378
has comment: http://stackoverflow.com/comment/43589313
has title: Sharing a regularly updating json data feed between 2 controllers angularjs
tagged with: angularjs
answer count: 0
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/43587626
has comment: http://stackoverflow.com/comment/43589244
has comment: http://stackoverflow.com/comment/43589392
score: 1
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/43587448
tagged with: angularjs-scope

http://stackoverflow.com/comment/43554260
score: 0
has text: @aduch If all numbers are 5 digits long yes, else no.
type: Comment
comment on: http://stackoverflow.com/q/27564318
type: QuestionComment

http://stackoverflow.com/a/27620032
score: 1
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27619696
type: AcceptedAnswer
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/27619696
has body: Looking at your example, the following works: $( '.tattoo-letters' ).text().indexOf('spirit of brotherhood.') The spaces in your HTML are non-breaking whitespace (U+00A0).

http://stackoverflow.com/a/27558383
type: Answer
score: 2
has body: In a bootstraped Firefox add-on, it is certainly possible to communicate between the bootstrap.js file and any other file within your add-on. In fact, it is normal to do so at least to the extent of setting up other entry points (e.g. buttons, UI controls, etc.), loading modules, etc. for your add-on. The install(), startup(), shutdown(), and uninstall() methods in bootstrap.js are the only entries into your add-on prior to you setting up others (usually set up from startup()). From the point of view of how your code is organized, it is unusual for bootstrap.js to contain code beyond what is needed to minimally set up your add-on. In general, the code in bootstrap.js, or called directly by bootstrap.js, should not contain any significant amount of processing, or calculations. Everything that does not need to be done to show the Firefox UI should be delayed until after the Firefox UI is fully initialized and available to the user. The reason for this is that it is much more important to have the main Firefox UI available to the user as rapidly as possible than almost any processing/setup that is not immediately needed to show the Firefox user interface. This includes things like setting up data structures or doing calculations which are not actually used prior to the user interacting with your add-on in some way. It is considered much better for such things to be done once the user clicks on your add-on's button (or otherwise interacts with your add-on) rather than delay showing the user the main Firefox UI to do these tasks. On the other hand, it is possible for your entire add-on to be simple enough for the functional code to be contained entirely within the bootstrap.js file. One example is an extension I wrote called Print Button is Print. That extension only changes the Firefox print button to cause a print (old default) instead of a print preview (new default as of FF29). Given the simplicity of the add-on, there was no need for any code beyond the code contain…
downvote count: 0
answers question: http://stackoverflow.com/q/27557265
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27557265
upvote count: 2

http://stackoverflow.com/q/27556211
upvote count: 1
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/34665065
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/20097662
tagged with: localforage
has body: Is it possible to have multiple dataStore in IndexedDB using angular-localForage? I tried this: var $tblStage = $localForage.createInstance({ storeName : 'tblStage', // name of the table }); but it triggered an error which says: Error: A localForage instance with the name dbName is already defined. I read this Question before but, is the only way is working with Raw IndexedDB? Or I missed something in my code? Any Idea?
downvote count: 0
score: 1
tagged with: indexeddb
type: Question
has title: Is it possible to create multiple dataStore in angular-localForage?
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/43465686
type: QuestionComment
type: Comment
has text: why you are using functions on keyup? why not on onClick?
score: 0
comment on: http://stackoverflow.com/q/27517827

http://stackoverflow.com/q/27532522
has answer: http://stackoverflow.com/a/27532925
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27533184
tagged with: perl
has body: I have a perl cgi script which accepts 2 params. I have a jquery ajax block within to the same cgi script. Now i need to use these param values of the cgi script inside the javascript block. Is it possible to do so? if (param) { $insp_id = param("param1"); $section_id = param("param2"); } my $html = <<BLOCK; Handling Images order for Inspection: $insp_id and Section: $section_id BLOCK Basically i have to replace 7004423 with insp_id in the javascript ajax block. Please advise. Thanks.
has title: use perl cgi values inside javascript ajax
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
answer count: 2
favorite count: 0
type: UnansweredQuestion
upvote count: 1

http://stackoverflow.com/comment/43561357
type: QuestionComment
has text: http://stackoverflow.com/questions/654112/how-do-you-detect-support-for-vml-or-svg-in-a-browser
comment on: http://stackoverflow.com/q/27568071
score: 0
type: Comment

http://stackoverflow.com/q/27527356
tagged with: kineticjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27527661
tagged with: resource-cleanup
type: Question
has title: Kineticjs causes memory leaks. Does not release stage after it is destroyed
tagged with: javascript
score: 0
has body: Our Single page Application generates a new stage for a new url route. We have huge memory leaks. We have noticed that Kinetic.shapes and Kinetic.names that are global variables are never cleared even after a call for stage.destroy(). The call bellow does not fix the problem: this.stage.destroy() Kinetic.shapes = []; Kinetic.names = []; Kinetic.stages = []; Any Ideas? Thanks
tagged with: memory-leaks
answer count: 1

http://stackoverflow.com/comment/43459495
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27514482
has text: perhaps, someone didn't understand...

http://stackoverflow.com/comment/43501098
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27530676
has text: thanks, I pushed your solution to github and it fixes the first problem; but when zooming I'm getting an exception now: `Countdown[...] -[NSView windowScriptObject]: unrecognized selector sent to instance`
score: 0

http://stackoverflow.com/comment/43658630
has text: You have given two different forms. That is why.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27618450
type: Comment

http://stackoverflow.com/a/27558405
score: 1
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27557622
type: Answer
answers question: http://stackoverflow.com/q/27557622
has body: If you can't use Angular's ngAminate (which doesn't require DOM manipulation as it uses css), you can build a custom directive. Directives are where DOM manipulation is allowed and you'd get the actual element passed into the directive, so there's no need for hard-coded ids. But I recommend following @NewDev's suggestion. This would be a possible stub for the directive: module.directive('myAnimation', function() { return { restrict: 'A', scope: { enabled: '=' }, link: function(scope, element) { // watch on enabled and start animation when set to true } } }); And your markup:
downvote count: 0

http://stackoverflow.com/q/27592147
has comment: http://stackoverflow.com/comment/43630351
type: Question
has comment: http://stackoverflow.com/comment/43608050
tagged with: javascript
upvote count: 1
answer count: 1
tagged with: jquery
favorite count: 0
has body: I have an autocomplete dropdown that appears when a user starts typing in a textbox (I'm using jquery mobile but I don't think that's important to my problem). I want to be able to hide the whole dropdown list when a user clicks anywhere on the page. However, I don't want to hide the dropdown when a user actually clicks on the dropdown itself. Is there a way I could catch the click event in order to know what was clicked? Here's my blur function: //hide autocomplete when dropdown is not clicked $("#search-div input").blur(function () { $("#autocomplete-list").hide(); }); I was thinking of somehow putting an if statement in my blur function. Here's my pseudo code: if( dropdown clicked) { run code to take text from dropdown and place in textbox } else { hide dropdown } Would it be possible to know whether my dropdown is clicked or something else is clicked while in my blur function? When I debug my javascript I'm only seeing an event that's related to the textbox doing the blur() Edit: Here is a function I'm using to handle when the dropdown is clicked: $( document).on( "click", "#autocomplete-list li", function() { var selectedItem = event.target.innerHTML; $(this).parent().parent().find('input').val(selectedItem); $('#autocomplete-list').hide(); runSearchQuery(); });
has answer: http://stackoverflow.com/a/27592168
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: how can I check if a particular item is clicked with .blur() in jquery
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43754196

currency
tag name: currency
type: Tag
tags question: http://stackoverflow.com/q/27547680

http://stackoverflow.com/comment/43427377
comment on: http://stackoverflow.com/q/27498084
has text: So write code that either disables/enables the input or you show/hide it. Or do form validation like every site and do it at the end.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27594957
possible better answer: http://stackoverflow.com/a/27595081
tagged with: loops
has comment: http://stackoverflow.com/comment/43613841
type: Question
tagged with: javascript
score: 4
has answer: http://stackoverflow.com/a/27595607
accepted answer: http://stackoverflow.com/a/27595607
has body: The individual table rows are giving me a problem. I have created what I want using divs but I need to use a table instead of divs. My table has 220 cells, 10 rows, and 22 columns. Each cell has to have the value of i inside the innerHTML. Here is similar to what i want using Divs ( although the cell height and width does not have to be set ): http://jsfiddle.net/8r6619wL/ This is my starting attempt using a table: But that code somehow dynamically creates a bunch of tbody elements. Thanks for help as I newb
linked to: http://stackoverflow.com/q/938083
has answer: http://stackoverflow.com/a/70052801
downvote count: 0
favorite count: 0
has title: How to create a table using a loop?
has answer: http://stackoverflow.com/a/27595081
upvote count: 4
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27595073

http://stackoverflow.com/q/27631782
downvote count: 0
has answer: http://stackoverflow.com/a/27632024
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
upvote count: 1
score: 1
type: Question
has answer: http://stackoverflow.com/a/27631926
has answer: http://stackoverflow.com/a/27632534
has title: Calling a function inside the controller of directive
has body: Is it possible to call the method defined inside the directive controller from outside. call updateMap() app.directive('map', function() { return { restrict: 'E', replace: true, template: ' ', controller: function(){ $scope.updateMap = function(){ //ajax call here. } }, link: function($scope, element, attrs) { $scope.updateMap(); //do some dom transformation } } }); I want to call the method updateMap() function from my view.
tagged with: javascript
answer count: 3

http://stackoverflow.com/a/27479550
accepted answer of: http://stackoverflow.com/q/27478950
answers question: http://stackoverflow.com/q/27478950
upvote count: 3
type: AcceptedAnswer
type: Answer
downvote count: 0
score: 3
has body: You cannot mix PHP and JavaScript code this way. Once the PHP code is executed, its output is sent to the browser, and there is no direct way to "read" the result of client side code (JavaScript) that you have output. What your code above just does is comparing the string " " to 1920, which will always evaluate to false, hence reaching code block 3. If you want to display a div based on the screen size, you can do it in JavaScript alone: Note: all the JavaScript examples below use jQuery. Or better yet, using CSS media queries and no JavaScript at all. If however you want to pass on this information to your server, you can get JavaScript to call a PHP script on your server, for example: This will be a separate PHP call that will occur after the page has loaded.
has comment: http://stackoverflow.com/comment/43392415

http://stackoverflow.com/comment/43512044
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27542186
score: 0
has text: I don't see any problems with your manifest.. Can you make a minimal example and upload it somewhere?

http://stackoverflow.com/a/27592686
type: Answer
has comment: http://stackoverflow.com/comment/43628366
has comment: http://stackoverflow.com/comment/43625172
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/43625314
has comment: http://stackoverflow.com/comment/43620324
has comment: http://stackoverflow.com/comment/43623610
has comment: http://stackoverflow.com/comment/43625510
downvote count: 0
has body: By default glyph opacity is set to 0.5. You should override style to make it more opaque: .x-btn-icon-el-default-small.x-btn-glyph, .x-btn-icon-el-default-medium.x-btn-glyph, .x-btn-icon-el-default-large.x-btn-glyph, .x-btn-icon-el-default-toolbar-small.x-btn-glyph, .x-btn-icon-el-default-toolbar-medium.x-btn-glyph, .x-btn-icon-el-default-toolbar-large.x-btn-glyph { opacity: 1.0; } Example: http://jsfiddle.net/89aeduo6/8/ (it uses Arial as glyph font)
accepted answer of: http://stackoverflow.com/q/27591001
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27591001

http://stackoverflow.com/q/27493909
has body: I have an array displayed as a list of objects. For each name in the list, there should be a circle to its left, displaying the first letter of that name. HTML5 canvas seems to be the cleanest way to pull this off, but I have little experience with canvases. When the canvas is added the function breaks as an undefined reference on the getContext. Thanks for your help! Fiddle: http://jsfiddle.net/dpnq7sj4/ Code: names = ["Joe","Bob","Clark","Henry"]; var numberOf = names.length; //Players List var text = "&lt;ul&gt;"; for (i = 0; i &lt; numberOf; i++) { var nameLetter = names[i].charAt(0); text += "&lt;li class='playerListItem'&gt;&lt;canvas id="myCanvas" height:100px width:100px&gt;&lt;/canvas&gt;&lt;label&gt;&lt;input type='checkbox' class='playerCheckbox'&gt;" + names[i] + "&lt;/label&gt;&lt;/li&gt;"; //Circle var canvas = document.getElementById('myCanvas'); var context = canvas.getContext('2d'); var centerX = canvas.width / 2; var centerY = canvas.height / 2; var radius = 25; context.beginPath(); context.arc(centerX, centerY, radius, 0, 2 * Math.PI, false); context.fillStyle = '#f0f0ef'; context.fill(); context.fillStyle = "black"; var width = context.measureText(nameLetter).width; var height = context.measureText("w").width; // this is a GUESS of height context.fillText(text, 200 - (width/2) ,200 + (height/2)); } text += "&lt;/ul&gt;"; //Ammend HTML document.getElementById("recentPlayersContainer").innerHTML = text;
has comment: http://stackoverflow.com/comment/43420133
favorite count: 0
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: dom
type: Question
possible better answer: http://stackoverflow.com/a/27494317
tagged with: canvas
has answer: http://stackoverflow.com/a/27494272
accepted answer: http://stackoverflow.com/a/27494272
tagged with: javascript
has answer: http://stackoverflow.com/a/27494260
has answer: http://stackoverflow.com/a/27494317
has title: HTML5 Canvas in DOM Loop
answer count: 3
has comment: http://stackoverflow.com/comment/43419775
upvote count: 1
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/43477127
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27524159
has text: again return caught exception `rtn = e.toString();` msg would be more meaningful

http://stackoverflow.com/comment/43480676
type: Comment
comment on: http://stackoverflow.com/q/27526034
has text: This kind of question occurs everyday, maybe this will be helpful: http://stackoverflow.com/questions/19554414/angularjs-disabling-cors
score: 0
type: QuestionComment

http://stackoverflow.com/comment/64051982
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27606074
type: Comment
has text: Possible duplicate of [Issue with angular.mock.inject method](http://stackoverflow.com/questions/30456231/issue-with-angular-mock-inject-method)

http://stackoverflow.com/a/27598339
type: Answer
score: 2
upvote count: 2
has body: $cope.users = [{ }] have one object inside its blank {} , so ng-repeat will iterate through the objects inside the array. doesn't matter the objects are empty or not. here your ng-repeat runs for 1 time. but in $scope.users = [ ], users array don't have anything inside, there is nothing to iterate , so ng-repeat is not going to iterate.
answers question: http://stackoverflow.com/q/27598260
has comment: http://stackoverflow.com/comment/43620748
has comment: http://stackoverflow.com/comment/43620210
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27598260
downvote count: 0

http://stackoverflow.com/q/27613461
type: Question
has answer: http://stackoverflow.com/a/30175226
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/43649318
accepted answer: http://stackoverflow.com/a/30175226
upvote count: 4
answer count: 1
downvote count: 0
has body: I recently updated my recaptcha implementation to google's new version. My understanding is that some reasonable fraction of users should see captchas that are not standard distorted text / read the address photos. The captchas work correctly in a sense of serving and giving correct responses to user input, but on every single usage of the widget I am asked for the answer to a distorted text question, just like the old reCaptcha. My question is this: is this the result of misconfiguration / misimplementation on my part, and, if so, how can I fix this? My hypothesis at the moment is that this is an effect of me serving the gateway api.js file from my own server instead of from google directly...if that is a likely culprit, how is it affecting the captcha operation? Thanks folks!
tagged with: recaptcha
favorite count: 0
tagged with: google-api
has title: Is serving Google No Captcha reCaptcha's api.js locally preventing correct behavior?
type: AnsweredQuestion
tagged with: captcha

http://stackoverflow.com/a/27556682
has comment: http://stackoverflow.com/comment/43549323
score: 4
upvote count: 4
answers question: http://stackoverflow.com/q/27543607
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/27543607
has body: How and when exactly are computeds disposed of? They aren't, in the sense that, their .dispose functions are never called. Could it cause memory leaks? Maybe, but it won't always. The reason computed's need to be .dispose'd, is because they subscriptions on their dependencies; which means that each dependency is holding a reference to the computed. The computed will get garbage collected when there are no longer any references to it. In the above example, that will happen when the ViewModel itself is no longer referenced anywhere, so the computed will get garbage collected along with its ViewModel, as intended. However, if the computed depends on anything outside of the ViewModel that contains it, it will not get garbage collected until all of the things it depends on are themselves ready to be garbage collected. In the worst case, where the computed depends on something global that is never garbage collected, the computed itself will never be garbage collected. So, the real answer is that you only need to dispose a computed when it has dependencies that will be longer-lived than the computed itself. However, as there's no harm to disposing a computed that would get garbage collected anyways, it's often just easier to make sure all computeds created by ViewModels get disposed; rather than trying to split hairs over which ones need to be disposed. How to handle computed disposal In any case, you'll want to have a .dispose method on your viewModel or some equivalent. There's no way some external logic is going to be able to know about the privately created computeds, so the ViewModel itself will need to handle it itself. The simple way to handle this is just to call .dispose on each privately created computed in the VM's .dispose method: var fileBrowserViewModel = function() { // on-the-fly created computed to maintain folderpath when currentFolder changes var folderPathComputed = ko.computed(function() { //implementation omitted }, this); this.dispose = function () {…

http://stackoverflow.com/comment/43518148
comment on: http://stackoverflow.com/q/27545789
type: QuestionComment
type: Comment
has text: `.append()` works differently from simply joining strings of text together — it appends/inserts a DOM node. You shouldn't append ` ` because that will make no sense.
score: 0

http://stackoverflow.com/q/27547015
type: UnansweredQuestion
has body: I have a form I am trying to validate. This is the html Personal Details Please enter in some information about you. Name Telephone Email I need to use some form of validation so I opted to use jQuery validation plugin called .validate. This is my script $(document).ready(function($) { //When the form is submitted do this... $("#stripe-payment-form").submit(function(event) { //Validation // just for the demos, avoids form submit $.validator.setDefaults({ debug: true, success: "valid" }); $( "#stripe-payment-form" ).validate({ rules: { telephone: { required: true, digits: true } } }); When the page loads the first time I get no errors and validation is working. However If input 'aaa' into the telephone input I get this error and no validation occurs: TypeError: $.validator is undefined Does anyone know why this is happening? I was following along the documentation on http://jqueryvalidation.org/digits-method
has comment: http://stackoverflow.com/comment/43526045
has comment: http://stackoverflow.com/comment/43521019
has comment: http://stackoverflow.com/comment/43523187
has answer: http://stackoverflow.com/a/28707660
tagged with: jquery-validate
has comment: http://stackoverflow.com/comment/43520526
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/43523497
has comment: http://stackoverflow.com/comment/43521059
has comment: http://stackoverflow.com/comment/43531943
has comment: http://stackoverflow.com/comment/43520356
has answer: http://stackoverflow.com/a/27552153
has title: JQuery Validation issue with accepting only digits.

http://stackoverflow.com/comment/69617163
score: 3
comment on: http://stackoverflow.com/a/27612348
type: AnswerComment
type: Comment
has text: Just to note the obvious, you also need to install JSHint extension for this to work

http://stackoverflow.com/q/27636258
tagged with: symfony
has comment: http://stackoverflow.com/comment/43709877
has comment: http://stackoverflow.com/comment/43699302
has answer: http://stackoverflow.com/a/27660973
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/10351167
has comment: http://stackoverflow.com/comment/43711500
downvote count: 0
has comment: http://stackoverflow.com/comment/43716113
has answer: http://stackoverflow.com/a/46062057
has title: Routing with angular and Symfony
type: Question
score: 5
has comment: http://stackoverflow.com/comment/43737647
possible better answer: http://stackoverflow.com/a/46062057
tagged with: javascript
has comment: http://stackoverflow.com/comment/43716025
has body: I have some route issue using symfony and angular. I tried to adapt this tutorial for my project and my symfony backend. But whatever I do in my main html page or in my js angular files, when I inspect an element (using chrome tools), my div that contains my ng-view is always in commentary. I read on forums that angularjs comments ng-view if routes are not working. Can someone please help to resolve this route problem? EDIT : It seems that Angular got the route but cannot retreive the html partial html because the console displays me a 404 on every html page called. Does anyone know where I should put my html partial files? EDIT 2: I finally found the path to my static html file but the web server returns me a 403 error (forbidden). DO you know how I can access to this file? Here is the files : layout.html.twig (main template): {% stylesheets filter='cssrewrite' 'Resources/css/bootstrap.min.css'%} {% endstylesheets %} {% javascripts 'Resources/js/jquery-1.9.1.js' 'Resources/js/bootstrap.js' 'Resources/js/angular.js' 'Resources/js/angular-route.js' 'Resources/js/app.js' 'Resources/js/Controllers.js' %} {% endjavascripts %} ADC-WebApp ADC-WebApp Plan de production Comparaison Paramètres app.js: 'use strict'; var adcApp = angular.module('adcApp', ['ngRoute', 'adcAppControllers']); adcApp.config(function($interpolateProvider){ $interpolateProvider.startSymbol('{[{').endSymbol('}]}'); //Conflict with twig }); adcApp.config(['$routeProvider', function($routeProvider) { $routeProvider.when('/OGPP/#/Comparaison', { templateUrl: 'partials/Comparaison.html', controller: 'ComparaisonCtrl' }) .when('/OGPP/#/Param', { templateUrl: 'partials/Param.html', controller: 'ParamCtrl' }) .when('/OGPP', { templateUrl: 'partials/index.html', controller: 'HomeCtrl' }); }]); PHP controller : class OgppController extends Controller { public function indexAction() { $content = $this->render('ADCOgppBundle:Ogpp:layout.html.twig'); return new Response($content); } } My partial folder is in the …
tagged with: routes
answer count: 2
has comment: http://stackoverflow.com/comment/43714820
has comment: http://stackoverflow.com/comment/43692517
has comment: http://stackoverflow.com/comment/43714634
has comment: http://stackoverflow.com/comment/43715933
has comment: http://stackoverflow.com/comment/43715287
linked to: http://stackoverflow.com/q/24597959
favorite count: 0
accepted answer: http://stackoverflow.com/a/27660973
has comment: http://stackoverflow.com/comment/43714653
has comment: http://stackoverflow.com/comment/43693003
has comment: http://stackoverflow.com/comment/43694785
upvote count: 5
tagged with: angularjs

http://stackoverflow.com/comment/43667925
type: QuestionComment
comment on: http://stackoverflow.com/q/27622371
has text: String interpolation doesn't happen inside single quoted strings.
score: 0
type: Comment

http://stackoverflow.com/comment/43394861
has text: JavaScript `Date` does the same thing as `ISODate()` for the shell expects. `ISODate()` is just more strict in the representation to **only** accept a string that would result in a UTC construct. That was the distinction.
comment on: http://stackoverflow.com/a/27480559
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/a/27503056
has body: A very good practice is to separate every component in a separate file, so I would start by putting your controller in a file like that : //File recursionHelperController.js (function() { 'use strict'; angular .module('app.controllers') .controller('RecursionHelperController', RecursionHelperController); RecursionHelperController.$inject = ['$scope']; function RecursionHelperController($scope) { //do your stuff } })(); Note that I gave you the most correct format I know for a controller or any angular element in general, but you can do something simpler like: angular.module('app.controllers') .controller('RecursionHelperController', ['$scope', function($scope) { //do your stuff }]) You can then call this controller in your main file : controller: 'RecursionHelperController' Hope it helps Update : Sometimes the automatic injection has some troubles that's why I recommend doing it this way with an explicit injection. The angular doc only shows the simplest way for clarity and tutorial purposes Update 2 If you don't want to separate the controller, try using the injection safe notation controller : ['$scope', function($scope) { //do your stuff }])
has comment: http://stackoverflow.com/comment/43436530
has comment: http://stackoverflow.com/comment/43436590
has comment: http://stackoverflow.com/comment/43437762
has comment: http://stackoverflow.com/comment/43437552
score: 0
answers question: http://stackoverflow.com/q/27502601
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43437388
accepted answer of: http://stackoverflow.com/q/27502601
has comment: http://stackoverflow.com/comment/43437908
has comment: http://stackoverflow.com/comment/43437822
type: Answer

http://stackoverflow.com/a/27537628
answers question: http://stackoverflow.com/q/27537475
type: Answer
has body: The issue is you are adding the onClick before the links have been added because the links are add some time after the ajax returns which is asynchronous. The simplest solution is to add the click in the populateCourses method: function populateCourses(data) { var html = ""; if (data.length > 0) { $.each(data, function () { html += "Edit "; }); } $("#courselist").html(html); $("a[id^=id]").on("click", function(event) { alert('here'); }); } http://jsfiddle.net/z6bnwjy7/
score: 1
upvote count: 1
downvote count: 0

http://stackoverflow.com/a/27498178
downvote count: 0
type: Answer
score: 7
accepted answer of: http://stackoverflow.com/q/27497718
upvote count: 7
answers question: http://stackoverflow.com/q/27497718
has body: No ranges required, you just need to duplicate all the cut elements and move their children around: function splitOn(bound, cutElement) { // will divide the DOM tree rooted at bound to the left and right of cutElement // cutElement must be a descendant of bound for (var parent = cutElement.parentNode; bound != parent; parent = grandparent) { var right = parent.cloneNode(false); while (cutElement.nextSibling) right.appendChild(cutElement.nextSibling); var grandparent = parent.parentNode; grandparent.insertBefore(right, parent.nextSibling); grandparent.insertBefore(cutElement, right); } } (jsfiddle demo)
type: AcceptedAnswer

http://stackoverflow.com/comment/43603008
type: QuestionComment
score: 0
has text: inspect the actual request in browser console and see exactly what is sent. You haven't shown where you call any of your functions so we can't help a lot.
comment on: http://stackoverflow.com/q/27589141
type: Comment

http://stackoverflow.com/q/27590787
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
type: Question
upvote count: 2
has title: Trying to update select list options from a jQuery post results
answer count: 1
tagged with: .net
has answer: http://stackoverflow.com/a/27591100
accepted answer: http://stackoverflow.com/a/27591100
tagged with: javascript
tagged with: jquery
has body: I have the following Dropdown on my View... &lt;div class="editor-field"&gt; @Html.DropDownListFor(model =&gt; model.CategoryId, new SelectList(new List&lt;string&gt;(), ""), "Select ...") &lt;/div&gt; My controller contains the following action method that I am calling to update the options... [HttpPost] public ActionResult GetCategories(int ChallengeId, string Gender, DateTime BirthDate) { CategoriesContext db = new CategoriesContext(); ChallengesContext cc = new ChallengesContext(); Challenge challenge = cc.Challenges.Where(c =&gt; c.ChallengeId == ChallengeId).Single(); var categories = db.Categories.Where(c =&gt; c.GenderOption == Gender &amp;&amp; c.SponsorId == challenge.SponsorId).AsEnumerable() .Select(s =&gt; new SelectListItem { Text = s.CategoryName, Value = s.CategoryId.ToString() }).ToList(); SelectList list = new SelectList(categories); return Json(list); } I call the following function when another item on the page changes: function GetCategories() { var _challengeid = $('#ChallengeId').val(); var _gender = $('#Gender').val(); var _birthdate = $('#Birthdate').val(); if (_birthdate != "" &amp;&amp; _gender != "" &amp;&amp; _challengeid &gt; 0) { $('html,body').css('cursor', 'wait'); var url = '@Url.Action("GetCategories", "Coach")'; $.post(url, { ChallengeId: _challengeid, Gender: _gender, BirthDate: _birthdate }, function (data) { $("#CategoryId").empty(); $.each(data, function (index, val) { $('#CategoryId') .append($("&lt;option&gt;&lt;/option&gt;") .attr("value", val.Text) .text(val.Text)); }); $('html,body').css('cursor', 'auto'); }, "json"); } The dropdown items are just full of "System.Web.Mvc.SelectListItem". I am getting all of my items, but something is not right in either the transfer of my items from the Action Method or the way that I am grabbing them in my javascript. Can anyone point out what my issue is? Thanks!
favorite count: 0
score: 2
downvote count: 0
tagged with: razor

http://stackoverflow.com/comment/43618598
score: 0
has text: Is your css being required in using the sprockets in `application.css`
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27596020

http://stackoverflow.com/comment/43433989
type: AnswerComment
comment on: http://stackoverflow.com/a/27501476
has text: not sure what you mean. Check the drad and scroll demo above.
type: Comment
score: 0

http://stackoverflow.com/comment/43530878
type: Comment
comment on: http://stackoverflow.com/q/27552333
type: QuestionComment
score: 0
has text: a) your opening html element isn't formed properly. b) where's the element with the ID of data?

http://stackoverflow.com/comment/43488802
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27511964
has text: Thanks for the help, @ProgrammerV5. +1 and marking this as the answer. I'm going to add an answer of my own (not marked as the answer) giving the actual C# code I used with regards to SpecFlow for future reference.

http://stackoverflow.com/q/27509711
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/27510953
favorite count: 0
has body: I am currently reading through "Node.js in action" as well as following through a number of online learning resources. One of the first examples in the book is showing how to pipe a stream through to a response. Like so: var http = require('http'), fs = require('fs'); http.createServer(function(req, res){ res.writeHead(200, {"Content-Type": "image/png"}); fs.createReadStream("./image.png").pipe(res); }).listen(xxxx) My question is how valid is this code? I was under the impression that when ever using the http you should always end with: res.end(); Is this not necessary as piping it implies an end? When ever writing a response should I always end it?
tagged with: node.js
accepted answer: http://stackoverflow.com/a/27510953
has comment: http://stackoverflow.com/comment/43449984
tagged with: http
possible better answer: http://stackoverflow.com/a/27510974
has title: Node http res.end
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27510974
score: 10
has comment: http://stackoverflow.com/comment/43450450
upvote count: 10
type: Question
has comment: http://stackoverflow.com/comment/43450347
answer count: 2

opencv
type: Tag
tag name: opencv
tags question: http://stackoverflow.com/q/27636042

http://stackoverflow.com/a/27504236
type: Answer
score: 2
upvote count: 2
has body: you can do it by using ng-class &lt;div class="col-xs-12 contact-wrapper" ng-class="{'active' : (userIdx == contact.id)}"&gt; and in your controller get the userId in route params in to a scope variable userIdx, because angular not allowed to use $routeParams inside the html $scope.userIdx = $routeParams.userId; angularjs Doc says, The ngClass directive allows you to dynamically set CSS classes on an HTML element by databinding an expression that represents all classes to be added
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27504205
answers question: http://stackoverflow.com/q/27504205

http://stackoverflow.com/q/27569698
favorite count: 0
upvote count: 2
tagged with: node.js
score: 2
type: AnsweredQuestion
has title: Node.js mysql queries and net connection
has answer: http://stackoverflow.com/a/27569819
tagged with: mysql
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27569819
answer count: 1
downvote count: 0
has body: I have a node.js script which takes in SMDR data from a phone system, then inserts it into a database. The code that I have right now inserts everything except for OperatorID (which it inserts [object Object] into that column). I cannot figure out as to why this is happening. Any ideas? var net = require('net'), mysql = require('mysql'), PORT = 1752, HOST = '192.168.10.2', pool = mysql.createPool({ host: 'localhost', port: 3306, user: 'root', password: 'root', database: 'mydb' }); function connectionListener(conn) { console.log('Listening for incoming calls...'); } function logCall(phonenumber, operator) { pool.getConnection(function(err, connection) { if (!err) { // If no error exists //var operID = ''; var opquery = connection.query('SELECT OperatorID FROM tblOperators WHERE Phone_Login = ' + operator, function(err, rows) { if (err) { console.error(err); } //operID = rows[0]; //console.log(operID); console.log(rows[0]); //logs on console okay var query = connection.query('INSERT INTO incoming_calls(phone_number, OperatorID) VALUES("' + phonenumber + '", "' + rows[0] + '") ON DUPLICATE KEY UPDATE OperatorID=OperatorID, date_created=NOW()', function(err, rows) {//fails to insert rows[0] if (err) { console.error(err); } connection.release(); }); }); } else { console.error(err); } }); } function processdata(data) { var phonedata = data.toString().match(/([0-9]?)([0-9]{10})/), operdata = data.toString().match(/([*])([0-9]{4})/); if (phonedata !== null &amp;&amp; operdata !== null) { var phonenumber = phonedata[2], oper = operdata[2]; oper = oper.replace('*', ''); //phonenumber = phonenumber.slice(0,3)+"-"+phonenumber.slice(3,6)+"-"+phonenumber.slice(6); logCall(phonenumber, oper); } }; logCall('999-999-9999', '1203'); //where 1203 is valid var conn = net.createConnection(PORT, HOST, connectionListener); conn.on('data', processdata); conn.setEncoding('utf8');

http://stackoverflow.com/comment/43605771
score: 1
type: Comment
has text: @zerkms, I agree with you in principle, but I also don't code the browsers, and can't always assume they behave correctly. Have you worked with Internet Explorer 6? Even modern Chrome is buggy.
comment on: http://stackoverflow.com/q/27585451
type: QuestionComment

http://stackoverflow.com/comment/43544670
type: Comment
type: QuestionComment
has text: here's the sample code
comment on: http://stackoverflow.com/q/27558323
score: 1

http://stackoverflow.com/comment/43402216
type: QuestionComment
comment on: http://stackoverflow.com/q/27484998
has text: @steveniseki - prototype.js doesn't overwrite `jQuery`, and the OP is using a IIFE to lock in the value and set the dollarsign. One generally doesn't need `$.noConflict` these days, all you should need is an IIFE like the one the OP is using.
score: 0
type: Comment

http://stackoverflow.com/a/44670831
upvote count: 1
answers question: http://stackoverflow.com/q/27565742
score: 1
has body: A tad late, but I have described how you can do this here. This works on AngularJS 1.6.x Basically you can trigger the $parsers pipeline by using $setViewValue(). Below is a code snippet that allows you to programmatically set the ngModel to anything you like, by "hijacking" the $parsers pipeline. This is done using a closure. Set up a $parser with a closure like this: const hijack = {trigger: false; model: null}; modelCtrl.$parsers.push( val =&gt; { if (hijack.trigger){ hijack.trigger = false; return hijack.model; } else { // .. do something else ... }) Then for (re)setting the model you need to trigger the pipeline by changing the $viewValue with modelCtrl.$setViewValue('newViewValue'). (Yes it is true that the new view value must be different with respect to the current value). const $setModelValue = function(model){ // trigger the hijack and pass along your new model hijack.trigger = true; hijack.model = model; // assuming you have some logic in getViewValue to output a viewValue string modelCtrl.$setViewValue( "some new view value" ); }
downvote count: 0
type: Answer

http://stackoverflow.com/q/27596484
has comment: http://stackoverflow.com/comment/47405845
tagged with: javascript
tagged with: jquery
answer count: 3
linked to: http://stackoverflow.com/q/6932913
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27596494
linked to: http://stackoverflow.com/q/5121495
has body: Please keep in mind I am a beginner so please don't be too harsh. I have spent hours researching ways to complete my 'mission'. My mission is as follows... 1. I open my already created html web page 2. I click on the submit button 3. The submit button should execute PHP code. 4. The PHP code should write the current date and time to a .txt file located on my desktop without overwriting previous records. My HTML page works perfectly fine. The submit button appears and when clicked it displays all the code from the .php file but doesn't actually run it. Even if it were to run the code I'm not sure if the code would work? Could you please tell me why when I click on the button it displays the PHP code but doesn't run it. By the way, sorry I should have mentioned I was using Google Chrome. I can settle for IE if necessary but would prefer Chrome. Here is the HTML file code Untitled Document Here is the PHP code <?php $file='phplog.txt'; $date= date('d-m-Y H:i:s'); file_put_contents($file, $date, FILE_APPEND); ?> I checked the pre-created by me phplog.txt file and it was empty so... I don't know... Please don't forget I would prefer this to work in Chrome :) Any help would be greatly appreciated! Thanks :)
favorite count: 0
linked to: http://stackoverflow.com/q/15213551
has answer: http://stackoverflow.com/a/27596554
has comment: http://stackoverflow.com/comment/43616902
type: UnansweredQuestion
downvote count: 2
has title: HTML button to run a PHP code within a web browser
duplicate of: http://stackoverflow.com/q/15213551
tagged with: php
has comment: http://stackoverflow.com/comment/43617178
linked to: http://stackoverflow.com/q/13840429
has comment: http://stackoverflow.com/comment/43616821
has comment: http://stackoverflow.com/comment/43616833
type: Question
has answer: http://stackoverflow.com/a/27596573
duplicate of: http://stackoverflow.com/q/13840429
tagged with: function
upvote count: 0
score: -2

http://stackoverflow.com/q/27635588
has body: I need to draw a line in the following manner: For now, it will be only drawn in code, no user input. My question is, how to draw perpendiculars to a line, if I draw it point by point? (Obviously, this will be the case, because drawing with bezier curves will not give me the possibility to somehow impact the drawing). The closest answer I found was possibly this one, but I can't reverse the equations to derive C. Also there is no length of the decoration mentioned, so I think this will not work as I'd like it to.
has answer: http://stackoverflow.com/a/27636114
type: Question
tagged with: canvas
possible better answer: http://stackoverflow.com/a/27636082
tagged with: javascript
has comment: http://stackoverflow.com/comment/43690394
answer count: 2
has title: Drawing a line with perpendicular decoration
score: 2
accepted answer: http://stackoverflow.com/a/27636114
downvote count: 0
favorite count: 0
tagged with: geometry
has comment: http://stackoverflow.com/comment/43690815
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/10301001
upvote count: 2
tagged with: math
has answer: http://stackoverflow.com/a/27636082

http://stackoverflow.com/q/27598195
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27598222
has answer: http://stackoverflow.com/a/27598295
score: 0
accepted answer: http://stackoverflow.com/a/27598222
has comment: http://stackoverflow.com/comment/43620056
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27598295
has title: Please why does this code refresh my page after the onclick event?
has comment: http://stackoverflow.com/comment/43619914
type: Question
answer count: 2
tagged with: javascript
has body: window.onload = init; function init() { var button = document.getElementById("addButton"); button.onclick = function () { var songTitle = document.getElementById("songTextInput").value; if (songTitle == "") alert("Baba Put Something Jare"); else { var playlist = document.getElementById("playlist"); var song = document.createElement("li"); song.innerHTML = songTitle; playlist.appendChild(song); } }; } The HTML body consist of : Web Tunes The code outputs the new list element but refreshes immediately.. Please help.

http://stackoverflow.com/q/27618267
type: Question
has comment: http://stackoverflow.com/comment/43657528
has comment: http://stackoverflow.com/comment/43658573
has comment: http://stackoverflow.com/comment/43657514
has comment: http://stackoverflow.com/comment/43657716
tagged with: javascript
tagged with: show-hide
answer count: 3
tagged with: function
has title: Can't apply simple hide function on div
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/43657543
favorite count: 0
has comment: http://stackoverflow.com/comment/43657525
has answer: http://stackoverflow.com/a/27618429
accepted answer: http://stackoverflow.com/a/27618429
has comment: http://stackoverflow.com/comment/43657730
has answer: http://stackoverflow.com/a/27618300
possible better answer: http://stackoverflow.com/a/27618296
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43657555
has answer: http://stackoverflow.com/a/27618296
score: 1
upvote count: 1
has body: EDIT: This is for leaning purpose I have jQuery library included in my header: &lt;script src="assets/js/jquery-1.11.0.min.js"&gt;&lt;/script&gt; In body I have simple div: &lt;div id="image"&gt; &lt;img class="width" src="assets/images/janka.jpg"&gt; &lt;/div&gt; And at the end of body is simple script: &lt;script&gt; $("#image").load(function () { $("#image").hide(); }); &lt;/script&gt; I would like to hide "image" div after loaded by jQuery function hide(). But nothing happens after page is loaded, div is still visible. In browser console is no error shown. Can't find out what I'm doing wrong. Pls, correct my banal error there.

http://stackoverflow.com/q/27484778
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43401681
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has title: How to initialize jquery plugins after append div on my web page?
score: 0
has body: I'm using jquery mmenu on my web page. There two different kind menu used on this page. One for desktop another one for mobile. I'm not interested to duplicate the menu on this page. How can i call run jquery mmenu after append element. Below i have added my code. Menu Link Link Link Link Link Link Link Link Link Link Link Link jquery, Here i have used jquery mmenu (URL:http://mmenu.frebsite.nl/) $(function() { $('body').wrapInner(' '); $('#mainNav ul').clone().appendTo($('div#mobile_menu')); $('div#mobile_menu').mmenu(); });
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43401780
tagged with: css
has answer: http://stackoverflow.com/a/27485442

http://stackoverflow.com/a/27593847
answers question: http://stackoverflow.com/q/27584898
type: Answer
score: 2
has body: element.focus(); document.execCommand("SelectAll"); window.getSelection().focusNode.selectionStart; This returns the length of the text entered in the input. Using it you can distinguish between an empty input and an invalid value. Remember to add an exception for tab.
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27584898
upvote count: 2

http://stackoverflow.com/comment/43421765
has text: @Giffyguy answer posted, just added additional details but you prolly have your implementation already.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27494330

http://stackoverflow.com/q/27577251
tagged with: google-visualization
tagged with: javascript
has answer: http://stackoverflow.com/a/27582799
has title: Google Visualization Table Chart - changing column names
score: 2
answer count: 1
downvote count: 0
has body: How would I go about changing the column names in the Google Table Chart? The columns names appear as the metrics given (ga:users | ga:sessions | ga:bounceRate) in the query. I need to have them displayed as: users | sessions | bounceRate. Do I have to create a new view? Or do some sort of getcolumnLabel and change it? Google Charts
favorite count: 0
upvote count: 2
accepted answer: http://stackoverflow.com/a/27582799
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43590021
type: Question
tagged with: google-analytics

http://stackoverflow.com/q/27572053
has comment: http://stackoverflow.com/comment/43569659
has answer: http://stackoverflow.com/a/27572087
tagged with: object
type: AnsweredQuestion
has title: Javascript for-in global scope
possible better answer: http://stackoverflow.com/a/27572102
has answer: http://stackoverflow.com/a/27572102
type: Question
accepted answer: http://stackoverflow.com/a/27572087
tagged with: javascript
score: 0
answer count: 2
has body: I just had an embarrassing realization... I regularly loop through objects as such: for (item in results) { if (results.hasOwnProperty(item)) { // do something with results[item]; } } In a large application, I started getting odd leaks into the global namespace. I never suspected that item above floats into the global namespace as it was never declared. I guess it does? Would the proper syntax be the following? for (var item in results) { if (results.hasOwnProperty(item)) { // do something with results[item]; } } For some reason I seem to have missed this in examples. EDIT I am otherwise very firm about declaring all of my variables and don't let anything into the global namespace. For some reason I thought for...in loops were some special exception, but the more I think about it, the dumber that conclusion seems.

http://stackoverflow.com/a/27510521
downvote count: 1
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/43451187
has body: Just add title attribute Google Website Yahoo Website Bing Website Or Using jQuery $(document).ready(function() { $('a').each(function() { var title = $(this).text(); $(this).attr("title", title); }); });
answers question: http://stackoverflow.com/q/27510476
upvote count: 2
has comment: http://stackoverflow.com/comment/43451161

http://stackoverflow.com/comment/43409747
type: Comment
has text: @KalmanHazins that won't really cut it, as there are multiple entries in the table and I want each component handling one entry..
type: AnswerComment
comment on: http://stackoverflow.com/a/27488666
score: 0

http://stackoverflow.com/q/27639498
has title: Using web form results at client/browser side > input to python
has body: I have created web pages with forms for input but I want to use that input at the client side and not pass it back to the server... Setup: One Raspberry Pi (#4) running some python code controlling LEDs = client A second Raspberry Pi (#5) running webmin with apache server hosting html + javascript + CSS pages. Pages have switches, slider and time inputs. Eg. html: &lt;button id="switch" type="button" onclick="toggle(standby)"&gt; javascript: function toggle() { if (standby==true) { document.getElementById('button').classList.toggle('on'); } else { document.getElementById('button').classList.toggle('off'); } standby = !standby; } This part works fine - by clicking on the button I can change its appearance (via the CSS file) and keep track of the button's on-off state using the 'standby' variable. What I want to do is control the LED on RPi #4 via the browser without sending data back to the server on RPi #5. Somehow, I need that 'standby' variable from the web page to be available to the python code, so it can turn on/off the LED (all I want for Christmas!) All my searches point to data going back to the server (Flask, AJAX, CGI, etc.) Many thanks!
tagged with: javascript
has comment: http://stackoverflow.com/comment/43721350
has comment: http://stackoverflow.com/comment/43705593
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43719860
tagged with: python
answer count: 0
score: 0
has comment: http://stackoverflow.com/comment/43719832
type: Question
has comment: http://stackoverflow.com/comment/43714897
has comment: http://stackoverflow.com/comment/43718316

http://stackoverflow.com/comment/43478371
type: Comment
type: QuestionComment
has text: possible duplicate: http://stackoverflow.com/questions/3224834/get-difference-between-2-dates-in-javascript
score: 0
comment on: http://stackoverflow.com/q/27524833

http://stackoverflow.com/a/27595190
has comment: http://stackoverflow.com/comment/43614072
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27595126
type: Answer
answers question: http://stackoverflow.com/q/27595126
has body: Try this: var getMax = function (arr, para) { var highest = arr[0][para]; for (var i = arr.length - 1; i &gt;= 1; i--) { highest = Math.max(highest, arr[i][para]); } return highest; } getMax(graph.data, 'y'); You can't just pass y because y is not defined, so pass 'y' as a character. Also you need to return highest from you function and you need start your loop from length - 1
downvote count: 0
score: 1

http://stackoverflow.com/a/27531241
downvote count: 0
has body: Simple: Change addClass("red") to toggleClass("red"), like so: $(document).ready(function(){ $(".flip").click(function(){ $(".panel").slideToggle("slow"); $(".flip").toggleClass("red"); }); }); Updated fiddle Defensive: Arguably better is this approach: $(document).ready(function(){ $(".flip").click(function(){ $(".panel").slideToggle("slow", function(){ $(".flip").toggleClass("red", $(".panel").is(":hidden")); }); }); }); What this does: it doesn't just toggle the state, but it sets it according to the visibility of the panel. Moreover, it uses a callback from slideToggle to toggle the 'red' class after the animation is done, so you are sure to have the right state of the panel. It should go well, but sometimes weird things can happen when an element is clicked in quick succession. This method makes sure that an invalid state repairs itself automatically, so it's a bit more defensive. Updated fiddle (2)
answers question: http://stackoverflow.com/q/27531198
score: 5
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27531198
type: Answer
upvote count: 5

http://stackoverflow.com/a/27594891
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/27594656
answers question: http://stackoverflow.com/q/27594656
upvote count: 1
type: AcceptedAnswer
type: Answer
has body: Problem You are asking for the actual, full URI of the image, not the value that is stored in the src attribute of the image tag itself. It works in your first (server side) example, because the value of the URI and the value in the src attribute happen to be the same. In your first example: src="http://www.mywebsite.nl/images/markwhite.png" Both the URI and the src attribute would be: http://www.mywebsite.nl/images/markwhite.png. However, in your second example: src="markwhite.png" The source (URI) would not be only the filename markwhite.png, but the complete path of your file system. For example, on Unix: /home/user/me/photos/markwhite.png, or on Windows: c:\web\photos\markwhite.png. You can simply verify this by adding some debugging. Add a simple console.log to your JavaScript: function changeImage() { if (document.getElementById("imgClickAndChange").src == "markwhite.png") console.log(document.getElementById("imgClickAndChange").src); { document.getElementById("imgClickAndChange").src = "markgreen.png"; } else { document.getElementById("imgClickAndChange").src = "markwhite.png"; } } Where the line: console.log(document.getElementById("imgClickAndChange").src); Will output the complete source into you browsers JavaScript console. Even a simple alert, instead of a console.log, would suffice as well: alert(document.getElementById("imgClickAndChange").src); Solution What you are looking for is simply the value of the source attribute rather then the full source itself. If you wish to only get an attribute of an element in vanilla JavaScript you can use the getAttribute getter. In your case, change your .src into .getAttribute('src'). Thus this altered script would do the trick: function changeImage() { if (document.getElementById("imgClickAndChange").getAttribute(src) == "markwhite.png") { document.getElementById("imgClickAndChange").src = "markgreen.png"; } else { document.getElementById("imgClickAndChange").src = "markwhite.png"; } }
has comment: http://stackoverflow.com/comment/43613637

http://stackoverflow.com/comment/43548340
comment on: http://stackoverflow.com/q/27561224
has text: JSON.parse(...) will help. And if you need to transcribe the names like that I have found jQuery's map() method very useful in the past
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43671974
type: AnswerComment
comment on: http://stackoverflow.com/a/27625290
type: Comment
has text: Thank you for the answer. So, do you a way to view or save the entire object 'rsakey'? Because when I save I see only [object Object]... And as I said, to use the same key later for encrypt/decrypt I need it saved somehow.
score: 1

http://stackoverflow.com/q/27598645
type: UnansweredQuestion
tagged with: http-redirect
answer count: 0
has comment: http://stackoverflow.com/comment/43620891
type: Question
has body: I am working on foursquare authentication in angularjs. When the foursquare redirects the user to the configured REDIRECT_URI, the angularjs automatically strips the query params and lands me in a different URI. The following is the link where the browser is redirected to at first. http://localhost:9000/foursquare?code=XXXXXXXXXX#_=_ Then within a second, it redirects me to http://localhost:9000/foursquare Thus I end up losing the query parameters. After referring the angularjs URL routing documentation I have the following snippet in my routes.js .state('foursquare',{ url:'/foursquare?code', templateUrl:'views/foursquare.html', controller:'mediaCtrl' }) Even then the same problem persists. I am struck with this. Any help would be appreciated. I am attaching the complete routes.js file 'use strict'; angular.module('nextpageApp') .config(function ($stateProvider) { $stateProvider .state('main', { url: '/', templateUrl: 'views/main.html', controller: 'MainCtrl' }) .state('foursquare',{ url:'/foursquare?code', templateUrl:'views/foursquare.html', controller:'mediaCtrl' }) .state('why-citibytes', { url: '/why-citibytes', templateUrl: 'views/why-citibytes.html' }) .state('small-businesses', { url: '/small-businesses', templateUrl: 'views/small-businesses.html' }) .state('resellers', { url: '/resellers', templateUrl: 'views/resellers.html' }) .state('groups', { url: '/groups-franchises', templateUrl: 'views/groups-franchises.html' }) .state('publishers', { url: '/publishers', templateUrl: 'views/publishers.html' }) .state('pricing', { url: '/pricing', templateUrl: 'views/pricing.html' }) .state('about', { url: '/about', templateUrl: 'views/about.html' }) .state('faq', { url: '/faq', templateUrl: 'views/faq.html' }) .state('contact', { url: '/contact', templateUrl: 'views/contact-us.html' }) .state('places', { url: '/places/:businessId', templateUrl: 'views/profile.html', controller: 'ProfileCtrl' }) .state('dashboard', { url: '/dashboard/:businessId', templateUrl: 'views/…
tagged with: angular-routing
has title: angularjs not detecting the redirect url
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/43620486
tagged with: angularjs

http://stackoverflow.com/comment/43532034
type: AnswerComment
comment on: http://stackoverflow.com/a/27533715
type: Comment
score: 1
has text: Also, take a look at this [question](http://stackoverflow.com/questions/13849185/moving-an-object-along-a-straight-line-at-a-constant-speed-from-point-a-to-b?rq=1). While your math looks alright to me, it's possible it's not correct

http://stackoverflow.com/comment/43462031
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27515788
has text: Thanks alec, that method doesn't work for custom attributes

http://stackoverflow.com/comment/43394557
comment on: http://stackoverflow.com/q/27480499
type: Comment
type: QuestionComment
score: 0
has text: Hey All :-) I posted it on fiddle now: http://jsfiddle.net/62dsqLff/ Pawel - problem is that it also work outside the nav a but it shouldn't :(

http://stackoverflow.com/comment/43638356
score: 0
type: Comment
type: QuestionComment
has text: @ Marventus ok, after correction, Its show same result also.
comment on: http://stackoverflow.com/q/27607588

http://stackoverflow.com/comment/43651044
type: AnswerComment
type: Comment
has text: MEAN doesn't declare new modules with a variable, always uses `angular.module` for all components
comment on: http://stackoverflow.com/a/27614523
score: 0

http://stackoverflow.com/q/27536581
has answer: http://stackoverflow.com/a/27536602
answer count: 4
has answer: http://stackoverflow.com/a/27537268
has answer: http://stackoverflow.com/a/27536776
has answer: http://stackoverflow.com/a/27536716
type: Question
score: 3
tagged with: javascript
upvote count: 3
has title: Check if input fields contains certain text
has comment: http://stackoverflow.com/comment/43502015
downvote count: 0
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has body: I'm trying to find if what the user typing in to an input field contain certain text - I've kinda got it works, but only working for an exact match as opposed to a partial match. If a user types anything before the text i'm matching, of course the code doesn't trigger. What i need to do is check if the input contains @nyu.edu at all in the input field. $('.email').keyup(function(){ if ($(".email").val() == "@nyu.edu") { $("p.warning").css("visibility", "visible"); } else if ($(".email").val() != "@nyu.edu") { $("p.warning").css("visibility", "hidden"); } });

http://stackoverflow.com/a/27485373
has comment: http://stackoverflow.com/comment/43402874
accepted answer of: http://stackoverflow.com/q/27484408
answers question: http://stackoverflow.com/q/27484408
type: AcceptedAnswer
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/43402751

angularjs-service
tags question: http://stackoverflow.com/q/27535407
tags question: http://stackoverflow.com/q/27557622
tag name: angularjs-service
type: Tag

http://stackoverflow.com/comment/43484115
type: Comment
score: 0
type: AnswerComment
has text: Enough with spoon feeding.
comment on: http://stackoverflow.com/a/27527688

http://stackoverflow.com/a/27575978
has comment: http://stackoverflow.com/comment/92068522
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27575423
answers question: http://stackoverflow.com/q/27575423
has body: Yep, each describe gets a new Context object. (All the classes I mention can be found in Mocha's source code.) You could get what you are trying to do with: describe('main describe', function() { afterEach(function() { console.log(this.prop); }); describe('sub', function() { it('should do something', function() { this.test.parent.ctx.prop = 'test'; }); }); }); The line this.test.parent.ctx.prop is the key. this is the Context associated with the it call. this.test is the Test object associated with the it call. this.test.parent is the Suite object associated with the describe call that immediately contains the it call. this.test.parent.ctx is the context in effect where the describe call appears, which happens to be the same context as this in the afterEach call. I would actually recommend not traversing Mocha's internal structures and instead doing something like: describe('main describe', function() { var prop; afterEach(function() { console.log(prop); }); describe('sub', function() { it('should do something', function() { prop = 'test'; }); }); });
type: Answer
score: 29
has comment: http://stackoverflow.com/comment/92074745
upvote count: 29

http://stackoverflow.com/a/27558072
answers question: http://stackoverflow.com/q/27557986
has body: One point - not a whole answer: You're not using a jQueryUI style-sheet. Some effects (highlight, for example) can't work as intended without it.
has comment: http://stackoverflow.com/comment/43542549
score: 0
type: Answer

http://stackoverflow.com/a/52318707
answers question: http://stackoverflow.com/q/27639683
type: Answer
has body: This is what worked for me. (inside app.js) const express = require('express');//path to express module const path = require('path'); const app = express(); app.use(express.static(path.join(__dirname, 'public'))); My file structure looked like this: server.js app.js &gt; public index.html &gt; assets &gt; js jquery.min Then import jquery from index.html like normal: &lt;script src="assets/js/jquery-3.3.1.min.js"&gt;&lt;/script&gt;
score: 0

http://stackoverflow.com/a/27512717
has comment: http://stackoverflow.com/comment/43456216
type: Answer
has comment: http://stackoverflow.com/comment/43456190
answers question: http://stackoverflow.com/q/27512641
score: 0
has body: I'd say both the wheel scroll and scrollbar scroll are the same. See the jquery page Here. The scroll event is sent to an element when the user scrolls to a different place in the element. It applies to window objects Reading this, it looks like the same event is going to be fired for both.
has comment: http://stackoverflow.com/comment/113610678
has comment: http://stackoverflow.com/comment/43456148

http://stackoverflow.com/comment/43588872
score: 0
type: Comment
has text: Thank you sir, I will wait Thank you so much
type: AnswerComment
comment on: http://stackoverflow.com/a/27582065

web-services
type: Tag
tags question: http://stackoverflow.com/q/27595703
tags question: http://stackoverflow.com/q/27501045
tag name: web-services
tags question: http://stackoverflow.com/q/27486523

http://stackoverflow.com/comment/43459609
type: Comment
score: 1
type: QuestionComment
has text: It just seems like you really have no idea what the markup will look like, and adding the same classes over and over, and then not being able to use them, seems silly !
comment on: http://stackoverflow.com/q/27514482

video
tags question: http://stackoverflow.com/q/27597366
type: Tag
tags question: http://stackoverflow.com/q/27550297
tags question: http://stackoverflow.com/q/27590956
tags question: http://stackoverflow.com/q/27496536
tags question: http://stackoverflow.com/q/27609592
tags question: http://stackoverflow.com/q/27564130
tags question: http://stackoverflow.com/q/27580402
tag name: video
tags question: http://stackoverflow.com/q/27610597
tags question: http://stackoverflow.com/q/27614407
tags question: http://stackoverflow.com/q/27631381
tags question: http://stackoverflow.com/q/27500519

http://stackoverflow.com/q/27631624
duplicate of: http://stackoverflow.com/q/26902994
tagged with: javascript
score: 0
answer count: 1
tagged with: promise
type: UnansweredQuestion
has title: Chain promises and use all variables
has body: I'm trying to do a few fetches with Javascript using a Promises API, and then use all of the values I just fetched. Something like... // Use an Id to find thing 1, use thing 1 Id to find thing2, use thing 2 id to find thing 3, // then use all of them. thing1model.findById(thing1id).then(function(thing1) { return thing2model.findById(thing1.id); }).then(function(thing2) { return thing3model.findById(thing2.id); }).then(function(thing3) { // Here I want to use all of thing1, thing2, thing3... someFunction(thing1, thing2, thing3); }).catch(function(err) { console.log(err); }); The problem is thing1 and thing2 go out of scope after the function call. How can I use them in the last then function?
linked to: http://stackoverflow.com/q/26902994
has answer: http://stackoverflow.com/a/27631705
type: Question

http://stackoverflow.com/q/27560661
has answer: http://stackoverflow.com/a/27560693
accepted answer: http://stackoverflow.com/a/27560693
has body: I have a Bootstrap accordion table that works perfectly. Basically, it shows more content if someone clicks a row. Now, the problem is that one of the rows contains a button link and when someone clicks that button, it goes to that link correctly, but it also opens the hidden row content. How do I make it so that when someone clicks on the button, it doesn't open the hidden row as well and goes to the link only? Row 1 Row 2 Row 3 Row 4 Row 5 Content 1 Content 2 Content 3 Content 4 Link More Content
answer count: 1
has title: Button with link inside Bootstrap accordion table
favorite count: 0
tagged with: twitter-bootstrap
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 4
upvote count: 4

http://stackoverflow.com/q/27639077
answer count: 1
has comment: http://stackoverflow.com/comment/43697043
favorite count: 0
has body: I'm trying to remove the EventListener but the error messages shown as follows in Chrome debug mode: Uncaught TypeError: Cannot read property 'removeEventListener' of undefined I don't know what the problem is and the codes shown as follows: window.addEventListener("load", init, false); var vote = null; function init() { vote = document.querySelectorAll("div&gt;span&gt;img"); for (var index = 0; index &lt; vote.length; index++) { //document.getElementById(("img" + index)).innerHTML = '&lt;img src="../images/voteoff.png" /&gt;'; event.stopPropagation(); vote[index].setAttribute("src", "../images/voteoff.png"); vote[index].setAttribute("id", index); vote[index].addEventListener("mouseover", handleMouseOver, false); vote[index].addEventListener("mouseout", handleMouseOut, false); vote[index].addEventListener("click", MouseOnclickVote, false); //vote[index].onmouseover = function () { MouseOverVote(this.id);} //vote[index].onmouseout = MouseOutVote; event.stopPropagation(); //vote[index].onclick = function () { MouseOnclickVote(this.id); } } function MouseOnclickVote() { length = this.id; console.debug(length); for (var index = 0; index &lt;= length ; index++) { console.debug(index); console.debug(vote[index]); vote[index].removeEventListener("mouseout", handleMouseOver); vote[index].removeEventListener("mouseover", handleMouseOut); } } } var handleMouseOver = function MouseOverVote() { length = this.id; for (var index = 0; index &lt;= length ; index++) { vote[index].setAttribute("src", "../images/voteok.png"); vote[index].parentNode.parentNode.nextSibling.nextSibling.firstChild.textContent = "你按了" + (index + 1) + "個讚"; event.stopPropagation(); } } var handleMouseOut = function MouseOutVote() { for (var index = 0; index &lt; vote.length ; index++) { vote[index].setAttribute("src", "../images/voteoff.png"); vote[index].parentNode.parentNode.nextSibling.nextSibling.firstChild.textContent = ""; event.stopPropagation(); } } &lt;/script&gt;
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
upvote count: 2
has answer: http://stackoverflow.com/a/27639205
downvote count: 2
type: Question
has title: Can't remove the EventListener by removeEventListener
tagged with: javascript
has comment: http://stackoverflow.com/comment/43697082
has comment: http://stackoverflow.com/comment/43696940
score: 0
accepted answer: http://stackoverflow.com/a/27639205

http://stackoverflow.com/a/27516513
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/43463606
type: Answer
score: 2
has body: Instead of using a global, I recommend decorating the input with an old value data attribute. Try this: http://jsfiddle.net/zpe7azsq/16/ For example: $(".some_field").on('focus', function () { $(this).data('oldValue', $(this).data('option_id')); }).change(function () { alert("Old value on focus was: " + $(this).data('oldValue')); alert("Current option_id value: "+$(this).data('option_id')); });
has comment: http://stackoverflow.com/comment/43463724
answers question: http://stackoverflow.com/q/27516128
has comment: http://stackoverflow.com/comment/43463229
accepted answer of: http://stackoverflow.com/q/27516128
type: AcceptedAnswer

http://stackoverflow.com/a/27512830
score: 1
has body: First of all you should do like this. And then, &lt;script language="javascript"&gt; &lt;!--// /*PW Script*/ function pasuser(form) { var pass = document.getElementsByName("pass")[0].value; if (pass == "fred") { var your_url = "portfolio.html"; window.location.href = your_url; } else { alert("Please enter the correct Password. Or request one under contacts"); } } //--&gt; &lt;/script&gt;
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/27512559
downvote count: 0

http://stackoverflow.com/comment/43525636
type: Comment
score: 1
has text: Really? Why wouldn't it? Once it's rendered the width is known enough for `auto` to do its work.
comment on: http://stackoverflow.com/a/27549732
type: AnswerComment

http://stackoverflow.com/comment/43572124
score: 1
comment on: http://stackoverflow.com/a/27573041
type: AnswerComment
type: Comment
has text: @JoshBurgess No, it doesn't really depend on the context. `==`'s behavior is bizarre and hard to predict, and the prevailing wisdom is to never use it (http://stackoverflow.com/a/359509/1945651). And FYI, `'true' == true` evaluates to `false`. See what I mean about it being hard to predict?

http://stackoverflow.com/comment/43686263
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27633064
has text: sorry guys, by mistake i saved the code without intending the code. Now i have edited the question. please have a look and provide some solution.. thanks in advance

http://stackoverflow.com/q/27565201
has answer: http://stackoverflow.com/a/27565782
type: UnansweredQuestion
tagged with: codeigniter
upvote count: 1
score: 1
type: Question
has body: I have been trying to use datatables jquery plugin with codeigniter and still have no luck. I'm new with this api. (No ignitedTables please, just dataTables jquery plugin). The view returns: Undefined table data Please see MVC below: VIEW (where the script is incorporated) &lt;script type="text/javascript"&gt; $(document).ready(function() { var oTable = $('#big_table').dataTable( { "bProcessing": true, "bServerSide": true, "sAjaxSource": "&lt;?php echo site_url('home/calendarListAll/') ?&gt;", "bJQueryUI": true, "sPaginationType": "full_numbers", "iDisplayStart ":20, "fnInitComplete": function() { //oTable.fnAdjustColumnSizing(); }, 'fnServerData': function(sSource, aoData, fnCallback) { $.ajax ({ 'dataType': 'json', 'type' : 'POST', 'url' : sSource, 'data' : aoData, 'success' : fnCallback }); } } ); } ); &lt;/script&gt; &lt;html&gt; &lt;?php echo $this-&gt;table-&gt;generate(); ?&gt; //this returns "Undefined table data" &lt;/html&gt; CONTROLLER function __construct() { parent::__construct(); $this-&gt;load-&gt;library('Datatables'); $this-&gt;load-&gt;library('table'); $this-&gt;load-&gt;database(); $this-&gt;load-&gt;helper('url'); $this-&gt;load-&gt;helper('form'); $this-&gt;load-&gt;helper('html'); } public function calendarListAll() { $this-&gt;load-&gt;model('counselor'); $result = $this-&gt;counselor-&gt;getCalendar(); echo $this-&gt;datatables-&gt;generate($result); } MODEL function getCalendar() // get referred_appointments { $counselor_id = $this-&gt;session-&gt;userdata('counselor_id'); $query = $this-&gt;db-&gt;select ('s.first_name as student_fname, s.last_name as student_lname, s.middle_name as student_mname, e.first_name, e.last_name, e.middle_name, re.*, r.student_id, i.*, e.*') -&gt;from ('referral as r, student_course_record as scr, curriculum as c, referred_appointment as re, degree as d, course as cc, counselor as ccc, issue as i, student as s, employee as e') -&gt;where ('r.student_id = scr.student_id') -&gt;where ('scr.curr_id = c.curr_id') -&…
answer count: 2
has comment: http://stackoverflow.com/comment/43556436
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: "Undefined table data" in codeigniter using datatables jquery
tagged with: datatable
favorite count: 0
has answer: http://stackoverflow.com/a/41960745

http://stackoverflow.com/a/27485181
has body: Use / instead of \. Use relative instead of absolute paths (here your root directory is C:\xampp\htdocs\projects\aptana\testapp). Your code: var url = "internals/getEvents.php?dateID=" + escape(dateName); request.open("GET", url, true); request.onreadystatechange = displayDetails; request.send(null);
answers question: http://stackoverflow.com/q/27485001
score: 0
type: Answer

http://stackoverflow.com/q/27522430
score: 1
tagged with: http://stackoverflow.com/tag/json
type: Question
tagged with: pug
upvote count: 1
tagged with: mixins
has title: Jade mixin iteration json
tagged with: javascript
answer count: 1
has body: I have the following json file: { "leadership": [ { "leadername": "Name1", "leaderjob": "Chairman", "leaderdescription": "The boss" }, { "leadername": "Name2", "leaderjob": "Chief Executive Officer", "leaderdescription": "Other boss" } ] } and if I try to get the content with the following mixin: mixin defList(obj) dl.deflist each item in obj dt= item.leadername dd= item.leaderdescription by calling it like this +defList(leadership) everything works fine, but what I would like to have is this: mixin defList(obj, name, description) dl.deflist each item in obj dt= name dd= description so I would be able to call it like this: +defList(leadership, leadername, leaderdescription) but unfortunately I get only empty dt and dd tags. Is there any way to make it work and populate the list? I can't figure out what am I doing wrong.
tagged with: node.js
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28517813
downvote count: 0

http://stackoverflow.com/comment/43649655
type: QuestionComment
comment on: http://stackoverflow.com/q/27613815
score: 3
has text: sounds like you have a gameplan, take a look at http://ivaynberg.github.io/select2/ for inspiration. see: Multi-Value Select Boxes
type: Comment

http://stackoverflow.com/a/27572087
accepted answer of: http://stackoverflow.com/q/27572053
answers question: http://stackoverflow.com/q/27572053
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43982573
type: Answer
has body: Yes; you need to declare your variables. If you add 'use strict'; (which you should for all new code), you'll get an error when you forget to.
has comment: http://stackoverflow.com/comment/43569509
downvote count: 0
score: 1

http://stackoverflow.com/q/27494544
has answer: http://stackoverflow.com/a/27691275
has title: RequireJS, Jasmine and Grunt Error: scripterror: Illegal path or script error
tagged with: gruntjs
type: Question
answer count: 1
has body: I have an application which uses requireJS, and I would like to use grunt-contrib-jasmie to test it. In order to get jasmine to work with require I am using cloudchen's grunt-template-jasmine-requirejs. The application has the following directory structure: topLevelApplicationFolder |_app.html |_Gruntfile.js |_package.json |_js |_app.js |_app |_modules |_rgbaHelpers.js |_main.js |_lib |_require.js |_spec |_rgba_spec.js app.js is my requireJS config file: requirejs.config({ baseUrl: "js/lib", paths: { app: "../app" }, shim: { spectrum: { deps: ["jquery"], exports: "spectrum" } } }); // Load the main app module to start the app requirejs(["app/main"]); And my Gruntfile.js is the following: module.exports = function(grunt) { // Project configuration. grunt.initConfig({ jasmine : { taskName: { src : 'js/**/*.js', options : { specs : 'spec/**/*.js', template: require('grunt-template-jasmine-requirejs'), templateOptions: { requireConfig: { baseUrl: 'js/lib' } // requireConfigFile: './js/app.js' } } } }, jshint: { all: [ 'Gruntfile.js', 'js/**/*.js', 'spec/**/*.js' ], options: { jshintrc: '.jshintrc' } } }); grunt.loadNpmTasks('grunt-contrib-jasmine'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.registerTask('test', ['jshint', 'jasmine']); grunt.registerTask('default', ['test']); }; The rgba_spec.js is the test I would like to run. It is very simple: define(['js/app/modules/rgbaHelpers'], function (rgbaHelpers) { describe('A suite', function() { it('should pass this test', function() { expect(rgbaHelpers).not.toBe(null); }); }); }); But when I run grunt jasmine I get the following error: Error: scripterror: Illegal path or script error: ['js/app/modules/rgbaHelpers'] I have been scratching my head over this all day. Does anyone know what is going on here?
tagged with: javascript
tagged with: jasmine
accepted answer: http://stackoverflow.com/a/27691275
score: 0
tagged with: requirejs
type: AnsweredQuestion

http://stackoverflow.com/a/27550152
answers question: http://stackoverflow.com/q/27549555
has body: I would change this line: var nextRow = logCount+1; //+1 to skip header row To: nextRow = nextRow + 1; //+1 to skip header row And give nextRow an initial value ABOVE the For loop: var nextRow = logCount - 1; //initialize nextRow for (var i=0; i&lt;msgs-1; i++) { Logger.log("78 inside FOR loop. Value of nextRow: " + nextRow); nextRow = nextRow + 1; //+1 to skip header row var msg = s.getRange(nextRow+1, 1, 1, 6).getValues(); //+1 to skip to next row var payload = { 'type' : "TimeEntry", 'matter_id' : msg[0][0], 'price' : msg[0][1], 'date' : msg[0][2], 'note' : msg[0][3], 'quantity' : msg[0][4], 'activity_description_id': activityDesc }; Also see the change I made to the Logger.log("78 inside FOR loop. Value of nextRow: " + nextRow); statement.
has comment: http://stackoverflow.com/comment/43527740
score: 1
type: AcceptedAnswer
upvote count: 1
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27549555

http://stackoverflow.com/comment/43639160
comment on: http://stackoverflow.com/q/27608140
score: 0
type: Comment
type: QuestionComment
has text: Your sample code already shows how to get the lower and upper values in the range: `$( "#slider-range" ).slider( "values", 0 )` is the low value and `$( "#slider-range" ).slider( "values", 1 )` is the high.

http://stackoverflow.com/comment/43544270
comment on: http://stackoverflow.com/q/27546426
score: 0
has text: share your code what you have done here.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27507811
type: Answer
score: 6
has comment: http://stackoverflow.com/comment/60858419
downvote count: 0
has comment: http://stackoverflow.com/comment/69913049
has body: From the official angular documentation // Simple GET request example : $http.get('/someUrl'). success(function(data, status, headers, config) { // this callback will be called asynchronously // when the response is available }). error(function(data, status, headers, config) { // called asynchronously if an error occurs // or server returns response with an error status. }); As you can see first parameter for error callback is data an status is second.
upvote count: 6
answers question: http://stackoverflow.com/q/27507678

http://stackoverflow.com/a/27582149
type: Answer
upvote count: 1
has body: You can access the parent g of each rect like: .on("mouseover", function(d,i) { var parentG = d3.select(this.parentNode); To get the X value: var barPos = parseFloat(parentG.attr('transform').split("(")[1]); And the x position becomes: var xPosition = barPos + x1(d.name); Fiddle here.
accepted answer of: http://stackoverflow.com/q/27574743
score: 1
answers question: http://stackoverflow.com/q/27574743
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/27534907
has comment: http://stackoverflow.com/comment/43498259
type: Question
tagged with: underscore.js
has body: I have an underscore template within that template I have this &lt;input type='checkbox' name='contacted_by_ae' class='contactedbyae'&gt; I am now trying to detect change so when a user clicks it. It will then post $('.contactedbyae').change(function() { $.post( "/contactedbyae", function( data ) { alert(data); }); }); The above jQuery is not working though. I put it within my .html file and my actual underscore template file I can't get either to work. How do I get this to work?
has title: How to get jQuery to work with Underscore?
accepted answer: http://stackoverflow.com/a/27534992
has answer: http://stackoverflow.com/a/27535044
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/27535044
has comment: http://stackoverflow.com/comment/43498618
favorite count: 0
has answer: http://stackoverflow.com/a/27534992
type: AnsweredQuestion
score: 2
upvote count: 2

http://stackoverflow.com/q/27623988
favorite count: 0
upvote count: 3
tagged with: encode
tagged with: php
has title: PHP passing string over url encode data
accepted answer: http://stackoverflow.com/a/27624644
type: AnsweredQuestion
score: 3
possible better answer: http://stackoverflow.com/a/27624573
has answer: http://stackoverflow.com/a/27624573
has answer: http://stackoverflow.com/a/27640384
type: Question
has comment: http://stackoverflow.com/comment/43668552
tagged with: decode
downvote count: 0
tagged with: javascript
has body: i use PHP file to send data from my web to JS. And i sending data to php by URL. For xample. www.web.com/send.php?data=Hello everybody. And my problem is, if someone send special character or emoticon, PHP script wont work. Is there any function to encode string to string only with letters and numbers, and on PHP side decode it? Thanks, for replyes ;).
answer count: 3
has answer: http://stackoverflow.com/a/27624644
has comment: http://stackoverflow.com/comment/43668505

http://stackoverflow.com/a/27596553
answers question: http://stackoverflow.com/q/27594647
has comment: http://stackoverflow.com/comment/43622824
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/43620652
has body: In your CSS, you have this: body:not([class*=nksub_mobile]) .nks_cc_trigger_tabs.nksub_tab { top: 327px !important; } This will make the icon appear 327 pixels from the top of the screen always. So, when you click on the search icon, the search field appears on top and the 327px is not enough to keep the email newsletter icon on the same level with the search icon. Workaround: in your: $( ".icon-medium.icon-search" ).click(function() { $(".nksub-tab-icon").toggleClass("newClass"); }); In the above function, add some CSS Class to your newsletter selector to adjust the position. Something around 327px + the height of the search box that appears on top. Hope this helps!

http://stackoverflow.com/a/27622486
has comment: http://stackoverflow.com/comment/43666935
accepted answer of: http://stackoverflow.com/q/27622069
upvote count: 4
answers question: http://stackoverflow.com/q/27622069
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43667077
score: 4
type: Answer
has body: Use a character class: oldHtml.replace(/([\wàâêëéèîïôûùüç]+)/gi, '$1'); Trying it: var oldHtml = 'kjh À ùp géçhj ùù Çfg'; var res = oldHtml.replace(/([\wàâêëéèîïôûùüç]+)/gi, '$1'); gives "kjh À ùp géçhj ùù Çfg"

http://stackoverflow.com/q/27617671
has body: I'm using JSON for drop down list select value based on id have to insert in 2 textboxes from database where I use the code in jQuery $("#Lt").change(function () { $.ajax({ url: '@Url.Action("code", "Home")', type: "POST", data: JSON.stringify({ id: $("#Lt").val() }), dataType: "json", async: false, contentType: 'application/json,charset=utf-8', success: function (data) { $("#AgreementSeries").val(data) } }); }); Here I have got one textbox value. How can I get another textbox value from the database? My controller code is: public JsonResult code(string id) { string no; string series; int _id = Convert.ToInt32(id); SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["constr"].ToString()); SqlCommand cmd = new SqlCommand("SELECT top(1) Agreementseries, num from loan where id = @ID", con); cmd.Parameters.AddWithValue("@ID", _id); cmd.CommandType = CommandType.Text; DataSet ds = new DataSet(); SqlDataAdapter da = new SqlDataAdapter(cmd); da.Fill(ds); series = ds.Tables[0].Rows[0]["Agreementseries"].ToString(); no = ds.Tables[0].Rows[0]["num"].ToString(); return Json(series, no, JsonRequestBehavior.AllowGet); }
upvote count: 1
has title: Get dropdown selected value to two textbox from database based on dropdown list selected value idin mvc4 jquery
answer count: 1
favorite count: 0
tagged with: asp.net-mvc-4
type: AnsweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/27617711
accepted answer: http://stackoverflow.com/a/27617711
type: Question
tagged with: c#
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/27487912
has body: Because downloads-div has not id but class, so change your selectors in jQuery from $("#downloads-div") to $(".downloads-div").
type: Answer
score: 0
answers question: http://stackoverflow.com/q/27487867

http://stackoverflow.com/a/27639813
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27639780
has comment: http://stackoverflow.com/comment/43698455
has body: It's in the angular documentation: https://docs.angularjs.org/api/ng/directive/ngShow &lt;!-- when $scope.myValue is truthy (element is visible) --&gt; &lt;div ng-show="myValue"&gt;&lt;/div&gt; &lt;!-- when $scope.myValue is falsy (element is hidden) --&gt; &lt;div ng-show="myValue" class="ng-hide"&gt;&lt;/div&gt; just attach ng-show="whateverValue" to each div you want to hide/show based on whether "whateverValue" is true/false
has comment: http://stackoverflow.com/comment/43698444
upvote count: 1

http://stackoverflow.com/a/27627405
downvote count: 0
has body: According to the docs: After a watcher is registered with the scope, the listener fn is called asynchronously (via $evalAsync) to initialize the watcher. In rare cases, this is undesirable because the listener is called when the result of watchExpression didn't change. To detect this scenario within the listener fn, you can compare the newVal and oldVal. If these two values are identical (===) then the listener was called due to initialization. This is why the watches are called at the beginning. Once the click happens, the watch is called again because the value changes. On subsequent clicks, the watch function should not be called because the owner value is no longer changing as a result of the click. If you simply want to allow the owner that is set in the parent scope to pass through to the directive scope, the two-way binding is enough. If you actually want to react to the value changing, the watch would be an easy option to notify you that the values are changing. The watches as they stand now are not performing any valuable function (i.e. just console.log output), so are just eating cycles in the $digest loop. To answer your ending questions: Why is it called at the beginning? The values are same See the docs above that says watcher functions are called at initialization time. Is it the right approach to do the following?: I want to initialize the problem at the beginning with default id and owner, and be able to change the owner later with controller outside. The problem is initialized with id and owner from the two-way binding setup through the isolate scope. As they change from the outside, they will update within the directive's isolate scope, and vice versa. Sample fiddle without watches.
score: 1
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/27627306

http://stackoverflow.com/comment/43468596
has text: @Kladnik You can't just put a filename there, you have to write Javascript code to read the file into a variable. Read about AJAX.
comment on: http://stackoverflow.com/a/27513353
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/a/27599576
score: 0
type: AcceptedAnswer
has body: i change some code, this is what I did and it works: function uploadFile(videoURI){ var options = new FileUploadOptions(); options.fileKey="videoPath"; options.fileName = videoURI.substr(videoURI.lastIndexOf('/')+1); options.mimeType="video/mp4"; options.chunkedMode = false; var params = { "access_token": "c7a9ef90684aa23472a9a3cfb01b35f4f55f6bf5cc392dbc9e01db5e8285f45a", "file": videoURI }; options.params = params; var ft = new FileTransfer(); ft.upload(videoURI, encodeURI("https://upload.wistia.com/"), win, fail, options); }
accepted answer of: http://stackoverflow.com/q/27595362
answers question: http://stackoverflow.com/q/27595362
type: Answer

http://stackoverflow.com/comment/43557343
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27565799
has text: can u tell me..how to use ajax??.i don't know ajax
score: 0

http://stackoverflow.com/comment/43629674
comment on: http://stackoverflow.com/q/27593068
type: Comment
type: QuestionComment
has text: I'm actually here to fix my code. I'm not here to watch the clouds go !!! What is the interest of the forum then? I do not ask me to do a code from A to Z, I am currently debbug, and that's why I request the opinion of the community to help me fix my code!
score: 0

http://stackoverflow.com/a/27640045
score: 1
has body: document.getElementById('FIELD_'+ (FieldIDs[nDate]).value = "test"; This statement is missing a ). I'm assuming you are trying to achieve the following: document.getElementById('FIELD_'+ (FieldIDs[nDate])).value = "test";
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27640000
type: Answer
accepted answer of: http://stackoverflow.com/q/27640000
has comment: http://stackoverflow.com/comment/43698747
upvote count: 1

http://stackoverflow.com/q/27575538
score: 4
tagged with: google-cloud-endpoints
type: AnsweredQuestion
has title: How to access Google Cloud Endpoints on non-default module of local Google App Engine?
type: Question
has answer: http://stackoverflow.com/a/27609734
tagged with: javascript
upvote count: 4
downvote count: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/27609734
favorite count: 0
has body: I'm developing a Google App Engine app with several modules. Back-end APIs utilize Google Cloud Endpoints. When I run the GAE server locally even though I load the APIs from my admin module (localhost:9090) after the client is loaded it tries to make the calls to the default module port (localhost:8080). On remote GAE instance everything works just fine. What can be the reason or workaround for that? The code is: function init() { var loadCallback = function () { gapi.client.adminapi.mymethod(12345).then(alert(Woohoo!)); }; var apiRoot = '//' + window.location.host + '/_ah/api'; gapi.client.load('adminapi', 'v1', loadCallback, apiRoot); }
tagged with: google-app-engine

http://stackoverflow.com/comment/43460354
type: Comment
comment on: http://stackoverflow.com/a/27482983
score: 5
has text: Since you are using howler.js 2.0, the `seek` method will work the same as `pos` in this instance: https://github.com/goldfire/howler.js/tree/2.0#seekseek-id.
type: AnswerComment

http://stackoverflow.com/comment/43445811
type: QuestionComment
comment on: http://stackoverflow.com/q/27507597
has text: I think this link might help you with this issue: http://stackoverflow.com/questions/9433871/how-to-get-checked-radio-buttons-value-in-jquery-mobile
type: Comment
score: 0

http://stackoverflow.com/a/41246159
type: Answer
score: 0
has body: var gulp = require('gulp'); var sass = require('gulp-sass'); var concat= require('gulp-concat'); var minifyCss = require('gulp-cssnano'); var uglify = require('gulp-uglify'); var pump = require('pump'); var useref = require('gulp-useref'); gulp.task('sass', function(){ gulp.src(['css/**/*.scss' ,'css/**/*.css' ]) .pipe(sass()) // Using gulp-sass .pipe(minifyCss()) .pipe(concat('all.css')) .pipe(gulp.dest('build/css')) }); gulp.task('compressJS', function (cb) { return gulp.src(['lib/*.js']) .pipe(concat('concat.js')) .pipe(uglify()) .pipe(gulp.dest('build/js')) }); var gulp = require('gulp'), useref = require('gulp-useref'); gulp.task('default', ['sass'] , function () { //нема return gulp.src('*.html') .pipe(useref()) .pipe(gulp.dest('dist')); }); then include file all.css genereted by gulp.task('sass') &lt;link rel="stylesheet" href="css/all.css" &gt;
answers question: http://stackoverflow.com/q/27627936

http://stackoverflow.com/comment/43614888
comment on: http://stackoverflow.com/a/27595109
type: AnswerComment
has text: @Gemma ` ` should have a class `single-page-nav`. Also you code doesn't have element with id `3`, which should come after div with id `2`. I would recommend visiting [w3schools](http://www.w3schools.com/jquery/) and learning [jQuery](http://api.jquery.com/) before proceeding further as you may solve this problem but will get stuck later on.
score: 0
type: Comment

http://stackoverflow.com/a/27626038
answers question: http://stackoverflow.com/q/27625981
score: 9
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27625981
type: Answer
has body: This is a comment, but comments can't have Stack Snippets, so it's a CW. Your example at the end is just fine, there's no problem there. That's exactly how you'd take an object and make it a property of another object you're creating via an object initializer: var obj = { "name" : "Bob", "city" : "Detroit", "state" : "MI" }; var obj2 = { "personalization" : obj }; snippet.log(obj2.personalization.name); // Shows Bob &lt;!-- Script provides the `snippet` object, see http://meta.stackexchange.com/a/242144/134069 --&gt; &lt;script src="http://tjcrowder.github.io/simple-snippets-console/snippet.js"&gt;&lt;/script&gt;
upvote count: 9
has comment: http://stackoverflow.com/comment/43673209

http://stackoverflow.com/a/27556970
downvote count: 0
score: 1
has body: It's because you don't have included JQuery. Include JQuery before your script:
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/27556963

http://stackoverflow.com/a/27646091
upvote count: 2
has body: @Uri Thanks for the updated question. In light of the new information, I would draw your attention to the note in the docs (appAP.message) about Internet Explorer limitations: Messages are converted to JSON strings before they are sent. Due to a limitation in Internet Explorer, the maximum length of the JSON string is 8000 bytes (8Kb). You can work around the issue by saving the data in the local database and sending a short message to the active tab to trigger it to read the data. The following is a simplified example of the flow: background.js: appAPI.ready(function($) { appAPI.db.async.set( 'my-data', myData, appAPI.time.minutesFromNow(1), function() { appAPI.message.toActiveTab({type: 'get-data'}); } ); }); extension.js: appAPI.ready(function($) { appAPI.message.addListener(function(msg) { if (msg.type === 'get-data') { appAPI.db.async.get('my-data', function(data) { // do something with data }); } }); }); [Disclosure: I am a Crossrider employee]
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/27508158

http://stackoverflow.com/comment/43594692
comment on: http://stackoverflow.com/a/27584995
score: 0
type: Comment
has text: The problem I ran into when I tried something similar was that the artist variable was overwritten every time the each looped to create the next link. If I can find a simple solution to it being overwritten, then problem solved!
type: AnswerComment

http://stackoverflow.com/comment/43423037
has text: It still targets both of them for some reason =/
comment on: http://stackoverflow.com/a/27495545
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27601125
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/27601481
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43625302
has title: Anchor tag in HTML not working on single click in IE11
type: Question
has comment: http://stackoverflow.com/comment/43624752
accepted answer: http://stackoverflow.com/a/27601481
has body: Here is my JSP code You may start another session by clicking below Login and my JS code is function redirectURL(){ window.location.replace(appContext); }; It works fine in Mozilla but in IE it works on double click. Please help.
has comment: http://stackoverflow.com/comment/43624850
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/comment/43407131
score: 0
type: Comment
has text: Just wondering, why you need to remove it client side and not instead handle it server side? BTW, how these URLs are in first place build?
type: QuestionComment
comment on: http://stackoverflow.com/q/27487425

custom-fields
tag name: custom-fields
tags question: http://stackoverflow.com/q/27517288
type: Tag

tiptip
type: Tag
tag name: tiptip
tags question: http://stackoverflow.com/q/27625046

http://stackoverflow.com/comment/43453455
type: AnswerComment
type: Comment
has text: I don't have a class with a `FindWindow` method available to me. Is that a static method on a class or an instance method, and if so what class is it a member of?
comment on: http://stackoverflow.com/a/27510991
score: 0

http://stackoverflow.com/comment/43527137
score: 0
type: Comment
has text: http://pastie.org/9788368 @Katie - try what i did please. p.s. kinda did this blind so might throw errors
comment on: http://stackoverflow.com/a/27549910
type: AnswerComment

http://stackoverflow.com/q/27593998
tagged with: javascript
answer count: 1
downvote count: 0
has title: Safari 8 freezes while using canvas
has body: I'm working on a canvas experiment using blending modes and particles and I've run into a problem with Safari 8. The code works great in Chrome. In Firefox it's a bit slow but still functional. I've tested it in Safari 7 and the most recent version of the Mobile Safari which both work fine, however when I test it in Safari 8, the animation runs for a few cycles and then freezes the entire tab. I've tried greatly simplifying the animations, amount of particles, blending modes, et cetera, and I still haven't managed to track down what is causing the most recent version of Safari to freeze. Is there something Safari related that I'm missing? var PI2 = Math.PI * 2; var HALF_PI = Math.PI / 2; var isTouch = 'ontouchstart' in window; function Canvas(options) { options = _.clone(options || {}); this.options = _.defaults(options, this.options); this.el = this.options.el; this.ctx = this.el.getContext('2d'); this.dpr = window.devicePixelRatio || 1; this.updateDimensions(); window.addEventListener('resize', _.bind(this.updateDimensions, this), false); this.resetTarget(); if(isTouch){ // touch this.el.addEventListener('touchstart', this.touchMove.bind(this), false); this.el.addEventListener('touchmove', this.touchMove.bind(this), false); } else { // Mouse window.addEventListener('mousemove', this.mouseMove.bind(this), false); window.addEventListener('mouseout', this.resetTarget.bind(this), false); } this.setupParticles(); this.loop(); } Canvas.prototype.updateDimensions = function() { this.width = this.el.width = _.result(this.options, 'width') * this.dpr; this.height = this.el.height = _.result(this.options, 'height') * this.dpr; this.el.style.width = _.result(this.options, 'width') + 'px'; this.el.style.height = _.result(this.options, 'height') + 'px'; } // Update the orb target Canvas.prototype.mouseMove = function(event) { this.target = new Vector(event.clientX * this.dpr, event.clientY* this.dpr); } // Reset to center when we mouse out Canvas.prototype.resetTarget = functi…
favorite count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: safari
score: 2
has answer: http://stackoverflow.com/a/28676384
type: Question
tagged with: canvas

http://stackoverflow.com/comment/43648742
has text: Go the whole way - parse the binary number into an integer, and then check it's greater than 0.
comment on: http://stackoverflow.com/q/27613240
score: 4
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27518674
has comment: http://stackoverflow.com/comment/43467235
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43473112
has comment: http://stackoverflow.com/comment/43467319
has body: From the link you referenced, the features you want are in WebView v36 which was only available in the L-preview and are available in WebView v37/Chromium M37 as announced on the Android Developer website announcement for Android 5.0 Lollipop. Since you are doing audio, the emulator may not work so you best bet is to test on a device. Set your minimum SDK to API 21 and try your app on a device with Android 5.0.
type: Answer
accepted answer of: http://stackoverflow.com/q/27518034
has comment: http://stackoverflow.com/comment/45712944
downvote count: 0
answers question: http://stackoverflow.com/q/27518034
score: 1

http://stackoverflow.com/comment/43567754
comment on: http://stackoverflow.com/q/27560886
type: Comment
score: 1
has text: Thank you, @Xan. This community has really gotten out of control. When I started using it, people didn't close questions without giving a suggestion or resolution to help out the asker. There are too many people with the power to close things willy nilly. How am I supposed to learn if you just shut me down in 10 minutes?
type: QuestionComment

http://stackoverflow.com/comment/138858386
has text: Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer).
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/78757677
type: Comment

http://stackoverflow.com/comment/66847237
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27573589
type: Comment
has text: @Kokodoko, I updated my answer with more detailed steps; does that help you?

meteor-helper
tag name: meteor-helper
tags question: http://stackoverflow.com/q/27590459
tags question: http://stackoverflow.com/q/27595788
type: Tag

http://stackoverflow.com/comment/43603586
type: QuestionComment
has text: you can write just `$('#myInput').focus()` instead of `$("#myForm [name='myInput']").focus();`
comment on: http://stackoverflow.com/q/27589822
score: 0
type: Comment

http://stackoverflow.com/comment/43587031
score: 0
type: AnswerComment
has text: Hi! Just wanted to make sure I understood it. $('#div').attr('style',''); is a more specific reset, it targets a div. while $('[style]').attr('style',''); targets the stylesheet directly and removes all styles?
type: Comment
comment on: http://stackoverflow.com/a/27580909

http://stackoverflow.com/a/27558598
has comment: http://stackoverflow.com/comment/43543536
answers question: http://stackoverflow.com/q/27558584
type: Answer
accepted answer of: http://stackoverflow.com/q/27558584
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
has body: At the time you run your javascript the DOM isn't loaded and the elements var cardFront = document.getElementById("cFront").innerHTML var cardBack = document.getElementById("cBack").innerHTML actually are not set and therefor not found. Wrap your code in window.onload = function() { var front = new Array("ante","anti","bi","circum","com","con","de","dis","equi","extra","inter","intra") var back = new Array("before","against","bi","around","together","together","down","away","equal","beyond","between","within") var placeholder = eval(0); var cardFront = document.getElementById("cFront").innerHTML var cardBack = document.getElementById("cBack").innerHTML function rightCard() { placeholder += 1 cardFront = front[placeholder] cardBack = back[placeholder] } function leftCard() { placeholder -= 1 cardFront = front[placeholder] cardBack = back[placeholder] } function flipCard(theCard) { if(theCard.className == 'front') theCard.className='flipped'; else theCard.className='front'; } } then it will work. To improve the loading speed of your page, I would recommend to put your javascript code at the end of your file, right before the closing &lt;/body&gt; tag. I don't see a reason why you use eval(). The eval function is slow. If you're using it unecessarily, you're slowing down your program for no reason. One cause of this is the fact that the engine has to parse the argument as a complete new program

http://stackoverflow.com/q/27535933
has answer: http://stackoverflow.com/a/27535998
score: 1
has comment: http://stackoverflow.com/comment/43501069
type: Question
tagged with: angularjs-routing
answer count: 1
linked to: http://stackoverflow.com/q/14319967
tagged with: javascript
has comment: http://stackoverflow.com/comment/43500337
tagged with: ng-view
favorite count: 0
has body: The website working fine with ngRoute on http://www.athimannil.com/ but unfortunately page http://www.athimannil.com/about not working when refresh URL :( is there anything extra need to add in the JavaScript code ? var app = angular.module('app',['ngRoute']); app.config(function($routeProvider, $locationProvider) { $locationProvider.html5Mode(true); $routeProvider .when('/', { templateUrl: 'home.html', controller: 'homecontroller' }) .when('/about', { templateUrl: 'about.html', controller: 'aboutController' }) .when('/portfolio', { templateUrl: 'portfolio.html', controller: 'portfolioController' }) .when('/contact', { templateUrl: 'contact.html', controller: 'contactController' }) .when('/cv', { templateUrl: 'cv.html', controller: 'cvController' }) .otherwise({ redirectTo: '/' }); }); .htaccess RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
linked to: http://stackoverflow.com/q/19211576
has comment: http://stackoverflow.com/comment/43500523
tagged with: angularjs
upvote count: 3
tagged with: angularjs-ng-route
type: UnansweredQuestion
downvote count: 2
has title: ngRoute not working when refreshing the page

http://stackoverflow.com/a/27503912
type: Answer
has body: When you try to parse a string that is enclosed in redundant double quotes, like this: JSON.parse('"[{"author": "Pete Hunt", "text": "This is one comment"}]"'); instead of: JSON.parse(' [{"author": "Pete Hunt", "text": "This is one comment"}] '); then you get SyntaxError: Unexpected token a because it tries to parse "[{" as a string and doesn't expect to get a character a next. You have to show the exact command that prints the JSON string but you definitely get the extra double quotes somewhere and Unexpected token a will become Unexpected token X if you change "author" to "X". What you are probably doing (though this is only my speculation because you haven't shown any actual code) is building the JSON string manually which is never a good idea. You should use a library like Google Gson or json-io to do it for you. See also: Java JSON serialization - best practice question.
score: 1
has comment: http://stackoverflow.com/comment/43442801
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27502744
answers question: http://stackoverflow.com/q/27502744
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/43397485
comment on: http://stackoverflow.com/q/27482245
score: 0
type: Comment
type: QuestionComment
has text: working check at http://jsfiddle.net/36t7zrju/ one possible reason you are missing script tag for javascript code

http://stackoverflow.com/comment/43529115
type: Comment
type: AnswerComment
has text: yes I missed your pastie I am sorry! I've updated the code and now I get the array yes! Exactly how it is in the table, it prints out but still nothing in the form.......@PHPology you are a legend for helping with this!!
score: 0
comment on: http://stackoverflow.com/a/27549910

http://stackoverflow.com/comment/98482796
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27497611
has text: However, Math.random() * (9000 - 2000)... doesn't follow from plain arithmatics. This function needs the interval to capture any number in between the upper and lower bound. Wimsch
type: AnswerComment

http://stackoverflow.com/a/27607569
has comment: http://stackoverflow.com/comment/43637389
score: -1
answers question: http://stackoverflow.com/q/27607430
downvote count: 1
has comment: http://stackoverflow.com/comment/43637361
type: Answer
upvote count: 0
has body: On the first run of myFunction, i.e. the first click of the button, variable i has value 0 and so the if statement executes the first alternative. On the second run, i has value 1 since the previous call executed i++;. Therefore, the second alternative of the if statement is run (the else part). Since the main and div variables are defined only in the first alternative which has not executed, div is undefined on that second run. The solution is to define div in the else block too: function myFunction () { var div; if ( i &lt; 1 ) { var main = document.getElementById("main"); div = document.createElement('div'); main.appendChild(div); var para = document.createElement("p"); div.appendChild(para); div.setAttribute("id","newdiv"); para.innerHTML = "This is a new div that has been created using java script.This is a new div that has been created using java script.This is a new div that has been created using java script.This is a new div that has been created using java script.This is a new div that has been created using java script."; i++; } else { // get the div we created before div = document.getElementById('newdiv'); div.parentNode.removeChild(div); i=0; } }

http://stackoverflow.com/a/27549340
has comment: http://stackoverflow.com/comment/109773580
score: 8
has comment: http://stackoverflow.com/comment/87001962
has comment: http://stackoverflow.com/comment/109773268
type: AcceptedAnswer
downvote count: 0
has body: as Neoaptt mentioned (Thanks!) the issue was that the iframe element was either not present or not loaded. Adding a pause solved my issue. By the way, if you want to exit the selected frame you should use ".frame(null)" module.exports = { "test" : function (browser) { browser .url("my_url") .waitForElementVisible(".frame-application-scroll-wrapper", 30000) // give time to the iframe to be available .pause(5000) .frame(0) .waitForElementPresent("#page-content", 30000) .frame(null) // we are now back to the main page // ... more code here ... .end(); } }; What also helped me to debug was to use the --verbose option, for example: nightwatch -t tests/test4.js --verbose This will display in your terminal all the data exchanged between nodejs and selenium. Thanks, Paul
accepted answer of: http://stackoverflow.com/q/27548030
upvote count: 8
answers question: http://stackoverflow.com/q/27548030
type: Answer

http://stackoverflow.com/comment/43526943
type: AnswerComment
comment on: http://stackoverflow.com/a/27549396
score: 0
type: Comment
has text: @UnskilledFreak I already did but dont know what to do to handle del

http://stackoverflow.com/q/27562043
has body: I am using bootstrap and in that I am using side nav to serve collapsible list on the left side of the page. Below is my code. Parent1 Child1 Child2 Child3 Instead of fixed I want to use toggle plus and minus. As it is shown in code, I am calling one function when parent1 is clicked. But when I try to expand the ul, the function loadelementsonpage() is called everytime. So, I want list to collapse only when that toggle image is clicked. In the same way I want to call loadelementsonpage() only when the outer area of that toggle image is clicked. I changed this data-toggle and data-target to i class, but the problem is the function is still getting called and if I move the i class out of a tag, the style is messed up. So can someone please shed some light on how to have different click areas on the parent li? One is for collapse and another is for calling function to load right side content page. P.S: Trying to implement this http://cssmenumaker.com/menu/modern-jquery-accordion-menu kind of side nav list where + or - should be clickable for only expanding and collapsing. Please click on build online in that link to see the side nav. Other area(apart from + and - icons) should act as link href to load the page.
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43549852
possible better answer: http://stackoverflow.com/a/27590061
has comment: http://stackoverflow.com/comment/43603648
has comment: http://stackoverflow.com/comment/43603860
accepted answer: http://stackoverflow.com/a/27597051
has answer: http://stackoverflow.com/a/27590061
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/27596284
type: Question
has comment: http://stackoverflow.com/comment/43603714
tagged with: font-awesome
tagged with: javascript
answer count: 3
has title: Having different click areas on sidenav
downvote count: 0
has comment: http://stackoverflow.com/comment/43603603
favorite count: 0
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/43603549
has comment: http://stackoverflow.com/comment/43603741
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27597051

http://stackoverflow.com/q/27512659
has comment: http://stackoverflow.com/comment/43455897
has comment: http://stackoverflow.com/comment/43456346
has comment: http://stackoverflow.com/comment/43455863
has answer: http://stackoverflow.com/a/27513025
upvote count: 1
answer count: 1
has title: Chrome rendering differently when content served in ASP.Net Release Mode?
tagged with: javascript
tagged with: asp.net
has comment: http://stackoverflow.com/comment/43455639
tagged with: bundling-and-minification
has comment: http://stackoverflow.com/comment/43456314
tagged with: css
favorite count: 0
has body: I am running into a problem that is quite grating to my patience and I hope I can get some help or pointers from Stack Overflow. I have a ASP.Net site hosting a SPA. I used the Bundle feature to serve both javascript and content. I send down the HTML5 doc type, I send down the meta http-equiv to force IE to render in standards mode. &lt;meta http-equiv="X-UA-Compatible" content="IE=edge" /&gt; Development has been great. However, we recently started building the site in Release mode. IE9 renders both our Debug and Release version in the same way, even after script and style minification and bundling. However, Chrome is not. I'm using Chrome 39 (and my team mate is using 38) and we're both running into the same layout problems. In general, it almost feels as if inline/inline block items are treated differently and Chrome is adding extra white space in certain spots? But why would this only be a problem for Chrome? And only in release mode? I broke down the bundles and server up the full JS/CSS in both release/debug mode to be sure that the same JS/CSS is coming down. Same problem! Any ideas? I'm losing it here.
downvote count: 0
type: UnansweredQuestion
type: Question
tagged with: asp.net-mvc
score: 1

http://stackoverflow.com/q/27523030
score: 3
has comment: http://stackoverflow.com/comment/43476130
has answer: http://stackoverflow.com/a/28126536
type: Question
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: asp.net
favorite count: 0
tagged with: xss
has body: I have been looking into preventing XSS attacks, and so am encoding values when they are rendered back to the client. This works fine, but when the value is placed into a .NET runat server input and this is rendered as below on the client the alert fires, even though the javascript has been encoded. &lt;input name="ctl00$body$buildTitle" type="text" value="&amp;amp;lt;script&amp;amp;gt;alert(&amp;amp;#39;Hola&amp;amp;#39;)&amp;amp;lt;/script&amp;amp;gt;" /&gt; Can anyone explain why?
has title: Why does this Javascript alert fire?
has comment: http://stackoverflow.com/comment/43476019
has comment: http://stackoverflow.com/comment/43476134
has comment: http://stackoverflow.com/comment/43476801
upvote count: 3
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43476108
has comment: http://stackoverflow.com/comment/43476154
has comment: http://stackoverflow.com/comment/43476081
has comment: http://stackoverflow.com/comment/43476055

http://stackoverflow.com/a/27508815
has body: I think you changed an ID and need to change a few other things $(document).ready(function() { $("button").click(function() { var val = $(this).val() $("#Screen").val(val); alert(val); onclick = "sevenClick()"; }); }); 1 2
answers question: http://stackoverflow.com/q/27508781
type: Answer
score: 0

http://stackoverflow.com/a/27478921
has body: Probably the most robust way to deal with data-* attributes is to use setAttribute and getAttribute. If the span has an id of Skin, then you might use: var span = document.getElementById('Skin'); span.setAttribute('data-minecraft-username', newValue); You can also use the element.dataset property: span.dataset['minecraft-username'] = newValue; Which will add a data-minecraft-unsername attribute with a value of whatever is in newValue. However, support may be lacking in older browsers (see MDN HTMLElement.dataset, which indicates fairly recent browsers such as IE 11, Safari 6, etc. are required). Also see MDN Using data attributes. To use the above script in a document, you might do something like: &lt;script&gt; function setDataAttribute(elID, attName, value) { var el = document.getElementById(elID); if (el) { el.setAttribute('data-' + attName, value); } } function setContent(elID, value) { var el = document.getElementById(elID); if (el) { el.innerHTML = value; } } &lt;/script&gt; &lt;span id="Skin"&gt;&lt;/span&gt; &lt;br&gt; &lt;input type="text" onblur=" setDataAttribute('Skin', 'minecraft-username', this.value); setContent('Skin', this.value); "&gt;
answers question: http://stackoverflow.com/q/27478741
score: 0
type: Answer

http://stackoverflow.com/comment/43534549
type: QuestionComment
type: Comment
has text: Ah ok, now I understand. I'll take a look at it!
score: 0
comment on: http://stackoverflow.com/q/27554026

http://stackoverflow.com/comment/43414637
score: 3
has text: You should generally only need one, at most ?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27491542

http://stackoverflow.com/comment/43682595
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27620286
has text: are your trying to open a `dialog` window when `btnShare` is clicked? if so change `$("#menu").menu();` to `$('#menu').dialog('open');` i think thats your issue if im understanding you right
score: 0

http://stackoverflow.com/q/27518133
linked to: http://stackoverflow.com/q/3553680
type: Question
tagged with: javascript
has body: Using pdf.js, I want to pass only file id number instead of file url then I will retrieve the file location(file url) from database with that file id number. I want all that process withing the viewer.aspx (I changed it to aspx file) and that viewer.aspx is embedded within a page. Now I am able to see the pdf viewer with default pdf file after embedding it. But I can't handle with pdf viewer instead of passing file url.... Any idea ??? Please do me a favor. Thank you so much.
score: 0
has comment: http://stackoverflow.com/comment/43468338
has comment: http://stackoverflow.com/comment/43466226
tagged with: asp.net
tagged with: pdf.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43467513
has title: How to pass file location to viewer.html instead of querystring (?file=) in pdf.js
answer count: 0

http://stackoverflow.com/a/32131394
downvote count: 0
score: 1
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/27612066
has body: Use Google Analytics Debugger and make sure the product information is being sent to GA. Your products may have a comma or any other character causing sintax errors (not detected as javascript errors), this would produce exactly what the snapshots are showing: the transaction is ok, the products are not. Actually both parts of the code are completely individual (as the go to different reports within GA). In case you detect no failure then I recommend you to go to the Enhanced Ecommerce Demo Store and copy exactly the products' code in the transactions so you can start including your dynamic values line by line until you find where the problem is.

http://stackoverflow.com/a/48980751
type: Answer
has body: I encountered a similar message and turned out I got my angular-mocks file path wrong. I used npm to install angular and angular-mocks, and I specified their path wrongly in my Karma.conf.js like this: files: [ 'node_modules/angular/angular.js', 'node_modules/angular/angular-mocks.js', 'scripts/*.js', 'tests/*.js' ], I should specify the path of angular-mocks.js as this: 'node_modules/angular-mocks/angular-mocks.js' Very simple error, but could be time-consuming to locate if you just started with AngularJS unit testing and didn't know where to look.
upvote count: 1
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/27622382

http://stackoverflow.com/a/27587181
answers question: http://stackoverflow.com/q/27587158
score: 1
upvote count: 1
downvote count: 0
has body: $('input[name="radioGrpSbjOption"]').bind('change', function (){ alert ($(this).val()); }) JS Fiddle
type: Answer

http://stackoverflow.com/q/27607167
has title: Using a callback once the geolocation has been found
answer count: 1
tagged with: callback
type: UnansweredQuestion
tagged with: geolocation
type: Question
has body: I am writing a program a web service that records the location of a user. The program uses geolocation to find the user and once it retrieves the location then continues to record the location. Because geolocation uses a callback function to get the location the program cannot continue until it has the location. The problem is that i cannot continue the program within the geolocation function since other variables are needed. So what i have done is that the geoolcaion function displays the location on the web page using the following function function geoFindMe(){ navigator.geolocation.getCurrentPosition(success, error, geo_options); function success(position) { var latitude = position.coords.latitude; var longitude = position.coords.longitude; var altitude = position.coords.altitude; var accuracy = position.coords.accuracy; var time = getTime(); //post the everything somewhere and then the callback function will fetch the info //may use var time = position.timestamp; $("#result").append(time + " " + latitude + " " + longitude); } function error(error) { alert("Unable to retrieve your location due to "+error.code + " : " + error.message); }//there was a semicolon here var geo_options = { enableHighAccuracy: true, maximumAge : 30000, timeout : 27000 }; } this function is called by the following code geoFindMe(function successful(){ //first call geoFindMe function then call successful as a callback //the function will retrieve the information that was displayed by the geoFindMe on the webpage $("#result").hide(); var currentLocation = document.getElementById('result'); document.getElementById('result').innerHTML = ""; var moved = hasMoved(previousLocation, currentLocation); var time = isItTime(moved, lastBuffer, 15); if(time){//its time to put the location in the buffer currentLocation = currentLocation + "#";// this way we will be able to differentiate between different locations charBuffer.wrap(currentLocation); } dump(stringArray, lastDump, true); }); what i am try…
tagged with: javascript
has answer: http://stackoverflow.com/a/27610557
score: 0

http://stackoverflow.com/comment/43674257
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27611069
has text: the existing video uses the code from http://www.freestyle.mvla.net/webaudio/videoDisplay.php#

http://stackoverflow.com/comment/43435252
type: AnswerComment
comment on: http://stackoverflow.com/a/27502476
score: 0
type: Comment
has text: it is not displayed on beginning and showed by pressing the + button... that's wrong ?

http://stackoverflow.com/comment/43560098
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27567505
has text: Your code doesn't have anything to add the `` elements.

http://stackoverflow.com/q/27561809
accepted answer: http://stackoverflow.com/a/27562226
favorite count: 0
has answer: http://stackoverflow.com/a/27562226
type: AnsweredQuestion
score: 3
downvote count: 0
has body: I want find the difference between two time in the format of AP/PM in jquery. i had tested many codes but can't find any solution. One of my code is here. var timeStart = new Date("01/01/2007 " + "05.00 AM").getHours(); var timeStartmin = new Date("01/01/2007 " + "05.00 AM").getMinutes(); var timeEnd = new Date("01/01/2007 " + "10.30 PM").getHours(); var timeEndmin = new Date("01/01/2007 " + "10.30 PM").getMinutes(); timeStart = timeStart+"."+timeStartmin; timeEnd = timeEnd+"."+timeEndmin; var hourDiff = timeEnd-timeStart; alert(hourDiff); but it doesn't works properly. Can any body give me an advise.
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/27561890
has comment: http://stackoverflow.com/comment/43549325
tagged with: javascript
upvote count: 3
has answer: http://stackoverflow.com/a/27561890
has title: difference between two times in am/pm format in javascript

http://stackoverflow.com/q/27574705
answer count: 1
has title: write() on a document crashes internet explorer 11
tagged with: crash
tagged with: internet-explorer
has comment: http://stackoverflow.com/comment/43576161
has comment: http://stackoverflow.com/comment/43575094
tagged with: internet-explorer-11
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43575958
has body: The following code works in chrome and Safari, but crashes the site in IE11: var doc = document.implementation.createHTMLDocument(""); doc.open("replace"); doc.write(document.querySelector("html").outerHTML); doc.close() What I'm attempting to do is create a clone of the DOM (that doesn't load scripts/images etc) to manipulate. Any idea why this crashes IE? Is there a better way to do this? I'm using a polyfill for outerHTML (though I think it's supported in IE11) and can confirm that outerHTML works as intended. Thank you in advance!
score: 2
downvote count: 0
favorite count: 0
type: Question
linked to: http://stackoverflow.com/q/1736886
has answer: http://stackoverflow.com/a/36313932
upvote count: 2

http://stackoverflow.com/q/27616231
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
answer count: 3
accepted answer: http://stackoverflow.com/a/27616284
has comment: http://stackoverflow.com/comment/43654028
linked to: http://stackoverflow.com/q/6491463
has title: Dynamically get/set JSON elements
tagged with: javascript
tagged with: jquery
has body: This is my JSON variable. var json = { input: "hello", payload: { pay1: 123, pay2: 456 } }; Now, I have a variable keypay1 var keypay1 = "payload.pay1"; Question 1: How can I get the value of json.payload.pay1 using just the dynamic variables json and keypay1??? I tried this and it gives me undefined. console.log( json[keypay1] ); Similarly, Question 2: How can I set the value of json.payload.pay1 using just the dynamic variables json and keypay1???
duplicate of: http://stackoverflow.com/q/6491463
possible better answer: http://stackoverflow.com/a/27616333
score: 0
has answer: http://stackoverflow.com/a/27616333
has comment: http://stackoverflow.com/comment/43654081
has comment: http://stackoverflow.com/comment/43653887
has comment: http://stackoverflow.com/comment/43654035
has answer: http://stackoverflow.com/a/27616340
has answer: http://stackoverflow.com/a/27616284
has comment: http://stackoverflow.com/comment/43654179
type: Question

http://stackoverflow.com/comment/43458107
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27512553
has text: Try making it a var. If that doesn't work, I don't know. It works for me in one of my apps.
type: AnswerComment

events
tags question: http://stackoverflow.com/q/27476415
tags question: http://stackoverflow.com/q/27496018
tags question: http://stackoverflow.com/q/27490578
tags question: http://stackoverflow.com/q/27545496
tags question: http://stackoverflow.com/q/27614636
tags question: http://stackoverflow.com/q/27499864
tags question: http://stackoverflow.com/q/27575111
tags question: http://stackoverflow.com/q/27500506
tags question: http://stackoverflow.com/q/27531347
tags question: http://stackoverflow.com/q/27580402
tags question: http://stackoverflow.com/q/27620100
tags question: http://stackoverflow.com/q/27560743
tags question: http://stackoverflow.com/q/27590545
tags question: http://stackoverflow.com/q/27625584
tags question: http://stackoverflow.com/q/27554775
tags question: http://stackoverflow.com/q/27518874
tag name: events
tags question: http://stackoverflow.com/q/27596759
tags question: http://stackoverflow.com/q/27484896
tags question: http://stackoverflow.com/q/27516836
tags question: http://stackoverflow.com/q/27621168
tags question: http://stackoverflow.com/q/27486373
tags question: http://stackoverflow.com/q/27551634
type: Tag
tags question: http://stackoverflow.com/q/27636569
tags question: http://stackoverflow.com/q/27537332
tags question: http://stackoverflow.com/q/27532556
tags question: http://stackoverflow.com/q/27614113

union
type: Tag
tags question: http://stackoverflow.com/q/27623204
tag name: union

http://stackoverflow.com/comment/43532207
type: QuestionComment
has text: @A.Wolff dont stall me here... on that.. your help is much appreciated
comment on: http://stackoverflow.com/q/27552737
score: 0
type: Comment

http://stackoverflow.com/comment/43613497
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27594711
has text: Where does it show undefined ? Can you send exactly the code you use to get it ?
score: 0

http://stackoverflow.com/comment/43415518
comment on: http://stackoverflow.com/q/27490707
score: 3
type: Comment
type: QuestionComment
has text: WebStorm uses tsc CLI to compile typescript - tsc executable is configured as a file watcher so that editing a .ts file triggers the external compiler. This indeed can be slower than integrating compiler as a service as it's done in VS

http://stackoverflow.com/comment/56444074
has text: In USA, the $ sign is before the number. In Europe the € sign is ALWAYS after the number.=> $5.00 - 5.00 €
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/32760737
type: Comment

http://stackoverflow.com/q/27494310
upvote count: 1
type: Question
has body: I have an assignment where the objective is to make sure that the large (changing) image on top also changes links just like its smaller counterpart on the bottom. I can't seem to figure out how to make that happen. I'm only able to link the larger image with to a single link and not have it change its links to match the links of the smaller images. Please help (if possible) and please advise if this can be done with just javascript & html/css. Here is the code Image link assignment
tagged with: hyperlink
score: -1
tagged with: image
answer count: 1
has comment: http://stackoverflow.com/comment/43420992
tagged with: javascript
favorite count: 0
has title: When onmouseover, need the large image to change its links to its anchored external sites like the smaller images are
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/27494712
type: UnansweredQuestion
downvote count: 2

http://stackoverflow.com/q/27595334
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has comment: http://stackoverflow.com/comment/43615279
has body: I'm having problems getting my code to work. My goal is to have mobile disregard the text animations, while having everything else display the text effect. I figured the best way to do this is with an if/else statement. I used the breakpoint example from this thread. Disable javascript on mobile websites Here's my code: // Mobile .js Disabler // $(function detectmob() { if(window.innerWidth &lt;= 800 &amp;&amp; window.innerHeight &lt;= 600) { return true; } else { return false; } } if(detectmob()){ $("h1").remove(); } else { jQuery(document).ready(function($){ //set animation timing var animationDelay = 2500, //loading bar effect barAnimationDelay = 3800, barWaiting = barAnimationDelay - 3000, //3000 is the duration of the transition on the loading bar - set in the scss/css file //letters effect lettersDelay = 50, //type effect typeLettersDelay = 150, selectionDuration = 500, typeAnimationDelay = selectionDuration + 800, //clip effect revealDuration = 600, revealAnimationDelay = 1500; initHeadline(); function initHeadline() { //insert &lt;i&gt; element for each letter of a changing word singleLetters($('.cd-headline.letters').find('b')); //initialise headline animation animateHeadline($('.cd-headline')); } function singleLetters($words) { $words.each(function(){ var word = $(this), letters = word.text().split(''), selected = word.hasClass('is-visible'); for (i in letters) { if(word.parents('.rotate-2').length &gt; 0) letters[i] = '&lt;em&gt;' + letters[i] + '&lt;/em&gt;'; letters[i] = (selected) ? '&lt;i class="in"&gt;' + letters[i] + '&lt;/i&gt;': '&lt;i&gt;' + letters[i] + '&lt;/i&gt;'; } var newLetters = letters.join(''); word.html(newLetters); }); } function animateHeadline($headlines) { var duration = animationDelay; $headlines.each(function(){ var headline = $(this); if(headline.hasClass('loading-bar')) { duration = barAnimationDelay; setTimeout(function(){ headline.find('.cd-words-wrapper').addClass('is-loading') }, barWaiting); } else if (headline.hasClass('…
has comment: http://stackoverflow.com/comment/43614785
has title: Disable Javascript on Mobile
has comment: http://stackoverflow.com/comment/43614464
type: Question
has comment: http://stackoverflow.com/comment/43614777
score: 0
tagged with: mobile
answer count: 0

http://stackoverflow.com/q/27508567
tagged with: http://stackoverflow.com/tag/html
score: 1
upvote count: 1
has body: I'm trying to force CKE to stop modifying my HTML wildly, and trying to introduce our own rules. For example, CKE will remove empty span and i tags, we can prevent it from doing it with CKEDITOR.dtd.$removeEmpty.span = false CKEDITOR.dtd.$removeEmpty.i = false So far so good. Then we tried to make A tags to be able to support block level elements (HTML5), which we were able to do by manipulating the DTD as well. But now it seems the DTD object is not enough for what we are trying to do. For example, it's removing empty A tags, and I can't prevent it from doing it, CKEDITOR.dtd.$removeEmpty.a = false will not do the trick. It's doing the same thing with empty BR tags located at the end of the content. I know CKE is using a filter, parser, processor or something that I need to hook onto and modify/alter it in order to stop it from doing those changes. Could you please give me any advise on how to achieve this ? Cordially, Agustin. UPDATE I'm also looking forward in adding an extra supported children to SELECT tag. Select supports optgroup and option as children, I'm trying to add support for a custom_tag (inline), but I can't succeed in making it happen. CKEDITOR.dtd.select.custom_tag = 1 Is not doing it. The custom tag is also declared on dtd.$inline I guess there is some sort of external processing cleaning it up, and I can't control this from the DTD object. Any pointer on this regard ?
type: Question
has title: Preventing CKEDITOR from modifying HTML
has answer: http://stackoverflow.com/a/28100826
tagged with: javascript
tagged with: ckeditor
answer count: 2
has answer: http://stackoverflow.com/a/27509590
downvote count: 0
has comment: http://stackoverflow.com/comment/43447220
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/43545612
type: AnswerComment
type: Comment
has text: OP didn't say anything about using a random value.
comment on: http://stackoverflow.com/a/27559728
score: 0

http://stackoverflow.com/comment/43690469
score: 0
has text: Don't do that. use `:after` pseudo class to clear the float.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27635618

http://stackoverflow.com/comment/43578546
type: Comment
score: 1
has text: You need to correct *can be represented with a 32-bit integer* to *can be represented with a 32-bit **positive** integer **(or zero)***. Negative values don't count towards the `length` property.
type: AnswerComment
comment on: http://stackoverflow.com/a/27573094

http://stackoverflow.com/a/27573764
type: Answer
has body: decreaseNumber.onclick = function() { textBox.value = parseInt(textBox.value) -50 } increaseNumber.onclick = function() { textBox.value = parseInt(textBox.value) + 50 } Also, you can use native html5 feature http://www.w3schools.com/html/tryit.asp?filename=tryhtml_input_number
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43573059
accepted answer of: http://stackoverflow.com/q/27573573
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27573573

http://stackoverflow.com/comment/43632165
score: 0
type: QuestionComment
has text: there is no javascript here... what do you think you are adding dynamically?
type: Comment
comment on: http://stackoverflow.com/q/27604865

http://stackoverflow.com/q/27533730
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27535357
has answer: http://stackoverflow.com/a/27535357
has answer: http://stackoverflow.com/a/27533916
tagged with: dependencies
has title: Having trouble including a dependancy in package.json
favorite count: 0
tagged with: angularjs
has body: I have an angular project (really just the docs tutorial) and I want to include the node-mysql module in my project- doesn't have to be installed globally. Not sure I understand how this works but I thought all I have to do was add this module to package.json as a dependency and run npm install, but I get an error: PS&gt; cat .\package.json { "version": "0.0.0", "private": true, "name": "angular-phonecat", ... "dependencies": { "node-mysql": "&gt;=2.5.0" }, "devDependencies": { "karma": "^0.12.16", ... The error: PS&gt; npm install npm WARN package.json karma-chrome-launcher@0.1.7 No README data npm ERR! notarget No compatible version found: node-mysql@'&gt;=2.5.0' npm ERR! notarget Valid install targets: npm ERR! notarget ["0.1.1","0.1.2","0.1.3","0.1.4","0.1.5","0.1.6","0.1.7","0.1.8","0.1.9","0.2.0","0.2.1","0.2.2","0.2.3","0.2.4","0.2.5","0.2.6","0.2.7","0.2.8","0.2.9","0.3.0","0.3.1","0.3.2","0.3.3","0.3.4","0.3.5","0.3.6","0.3.7","0.3.8","0.3.9","0.4.0","0.4.1"] npm ERR! notarget npm ERR! notarget This is most likely not a problem with npm itself. npm ERR! notarget In most cases you or one of your dependencies are requesting npm ERR! notarget a package version that doesn't exist. npm ERR! System Windows_NT 6.1.7601 npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" npm ERR! cwd C:\testangular\ticketsys\angular-phonecat npm ERR! node -v v0.10.32 npm ERR! npm -v 1.4.28 npm ERR! code ETARGET npm ERR! npm ERR! Additional logging details can be found in: npm ERR! C:\testangular\ticketsys\angular-phonecat\npm-debug.log npm ERR! not ok code 0 How can I include this dependency in my project?
upvote count: 1
tagged with: node.js
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27533916
score: 1

http://stackoverflow.com/q/27497100
has answer: http://stackoverflow.com/a/27497336
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27497469
tagged with: asp.net-mvc
tagged with: javascript
has title: ASP.NET MVC Action on Synchronous AJAX Requests
has answer: http://stackoverflow.com/a/27497838
answer count: 3
has body: I am looking for an MVC implementation equivalent in functionality to the WebForms ajax request handlers below: Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(function()); Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function()); A very similar question (link below) was answered with a reference to the global .ajax event handlers, but as all of my calls are synchronous I am having the issue that it is firing the ajax finished event at the end of each individual ajax request, and I want it to start with the first and end when the final one finishes. I tried using ajaxStart and ajaxStop which the documentation suggests should be exactly what I am looking for, but I belive that these would only work as intended with async ajax requests. (ASP.NET MVC 4 Action on AJAX Request) Is there any way to do this using the jQuery built in ajax event handlers, or any alternative method for synchronous requests?
downvote count: 0
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27497469
favorite count: 0
tagged with: ajax
possible better answer: http://stackoverflow.com/a/27497336

http://stackoverflow.com/q/27513938
has answer: http://stackoverflow.com/a/27513985
has answer: http://stackoverflow.com/a/27514017
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27514055
has comment: http://stackoverflow.com/comment/43459774
has title: Replace one text with another in a tag containing other tags
linked to: http://stackoverflow.com/q/12919074
answer count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43458280
has answer: http://stackoverflow.com/a/27514049
type: Question
accepted answer: http://stackoverflow.com/a/27514017
tagged with: javascript
has comment: http://stackoverflow.com/comment/43459079
score: 4
upvote count: 4
has body: I have the following HTML element: Some text to change My idea is to replace "Some text" with "Some other text" when someone clicks on the "to change" span. So my first try was: function myFunc(){ var myP = document.getElementById("myP"); myP.innerText = "Some other text"; } ... However, I have already learned from my mistakes that this would over-ride not only the text, but also the span element nested in the p. So, using the learning of the last time, I've tried to rather create a text node: function myFunc(){ var myP = document.getElementById("myP"); myP.appendChild(document.createTextNode("Some other text")); } However this is clearly wrong, because it would append the text and not replace it. How should I write my JavaScript function to obtain the pure replacement of Some text with Some other text, without however affecting the nested span? I know this might seem a basic question, but I'm a complete beginner and don't know how well yet how to treat with HTML objects. Thanks in advance NOTE I think that I could do simply this: myP.innerText = "Some other text to change" ... but apart for being complicated because this is a minimized example w.r.t. the real code, I imagine it's the most unelegant solution ever, so I would like to learn the proper way.
downvote count: 0
favorite count: 0
linked to: http://stackoverflow.com/q/27479449
possible better answer: http://stackoverflow.com/a/27513985

http://stackoverflow.com/comment/44735391
score: 0
comment on: http://stackoverflow.com/q/27581199
type: QuestionComment
type: Comment
has text: @dandavis wow, can you please submit an answer with usage instructions if possible so i could award you the bounty! Thanks

http://stackoverflow.com/comment/43686158
score: 0
comment on: http://stackoverflow.com/q/27633064
type: Comment
type: QuestionComment
has text: Your code and desired output is same. What is ur query ?

http://stackoverflow.com/a/27488590
score: 0
has comment: http://stackoverflow.com/comment/43413958
type: Answer
has comment: http://stackoverflow.com/comment/43412670
has comment: http://stackoverflow.com/comment/43416466
has comment: http://stackoverflow.com/comment/43416533
has comment: http://stackoverflow.com/comment/43410952
has comment: http://stackoverflow.com/comment/43411033
has comment: http://stackoverflow.com/comment/43414350
has comment: http://stackoverflow.com/comment/43412904
has body: If you require both versions use $.noConflict Like so: Everything above the $.noConflict line will use 1.7.1 Here's the jQuery Docs on .noConflict Also, per your comment, from your page, if this needs to use that first version of jquery, change it to this:
answers question: http://stackoverflow.com/q/27488484
has comment: http://stackoverflow.com/comment/43411666
has comment: http://stackoverflow.com/comment/43411773
has comment: http://stackoverflow.com/comment/43412452
has comment: http://stackoverflow.com/comment/43413615
has comment: http://stackoverflow.com/comment/43416649
has comment: http://stackoverflow.com/comment/43416418
has comment: http://stackoverflow.com/comment/43417636

http://stackoverflow.com/q/27494688
has answer: http://stackoverflow.com/a/27495082
score: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/27495082
type: AnsweredQuestion
has title: angularJS increment/decrement current route with next/previous buttons
type: Question
has body: I have this plunker: http://plnkr.co/edit/342MvXDwWG7RlIxB0JB1?p=preview I need to use "prev" & "next" buttons to switch to the next or previous route index. i.e. when on page route article/0, you can click "next", and the page will route to and display article/1. Can someone help? javascript: FeedApp.controller("ArticlesCtrl", ["$scope", "$routeParams", '$http', function($scope, $routeParams, $http) { var index = $routeParams.articleId; console.log(index); $scope.article = {}; $http.get('news-html.json') .success(function(data) { $scope.news.push(data); $scope.article = $scope.news[0].entries[index]; }); } ]); FeedApp.config(function($routeProvider) { $routeProvider .when("/", { controller: "NewsCtrl", templateUrl: "home.html" }) .when("/article/:articleId", { controller: "ArticlesCtrl", templateUrl: "article.html" }) .otherwise({ redirectTo: "/" }); }); html for page with buttons: Back Prev Next {{article.title}}
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/27601054
type: Answer
answers question: http://stackoverflow.com/q/27601013
has body: https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers.onsubmit The submit event happens when a user clicks a submit button inside a tag. Right now you use a tag. If you would like to use the tag, instead of using onsubmit, use onclick on the submit Submit
upvote count: 3
score: 3
downvote count: 0

http://stackoverflow.com/a/27635436
upvote count: 2
has comment: http://stackoverflow.com/comment/43699528
answers question: http://stackoverflow.com/q/27633858
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27633858
type: Answer
score: 2
downvote count: 0
has body: One possible explanation: If your &lt;script&gt; tag is in the &lt;head&gt; of your document, it will execute before the body is loaded. In this situation, the element with Id "screen_name" won't yet be loaded, and thus var x = document.getElementById('screen_name'); will not contain the result you expect. If this is the case, try moving the &lt;script&gt; tag to the end of your document.

http://stackoverflow.com/comment/43499180
comment on: http://stackoverflow.com/q/27535345
type: Comment
score: 0
has text: function find_duplicates(input) { duplicates = [input] var i, j; for (i = 0, j = input.length; i < j; i++) { if (duplicates.indexOf(input[i]) === -1) { if (input.indexOf(input[i], i + 1) !== -1) { duplicates.push(input[i]); } } } console.log("test " + duplicates[1]); }
type: QuestionComment

http://stackoverflow.com/q/27492476
has answer: http://stackoverflow.com/a/27493115
has body: I use highcharts.js and I specified an id while creating series: var series = []; var key = "123"; var chartObject = { type: 'line', id: key, name: "NAME" data: [], }; /// filling chartObject.data array series.push(chartObject); /// later this array of objects assigned as series property /// in HighCharts.Chart() configuration Later I needed to iterate over all series, that I do using cycle // chart is my object made elsewhere with chart = new Highcharts.Chart({...}); var cs = chart.series; angular.forEach(chart.series, function (s) { // Here I want to know series ID to set visibility to true or false. s.setVisible(false); // debug console.log(s.name); // WORKS OK console.log(s.id);; // RETURNS UNDEFINED }); How I can obtain 'id' from "series" object?
type: Question
tagged with: highcharts
tagged with: javascript
downvote count: 0
answer count: 1
favorite count: 0
has title: How to obtain HighCharts series "id" from "series" elements?
upvote count: 2
type: UnansweredQuestion
score: 2

http://stackoverflow.com/a/27534176
has body: Try disabling the button by default: &lt;input type="submit" id="submit" value="Log in" disabled="true"&gt; Then in validateLogin add a line to enable the button: xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) document.getElementById("loginstatus1").innerHTML=xmlhttp.responseText; else document.getElementById("submit").disabled = false; } You would probably also want to add this line to the top of each validation function: document.getElementById("submit").disabled = true; Otherwise it would be possible for the user to follow this sequence: user enters a valid username and password your code verifies the entries and enables the login button user changes the login name or password to something invalid user clicks the submit button
answers question: http://stackoverflow.com/q/27533420
score: 0
type: Answer

http://stackoverflow.com/comment/43457991
has text: @thankyour To answer you're tl;dr edit: you cannot get the return value out of the callback. That value only exists in the context of the callback function. You can always assign that value to some kind of global variable from inside the callback function, but then you'll never know when that global value got assigned its value.
type: Comment
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/27513610

http://stackoverflow.com/q/27559047
has comment: http://stackoverflow.com/comment/43568893
has comment: http://stackoverflow.com/comment/43544214
has comment: http://stackoverflow.com/comment/43545768
answer count: 0
type: UnansweredQuestion
tagged with: xampp
has comment: http://stackoverflow.com/comment/43568491
has comment: http://stackoverflow.com/comment/43568568
has comment: http://stackoverflow.com/comment/43571697
has body: I have a MacBook Pro running Yosemite. I have loaded xampp, latest version of Java and Dreamweaver cs6. I cannot get the localhost to display the Java code. How can I get My local host to display the Java code in my website?
has comment: http://stackoverflow.com/comment/43569304
has title: Xampp, Apache and Java
type: Question
has comment: http://stackoverflow.com/comment/43570196
has comment: http://stackoverflow.com/comment/43568909
tagged with: apache
tagged with: javascript
has comment: http://stackoverflow.com/comment/43546229
has comment: http://stackoverflow.com/comment/43569931
score: 0
tagged with: dreamweaver

http://stackoverflow.com/a/27523181
score: 1
has body: You need to add single quotes around your second parameter. Corrected code: echo " Email "; Otherwise, javascript will consider your argument as a keyword like this.
upvote count: 1
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/43475395
answers question: http://stackoverflow.com/q/27523147

jquery-svg
tag name: jquery-svg
type: Tag
tags question: http://stackoverflow.com/q/27560731
tags question: http://stackoverflow.com/q/27479297

dialog
tag name: dialog
tags question: http://stackoverflow.com/q/27551268
type: Tag
tags question: http://stackoverflow.com/q/27584468
tags question: http://stackoverflow.com/q/27616990

http://stackoverflow.com/a/27517445
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27517419
score: 2
has body: this inside the ListUsers does not refer to the clicked element so you need to pass the clicked element reference as a param &lt;input name="SeeUsers" id="SeeUsers" class="SeeUsersButton" value="See Users" type="button" title="#qPages.id#" onclick="ListUsers(this);"&gt; then ListUsers = function(el) { var userid = el.title; $('.userslistdiv').text(userid); $('.userslistdiv').show(); }; -- But since you have jQuery, use jQuery to handle events jQuery(function ($) { $('#SeeUsers').click(function () { var userid = this.title; $('.userslistdiv').text(userid); $('.userslistdiv').show(); //it is a function }); })
upvote count: 2

http://stackoverflow.com/a/27523016
has comment: http://stackoverflow.com/comment/43477246
has comment: http://stackoverflow.com/comment/43480816
type: Answer
has comment: http://stackoverflow.com/comment/43474940
has comment: http://stackoverflow.com/comment/43475275
has comment: http://stackoverflow.com/comment/43480595
has comment: http://stackoverflow.com/comment/43481382
has body: session_start(); if(!isset($_SESSION["popup_shown"])) { echo "//javascript and/or html code to show the popup"; $_SESSION["popup_shown"] = true; } update: according to your comments, just change what's in your &lt;body&gt; tag then: session_start(); $body_attr = ""; if(!isset($_SESSION["popup_shown"])) { $body_attr = " onload=\"show('divid')\""; $_SESSION["popup_shown"] = true; } in your html: &lt;body&lt;?php echo $body_attr;?&gt;&gt; note: session_start() has to be called before any other output occurs!
has comment: http://stackoverflow.com/comment/43480322
answers question: http://stackoverflow.com/q/27522902
has comment: http://stackoverflow.com/comment/43475060
has comment: http://stackoverflow.com/comment/43476297
has comment: http://stackoverflow.com/comment/43479712
has comment: http://stackoverflow.com/comment/43480720
has comment: http://stackoverflow.com/comment/43481144
has comment: http://stackoverflow.com/comment/43482153
has comment: http://stackoverflow.com/comment/43474882
score: 0
has comment: http://stackoverflow.com/comment/43476811

http://stackoverflow.com/a/27575804
has body: A little more explicitly: expect(row.element(by.css('img')).getAttribute('src')).toMatch(/someImg.png/); expect(row.element(by.css('span')).getOuterHtml()).toBe('&lt;i&gt;&lt;img src="res/someImg.png"&gt;&lt;/i&gt;'); expect(row.element(by.css('i')).getInnerHtml()).toBe('&lt;img src="res/someImg.png"&gt;');
has comment: http://stackoverflow.com/comment/65590881
downvote count: 1
accepted answer of: http://stackoverflow.com/q/27570025
answers question: http://stackoverflow.com/q/27570025
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/111945791
upvote count: 8
type: Answer
score: 7

http://stackoverflow.com/q/27558842
has title: Google closure compiler, JSC_INEXISTENT_PROPERTY issue with mixin/extend
favorite count: 0
tagged with: compiler-errors
has answer: http://stackoverflow.com/a/27682693
accepted answer: http://stackoverflow.com/a/27682693
upvote count: 1
type: AnsweredQuestion
tagged with: build
score: 1
tagged with: compiler-warnings
type: Question
tagged with: google-closure-compiler
answer count: 1
downvote count: 0
tagged with: javascript
has body: The code below throws a warning/error when compiled with google closure compiler advanced mode. JSC_INEXISTENT_PROPERTY: Property getJerseyNumber never defined on player Any ideas how we can fix this? var getDetails = { getJerseyNumber: function() { return Math.random(); } }; /** * @param {Object} source * @param {Object} delta */ function mixIn(source, delta) { for (var i in delta) { source[i] = delta[i]; } } /** * @type {{name: string , sport: string}} */ var player = { name: 'Tom Brady', sport: 'Football' }; mixIn(player, /** @lends {player} */ getJerseyNumber); alert(player.getJerseyNumber()); Using @lends work with object literals only. So adding this line will work, but any other ideas? mixIn(player, /** @lends {player} */ { getJerseyNumber: function() { return Math.random(); } });

http://stackoverflow.com/q/27516527
has answer: http://stackoverflow.com/a/27516562
type: AnsweredQuestion
has title: Mapping an array of objects and grouping by key in javascript
tagged with: arrays
tagged with: javascript
type: Question
has body: How can I succinctly achieve the following manipulation in javascript: [ {key:'a', value:1}, {key:'a', value:2}, {key:'b', value:4} ] -> {'a':[1,2], 'b':[4] } Code simplicity is what I'm really going for and I am already using lodash but I couldn't really figure out how to do this manipulation.
tagged with: lodash
accepted answer: http://stackoverflow.com/a/27516562
score: 0
answer count: 1
tagged with: object

http://stackoverflow.com/comment/43497480
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27534336
has text: Basically, the jQuery answer below is extremely bloated and inefficient. An efficient solution would be something like `![].some.call(document.getElementsByTagName('span'), function(s) {return s.textContent != 9;});`
score: 0

http://stackoverflow.com/a/27561558
answers question: http://stackoverflow.com/q/27505460
accepted answer of: http://stackoverflow.com/q/27505460
score: 9
upvote count: 9
has comment: http://stackoverflow.com/comment/113858189
has body: var d = new Date(+milliseconds);
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/107616896
type: Answer

http://stackoverflow.com/q/27622019
tagged with: android
has comment: http://stackoverflow.com/comment/43664869
duplicate of: http://stackoverflow.com/q/27610738
has answer: http://stackoverflow.com/a/27623751
has title: send e-mail in android using cordova
has comment: http://stackoverflow.com/comment/43664595
has comment: http://stackoverflow.com/comment/43665391
tagged with: cordova
downvote count: 2
type: Question
linked to: http://stackoverflow.com/q/27610738
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/43664699
has body: how to send e-mail in android using cordova. i've been trying since two days but i'm getting an error like e-mail plugin not available. been trying with this code but cannot get my desired result. dont know were the problem is... Contact Example
upvote count: 0
tagged with: email
answer count: 1
has comment: http://stackoverflow.com/comment/43664837
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/27504961
score: 2
answers question: http://stackoverflow.com/q/27504801
upvote count: 2
has comment: http://stackoverflow.com/comment/43440171
accepted answer of: http://stackoverflow.com/q/27504801
has body: Here is my non-regexp solution to the problem; var input = 'bar$fo$$o$zoo', results = input.replace(/%/g, '%25') .replace(/\$\$/g, '%24') .split('$') .map(function(term) { return decodeURIComponent(term); }); console.log(results); You may try the fiddle at http://jsbin.com/qineqazaxo/2/edit
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43440296
has comment: http://stackoverflow.com/comment/43440030
type: Answer
has comment: http://stackoverflow.com/comment/43439909

http://stackoverflow.com/comment/43554732
type: AnswerComment
has text: @Hacketo There are a bunch of well known practices in the world of JavaScript and NodeJS which are considered bad to prevent us from blocking on IO. In the NodeJS world the famous synchronous fs.readFile is one of them and in browser synchronous XHR requests is the other bad practice which block the whole thread.
comment on: http://stackoverflow.com/a/27563865
type: Comment
score: 0

http://stackoverflow.com/q/27601581
has answer: http://stackoverflow.com/a/53388367
possible better answer: http://stackoverflow.com/a/27601617
has body: I've an HTML table and i want to get a selected value in list in a td. I proceed like this : var table = document.getElementById('ZZ'); for (var r = 0, n = table.rows.length; r < n; r++) { for (var c = 0, m = table.rows[r].cells.length; c < m; c++) { var type =table.rows[r].cells[11].innerHTML; alert(type); } } And i've a result like this in an alert box <SELECT id="" onchange=''... A B And i want to get 'B' in a var. How can i complete this?
has answer: http://stackoverflow.com/a/27601617
has answer: http://stackoverflow.com/a/27602189
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27601950
type: AnsweredQuestion
score: 2
downvote count: 0
has title: Javascript-Get selected option in table
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
answer count: 4
has answer: http://stackoverflow.com/a/27601950
upvote count: 2

http://stackoverflow.com/comment/43427197
score: 0
has text: @Sparky Read the question and answer **carefully**. Or read the code ***carefully*** or specifically this line `$('#myDiv').toggle(effect, options, duration);`.
type: Comment
comment on: http://stackoverflow.com/a/27484132
type: AnswerComment

http://stackoverflow.com/comment/43631786
score: 0
type: Comment
type: QuestionComment
has text: @A.Wolff i can not detect previous, current and next values to measure with, need to detect 16% range. I can get values but stucked at the formula /:
comment on: http://stackoverflow.com/q/27604734

http://stackoverflow.com/a/27618429
has body: load can be called on Body,iframe,img etc. but not on divs, Instead if you wish to use onload event on an element, you need to bind it with the element for eg. with div.But basically there are 2 ways to call a function 1. is to call function just after div load , write just after div element &lt;div id="image"&gt; &lt;img class="width" src="assets/images/janka.jpg"&gt; &lt;/div&gt; &lt;script&gt; function toHide() { $("#image").hide(); } toHide(); &lt;/script&gt; 2. is to fire function onload of img instead of div $("#image img").load(function () { $("#image img").hide(); //USING JS function }); OR $("#image").load(function () { $("#image").css('display', 'none'); //USING CSS });
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27618267
has comment: http://stackoverflow.com/comment/43657867
answers question: http://stackoverflow.com/q/27618267
has comment: http://stackoverflow.com/comment/43658042
has comment: http://stackoverflow.com/comment/43658106
upvote count: 2
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/43658017
score: 2

http://stackoverflow.com/a/27523954
has comment: http://stackoverflow.com/comment/43494999
has comment: http://stackoverflow.com/comment/131730930
has comment: http://stackoverflow.com/comment/89641179
has body: There are currently three syntaxes that TypeScript allows for function declarations in interfaces: Using your example of a validation function taking 1 parameter (of any type) and a boolean return value: validation: {(flag: any): boolean}; or in the newer syntax: validation(flag: any) : boolean; or an alternative is: validation: (flag: any) =&gt; boolean; Solution: so to make it optional with the old syntax is easy: validation?: {(flag: any): boolean}; with the second syntax (recent addition - thanks to @toothbrush) validation?(flag: any) : boolean; or in the third syntax (as you found): validation?: (flag: any) =&gt; boolean;
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27522973
type: Answer
score: 325
has comment: http://stackoverflow.com/comment/43513606
accepted answer of: http://stackoverflow.com/q/27522973
upvote count: 325
has comment: http://stackoverflow.com/comment/89778356

http://stackoverflow.com/q/27519836
has title: Uncaught TypeError: Cannot assign to read only property
has body: I was trying out this really simple example from the awesome "Professional JavaScript for Web Developers" book by Nicholas Zakas but I can't figure what I am doing wrong here. Must be something really simple that I missed but I'm stuck. Here is the code: 'use strict'; var book = {}; Object.defineProperties(book, { originYear: { value: 2004, writable: false }, _year: { value: 2004 }, edition: { value: 1 }, year : { get: function() { return this._year; }, set: function(newValue) { if(newValue > this.originYear) { this._year = newValue; this.edition += newValue - this.originYear; } } } }); console.log(book.edition); book.year = 2006; console.log(book.edition); The error I am getting on the Chrome console is: Uncaught TypeError: Cannot assign to read only property '_year' of #main.js:31 Object.defineProperties.year.setmain.js:39 (anonymous function) Can someone please explain where I have gone wrong? Here is the fiddle
has answer: http://stackoverflow.com/a/27519874
accepted answer: http://stackoverflow.com/a/27520133
downvote count: 0
favorite count: 0
score: 92
answer count: 4
has answer: http://stackoverflow.com/a/63684431
possible better answer: http://stackoverflow.com/a/76663009
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/76663009
has answer: http://stackoverflow.com/a/27520133
type: Question
upvote count: 92
tagged with: javascript

ecmascript-harmony
tag name: ecmascript-harmony
type: Tag
tags question: http://stackoverflow.com/q/27532794
tags question: http://stackoverflow.com/q/27622636
tags question: http://stackoverflow.com/q/27594934

reserved-words
tag name: reserved-words
type: Tag
tags question: http://stackoverflow.com/q/27596093

http://stackoverflow.com/comment/43573465
type: AnswerComment
score: 0
has text: I also have no idea why this worked. I haven't had to do value="" in any of my other input boxes, but I guess I can't complain if it works now!
type: Comment
comment on: http://stackoverflow.com/a/27573840

android-webview
tags question: http://stackoverflow.com/q/27523040
type: Tag
tag name: android-webview
tags question: http://stackoverflow.com/q/27546426

http://stackoverflow.com/q/27477531
tagged with: google-chrome-extension
answer count: 1
favorite count: 0
tagged with: angularjs
tagged with: google-chrome-os
type: UnansweredQuestion
has body: I have developed an Chrome installable app as an extension in Google Chrome and published it on the Chrome Web store. The app is developed using Html5, AngularJS and Ionic framework . It works well as an extension but does not work on Chrome OS. Can you please let me know if i am missing something or do i need to do any extra coding for the chrome installable app(extension) to work on a Chrome OS.
tagged with: google-chrome
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/43426068
has answer: http://stackoverflow.com/a/27495034
upvote count: 0
has title: Chrome extension published on chrome web store does not work in Chrome book
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/43422197

http://stackoverflow.com/comment/43401549
type: AnswerComment
type: Comment
has text: in this way, the page wont be reloaded?
comment on: http://stackoverflow.com/a/27484759
score: 0

http://stackoverflow.com/q/27485002
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27485074
score: 1
answer count: 2
has answer: http://stackoverflow.com/a/27485086
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has body: I'm starter in JavaScript and I try to make simple code to print numbers (0-100) , but with pause in printing, for every next number(for exp. 3 seconds pause). Code doesn't work properly... It waits 3 seconds and print the last number (100 in my case). Can you help me, where is my mistake? This is the code: Start
has comment: http://stackoverflow.com/comment/43402024
accepted answer: http://stackoverflow.com/a/27485086
has title: JavaScript: simple counter with pause between the values doesn't work
upvote count: 1
possible better answer: http://stackoverflow.com/a/27485074
type: Question

http://stackoverflow.com/q/27488902
has comment: http://stackoverflow.com/comment/43409397
score: -3
has answer: http://stackoverflow.com/a/27489092
has comment: http://stackoverflow.com/comment/43409399
type: AnsweredQuestion
has body: HEAVILY EDITED: I have a form which has this input field: &lt;input id="RR_No" type="text" size="15" name="RR_No" readonly&gt;&lt;/div&gt;&lt;/TD&gt; In that field, I need to put the date in the format: DDMMYYYY And a Serial Number that is 6 numbers long to make a number like this: DDMMYYYYABCDEF Here is the Javascript to make the date: function autoDate () { var tDay = new Date(); var tMonth = tDay.getMonth()+1; var tDate = tDay.getDate(); if ( tMonth &lt; 10) tMonth = "0"+tMonth; if ( tDate &lt; 10) tDate = "0"+tDate; document.getElementById("RR_Date").value = tDate+"/"+tMonth+"/"+tDay.getFullYear(); document.getElementById("RR_No").value = tDate+""+tMonth+""+tDay.getFullYear(); } function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { if (oldonload) { oldonload(); } func(); } } } addLoadEvent(function() { autoDate(); }); Which works. I then have this JavaScript that copies the Serial Number into the same Input box: $(function(){ $("#copyCheck").change(function() { if ($("#copyCheck:checked").length &gt; 0) { bindGroups(); } else { unbindGroups(); } }); }); var bindGroups = function() { // First copy values $("input[name='RR_No']").val($("input[name='S_Serial_No']").val()); // Then bind fields $("input[name='S_Serial_No']").keyup(function() { $("input[name='RR_S_No']").val($(this).val()); }); }; var unbindGroups = function() { $("input[name='SN_No0']").unbind("keyup"); }; But this second code overwrites the date already in the Input box. I need it to show beside the Date within the same Input box. Hope this makes more sense. Chris
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/43409490
downvote count: 4
accepted answer: http://stackoverflow.com/a/27489092
has comment: http://stackoverflow.com/comment/43409462
tagged with: javascript
has title: 2 Javascript functions into 1 Form Input Box
answer count: 1
favorite count: 0

http://stackoverflow.com/comment/43601405
type: Comment
has text: Thanks for an answer, but it throws invalid Regex. Apart from that it does not match function(a){ console.log(a); }.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27588608

http://stackoverflow.com/a/27531315
has body: The 'prototype' and 'allow_add' are their own options. The 'options' is the array passed to the form type you specify in 'type' (so what each 'email' option would have, in this case). See the documentation here: http://symfony.com/doc/current/reference/forms/types/collection.html Your form creation should look like this: $this-&gt;createFormBuilder($data) -&gt;add('emails', 'collection', array( 'type' =&gt; 'email', 'prototype' =&gt; true, 'allow_add' =&gt; true, 'options' =&gt; array( 'required' =&gt; false, 'attr' =&gt; array('class' =&gt; 'email-box'), ) ) )-&gt;getForm();
score: 3
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27529472
has comment: http://stackoverflow.com/comment/43492829
has comment: http://stackoverflow.com/comment/43493211
answers question: http://stackoverflow.com/q/27529472
upvote count: 3
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43493004
type: Answer

http://stackoverflow.com/comment/43462599
type: QuestionComment
type: Comment
has text: The headers can possibly be ignored.
comment on: http://stackoverflow.com/q/27515962
score: 0

http://stackoverflow.com/q/27536536
has body: This is a pretty silly question, but for the life of me I can't figure out an easy way to do this in javascript. If a string has "abcdefgh", this should return false (no error found) but if a string has an invalid character like "@$$", it should return true (error found). So, the general rule is if it contains a non-word, non-space, and non-hyphen, it should return true to indicate an error. I tried (/\W\D\S/).test('hello!'), which should return true (found an problem) because of the "!", but it's returning false still. Much appreciated!
answer count: 2
score: 2
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/27536595
tagged with: regex
has title: Finding non-word, non-space, and non-hyphen in javascript
has answer: http://stackoverflow.com/a/27536603
has comment: http://stackoverflow.com/comment/43502306
type: AnsweredQuestion
upvote count: 2
possible better answer: http://stackoverflow.com/a/27536603
accepted answer: http://stackoverflow.com/a/27536595
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/43501780

http://stackoverflow.com/comment/43563143
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27568945
score: 3
has text: So, what seems to be the problem here? You just gave us a block of code, care to describe it and the issue you are having?

http://stackoverflow.com/q/27497507
tagged with: javascript
upvote count: 4
tagged with: jsoup
type: AnsweredQuestion
downvote count: 0
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
score: 4
has body: I am using jsoup to parse an html document. I need to extract all the child div elements. This is basically div tags without nested div tags. I used the following in java to extract div tags, Elements bodyTag = document.select("div:not(div>div)"); Here is an example: I need to extract only the following: Instead, the above code snippet is returning all the div tags. So, could you please help me figure out what is wrong with this selector
answer count: 2
has answer: http://stackoverflow.com/a/27497603
has title: How to select leaf tags of an html document using jsoup
possible better answer: http://stackoverflow.com/a/27497641
accepted answer: http://stackoverflow.com/a/27497603
has answer: http://stackoverflow.com/a/27497641

http://stackoverflow.com/a/76850599
answers question: http://stackoverflow.com/q/27621168
type: Answer
has body: You can simulate load event by selecting the image element and call the triggerEventHandler with whatever event you would like. For example here is an image and if you want to emulate the load event to test the imgLoaded() method you can it('imgLoaded should be called when image is preloaded', () => { spyOn(component, 'imgLoaded').and.callThrough(); fixture.detectChanges(); const preloadImage = debugElement.query( By.css('img') ); preloadImage.triggerEventHandler('load') expect(component.imgLoaded).toHaveBeenCalledOnceWith(); });
score: 0

http://stackoverflow.com/q/27503616
score: 0
tagged with: typo3
answer count: 0
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/43477815
has body: I'm trying to use ob_flush() and flush() from a TYPO3 controller, but the result is weird. In the web-browser console I can see that each flush does not lead to one response in Javascript; there's no one-to-one correspondence between a flush on the server and a reaction in javascript. This is the code: // PHP foreach ($ids as $id) { echo $id; ob_flush(); // &lt;-- Flush 1, 2, 3, ... flush(); // more data processing... } // Javascript var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function() { if (xhr.readyState == 4 &amp;&amp; xhr.status == 200) { } else if (xhr.readyState &gt; 2) { console.log(xhr.responseText); // &lt;-- Can log "123" in one go } } How do I force one flush to lead to exactly one response in Javascript? Could it be that the flush occurs so often that Apache2 don't have time to react? Edit: Solved by including this after echo: echo str_pad('',4096)."\n";
type: Question
has title: PHP with comet/ajax and ob_flush
tagged with: comet
tagged with: javascript
has comment: http://stackoverflow.com/comment/43454874

http://stackoverflow.com/comment/43627766
type: Comment
score: 0
comment on: http://stackoverflow.com/a/27599180
has text: You're welcome, glad to help ^^ Please mark the post as answered.
type: AnswerComment

http://stackoverflow.com/comment/43692755
type: AnswerComment
score: 0
type: Comment
has text: that looks like a new approach. give me a moment to try it @Satindersingh
comment on: http://stackoverflow.com/a/27636795

http://stackoverflow.com/comment/43640275
comment on: http://stackoverflow.com/a/27607740
type: AnswerComment
score: 0
type: Comment
has text: Hi Mark, Thanks for the help! The first part worked perfectly. For the 2nd part, I currently am using the following:

http://stackoverflow.com/comment/43438900
type: QuestionComment
has text: can you provide jsfiddle?
comment on: http://stackoverflow.com/q/27504434
score: 0
type: Comment

http://stackoverflow.com/comment/43652778
type: Comment
type: QuestionComment
has text: Please have a look this website http://webdesign.about.com/od/video/a/html5-video-formats.htm
score: 0
comment on: http://stackoverflow.com/q/27599883

http://stackoverflow.com/comment/43463776
type: QuestionComment
type: Comment
has text: No, as the browser does execute javascript not jsx files. [There might be sourcemaps, though](https://github.com/facebook/react/pull/833)
comment on: http://stackoverflow.com/q/27516580
score: 0

http://stackoverflow.com/q/27604964
upvote count: 2
answer count: 5
possible better answer: http://stackoverflow.com/a/27605010
tagged with: http://stackoverflow.com/tag/html
has title: jQuery select element and next together
has answer: http://stackoverflow.com/a/27605010
score: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27605036
has answer: http://stackoverflow.com/a/27605168
has answer: http://stackoverflow.com/a/27605030
has body: I have an auto-generated HTML and I want to group together elements. Input Html: StringField IntField Desired output: StringField IntField I'm trying to use jQuery's next selector to get those groups, and then wrap them, but I'm having trouble getting the items to select as one to use with wrap(). I'm not sure if I can write a single selector to get this, or if I will need to do it iteratively. Here are some of the selectors I've tried. //selects just the labels $('.editor-label') //returns only the .editor-fields $('.editor-label + .editor-field') //returns all 4 elements separately $('.editor-label, .editor-label + .editor-field') What selector can I use to select the element (.editor-label) and it's next (.editor-field) as one "element"?
type: Question
has answer: http://stackoverflow.com/a/27605015
tagged with: javascript
has answer: http://stackoverflow.com/a/27605036
downvote count: 0
tagged with: jquery
favorite count: 0

http://stackoverflow.com/q/27511082
tagged with: javascript
has answer: http://stackoverflow.com/a/30961141
has body: I'm using Parsley.js to validate part of a form like in this example. However, the validate() method always returns false, even when that piece of form should validate. No error messages are displaying, and I want to see what it is that's failed validation. I can't see a way to get Parsley to simply return all the errors found, so I can see them in the console. Have I missed something obvious?
has comment: http://stackoverflow.com/comment/43454412
has title: How do I show what validation errors Parsley.js has found?
answer count: 3
tagged with: validation
downvote count: 0
favorite count: 0
type: UnansweredQuestion
upvote count: 6
score: 6
has comment: http://stackoverflow.com/comment/43473095
type: Question
has answer: http://stackoverflow.com/a/34656510
tagged with: parsley.js
has answer: http://stackoverflow.com/a/27525259

http://stackoverflow.com/comment/43692048
score: 0
has text: I've done that and it's made 0 difference
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27634068

http://stackoverflow.com/comment/43428096
comment on: http://stackoverflow.com/q/27498518
score: 0
type: Comment
type: QuestionComment
has text: Can you please show what you have already tried as well as what language you are working in? I'm sure if you do, someone will be able to answer your question.

code-generation
tag name: code-generation
tags question: http://stackoverflow.com/q/27540941
type: Tag

http://stackoverflow.com/a/27513941
type: Answer
has body: You have said the JS file is in the same folder as the page, so you would link it like: Also noted, is in the HTML provided, you did not have JQuery Library included, and since the coding you were using is dependent on JQuery, that would be a problem! :) You can download the JQuery library from JQuery.com, or link to the CDN host like:
score: 0
answers question: http://stackoverflow.com/q/27513672

http://stackoverflow.com/q/27598229
tagged with: http://stackoverflow.com/tag/html
has body: I have an image loading that is resize to fit the window using javascript, and the image is continuously resize when the browser window is resized. However, before the javascript resize the image is loaded full-size. So you see the full-size image and then it jumps to the resized version. Can I fix this so only the resized image is loaded? I've hacked a small work around where I make the image visibility:hidden and then after the javascript resize I set the visibility:visible but this is not the most ideal solution. Any help would be superb, thanks. HTML &lt;body&gt; &lt;img style="content:url(/uploads/user/bg_image/31/background.jpg) no-repeat fixed left top;" id="bg"&gt; &lt;/body&gt; JAVASCRIPT $(window).load(function() { var theWindow = $(window), $bg = $("#bg"), aspectRatio = $bg.width() / $bg.height(); function resizeBg() { if ( (theWindow.width() / theWindow.height()) &lt; aspectRatio ) { $bg .removeClass() .addClass('bgheight'); } else { $bg .removeClass() .addClass('bgwidth'); } } theWindow.resize(function() { resizeBg(); }).trigger("resize"); });
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43620333
has answer: http://stackoverflow.com/a/27598303
accepted answer: http://stackoverflow.com/a/27598303
type: Question
has title: Javascript resizes a background image, but the image loads full-size first - any fix?
has comment: http://stackoverflow.com/comment/43619892
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27598300
has answer: http://stackoverflow.com/a/27598300
answer count: 2
linked to: http://stackoverflow.com/q/3029422
upvote count: 1
tagged with: jquery
tagged with: autoresize
favorite count: 0

http://stackoverflow.com/a/27597886
type: AcceptedAnswer
type: Answer
has body: Yes, you just pass the function without invoking it: parseItems: function() { return _.each(this.items, this.parseItem, this); }
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/27597810
accepted answer of: http://stackoverflow.com/q/27597810
upvote count: 2

http://stackoverflow.com/comment/43654335
score: 0
type: Comment
type: QuestionComment
has text: You use them no differently than you would use any asynchronous api or library, and there are a variety of ways to do that. You can find examples all around the internet and by seearching [reactjs async](http://stackoverflow.com/search?q=%5Breactjs%5D+async), [reactjs ajax](http://stackoverflow.com/search?q=%5Breactjs%5D+ajax), etc. here.
comment on: http://stackoverflow.com/q/27616087

http://stackoverflow.com/comment/43488060
score: 0
type: Comment
has text: did you try public/js/vendor/**?
type: QuestionComment
comment on: http://stackoverflow.com/q/27524576

http://stackoverflow.com/a/27564372
type: Answer
has comment: http://stackoverflow.com/comment/43561298
downvote count: 0
has body: Use a context based lookup for the expandableSection element. In your case the target expandableSection is the parent of the clicked expandButton element so you can use this(which refer to the clicked button) and then find the target expandableSection using .closest() or .parent()(since expandableSection is the direct parent of the button) $(document).ready(function() { $('.expandButton').click(function() { $(this).next('.expandableSection').toggle("slide"); }); }); .expandButton { height: 20px; background: lightgrey; } .expandableSection { height: 20px; background: lightblue; }
score: 3
answers question: http://stackoverflow.com/q/27564340
upvote count: 3

http://stackoverflow.com/a/27633122
score: 0
has body: try this one 2014-02-13 23:00:59.0
answers question: http://stackoverflow.com/q/27632891
has comment: http://stackoverflow.com/comment/43686418
has comment: http://stackoverflow.com/comment/43686755
type: Answer

http://stackoverflow.com/a/27486092
score: 0
has body: The previous answers are too complex ; just update your helper : dataList : function() { var d = _.map( DataList.find().fetch(), function(v) { return {value: v}; }); return _.union( d.slice(0,2), { type: 'ad', value: 'Buy a Destrier - 5 Golden Stags' } ,d.slice(2)); }); So, dataList will have the ad inserted in third position.
has comment: http://stackoverflow.com/comment/43405362
type: Answer
answers question: http://stackoverflow.com/q/27484016

http://stackoverflow.com/comment/43699600
comment on: http://stackoverflow.com/a/27640353
type: Comment
has text: when i use this way i can't see my image in canvas.
score: 1
type: AnswerComment

http://stackoverflow.com/q/27490578
tagged with: javascript
has comment: http://stackoverflow.com/comment/43414387
has comment: http://stackoverflow.com/comment/43414693
score: 0
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/27492365
has title: Run function when file downloading in IE
accepted answer: http://stackoverflow.com/a/27492365
has body: How can I run function when IE ask for save file localization, eg. onclick? I google for it and found nothing interested. link $(".link").on('click', function(){ alert("test"); });
tagged with: events
type: AnsweredQuestion
type: Question
tagged with: internet-explorer

http://stackoverflow.com/a/27559405
accepted answer of: http://stackoverflow.com/q/27541315
type: Answer
answers question: http://stackoverflow.com/q/27541315
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/55887843
has body: Answer for future searchers. It's because one of my plugins broke cordova.js, so plugins included after the broken plugin not worked with js. I missed this error because safari web inspector doesn't have persist console log, so I can't see the err message happened before inspector opened.
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/q/27596658
upvote count: 1
has answer: http://stackoverflow.com/a/27596694
type: Question
has comment: http://stackoverflow.com/comment/43617134
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/27596670
has title: JQuery Creating Array from All Inputs and Extracting It
answer count: 3
tagged with: arrays
possible better answer: http://stackoverflow.com/a/27597276
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27597276
favorite count: 0
has comment: http://stackoverflow.com/comment/43617684
accepted answer: http://stackoverflow.com/a/27596670
has body: Here is my Fiddle Here is my Input Code : &lt;input type="text" id="first" name="first"&gt; &lt;input type="text" id="second" name="second"&gt; &lt;input type="text" id="third" name="third"&gt; &lt;input type="text" id="fourth" name="fourth"&gt; &lt;input type="button" id="driver" name="driver" value="Submit"&gt; Here is my Script : &lt;script&gt; $(document).ready(function() { $("#driver").click(function(event) { var A = $("#first").val(); var B = $("#second").val(); var C = $("#third").val(); var D = $("#fourth").val(); console.log(A); console.log(B); console.log(C); console.log(D); }); }); &lt;/script&gt; There was few fiddle which can create just an array in few complex ways i.e., $('document').ready(function() { var results = []; var items = $('[name^=item]'); $.each(items, function(index, value) { value = $(value); var jsObject = {}; jsObject[value.attr('name')] = value.attr('value'); results.push(jsObject); }); console.log(results); }); But Is there a simple way to create an Array with all elements and Extract all the values from the from those Array in JQuery ??

http://stackoverflow.com/comment/43622619
comment on: http://stackoverflow.com/a/27599198
type: Comment
has text: Can you be a bit more specific? Is there any browser where useCapture will mean that the text node is captured as the target, rather than its parent element?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43488169
type: QuestionComment
comment on: http://stackoverflow.com/q/27529235
has text: Alex, sorry. The source for [console.js](https://github.com/joyent/node/blob/master/lib/console.js): Looking at the `log` function, it just prints the value + a newline. And the default behavior for that in the underlying C/C++ library is that it doesn't flush except when necessary, so yes, most of the time it buffers.
score: 0
type: Comment

http://stackoverflow.com/comment/43526730
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/27550264
type: Comment
has text: Just as a new browser (i.e by visiting mypage.html)

http://stackoverflow.com/q/27623235
tagged with: javascript
has body: I wanted to use BootstrapValidator to validate couple of fields and enable stripe button upon validation. The problem is that the button is enabled once any of the fields are validated. I am trying to enabled the stripe button once both fields are validated.(ignore the datepicker field). below is my javascript code. $('#myform') .bootstrapValidator({ message: 'This value is not valid', //live: 'submitted', icon: { valid: 'glyphicon glyphicon-ok', invalid: 'glyphicon glyphicon-remove', validating: 'glyphicon glyphicon-refresh' }, fields: { fname: { message: 'The first name is not valid', validators: { notEmpty: { message: 'The first name is required and can\'t be empty' }, stringLength: { min: 2, max: 30, message: 'The first name must be more than 6 and less than 30 characters long' }, /*remote: { url: 'remote.php', message: 'The username is not available' },*/ regexp: { regexp: /^[a-zA-Z]+$/, message: 'The first name can only consist of alphabetical letters' } } }, lname: { message: 'The last name is not valid', validators: { notEmpty: { message: 'The last name is required and can\'t be empty' }, stringLength: { min: 3, max: 30, message: 'The last name must be more than 6 and less than 30 characters long' }, /*remote: { url: 'remote.php', message: 'The username is not available' },*/ regexp: { regexp: /^[a-zA-Z]+$/, message: 'The last name can only consist of alphabetical letters' } } }, } }) .on('success.form.fv', function(e) { // Prevent submit form e.preventDefault(); var $form = $(e.target), validator = $form.data('bootstrapValidator'); $form.find('#result').html('Thanks for signing up. Now you can sign in as ' + validator.getFieldElements('fname').val()).show(); }); $('.stripe-button-el').attr("disabled", true ); }); And this is the form: Full name Pick a Date <script src="https://checkout.stripe.com/checkout.js" class="stripe-button" data-key="<?php echo $stripe['publishable_key']; ?>" data-amount="5000" data-zip-code = "true" data-description="Whatever">
tagged with: jquery
score: 0
accepted answer: http://stackoverflow.com/a/27625127
tagged with: twitter-bootstrap
type: AnsweredQuestion
has title: Enable stripe button upon bootstrap validation
type: Question
has answer: http://stackoverflow.com/a/27625127
answer count: 1

http://stackoverflow.com/a/28052526
type: Answer
answers question: http://stackoverflow.com/q/27594391
has body: Window management is not allowed from javascript for security reasons. Perhaps you could open the paypal window in an iframe? That being said, it sounds like you are trying to resolve an issue that is already solved by oauth. Have you seen paypal's "login with paypal" page?
score: 0

http://stackoverflow.com/comment/43639787
score: 0
comment on: http://stackoverflow.com/q/27608650
type: Comment
type: QuestionComment
has text: What errors are you getting? Try `.replace(</?span>,"")`, what do you get? Because "here" in `/`<-here + `</?span>` +`/` <-here, are not part of the regex.

http://stackoverflow.com/a/27623332
has comment: http://stackoverflow.com/comment/43667394
score: 1
answers question: http://stackoverflow.com/q/27623275
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27623275
type: AcceptedAnswer
type: Answer
has body: You are almost correct. Just select parent p element and from there search for next .radioWrapper. Note, that you also have to include p with andSelf method: $( "strong:contains('Country')") .closest('p') .nextAll("div.radioWrapper").andSelf() .wrapAll(" "); Or another version using nextUnti method: $("strong:contains('Country')") .closest('p') .nextUntil(":not(.radioWrapper)").andSelf() .wrapAll(" "); Check the demo below. $( "strong:contains('Country')").closest('p').nextAll( "div.radioWrapper" ).andSelf().wrapAll(" "); .RadioWrap {background: #EEE;} Country Canada US
downvote count: 0

http://stackoverflow.com/comment/43663678
has text: same issue with your code my function is being called twice. This issue is only being occurred on IE8
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27621502
type: Comment

http://stackoverflow.com/comment/43611195
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27593731
score: 1
has text: @raina77ow That is correct, +1'd your answer for being more thorough.

http://stackoverflow.com/comment/43630931
comment on: http://stackoverflow.com/q/27604366
has text: You aren't stopping the form from being submitted, so the browser is doing what it's supposed to: submitting the form and taking you to the form's `action`. Since it's via GET, the form fields will be added to the url as part of the query string.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/31605264
upvote count: 3
answers question: http://stackoverflow.com/q/27566985
type: AcceptedAnswer
downvote count: 0
has body: It turns out Microsoft eventually backpedaled on its decision to kill off .execScript at COM-level. Just install the latest updates for Windows including kb3025390: One of the updates for IE that came after kb3025390 brings back .execScript functionality at COM-level Note, however, that .execScript is not accessible through IE's javascript anymore. In that context it's gone for good.
type: Answer
score: 3
accepted answer of: http://stackoverflow.com/q/27566985

http://stackoverflow.com/comment/43573658
score: 0
type: Comment
has text: I had the first alternative at first, and has changed back now aswell, still not working
type: AnswerComment
comment on: http://stackoverflow.com/a/27573886

http://stackoverflow.com/comment/43710467
has text: @arg0 Yes, I've tried and all is running except for the changeImage function. Here's the fiddle: http://jsfiddle.net/antoniobarcos/owv1ysto/4/ As you can see, the opacity of changes but not image...
score: 0
comment on: http://stackoverflow.com/q/27638467
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27640152
score: 0
tagged with: canvas
has answer: http://stackoverflow.com/a/27649870
accepted answer: http://stackoverflow.com/a/27649870
has body: I have an issue with a javascript project. Something similar to a drawing tool. I would like to draw a dashed curved line. I succed to draw a DASHED LINE like that: jsfiddle.net/lannymcnie/uQpdA/1/ Also succed to draw a QUADRATIC CURVE. but can't draw a DASHED QUADRATIC CURVE. I tried a lot of things, also the ctx.setLineDash() but it change all my canvas elements into dashed instead of just the curve. I'm using easeljs as js library to draw in canvas. Thanks for your help.
answer count: 1
tagged with: createjs
type: AnsweredQuestion
has title: Draw a dashed curved with createjs
type: Question
tagged with: javascript
tagged with: easeljs

http://stackoverflow.com/q/27559438
has answer: http://stackoverflow.com/a/27559450
has comment: http://stackoverflow.com/comment/43545057
answer count: 1
downvote count: 0
tagged with: button
duplicate of: http://stackoverflow.com/q/3166821
favorite count: 0
tagged with: console
has body: So I only have 6 lines of code in my page.js file and they are: document.getElementById("desired").addEventListener("blur", gradeChange()); document.getElementById("calculate").addEventListener("click", gradeChange()); function gradeChange() { var dog = document.getElementById("desired").value; console.log(dog); } And in my page.html I have: and somewhere else: Calculate I thought it would work without the button, so that when I typed something in the textbox and then left the textbox, it would show up in the log. But nothing showed up, so I added the button to make it more straight forward. Still, it did nothing in the log. Any idea why nothing is showing up?
upvote count: 2
accepted answer: http://stackoverflow.com/a/27559450
type: AnsweredQuestion
score: 2
type: Question
has comment: http://stackoverflow.com/comment/43545133
tagged with: javascript
tagged with: blur
has title: Javasctipt function running without being called?
linked to: http://stackoverflow.com/q/3166821

http://stackoverflow.com/q/27530335
accepted answer: http://stackoverflow.com/a/30472861
type: AnsweredQuestion
score: 2
type: Question
downvote count: 0
tagged with: javascript
has title: opening a section of another page in a foundation reveal modal
tagged with: ajax
has answer: http://stackoverflow.com/a/30472861
tagged with: zurb-reveal
tagged with: zurb-foundation
answer count: 1
has body: So I'm trying to have a modal appear with the content of a section from another page when you click a link. For exmaple. Click Me For A Modal the problem is, I don't want the whole page contents just a section from an accordion drop down which I would like to be expanded in the modal eg. ect..: Math Foundations I Sem 1 code: HS-ES-38 Offerings: xxx Course Materials: Syllabus Course Contract White Board blah Study Sheets Study Sheets Answer Keys Graded Assignments Graded Assignment Answer Keys example So how would I be able to specify the specific sections of the page, would doing it by ID work? eg is there any way to do this in this fashion? If so how?
favorite count: 0
upvote count: 2

http://stackoverflow.com/comment/43522887
type: AnswerComment
comment on: http://stackoverflow.com/a/27548220
has text: Ok (thank you for the quick answer), now i got the JSON object, but how can i trasform the string in array using $http.get('myUrl.json'), where myUrl is where my file is.
type: Comment
score: 0

http://stackoverflow.com/comment/43646510
type: Comment
comment on: http://stackoverflow.com/a/27612130
has text: @Dai - Yup, agree with all that :)
type: AnswerComment
score: 0

http://stackoverflow.com/comment/43629177
comment on: http://stackoverflow.com/q/27602575
type: Comment
score: 0
has text: @Harko I have tried but it is not working.
type: QuestionComment

http://stackoverflow.com/comment/43515189
score: 0
type: Comment
type: QuestionComment
has text: This seems to be how behaves momentjs in its internal date management and should not be a problem to handle moment dates. However there might be some internal Javascript Date management that make days at millisecond `0` invalid
comment on: http://stackoverflow.com/q/27543974

http://stackoverflow.com/comment/43496662
has text: Just in case, if `node-mysql` is what he wants, running `npm install --save node-mysql` will install the latest required version and will add it to the package.json correctly. Delete the line corresponding to your node-mysql and run that command. In general if you just want the latest version of a package just install it with npm install --save
score: 3
comment on: http://stackoverflow.com/a/27533916
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27592555
answers question: http://stackoverflow.com/q/27592471
has comment: http://stackoverflow.com/comment/43630318
has comment: http://stackoverflow.com/comment/43625130
score: 1
type: AcceptedAnswer
downvote count: 0
has body: Any server-side action method can technically return any kind of response. So instead of thinking about files, think about response types. Namely: text/html text/css application/javascript (or maybe text/javascript?) So you'd need at least three action methods. Pressing the "magic button" can, for example, reload a frame (with a POST request which includes the HTML/CSS/JS inputs) which: invokes the action method which returns text/html, which itself: includes standard tags in the head node which reference the routes for the CSS and JavaScript "files" (which aren't really files, just action responses) One handy way to return custom responses from the action methods would be with the ContentResult type: return Content(htmlText, "text/html"); Or: return Content(cssText, "text/css"); So your server-side code can, for example, take the CSS text from the client-side and just echo it back like that. (Beware of various attacks, such as XSS. This simplistic implementation isn't likely ideal, but should get you started.) The only one you'd really need to wrap in any custom text would be the HTML response, where you can just statically define the HTML server-side and put the user-input HTML in just the body element. So just thinking out loud, if the POST request for the frame/iframe consists of the three values, then the basic HTML server-side action might look like: public GetHTML(string html, string css, string javascript) { // temporarily store the css somewhere server-side // temporarily store the javascript somewhere server-side // build the html response from static dressing around the user-input html return Content(htmlString, "text/html"); } The CSS/JS are stored in a temporary server-side location, possibly utilizing session state or any built-in temporary storage mechanism. After the above action returns its response, the browser will request the CSS/JS actions from the tags in that response, those are simple enough: public GetCSS() { // if the temporary location (se…
type: Answer
has comment: http://stackoverflow.com/comment/43620776
has comment: http://stackoverflow.com/comment/43630445
accepted answer of: http://stackoverflow.com/q/27592471
upvote count: 1

http://stackoverflow.com/q/27622069
tagged with: javascript
has answer: http://stackoverflow.com/a/27622486
accepted answer: http://stackoverflow.com/a/27622486
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/43664709
has comment: http://stackoverflow.com/comment/43665954
tagged with: regex
duplicate of: http://stackoverflow.com/q/280712
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/280712
tagged with: non-ascii-characters
type: Question
has comment: http://stackoverflow.com/comment/43664846
has body: I try to find and stock in HTML paragraphe all the word. Actually, I have a function like this p.html(function(index, oldHtml) { return oldHtml.replace(/\b(\w+?)\b/g, '$1'); }); But it's only return word without accent. I test on regex101.com https://www.regex101.com/r/jS5gW6/1 Any idea ?
has title: Regex and Javascript : find word with accents

http://stackoverflow.com/a/27532934
upvote count: 3
has comment: http://stackoverflow.com/comment/43496010
has comment: http://stackoverflow.com/comment/43495949
has comment: http://stackoverflow.com/comment/43495592
has comment: http://stackoverflow.com/comment/43495852
accepted answer of: http://stackoverflow.com/q/27532604
has comment: http://stackoverflow.com/comment/43495884
score: 3
answers question: http://stackoverflow.com/q/27532604
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43494988
has comment: http://stackoverflow.com/comment/43495310
type: Answer
has body: Your PHP returns JSON, not HTML. Use: dataType: "json" The only HTML you're returning is in the values of the title and content properties. Also, the PHP associative array in the links element will become a Javascript object, not an array. I suggest you change it to an indexed array: 'links' =&gt; [ [ 'url' =&gt; 'http://abv.bg/', 'name' =&gt; 'ABV.BG'], [ 'url' =&gt; 'http://dir.bg/', 'name' =&gt; 'DIR.BG'] ] Then the success function would be: success: function(data) { $('#page').html(data.about.content); $('title').html(data.about.title); $.each(data.about.links(function(i, link) { $('aside ul li').eq(i).children('a').attr('href', link.url).html(link.name); }); } And as pointed out in GolezTrol's answer, the handler argument to .on() must be a function: $('nav ul li:nth-child(2) a').on('click', function(e) { e.preventDefault(); $.ajax(...); }); Since you're loading your page from localhost, you need to change the jQuery URL to go to the web: &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; When you leave out the protocol prefix of a URL, it uses the same protocol as the page that contains it, and for local files that's file:. But you need to use http: or https: to get something from the web.

http://stackoverflow.com/comment/43616110
comment on: http://stackoverflow.com/q/27596093
score: 1
type: Comment
type: QuestionComment
has text: Sounds like your book is out of date.

http://stackoverflow.com/a/27476206
answers question: http://stackoverflow.com/q/27475866
downvote count: 1
type: Answer
has body: You should try echo json_encode($total); instead of echo $total;
has comment: http://stackoverflow.com/comment/43403000
upvote count: 1
score: 0

http://stackoverflow.com/comment/43560796
has text: Aha thats how you retriev it from Firebase! Thank you for helping me!
comment on: http://stackoverflow.com/a/27566560
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/27502097
has comment: http://stackoverflow.com/comment/43434490
answer count: 1
downvote count: 0
tagged with: url
tagged with: .htaccess
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27502535
score: 2
has comment: http://stackoverflow.com/comment/43434526
type: Question
linked to: http://stackoverflow.com/q/6478485
has body: I have a website that generates the following URL on the home page in the browser bar: http://example.com/int/bdf/eng/ I want change it to the following without reloading the page: http://example.com Is there an IE8+ solution available? i know about window.history.pushState("", "", ""); but how to use it? Or would it be better to use a htaccess file?
has comment: http://stackoverflow.com/comment/43434456
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43434736
has comment: http://stackoverflow.com/comment/43434629
has title: How to change browser bar url without reload
has comment: http://stackoverflow.com/comment/43434788

http://stackoverflow.com/a/27534508
has comment: http://stackoverflow.com/comment/43518761
score: 0
has comment: http://stackoverflow.com/comment/43519591
type: Answer
has comment: http://stackoverflow.com/comment/43522155
answers question: http://stackoverflow.com/q/27531623
has comment: http://stackoverflow.com/comment/43529312
has comment: http://stackoverflow.com/comment/43530844
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27531623
has body: Without really knowing how you call it, i could suggest following method. It first check if your script for editor was already loaded (in this case, jquery-ui), and if not loads it. Once it is loaded, it also calls the function to show the dialog, if you click on another element (calling the same function), it doesn't reload, and simply calls the "editor" directly, the load function gets the div element as an argument, and this argument is added to the addEditorToScript function (in that case, as the this object) Update I made the update to use the tinymce. The script should go where you current jquery script is, the div should get a click event, and at least a unique id :) (it can be a textarea as well), does that help you better? function loadMe(divElement) { console.log(divElement.innerHTML); if (divElement && divElement.innerHTML.indexOf('Click to reply')) { divElement.innerHTML = '... loading, please wait ...'; var callEditor = addEditorToScript.bind(divElement); if ($('#editorScript').length === 0) { console.log('loading jquery-ui'); var scriptTag = document.createElement('script'); scriptTag.id = 'editorScript'; scriptTag.src = 'http://tinymce.cachefly.net/4.1/tinymce.min.js'; $(scriptTag).on('load', callEditor); document.body.appendChild(scriptTag); return; } setTimeout(callEditor, 0); } } function addEditorToScript() { console.log(this); console.log(arguments); tinymce.init({ selector: '#' + this.id }); } Lorem Ipsum Click to reply Delorem Something Click to reply

http://stackoverflow.com/comment/43564856
score: 0
type: QuestionComment
has text: @herezy I'm also not clera how getScript() would help. The callback for that fires after it's loaded, but potentially BEFORE it's execute, which is the same thing that's happening now.
type: Comment
comment on: http://stackoverflow.com/q/27569505

http://stackoverflow.com/comment/43397899
comment on: http://stackoverflow.com/a/27482016
type: AnswerComment
type: Comment
has text: I think I found this solution: var dup2 = tree.parse(root.model) *Edit: ok , you found it as well :)
score: 1

http://stackoverflow.com/comment/43535176
type: AnswerComment
comment on: http://stackoverflow.com/a/27553962
type: Comment
has text: @MikeMcCaughan hope it's now better
score: 1

http://stackoverflow.com/a/27636345
upvote count: 4
downvote count: 0
has body: Ideally the testing of a component should be isolated from other units, like the model in this case. You can pass a fake model that has the state you need to test specific behavior. Ember.Object.create({ // the state you need }) And pass that to the component If you really need to pass a real model you will have to do a lot more things, create a container and set up a store, etc. since you cannot call .create directly on a model, hopefully you can avoid all of that.
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27628925
score: 4
answers question: http://stackoverflow.com/q/27628925
type: Answer

http://stackoverflow.com/q/27506610
upvote count: 2
type: UnansweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/43443528
has comment: http://stackoverflow.com/comment/43486746
has comment: http://stackoverflow.com/comment/43443908
linked to: http://stackoverflow.com/q/19281509
type: Question
has comment: http://stackoverflow.com/comment/43456278
has comment: http://stackoverflow.com/comment/43459430
tagged with: javascript
tagged with: jquery
has title: Replacing an equation and embedding a math function plotter?
has body: I am actually searching for a javascript / jquery library where I can pass a function equation, such as sin(x^2), and it plots the graph. Example link: http://www.greatgraphing.me/?plot=sin(x^2) Furthermore, I would like to scan my website for function equations and replace them with this function graph embed. It should have navigation features (scrolling, dragging the stage etc). Over the last 4 hours I have searched the net without satisfactory result. Even the popular plot.ly, fooplot.com and jsxgraph do not offer this kind of features. The only thing that comes close to what I need is www.graph.tk. You can pass 1 equation by URL but it has no embed feature (widget or alike). Wolframalpha offers a widget but it seems to be just an embed without the option to pass the equation. Update: Found out that desmos.com offers an embed feature, if you purchase one of their API keys. Price is not stated. I also considered using Google's geometry calculator but there seems to be no embed features. Before starting to build such a "graph embed" myself, I would like to ask if such a project exists already. Maybe it is hidden in some github repo and I just can't find it. Thank you. PS: If the question is too offtopic (saw the first close flag), even though it is related to js/jquery, where should I ask it? On Superuser? Please advice me. I am sure this is an important question for many math developers.
has answer: http://stackoverflow.com/a/29419899
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/43486310
favorite count: 0
has comment: http://stackoverflow.com/comment/43443575
has comment: http://stackoverflow.com/comment/43468574

http://stackoverflow.com/q/27538529
has answer: http://stackoverflow.com/a/33108838
tagged with: cordova
upvote count: 3
tagged with: material-design
type: Question
score: 3
has answer: http://stackoverflow.com/a/33109045
has body: im trying to use Material Design by google(Angular Material) to develop a app using phonegap (so i pretend it to work in iOS or other os) why this code is not working: Button I'm a link I'm a disabled button THE PLUNKER for both, cellphone / computer, it just show like the plkr = plain text =| what im doing wrong since its a ctrl c + ctrl v from the tutorial: Any solution or fix? nobody worked with phonegap + angular material yet?
tagged with: javascript
has comment: http://stackoverflow.com/comment/50327945
has answer: http://stackoverflow.com/a/27563384
has title: Angular Material + Phonegap/Cordova
answer count: 3
downvote count: 0
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/43634452
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27605806
has text: Question: do you have any idea why I need to add the code after the div? When I add it in the it don't work.

http://stackoverflow.com/comment/43654739
type: QuestionComment
has text: Ah, interesting. Knitevision, would you mind doing a quick demonstration using jsfiddle?
comment on: http://stackoverflow.com/q/27616489
score: 0
type: Comment

http://stackoverflow.com/comment/43640398
has text: Try this ('function' + (args[1] || '')).replace(/function/, 'fn')
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27609056
score: 1

http://stackoverflow.com/comment/43501516
score: 0
type: Comment
type: QuestionComment
has text: Doesn't change the fact that questions have to be self-contained. Your question isn't just for you, now; it's for others, later. If plunker disappears (which it easily could), the question must make sense *without* it. A Stack Snippet ensures that the question is self-contained (but with your edit, provided that's all the code needed, it's self-contained even without a Stack Snippet -- an SS would just make it easier for people to help you, which is surely a goal?).
comment on: http://stackoverflow.com/q/27536484

http://stackoverflow.com/comment/43641501
type: AnswerComment
score: 0
has text: **Perfect!** This is exactly what I was looking for! Thank you so much. I'll have to look into what an EventListener is since this is my first time using this method. Thanks again.
type: Comment
comment on: http://stackoverflow.com/a/27609468

http://stackoverflow.com/comment/43538259
score: 0
comment on: http://stackoverflow.com/a/27516501
type: AnswerComment
has text: Thanks that works perfect. I forgot the array within array thing.
type: Comment

http://stackoverflow.com/a/27550848
downvote count: 0
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/43527995
score: 27
accepted answer of: http://stackoverflow.com/q/27550529
answers question: http://stackoverflow.com/q/27550529
upvote count: 27
has body: How about something like this? // create the video element but don't add it to the page var vid = document.createElement('video'); document.querySelector('#input').addEventListener('change', function() { // create url to use as the src of the video var fileURL = URL.createObjectURL(this.files[0]); vid.src = fileURL; // wait for duration to change from NaN to the actual duration vid.ondurationchange = function() { alert(this.duration); }; }); &lt;input type="file" id="input"&gt;

http://stackoverflow.com/comment/43610328
comment on: http://stackoverflow.com/q/27593208
has text: The idea works in this concept - http://jsfiddle.net/JTqvJ/166/
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27574293
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/43574708
answers question: http://stackoverflow.com/q/27574242
accepted answer of: http://stackoverflow.com/q/27574242
has body: this inside ajax callback isn't referring to the current hovered TD but to the jqXHR object. You can use $.ajax context option: context: this, BTW, $(this).closest("td") is quite unrelevant because obviously, even you have nested TDs, $(this).closest("td") will always return the current TD, so you could just use this: hoverOff = $("label", this).text(); And data: "{}", could be data: {},, no point of setting a string here. >> because you are setting contentype to JSON
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/43543052
score: 0
has text: Welcome to SO. Have you tried something yet? If you have your code, would you be able to share it with us? Then, somebody will be able to help you. :)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27558323

http://stackoverflow.com/comment/43454728
type: QuestionComment
score: 1
has text: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
comment on: http://stackoverflow.com/q/27512201
type: Comment

http://stackoverflow.com/a/27567232
has comment: http://stackoverflow.com/comment/44746099
has comment: http://stackoverflow.com/comment/43560114
type: AcceptedAnswer
downvote count: 0
has body: You don't have to specifically mention all classes here to hide. You can use a class common to all elements say .text-hidden and in CSS add this code .text-hidden { display: none; } Now that all boxes are hidden, you can have a function for the animation than repeating the animate code everytime, where you pass the element which needs to be animated. I have added a data attribute to each button called data-next which will have the box name to be shown when clicked. HTML Fortsett JS $('button').on('click', function(){ var str = $(this).data('next'); // on click get the value from data-next of the clicked button animateBox($('.'+str)) // pass this value to the custom function }); function animateBox(obj) { var $obj = obj; $obj.animate({ margin: "0px 4px" }, 500); $obj.show(500); } See Fiddle
type: Answer
accepted answer of: http://stackoverflow.com/q/27566755
answers question: http://stackoverflow.com/q/27566755
score: 1
upvote count: 1

http://stackoverflow.com/a/27578904
upvote count: 2
answers question: http://stackoverflow.com/q/27578858
type: Answer
has body: use implode function to convert returned array into a string an then insert it into database as normal if(isset($_POST['submit'])){ $result = implode(",",$_POST['games']); } hopefully this will help you. Regards Imran Qasim
score: 2
downvote count: 0

http://stackoverflow.com/comment/43632454
type: QuestionComment
comment on: http://stackoverflow.com/q/27604366
has text: You're welcome Andrew. I don't like hackers; nobody should. It's just a waste of time, energy and karma that could be spent better elsewhere. ;-)
score: 0
type: Comment

http://stackoverflow.com/comment/43460545
has text: Regarding #3, what issues?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27515045
type: AnswerComment

http://stackoverflow.com/comment/43808435
comment on: http://stackoverflow.com/a/27613015
type: AnswerComment
has text: Thanks for the resources, and your thoughts on the look of the page. I have been excited about learning more Java fundamentals ever since I worked with Flash Actionscript, and I am still trying to bridge the gap between my knowledge and the type of coding that runs plugins such as the ones found on the codrops page you mentioned. I've also been told that CSS can produce many of the same effects I am looking for, so I am going to have to do a lot more research!
score: 0
type: Comment

http://stackoverflow.com/a/27699540
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/43816438
downvote count: 0
answers question: http://stackoverflow.com/q/27604250
score: 1
has body: There seems to be a problem in this definition (I added linebreaks to see better) : M 79.5111111111111,59.87405972222222 C79.89444444444443,66.13517083333333,70.94999999999999,63.32405972222222,65.45555555555555,63.96294861111111 C70.94999999999999,63.451837499999996,79.89444444444443,66.00739305555555,79.5111111111111,59.87405972222222 C79,52.84628194444444,66.09444444444443,56.67961527777778,65.58333333333333,49.77961527777778 C65.19999999999999,44.15739305555556,73.24999999999999,46.457393055555556,78.48888888888888,45.94628194444444 C73.24999999999999,46.329615277777776,65.19999999999999,44.15739305555556,65.58333333333333,49.77961527777778 C66.09444444444443,56.67961527777778,79,52.84628194444444,79.5111111111111,59.87405972222222 C79.5111111111111,59.87405972222222, 79.5111111111111,59.87405972222222, 79.5111111111111,59.87405972222222 The last definition starting with a C is just wrong. This might be where your problem is coming from. You could try without this last part...? This is the W3C documentation for SVG paths that is useful to read it through ;-) Let me know if that works for you

http://stackoverflow.com/q/27476829
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has body: below is my code for jquery slider .... function slide_temp(min,max){ $('#myrange_range').noUiSlider({ start: [min, max], connect: true, range: { 'min': 16, 'max': 30 }, orientation: 'vertical', behaviour: 'tap-drag', margin: 1, setp: 1, format: wNumb({ decimals: 0 }), direction: "rtl" }); } I have to call this function on every &lt;li&gt; click by passing min and max parameters First Clicks it works well but from second click on words I get and error on console and clider stops working... Uncaught Error: Slider was already initialized. Is there any ways to uninitialize plugin ?? and any other way to fix this problem?
upvote count: 1
has comment: http://stackoverflow.com/comment/43387872
possible better answer: http://stackoverflow.com/a/27477639
type: AnsweredQuestion
score: 1
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/27477692
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Jquery slider not working multiple call
has answer: http://stackoverflow.com/a/27477639
has answer: http://stackoverflow.com/a/27477692

http://stackoverflow.com/a/27537777
has body: The query string parameters, by themselves, do not do anything. They are simply name/value pairs that can be parsed and used by the endpoint you are attempting to request (http verb GET). So unless your sheet.csv is actually a program, or an obscure API endpoint, it will not be able to redirect the user to a different url. To do this, you need to use a rewrite module or other server side program to capture the information from the querystring, build the new url, and redirect the user's browser. As Mark Setchell mentioned in a comment above, information on the apache rewrite module can be found at: httpd.apache.org/docs/2.0/misc/rewriteguide.html If this is used, the rule would be RewriteRule ^sheet.csv?z=([_0-9a-z-]+) /$1/sheet.csv [R]
downvote count: 0
has comment: http://stackoverflow.com/comment/43504005
score: 1
answers question: http://stackoverflow.com/q/27537354
has comment: http://stackoverflow.com/comment/43504080
upvote count: 1
has comment: http://stackoverflow.com/comment/43522068
type: Answer

http://stackoverflow.com/a/79069971
upvote count: 1
answers question: http://stackoverflow.com/q/27599614
has comment: http://stackoverflow.com/comment/139421844
downvote count: 0
type: Answer
has body: Let me explain it in a simple way: When you require Express using require("express"), you are assigning the returned Express module to a variable, typically named express. Now, express is just a variable (e.g., var express = require("express");). To use Express functionality in your code, you would normally call it like express().[any Express function name such as get, put, post, delete]. However, instead of calling express() repeatedly, you're typically assigning its reference (the return value from calling express()) to another variable, like app, and then using app throughout your code. For example, app.get(), app.post(), etc.
score: 1

http://stackoverflow.com/comment/43644405
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27606954
has text: okay, so at the end of my list I return - key: undefined. I get two objects returned. One is an object containing functions: then, catch, and finally. Another is a boolean -- true. Is there anyway that groupby can append these to a list?

http://stackoverflow.com/comment/43440879
comment on: http://stackoverflow.com/q/27505460
score: 0
type: Comment
type: QuestionComment
has text: possible duplicate of [Converting milliseconds to a date (jQuery/JS)](http://stackoverflow.com/questions/4673527/converting-milliseconds-to-a-date-jquery-js)

http://stackoverflow.com/comment/43619348
type: Comment
has text: Thanks. I think this one covers most of the scenarios so far.
type: AnswerComment
comment on: http://stackoverflow.com/a/27597675
score: 0

http://stackoverflow.com/a/27495546
score: 0
has comment: http://stackoverflow.com/comment/43422869
type: Answer
upvote count: 1
downvote count: 1
answers question: http://stackoverflow.com/q/27495510
has body: You've got multiple items there with the same id, which is not allowed in HTML. IDs should be unique. If you switch your id's to classes it may work for you. I'm not very familiar with jQuery UI's resizable, but from the documentation it looks like you don't need to supply the handles?

jqplot
tags question: http://stackoverflow.com/q/27515582
tag name: jqplot
tags question: http://stackoverflow.com/q/27538657
type: Tag
tags question: http://stackoverflow.com/q/27598306

http://stackoverflow.com/q/27608578
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/27608670
has title: javascript datetime to string and back to datetime?
accepted answer: http://stackoverflow.com/a/27608722
has comment: http://stackoverflow.com/comment/43640052
tagged with: datetime
has answer: http://stackoverflow.com/a/27608722
type: AnsweredQuestion
downvote count: 0
score: 13
type: Question
possible better answer: http://stackoverflow.com/a/27608670
upvote count: 13
answer count: 2
has body: if you had to store the current javascript datetime in a string what would it look like and could you convert it back to a datetime for javascript to read? What I am trying is not working given the current xml string of Tue Dec 23 12:02:08 EST 2014 var xmlImagePath = $(this).find('pathName').text(); var xmlStartTime = $(this).find('startTime').text(); xmlStartTime = new Date(xmlStartTime); var fortnightAway = new Date(xmlStartTime); var numberOfDaysToAdd = 14; fortnightAway.setDate(fortnightAway.getDate() + numberOfDaysToAdd); if (fortnightAway &lt; xmlStartTime) { alert("here"); } I do not believe xmlStartTime = new Date(xmlStartTime); is setting the xmlStartTime to a datetime object.. Also, What is the correct format to store the datetime into the xml so that it is easier to test later?

http://stackoverflow.com/comment/43438814
score: 0
has text: Why are you doing it this way, and not just putting the function `serialise` directly on the `Mammal` prototype? Also, why do you have `Mammal.constructor = Mammal`?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27504164

http://stackoverflow.com/comment/43612250
score: 0
type: AnswerComment
type: Comment
has text: Ah yes - I see. http://plnkr.co/edit/GeQDjP9h6hbAVPacynyI?p=preview Second paramater to filter forces exact match just add :true to the end of the filter line. filter:{...}:true
comment on: http://stackoverflow.com/a/27515181

http://stackoverflow.com/q/27602256
type: Question
score: -1
has body: How to get the Values that is inside First Element and Second Element from Update (due to wrong edit in Question) var data = { "0": [ "The VehicleNumber has already been taken." ], "2": [ "The VehicleCode has already been taken." ]} i.e., First = The 0 has already been taken. Second = The 2 has already been taken.
upvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27602379
has comment: http://stackoverflow.com/comment/43626926
has answer: http://stackoverflow.com/a/27602299
has answer: http://stackoverflow.com/a/27602329
answer count: 4
has title: How to get the Values that is inside First Element and Second Element from array
type: UnansweredQuestion
downvote count: 1
has answer: http://stackoverflow.com/a/27602296

http://stackoverflow.com/a/27631429
has body: The code you got will produce html like this But the code you changed will produce like this You cannot write script tag inside a script tag. That's why it producing error
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/27631383
score: 1
downvote count: 0

http://stackoverflow.com/q/27584692
has comment: http://stackoverflow.com/comment/43594148
has comment: http://stackoverflow.com/comment/43593967
score: 1
upvote count: 1
has body: I'm in the process of refining a translation script, and the script itself actually works fine (on most computers). We've found that the script does not work correctly on computers where the native language is not English. The script is as follows: $('.translation-links a').click(function(e) { e.preventDefault(); var lang = $(this).data('lang'); $('#google_translate_element select option').each(function(){ if($(this).text().indexOf(lang) != -1) { $(this).parent().val($(this).val()); var container = document.getElementById('google_translate_element'); var select = container.getElementsByTagName('select')[0]; triggerHtmlEvent(select, 'change'); } }); }); The .translation-links a would be something like: Afrikaans The line with the problem is if($(this).text().indexOf(lang) != -1) { We've narrowed it to that line through troubleshooting, but we're wondering if there is another way to write it to possibly prevent the issue. Maybe an alternative to indexOf? We're not sure exactly why the native language matters, so if somebody has some insight into that as well we'd appreciate it!
type: Question
has comment: http://stackoverflow.com/comment/43593988
has comment: http://stackoverflow.com/comment/43594050
tagged with: javascript
tagged with: jquery
has title: Is there an alternative to indexOf for jQuery?
tagged with: google-translate
has comment: http://stackoverflow.com/comment/43593979
has comment: http://stackoverflow.com/comment/43593954
has comment: http://stackoverflow.com/comment/43594002
has answer: http://stackoverflow.com/a/27584937
downvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43593946
has comment: http://stackoverflow.com/comment/43594011
linked to: http://stackoverflow.com/q/10406300
has comment: http://stackoverflow.com/comment/43594175

http://stackoverflow.com/comment/43394258
comment on: http://stackoverflow.com/q/27480621
has text: Maybe rewriting the functions is an option, however the function I wanted to use uses CryptoJS and I couldn't find how to replicate it.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43604885
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27590114
has text: PatrickStahel:You can project the angles to a plane. For example mercator projection.
type: Comment

regex
tags question: http://stackoverflow.com/q/27534981
tags question: http://stackoverflow.com/q/27529589
tags question: http://stackoverflow.com/q/27609056
tags question: http://stackoverflow.com/q/27553556
tags question: http://stackoverflow.com/q/27497305
tags question: http://stackoverflow.com/q/27568295
tags question: http://stackoverflow.com/q/27543623
tag name: regex
tags question: http://stackoverflow.com/q/27477934
tags question: http://stackoverflow.com/q/27625510
tags question: http://stackoverflow.com/q/27504482
tags question: http://stackoverflow.com/q/27486452
tags question: http://stackoverflow.com/q/27476907
tags question: http://stackoverflow.com/q/27619583
tags question: http://stackoverflow.com/q/27540105
tags question: http://stackoverflow.com/q/27546774
tags question: http://stackoverflow.com/q/27574691
tags question: http://stackoverflow.com/q/27541497
tags question: http://stackoverflow.com/q/27535263
tags question: http://stackoverflow.com/q/27550973
tags question: http://stackoverflow.com/q/27558321
tags question: http://stackoverflow.com/q/27610179
tags question: http://stackoverflow.com/q/27553003
tags question: http://stackoverflow.com/q/27544855
tags question: http://stackoverflow.com/q/27588291
tags question: http://stackoverflow.com/q/27595476
tags question: http://stackoverflow.com/q/27632891
tags question: http://stackoverflow.com/q/27536536
tags question: http://stackoverflow.com/q/27566009
tags question: http://stackoverflow.com/q/27508447
tags question: http://stackoverflow.com/q/27622069
tags question: http://stackoverflow.com/q/27492882
tags question: http://stackoverflow.com/q/27538607
tags question: http://stackoverflow.com/q/27497152
tags question: http://stackoverflow.com/q/27636646
tags question: http://stackoverflow.com/q/27476388
tags question: http://stackoverflow.com/q/27566685
tags question: http://stackoverflow.com/q/27611112
tags question: http://stackoverflow.com/q/27596586
tags question: http://stackoverflow.com/q/27480971
tags question: http://stackoverflow.com/q/27628746
tags question: http://stackoverflow.com/q/27560612
tags question: http://stackoverflow.com/q/27509722
tags question: http://stackoverflow.com/q/27635343
tags question: http://stackoverflow.com/q/27505343
tags question: http://stackoverflow.com/q/27518104
tags question: http://stackoverflow.com/q/27557767
tags question: http://stackoverflow.com/q/27545810
tags question: http://stackoverflow.com/q/27604492
tags question: http://stackoverflow.com/q/27628318
tags question: http://stackoverflow.com/q/27526446
tags question: http://stackoverflow.com/q/27551345
tags question: http://stackoverflow.com/q/27597638
tags question: http://stackoverflow.com/q/27510916
tags question: http://stackoverflow.com/q/27486757
tags question: http://stackoverflow.com/q/27613240
tags question: http://stackoverflow.com/q/27590666
tags question: http://stackoverflow.com/q/27598917
tags question: http://stackoverflow.com/q/27585806
tags question: http://stackoverflow.com/q/27525139
tags question: http://stackoverflow.com/q/27487425
tags question: http://stackoverflow.com/q/27576711
tags question: http://stackoverflow.com/q/27525659
tags question: http://stackoverflow.com/q/27512629
tags question: http://stackoverflow.com/q/27545202
tags question: http://stackoverflow.com/q/27591005
tags question: http://stackoverflow.com/q/27585709
tags question: http://stackoverflow.com/q/27556492
tags question: http://stackoverflow.com/q/27564259
tags question: http://stackoverflow.com/q/27491752
tags question: http://stackoverflow.com/q/27588155
tags question: http://stackoverflow.com/q/27565613
tags question: http://stackoverflow.com/q/27588579
tags question: http://stackoverflow.com/q/27490725
tags question: http://stackoverflow.com/q/27565074
tags question: http://stackoverflow.com/q/27581593
tags question: http://stackoverflow.com/q/27554095
tags question: http://stackoverflow.com/q/27532393
tags question: http://stackoverflow.com/q/27494283
tags question: http://stackoverflow.com/q/27516990

http://stackoverflow.com/a/27593519
answers question: http://stackoverflow.com/q/27593505
score: 0
has body: . operates on the result of the preceding expression. For example, angular.module('project', ['ngRoute', 'firebase']) returns a module object, which you can call .value on.
has comment: http://stackoverflow.com/comment/43620099
type: Answer
upvote count: 1
downvote count: 1

http://stackoverflow.com/comment/43532057
score: 0
type: AnswerComment
has text: I didn't see anything about DNS in your question. The hosts file will only update how your server handles requests. If your API requests are running from the browser, it won't help. Can you provide more details about what you're trying to do, and what isn't working? What is the backend? How is it being called? Where do you see the 400 errors?
type: Comment
comment on: http://stackoverflow.com/a/27552775

http://stackoverflow.com/comment/43482507
type: Comment
has text: @adeno I was about to suggest that the [MDN documentation for `.apply`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply) has a good illustration of `Math.min()` and `Math.max()`. Your example is similar to Mozilla's.
comment on: http://stackoverflow.com/q/27526930
score: 0
type: QuestionComment

http://stackoverflow.com/q/27479169
tagged with: java
tagged with: http://stackoverflow.com/tag/json
type: Question
has answer: http://stackoverflow.com/a/27479415
has body: In my project, I used JSON to pass readed data from database to client side.In this code I put JSONObject in to JSONArray and pass to client side. This my code for JsonProcessing.java servlet: JSONObject obj = new JSONObject(); JSONArray objarr = new JSONArray(); //read from DB sql = "SELECT id, name FROM test"; ResultSet rs = stmt.executeQuery(sql); while (rs.next()) { // Retrieve by column name int id = rs.getInt("id"); String first = rs.getString("name"); obj.put("name", first); obj.put("id", id); objarr.add(obj); System.out.print("\nobj: "+obj); } response.setContentType("application/json"); response.setCharacterEncoding("UTF-8"); PrintWriter out = response.getWriter(); out.print(objarr); out.flush(); And this is my javascript code: $.ajax({ url : "/test/JsonProcessing", type : "get", data : { id : 30 }, success : function(info) { //alert(info.name); console.log(info); for (var i = 0; i &lt; info.length; i++) { alert(i + ": " + info[i].name + " " + info[i].id); } // data: return data from server }, error : function() { alert('Faild'); // if fails } }); I don't know why I take duplicate same result in alert ?
tagged with: javascript
has title: JSONArray duplicate same result
downvote count: 2
upvote count: 10
answer count: 1
score: 8
has comment: http://stackoverflow.com/comment/43392151
favorite count: 0
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27479415

http://stackoverflow.com/comment/43477308
type: Comment
comment on: http://stackoverflow.com/a/27492555
has text: Is it a requirement that it can be used in a switch? (ErrorCodeAuthority.ENTITY_NOT_FOUND) because that is making it pretty hard with the java enum style in TypeScript.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43586789
comment on: http://stackoverflow.com/a/27559924
type: AnswerComment
type: Comment
score: 0
has text: I have altered the line you specified in the answers below however, things seem to be the same. Really would appreciate any assistance you could provide here, many thanks

http://stackoverflow.com/a/27548539
answers question: http://stackoverflow.com/q/27547980
accepted answer of: http://stackoverflow.com/q/27547980
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: You can create validation with type PL/SQL expression and implement any validation logic there, like this: (:P_NUMBER_ITEM = 1 and :P_STRING_ITEM is not null) or :P_NUMBER_ITEM &lt;&gt; 1 In this example validation requires NOT NULL value in P_STRING_ITEM only when P_NUMBER_ITEM Is equal 1.
score: 2
upvote count: 2

http://stackoverflow.com/q/27530618
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27530880
favorite count: 0
has body: I want to display the records on details page when user click on next button then he should be able to display the next record of table. Suppose user select the details of a particular record id 1 he get the details of that id 1 at the same time on the same page by clicking the next button user should be able to get the record of id 2 and vice versa. I have done it but getting some error when table has no such id named id 3 after id 1 and id 2 its showing me the error. Please help me to find out where i am wrong. View @model WebApp.ViewModels.ViewTeamList @Model.TeamDetails.TeamName @* *@ Previous Next Edit @* *@ @Html.CustomLabel("lblTeam","CT Team Name:") @Model.TeamDetails.TeamName @Html.CustomLabel("lblDescription","Description:") @Model.TeamDetails.Description @Html.CustomLabel("lblCTUserCount","User Count") @Model.TeamDetails.UserCount Controller public ActionResult Next(int dataid) { dataid++; ViewTeamList viewTeamList = new ViewTeamList(); viewTeamList.ViewTeamDetails(dataid); return PartialView("_ViewTeamDetails", viewTeamList); } View model public class ViewTeamList { public TeamDetails TeamDetails; private ITeamService teamService; public ViewTeamList() { } public void ViewTeamDetails(int Id) { teamService = new TeamService(pDbContext); TeamDetails = teamService.GetTeamDetails(Id); //return (TeamDetails.First()); } } Please help where i am doing wrong.
has answer: http://stackoverflow.com/a/55011632
has comment: http://stackoverflow.com/comment/43502889
score: 2
upvote count: 2
type: UnansweredQuestion
type: Question
tagged with: asp.net-mvc
has comment: http://stackoverflow.com/comment/43515764
has title: show records on same details page by clicking next button in asp.net mvc getting error
answer count: 2
has comment: http://stackoverflow.com/comment/43515525
downvote count: 0

http://stackoverflow.com/comment/43669190
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27624316
has text: But `a` has no `someFunction()` -- it only has `b()`. It's `c` that has it...
score: 0

http://stackoverflow.com/comment/43390276
type: QuestionComment
comment on: http://stackoverflow.com/q/27477229
score: 0
has text: why not apply a unique id on home page and then target that id to apply class?
type: Comment

http://stackoverflow.com/q/27526034
has body: I try to make a POST call from a javascript client to a foursquare API called addvenue. This the API endpoint documentation link. But the server returns 405 - Method not allowed. Here is the snippet making the call var postdata = {'oauth_token':$scope.access_token_foursquare, 'v':'20141217','name':'randomlisting', 'll':'44.3,37.2','m':'foursquare'}; var req = { method: 'POST', url: 'https://api.foursquare.com/v2/venues/add', headers: { 'content-type': 'application/x-www-form-urlencoded' }, data: postdata } $http(req).then(function(response){ console.log(response); }); Following is the Request and response packet for the above call. Remote Address:103.245.222.185:443 Request URL:https://api.foursquare.com/v2/venues/add Request Method:OPTIONS Status Code:405 Method Not Allowed **Request Headers** Accept:*/* Accept-Encoding:gzip, deflate, sdch Accept-Language:en-US,en;q=0.8 Access-Control-Request-Headers:accept, authorization, content-type Access-Control-Request-Method:POST Connection:keep-alive Host:api.foursquare.com Origin:http://localhost:9000 Referer:http://localhost:9000/foursquare User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 **Response Headers** Accept-Ranges:bytes Access-Control-Allow-Origin:* Connection:Keep-Alive Content-Length:90 Content-Type:application/json; charset=utf-8 Date:Wed, 17 Dec 2014 12:15:15 GMT Keep-Alive:timeout=10, max=50 Server:nginx Tracer-Time:1 Via:1.1 varnish X-Cache:MISS X-Cache-Hits:0 X-Served-By:cache-sn87-SIN I also studied about CORS issue. In my case the server is allowing all origins, as seen in the response headers. I am struck with this issue and could not proceed further. Any help would be appreciated. Thanks in advance.
has answer: http://stackoverflow.com/a/43108391
type: Question
score: 5
upvote count: 5
tagged with: javascript
has comment: http://stackoverflow.com/comment/43485143
tagged with: http-post
tagged with: cors
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/43480676
linked to: http://stackoverflow.com/q/19554414
favorite count: 0
has title: $http POST call in angularjs returns HTTP status code 405
tagged with: foursquare
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/62014319

http://stackoverflow.com/comment/43684566
comment on: http://stackoverflow.com/a/27632070
type: Comment
has text: If you use `document` to select elements before the window has loaded, it's undefined because the window is what contains all the HTML. If the window hasn't finished loading, there is no HTML to select. And it's alright.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43583726
score: 0
type: Comment
has text: There is code parts missing. I didn't want to post the whole lot so I just posted what I thought was relevant. I'm searching for the function now using notepad++ When I tried to use ajax methods I kept getting 'function undefined' errors.
comment on: http://stackoverflow.com/a/27579456
type: AnswerComment

http://stackoverflow.com/a/27573748
answers question: http://stackoverflow.com/q/27573020
type: Answer
accepted answer of: http://stackoverflow.com/q/27573020
score: 1
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has body: @Deebs, I expanded on your proposal since I believe the expected behavior in mobile would be for the #demo div to be hidden and to be shown/hidden when clicking on #button. // Pure JS document.getElementById("button1").addEventListener("click", function() { var disp = document.getElementById("demo1").style.display; document.getElementById("demo1").style.display = disp === "" || disp == "none" ? "block" : "none"; this.innerHTML = disp === "" || disp === "none" ? "Hide" : "Show"; }); // jQuery $("#button2").on("click", function() { $("#demo2").toggle(); $("#button2").text( $("#demo2").css("display") === "block" ? "Hide" : "Show" ); }); #demo1, #demo2 { display:none; } #button1, #button2 { display:block; } Pure JS: Show Warrior Adventurer Mage jQuery: Show Warrior Adventurer Mage

http://stackoverflow.com/comment/43460392
has text: @try-catch-finally: Everything works perfectly. I just want to add some subtle niceness.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27512641

http://stackoverflow.com/q/27567703
answer count: 1
accepted answer: http://stackoverflow.com/a/27568929
has title: HighChart: add data series dynamically with dynamically added categories on yAxis
has body: I've run into an interesting issue where I cannot add a point with an xAxis of type 'datetime' and a yAxis with dynamic categories and dynamically added series's $(document).ready(function() { drawScatter(); $('#addSeries').on('click', function() { //first check if value is already a series var currentDate = new Date(); var id = document.getElementById('txtValue').value; getSeriesIndexByEventID(eventid, function(index) { //if it doesnt exist, add it to chart if (index == -1) { categories.push(id + ' category'); console.log(categories); chart.yAxis[0].setCategories(categories); idSeries.push({name: id+ 'n', data: [categories.length-1, [{x: currentDate.getTime()}]]}); chart.addSeries(idSeries[idSeries.length-1]); console.log(chart.series[categories.length-1]); } }); }); }): Here is a jsfiddle http://jsfiddle.net/5L59r1qt/10/ I want to be able to click the button and with the text inside add it as a series. It does that but it won't do the correct time!
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27568929
type: Question
tagged with: highcharts
tagged with: javascript
score: 0

http://stackoverflow.com/comment/43415421
type: AnswerComment
has text: No, id is not Auto Increment, when I set $count to 2 or 3, in mysql database i have only the last record!
type: Comment
score: 0
comment on: http://stackoverflow.com/a/27489494

http://stackoverflow.com/q/27571189
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43572147
has title: Convert a JavaScript string array into a Java string array
linked to: http://stackoverflow.com/q/17440164
linked to: http://stackoverflow.com/q/8853986
has comment: http://stackoverflow.com/comment/43568315
has comment: http://stackoverflow.com/comment/43568089
tagged with: java
duplicate of: http://stackoverflow.com/q/8853986
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/43567890
score: 0
has body: I'm using Apache Tomcat for my study project and I want to convert a JavaScript array into a Java array. Is that possible? I saw some questions before but that didn't really answer my question. If there's a way to do that, would you like to give a little explanation?

http://stackoverflow.com/comment/43536114
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27554831
has text: Are you willing to use jQuery?

http://stackoverflow.com/comment/43470837
type: Comment
has text: That is not answer @RajShakya, but it is a comment.
score: 0
comment on: http://stackoverflow.com/q/27520418
type: QuestionComment

http://stackoverflow.com/comment/43904113
has text: If you still need a more in-depth recommendation, try the [Software Recs](http://softwarerecs.stackexchange.com) stack.
comment on: http://stackoverflow.com/q/27524069
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43514516
comment on: http://stackoverflow.com/q/27536997
has text: Thanks! Turns out it was the global declaration that screwed me up. It wasn't really intentional, and I think my past c++ experience is to blame here - variables like that are still local there, unless modified in the same look. To be honest, I feel kind of stupid now, but thanks everyone! EDIT: Stephen P, if you post it as a official answer rather than a comment, I'll mark it as the right one.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43616093
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27596093
score: 0
has text: `abstract` is not a reserved word.

http://stackoverflow.com/comment/43490288
has text: Post a code sample, or link to live code. You'll need to search the javascript, nothing will show up in the console (in this case) unless the code says to log something there.
score: 1
comment on: http://stackoverflow.com/q/27530853
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43616935
type: Comment
has text: So, without scope : {}, superhero directive is shared thrice to other directives with same scope and with scope: {}, the superhero directive is shared thrice other directives with individual scopes.
type: AnswerComment
comment on: http://stackoverflow.com/a/27596530
score: 0

http://stackoverflow.com/comment/43385646
type: Comment
type: QuestionComment
has text: What exactly is your question?
score: 0
comment on: http://stackoverflow.com/q/27475641

http://stackoverflow.com/comment/43462261
comment on: http://stackoverflow.com/q/27515503
type: Comment
type: QuestionComment
has text: Do people still save web pages?
score: 1

http://stackoverflow.com/q/27502749
favorite count: 0
has answer: http://stackoverflow.com/a/27503040
accepted answer: http://stackoverflow.com/a/27503040
has body: I want to print parent domain name in my iframe. Is it possible? Share your idea. Thanks in advance. :) Parent page iframe page (test.php) Parent Domain Name
upvote count: 0
tagged with: iframe
downvote count: 2
has title: I want to print parent url in my iframe. Is it possible?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43435969
score: -2
has comment: http://stackoverflow.com/comment/43435836
type: Question
answer count: 1
has comment: http://stackoverflow.com/comment/43435808
tagged with: javascript

http://stackoverflow.com/comment/43415945
type: QuestionComment
has text: @KevinB - assigment *can be done* in a condition, even if it's not very good practice, so it's not really an error.
comment on: http://stackoverflow.com/q/27492154
score: 0
type: Comment

http://stackoverflow.com/comment/43603676
comment on: http://stackoverflow.com/a/27589583
type: AnswerComment
has text: @Toniq I think it has at least three (perhaps subjective) advantages. (1) Named function is accessible from the scope of the constructor even if value of property gets changed from outside. (2) Code in constructor is a bit cleaner since you don't have `this` or `self` all over the place. (3) Code in constructor is cleaner because you visually separate the implementation of the function from whether it is public or not. First you define all the functions, then you assign only the public ones to properties, so at a glance you can easily see what is public and what is not.
type: Comment
score: 0

http://stackoverflow.com/q/27553178
type: Question
has comment: http://stackoverflow.com/comment/43532637
tagged with: javascript
has title: Open a page and fill inputs with bookmarklet
has comment: http://stackoverflow.com/comment/43534031
tagged with: bookmarklet
upvote count: 1
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/8963688
linked to: http://stackoverflow.com/q/11292786
has comment: http://stackoverflow.com/comment/43532797
answer count: 0
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43532763
has body: Is it possible to use a bookmarklet to open a page then autofill some information on it? For instance this site, then fill in all of the text with my info and check the checkbox. Is this achievable? If so can you please provide an example?
linked to: http://stackoverflow.com/q/26573076

http://stackoverflow.com/comment/80120495
comment on: http://stackoverflow.com/a/27612348
score: 0
type: AnswerComment
has text: What about ESLint? I'm trying with `"linting.prefer": ["ESLint"]` but it seems that it doesn't work
type: Comment

http://stackoverflow.com/comment/43401650
has text: To see how you use $compile correctly see: [Angular Compile How it works, how to use](http://www.benlesh.com/2013/08/angular-compile-how-it-works-how-to-use.html). I was just thinking why you don't append the Raphael object to the DOM in your directive?
type: Comment
comment on: http://stackoverflow.com/a/27483261
type: AnswerComment
score: 0

http://stackoverflow.com/a/28638768
has body: Add an error event handler to the images. On Chrome 40, it is triggered when the image is missing or when the browser does not know how to display it: &lt;script&gt; var errors = []; function fallback(elt) { if(errors[elt.src]) return; // you should also extract the extension in order to test lena.bpg, lena.png, lena.jpg and not lena.bpg.png, lena.bpg.png.jpg errors[elt.src] = true; console.error('could not load image, falling back'); elt.src = elt.src + '.png'; // stop trying elt.onerror= function(){}; } &lt;/script&gt; &lt;img src="test.html" onerror="fallback(this);" width=300 height=300 /&gt; Pros: no memory/cpu usage on the client part. Cons: need to provide alternate images on the server. I believe you could declare a global error listener on all img tags so this would work for future images too.
has comment: http://stackoverflow.com/comment/45592650
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27586134
has comment: http://stackoverflow.com/comment/45585152

http://stackoverflow.com/comment/43654872
comment on: http://stackoverflow.com/a/27616594
score: 1
has text: Now for the font size, you can always use em instead of px, therefore you can have a more responsive feel of the font-size.
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27573795
answers question: http://stackoverflow.com/q/27573573
has body: Here is how you can do it using Javascript/jQuery: var value = $("#textBox").val(); $("#decreaseNumber").click(function(){ value -= 50; $("#textBox").val(value); }); $("#increaseNumber").click(function(){ value += 50; $("#textBox").val(value); }); I also recommend changing the input type to number: &lt;input id="textBox" type="number" value="0"&gt; var value = $("#textBox").val(); $("#decreaseNumber").click(function() { value -= 50; $("#textBox").val(value); }); $("#increaseNumber").click(function() { value += 50; $("#textBox").val(value); }); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;input id="decreaseNumber" type="button" value="-"&gt; &lt;input id="textBox" type="number" value="0"&gt; &lt;input id="increaseNumber" type="button" value="+"&gt;
score: 0
type: Answer

http://stackoverflow.com/comment/43490500
type: QuestionComment
type: Comment
has text: Server.HtmlEncode doesn't do anything for single quotes.
score: 0
comment on: http://stackoverflow.com/q/27530729

http://stackoverflow.com/comment/43565096
score: 0
comment on: http://stackoverflow.com/a/27568585
type: Comment
has text: callback inside JSON or not? you have it both ways
type: AnswerComment

http://stackoverflow.com/a/27560974
answers question: http://stackoverflow.com/q/27560883
score: 0
type: Answer
has body: From the top of my head (not tested!): yourTime = startTime; while(yourTime &lt; endTime){ yourTime.setMinutes(yourTime.getMinutes() + 80); dateArray.push(yourTime); }

http://stackoverflow.com/comment/43398204
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27480143
type: Comment
has text: i get the same output which is 1 when i run this code

http://stackoverflow.com/comment/43500026
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27535780
has text: this SO question may help. It explains Array.apply to fill an array with data efficiently http://stackoverflow.com/questions/1295584/most-efficient-way-to-create-a-zero-filled-javascript-array
score: 1

http://stackoverflow.com/a/27510154
downvote count: 0
answers question: http://stackoverflow.com/q/27509674
type: Answer
has body: I'm guessing that your question is that you aren't getting the data from the database? If so, it looks like your missing a line of code that reads the information your getting from the query. I believe that this is what it should look like... &lt;?php $dbhost = 'localhost'; $dbuser = 'root'; $dbpass = 'password'; $db = 'base'; $conn = mysql_pconnect($dbhost,$dbuser,$dbpass); mysql_select_db($db, $conn); $result = mysql_query("SELECT * FROM mbblog ORDER BY id DESC"); $mbblog = mysql_fetch_assoc($result); $news = $mbblog['short_news']; mysql_close($conn); ?&gt; And if you wanted it to automatically update (say every 5 seconds) you could use AJAX, simply place the code above on an external page making sure it echos your $news variable, and using a JavaScript loop, update the content of a &lt;div&gt; using AJAX to call the content of the external page every time the loop runs. That would work something like this... window.setInterval(function get() { var xmlhttp; if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET","LOCATION_OF_CODE.php?session=" + Math.random(),true); xmlhttp.send(); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200) { document.getElementById("ELEMENT_TO_DISPLAY_CONTENT").innerHTML=xmlhttp.responseText; } } }, 5000); So for your marquee code, you would place a &lt;div&gt; tag inside the &lt;marquee&gt; and give it an ID to link to the AJAX. Hope this helps!
upvote count: 1
score: 1

http://stackoverflow.com/a/27632427
downvote count: 0
has body: You have not set the renderer for legend. Set renderer to $.jqplot.EnhancedLegendRenderer So the legend object would look like this: legend:{ renderer: $.jqplot.EnhancedLegendRenderer, show:true, placement:'outside', rendererOptions: { numberRows: 2, numberColumns: 2 }, location:'s', marginTop: '40px', border:'none' } IMP: Also make sure, you have included the jqplot.enhancedLegendRenderer.min.js and jquery.jqplot.min.css files in the script and link tag(s) respectively. You can check the working fiddle here: Stacked Bar Chart with Legends Would like you to check the External Resources section on the left pane after you visit the above link. You can check the included JS and CSS files there. Hope it helps. :-)
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27598306
has comment: http://stackoverflow.com/comment/43817655
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27598306
has comment: http://stackoverflow.com/comment/43766499
has comment: http://stackoverflow.com/comment/43781474
has comment: http://stackoverflow.com/comment/43817977
type: Answer
score: 2

http://stackoverflow.com/comment/43531671
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27535217
score: 0
has text: Ah, this was a surprise to me... (but perhaps it shouldn't) `var x=[]; x["a"]=1; console.log(x.length); // prints 0`

http://stackoverflow.com/a/27577951
has comment: http://stackoverflow.com/comment/43582167
has comment: http://stackoverflow.com/comment/43616766
has comment: http://stackoverflow.com/comment/43586070
has comment: http://stackoverflow.com/comment/43617197
has body: It's not fully clear from you description what "run correctly" means, so I'm going to guess a bit. You want to have a reservation object (that lives in the parent scope of the ng-repeat) hold the properties of N people. In other words, if you had a ReservationCtrl, you want it to have an object of the following form: $scope.reservation = [ {name: "Foo", gender: "male", age: 23}, {name: "Bar", gender: "female", age: 18}, // and so on... ]; So, define a controller: app.controller("ReservationCtrl", function($scope){ $scope.reservation = [{}]; // array with the an uninitialized person $scope.addPerson = function(){ $scope.reservation.push({}); } }); Then in the View: Male: Female: Add another person plunker
answers question: http://stackoverflow.com/q/27577528
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43620591
accepted answer of: http://stackoverflow.com/q/27577528
score: 0
type: Answer

http://stackoverflow.com/q/27582971
has body: I have an object called classes, which looks like this: Object {d1: Array[6], a1: Array[6]}; I add a new array: classes.b1 = [{"id":1,"vprasan":true},{"id":2,"vprasan":true}] How can I sort this object, so it looks like this: Object {a1: Array[6], b1: Array[6], d1: Array[6]};
type: UnansweredQuestion
tagged with: arrays
tagged with: javascript
has title: How to sort javascript object which contains arrays?
tagged with: sorting
linked to: http://stackoverflow.com/q/8900732
type: Question
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/27583368
has answer: http://stackoverflow.com/a/27583430
has answer: http://stackoverflow.com/a/27583003

http://stackoverflow.com/comment/43572692
score: 1
type: QuestionComment
has text: how your html looks like?
comment on: http://stackoverflow.com/q/27573064
type: Comment

http://stackoverflow.com/q/27529057
downvote count: 0
answer count: 1
tagged with: meteor
favorite count: 0
accepted answer: http://stackoverflow.com/a/27530257
tagged with: angularjs
has body: I'm a newbie who's trying to build a meteor app, and I was looking to cut some time by using a commercial theme. Let's take this as an example: http://themeforest.net/item/metronic-responsive-admin-dashboard-template/4021469?WT.ac=category_item&amp;WT.seg_1=category_item&amp;WT.z_author=keenthemes I have two options: 1) Use the html to create meteor templates, using spacebars tags, etc. But how would I implement the theme javascript? doesnt it comes in conflict with meteor? 2) Use angular.js, as the theme is provided in angular.js format other than plain html. But wouldnt this create conflicts? is this a better approach? In general, what is the easiest and best way to use commercial themes with meteor?
type: AnsweredQuestion
upvote count: 3
type: Question
has title: How to use commercial themes with meteor.js
has answer: http://stackoverflow.com/a/27530257
tagged with: javascript
score: 3

http://stackoverflow.com/q/27633089
upvote count: 1
type: Question
downvote count: 0
tagged with: javascript
has body: Sorry if this isn't the proper way to ask this. I do not have 'reputation 50' to comment on a response to an identical question, and etiquette says I should not 'Answer' with a question. I have the same problem as described in Add data to line chart using chart.js but the solution does not work for me. I am running a newer version of Chart.js (1.0.1-beta.4), and I have tried the older version 1.0.1-beta.3 as suggested. Everything works for me except addData(). I have commented out other methods that do work. BTW, it is not clear to me how addData() targets a specific dataset within the Chart. The documentation says: The values array passed into addData should be one for each dataset in the chart. However, I am only using one dataset. Below is my code made as trivial as possible to demonstrate my problem. The error I get is: Uncaught TypeError: Cannot read property 'points' of undefined I'm using Linux Mint 17 and Chrome Version 39.0.2171.71 (64-bit). Line Chart
has comment: http://stackoverflow.com/comment/43688864
answer count: 1
favorite count: 0
type: UnansweredQuestion
has title: Adding data to line chart using addData() method in Chart.js
tagged with: chart.js
score: 1
linked to: http://stackoverflow.com/q/25625131
has answer: http://stackoverflow.com/a/27635205

http://stackoverflow.com/a/27568969
has body: You can try this: require(["superagent"], function(superagent){ console.log(superagent) // there your code })
has comment: http://stackoverflow.com/comment/43564106
answers question: http://stackoverflow.com/q/27568461
has comment: http://stackoverflow.com/comment/43563981
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/43563754

http://stackoverflow.com/q/27507130
has body: I am interested to know where is local data stored in Android devices when we use one of the following approaches to save our data locally? localStorage IndexedDB WebSQL Is they save in Android folder where other apps data has been saved or another places?!
tagged with: javascript
has comment: http://stackoverflow.com/comment/43473868
score: 0
has title: Where is data stored in hybrid mobile apps?
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/43472373
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43473565
tagged with: intel-xdk
tagged with: hybrid-mobile-app
has answer: http://stackoverflow.com/a/37476081
type: Question

http://stackoverflow.com/a/27514185
has comment: http://stackoverflow.com/comment/43459090
score: 5
upvote count: 5
answers question: http://stackoverflow.com/q/27513504
downvote count: 0
has body: That can't be done with object literals. Try this: var a = 'obj2'; var pushObj = {}; pushObj[a + '.array'] = { "field3": "text3" }; db.collection('fooCollection').update({ 'id':1234 }, { $push: pushObj });
type: Answer

http://stackoverflow.com/comment/43706860
has text: Thanks KRR, but that just tries to read past the end of the array aResponses.
comment on: http://stackoverflow.com/q/27625271
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/35407924
type: Answer
has comment: http://stackoverflow.com/comment/75967560
answers question: http://stackoverflow.com/q/27494084
upvote count: 29
score: 28
has body: HTML5 datalist workaround for Safari and/or older browsers Update, Jun 2022 Safari (untested by me) now supports the datalist tag—see this answer below. However, Firefox has some issues, as outlined on caniuse. Update, Jan 2017 Both iOS or desktop Safari still do not support datalist, and there's no sign so far of this changing. So this is a hack making it appear to get around the issue. Chris Coyier also had a go at a datalist polyfill back in 2011. Let's hope Safari implements the existing W3C Recommendation in future. Original post: You can use a select element inside the datalist, and duplicate the option tag values as readable text in these. For example: test Choose: JavaScript Haskell Ruby Go Python etc Supporting browsers will just display the datalist, Safari and older browsers will show the option tags' innerHTML. The input tag has a default border, which in Safari looks bad behind the select element, but with a little styling as shown in this example, you can get around Safari's lack of support and keep the same functional appearance. No need for Javascript and/or polyfills.
downvote count: 1
has comment: http://stackoverflow.com/comment/76255264
has comment: http://stackoverflow.com/comment/70979970
has comment: http://stackoverflow.com/comment/70979460
has comment: http://stackoverflow.com/comment/64743788

http://stackoverflow.com/comment/43870148
type: Comment
has text: @BestDayEver2015 Did you finally fix this or do you still need help?
comment on: http://stackoverflow.com/a/27633407
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43441623
score: 0
type: Comment
type: QuestionComment
has text: Can you elaborate on "multipart object" ? multiple meshes/single mesh
comment on: http://stackoverflow.com/q/27495906

onclicklistener
tag name: onclicklistener
tags question: http://stackoverflow.com/q/27636704
type: Tag

http://stackoverflow.com/a/39566624
upvote count: 1
score: -2
answers question: http://stackoverflow.com/q/27480262
has body: var date = new Date(); console.log(date.toJSON().slice(0,10).replace(new RegExp("-", 'g'),"/" ).split("/").reverse().join("/")+" "+date.toJSON().slice(11,19)); // output : 01/09/2016 18:30:00
type: Answer
downvote count: 3

http://stackoverflow.com/a/27513931
upvote count: 9
answers question: http://stackoverflow.com/q/27484911
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/43487134
has body: One way to start is by creating a service in Angular that uses $http to hit your endpoint in Express. $http returns a promise with success and error methods you can use to change state. If you're building a Single Page App (SPA) this is probably all you need to know. For example: // An Angular service that talks to Express UserService.$inject = ['$http', '$state']; function UserService($http, $state) { this.loginUser = function (user) { $http.post("/api/login", user) .success(function (data, status) { console.log('Successful login.'); console.log('data = ' + data); console.log('status = ' + status); $state.go('welcome'); // }) .error(function (data) { console.log('Error: ' + data); $state.go('somewhereelse'); }); }; $state.go is a UI Router convenience method that will render your defined state. In Express you'll want to write your own callback function for Passport to control what is returned. For example: // Express Route with passport authentication and custom callback app.post('/api/login', function(req, res, next) { passport.authenticate('local-login', function(err, user, info) { if (err) { return next(err); } if (user === false) { res.status(401).send(info.message); } else { res.status(200).send(info.message); } })(req, res, next); }); In this example, I'm using a 'local-login' Passport strategy that's working it's magic in the background. If the user is authenticated it will send a 200 back to Angular, which will in turn trigger .success. Otherwise it will send a 401 Unauthorized and fire off .error.
score: 9

http://stackoverflow.com/q/27560753
type: UnansweredQuestion
tagged with: node.js
has comment: http://stackoverflow.com/comment/43547537
linked to: http://stackoverflow.com/q/572897
has title: differences of using a prototype method vs. plain function
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/27560832
tagged with: javascript
has answer: http://stackoverflow.com/a/27561163
score: 0
has body: I have this following scenarios. I am defining a new class C and export it as a node module. I wonder what the differences are between using a plain function (method 1) vs. using a prototype method (method 2). It seems there is no global namespace pollution issue (since it is inside a module) for the helper with method 1, but method 2 actually can expose some internal stuff (here the helper method) to outside through prototypal inheritance. Any other differences (performance, etc.)? Which one should I use normally? C.prototype.func=function(){ // need to call helper, use either // helper(); // or // this.helper(); } function helper(){// method 1 } C.prototype.helper=function(){// method 2 } module.exports = C;

http://stackoverflow.com/comment/43457215
comment on: http://stackoverflow.com/q/27513195
score: 0
type: QuestionComment
type: Comment
has text: All typos are fixed. You can not even look at the code and understand "Trying to make image with these Ids hide and show on certain part of page only. Causes them to hide and show everywhere on page since they are used multiple times using same Id. "

http://stackoverflow.com/q/27626366
has answer: http://stackoverflow.com/a/29565577
type: UnansweredQuestion
has body: Are there any examples of client side auth for react? Similar to https://github.com/fnakstad/angular-client-side-auth If not, what would be a good way to handle role based showing/hiding of specific UI inside react?
has comment: http://stackoverflow.com/comment/43863265
upvote count: 18
type: Question
has answer: http://stackoverflow.com/a/34334624
tagged with: reactjs
has comment: http://stackoverflow.com/comment/43856573
downvote count: 0
score: 18
tagged with: javascript
favorite count: 0
answer count: 3
has answer: http://stackoverflow.com/a/27702786
has title: Examples of client side auth in react

http://stackoverflow.com/q/27545418
linked to: http://stackoverflow.com/q/14533585
has comment: http://stackoverflow.com/comment/44172791
has comment: http://stackoverflow.com/comment/82579600
upvote count: 6
has body: I have a problem with mozilla firefox. I am developing a web site using asp.net language and I have a button in a form. when i clicked the button at onclick attributies i am calling a function and this funtion doing postback. this scenerio is working chrome and internet exploerer. but it is not working at mozilla firefox. i am getting this error in console : TypeError: access to strict mode caller function is censored.. my sample button is : &lt;input id="Button1" type="button" onclick="sampleFunc('sample');" value="button" /&gt; and my sample function is : function sampleFunc(reqMessage) { __doPostBack('', reqMessage); } I searched on internet. and many people have rhis problem but there is no any solution. Do you have any solution about this bug (!) EDIT 1: I have found a ticket on jquery web site. According to the ticked, thay fixed that bug. But i applied same solition but my bug is continue. :(
answer count: 4
has answer: http://stackoverflow.com/a/27887519
has answer: http://stackoverflow.com/a/27545872
has title: Post back not working in Firefox for asp.net(C#) pages
has answer: http://stackoverflow.com/a/36867843
has comment: http://stackoverflow.com/comment/44259639
tagged with: postback
accepted answer: http://stackoverflow.com/a/27946169
score: 6
has comment: http://stackoverflow.com/comment/43518426
possible better answer: http://stackoverflow.com/a/36867843
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44173292
tagged with: javascript
has comment: http://stackoverflow.com/comment/43518861
type: Question
tagged with: firefox
has comment: http://stackoverflow.com/comment/43518389
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/43518989
has answer: http://stackoverflow.com/a/27946169
tagged with: asp.net
favorite count: 0

http://stackoverflow.com/comment/43624516
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27600451
type: Comment
has text: @nish: Have added full example using custom events. This is more flexible as your high-level code looks like any normal event handler.

http://stackoverflow.com/q/27501543
has comment: http://stackoverflow.com/comment/43434659
has comment: http://stackoverflow.com/comment/43434919
has comment: http://stackoverflow.com/comment/43434505
upvote count: 1
has body: Im currently trying to make a song book for eg. birthdays, weddings etc. where you choose a couple of songs and then the songs will be shown on the website in the size of A5 paper, and the users can edit some text there, before converting it to a PDF. Currently i create a new page for each song, but i would like to fill out as much space as possible. By having more than one song per page, or atleast have some verses of another song on the same page, and show the rest on next page. A5 size Height: 793.7px Width: 559.3px Song #1 1 - Lipsum Lipsum 2 - Lipsum Lipsum 3 - Lipsum Lipsum 4 - Lipsum Lipsum 5 - Lipsum Lipsum 6 - Lipsum Lipsum 7 - Lipsum Lipsum 8 - Lipsum Lipsum 9 - Lipsum Lipsum Song #2 1 - Lipsum Lipsum 2 - Lipsum Lipsum 3 - Lipsum Lipsum 4 - Lipsum Lipsum 5 - Lipsum Lipsum 6 - Lipsum Lipsum 7 - Lipsum Lipsum 8 - Lipsum Lipsum 9 - Lipsum Lipsum The green line indicates where the song should be split up and continue on next page. Lets say that = 60px height = 90px height How can i check elements height and split them into new pages (closing tags and creating a new div.songpage) when the max height is reached. max height is 793.7px. If anyone can come with an example of some sort or guide me in the right direction - i'll appreciate it!
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: Splitting data into pages depending on height (creating a printable song book)
linked to: http://stackoverflow.com/q/13907718
has comment: http://stackoverflow.com/comment/43434772
answer count: 0
downvote count: 0
type: UnansweredQuestion
score: 1
type: Question

http://stackoverflow.com/comment/43522368
comment on: http://stackoverflow.com/q/27548084
type: QuestionComment
type: Comment
score: 0
has text: You cannot set a src attribute on the script tag and have text between script tags, it has to be one or the other

http://stackoverflow.com/a/27561059
upvote count: 4
downvote count: 0
score: 4
type: Answer
has body: use getAttribute in javascript id.getAttribute("name"); or in jquery $(id).attr("name"); NOTE : in your code this will display undefined id.name so change to id.getAttribute("name");
answers question: http://stackoverflow.com/q/27561024

http://stackoverflow.com/comment/43642502
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27609687
score: 1
has text: Here's the [docs for effects on showing tabs](http://api.jqueryui.com/tabs/#option-show)

http://stackoverflow.com/comment/43387175
type: QuestionComment
type: Comment
score: 2
comment on: http://stackoverflow.com/q/27476479
has text: call it multiple times... ie use a loop.. `for(var i = 0; i<10;i++){ $('.control-prev').trigger('click');}`

http://stackoverflow.com/a/54337461
has body: Thanks for the solution - the only thing I did was add a timeout so that they could be treated as separate events var touchtime = 0; var delay = 800; var action = null; $(".target").on("click", function() { /*Double Click */ if((new Date().getTime() - touchtime) < delay){ clearTimeout(action) alert('dbl'); touchtime=0; } /* Single Click */ else{ touchtime = new Date().getTime(); action = setTimeout(function(){ alert('single'); },delay); } })); Although I haven't tested it, might also be worth adding the following to a header section of any HTML as per: To "user-scalable=no" or not to "user-scalable=no"
score: 3
downvote count: 0
answers question: http://stackoverflow.com/q/27560653
upvote count: 3
type: Answer

http://stackoverflow.com/a/27531762
has comment: http://stackoverflow.com/comment/43492938
answers question: http://stackoverflow.com/q/27531531
has comment: http://stackoverflow.com/comment/43492888
has body: Look like a weird behavior of ng-select, you need to manually tell what should be value for options in ng-options: ng-options="u.name as u.name group by u.type for u in userables" http://plnkr.co/edit/s6XqXhQHseqbu70f1HOR?p=preview //also I removed 'track by' because it's not recommended to use it with as: docs
has comment: http://stackoverflow.com/comment/43496641
has comment: http://stackoverflow.com/comment/43495681
has comment: http://stackoverflow.com/comment/43493979
score: 0
type: Answer

http://stackoverflow.com/comment/43413319
comment on: http://stackoverflow.com/q/27490725
type: QuestionComment
type: Comment
score: 1
has text: I feel like I'm reading a test question.

http://stackoverflow.com/q/27524891
type: Question
accepted answer: http://stackoverflow.com/a/27524976
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/43478434
answer count: 1
has title: Show map values in ng-select
tagged with: angularjs
has body: I want to put map values(1,2,3) into select. $scope.groups is map {'a':'1', 'b':'2', 'c':'3'} I know that by this code : I can put keys. I've tried ng-options="value for(value,g) in groups" but it failed.
has answer: http://stackoverflow.com/a/27524976
type: AnsweredQuestion

linechart
tag name: linechart
tags question: http://stackoverflow.com/q/27537970
type: Tag

http://stackoverflow.com/a/27608062
answers question: http://stackoverflow.com/q/27607876
score: 0
has body: I'd recommend logging msg so you can see how the data looks, and maybe adding a debugger; into your .done() callback to give yourself a way of experimenting with different ways of accessing the properties of msg.
type: Answer

http://stackoverflow.com/comment/43647164
type: Comment
has text: And we can answer this with no code provided?
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27606356

http://stackoverflow.com/q/27527071
favorite count: 0
has comment: http://stackoverflow.com/comment/43482783
has comment: http://stackoverflow.com/comment/43482896
score: -3
type: AnsweredQuestion
tagged with: href
accepted answer: http://stackoverflow.com/a/27527785
tagged with: onclick
has answer: http://stackoverflow.com/a/27527166
tagged with: intercept
has title: JavaScript update href and then follow it and keep intended target
downvote count: 3
has body: I have a problem. I need to update href and then follow it. It may seem that it's quite easy task, because I just could return false, create new link element and then initialise click on it or maybe just change location.href... So problem is: How to know if user held [CTRL] button or right-clicked and chose one of Open in New Tab, Open in Incognito Tab or Open in New Window... or of course simply clicked with left-button... This href must be updated on click. Mouse hover may be an option but this will fail in mobile and tablets :) P.S. if you give a negative evaluation it would be nice to know why :)
type: Question
possible better answer: http://stackoverflow.com/a/27527166
has comment: http://stackoverflow.com/comment/43482993
answer count: 2
upvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43482790
has comment: http://stackoverflow.com/comment/43483057
has answer: http://stackoverflow.com/a/27527785

http://stackoverflow.com/q/27556728
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/43539789
has title: How can i merge array of objects with underscore js
downvote count: 0
has comment: http://stackoverflow.com/comment/43539816
score: 6
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/43539762
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43539741
tagged with: underscore.js
has answer: http://stackoverflow.com/a/27556833
accepted answer: http://stackoverflow.com/a/27556833
type: Question
has body: I have an array of objects like this: array1 = [ {field: 'username', display: 'username', hide: true}, {field: 'age', display: 'Age', hide: true}, {field: 'height', display: 'Height', hide: true} ] Then I have array2: array2 = [ {field: 'username', display: 'username 123', hide: false}, {field: 'age', hide: false} ] I want to merge these two arrays by their field i.e. the final result should be: array3 = [ {field: 'username', display: 'username 123', hide: false}, {field: 'age', display: 'Age', hide: false}, {field: 'height', display: 'Height', hide: true} ] I tried var newObj = _.extend(array1, array2); but it didn't give me what I want.
tagged with: arrays
answer count: 1
upvote count: 6

http://stackoverflow.com/comment/70555975
has text: what if I'm using javascript to load YouTube player?
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/27574013
type: Comment

http://stackoverflow.com/comment/66358373
type: QuestionComment
comment on: http://stackoverflow.com/q/27565056
has text: You basically asking what is the difference between string interpolation vs string concatenation.
score: 0
type: Comment

http://stackoverflow.com/q/27596965
tagged with: asp.net
favorite count: 0
has comment: http://stackoverflow.com/comment/43617954
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27597018
has title: Throwing Error in javascript for loop
downvote count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/43618041
type: Question
tagged with: c#
score: -1
has comment: http://stackoverflow.com/comment/43617686
has body: Hi I'm using Javascript for loop to generate a string on looping C# list but I'm getting Error Error 4 The name 'eventList' does not exist in the current context My complete code is here &lt;script type="text/javascript"&gt; $(document).ready(function () { $.ajax({ type: 'POST', dataType: 'json', contentType: 'application/json', url: 'ProjectedYieldCalender.aspx/GetData', data: '{}', success: function (data) { var eventList = data.d; alert(eventList.length); // eventList = demo(eventList); initCalendar(eventList); } }); }); function initCalendar(eventList) { $('#calendar').fullCalendar({ header: { left: 'prev,next today', center: 'title', right: 'month,basicWeek,basicDay' }, //defaultDate: '2014-08-12', editable: true, eventLimit: true, // allow "more" link when too many events events: [ &lt;% for (var i = 0; i &lt; eventList.count ; i++) { %&gt; { title : eventList[&lt;%=i%&gt;].name, start : eventList[&lt;%=i%&gt;].date } &lt;% }%&gt; ] }); } &lt;/script&gt; Cany any one please let me know where am I doing mistake and please let me know how to use the count of list in for loop . I'm getting proper result if I place some static value in for loop like 'i&lt;5' in stead of 'i &lt; eventList.Count'
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/43506457
type: QuestionComment
comment on: http://stackoverflow.com/q/27539326
has text: @ArunPJohny I have many properties like that. Is there any way without watch
score: 0
type: Comment

http://stackoverflow.com/q/27580585
answer count: 1
tagged with: url
favorite count: 0
accepted answer: http://stackoverflow.com/a/27975476
tagged with: hash
tagged with: dhtmlx
has title: Back button handling in Single Page Apps?
score: 2
type: AnsweredQuestion
has body: A similar question here has been noted! I've got an SPA based exclusively on the DHTMLX toolkit (fabulous stuff incidentally). One serious UX problem is with back button handling: there is none. Their forum recommended 'any js routing library to handle state of the app in the url hash and restore it back'. I am confused by this as the SPA has only the simplest HTML, is exclusively Javascript and does most communicating via WebSockets ... does this mean I have to store state on each button click/keypress? So, ... Does the panel have any recommendations on best practices? Is there an existing library that will do this? If said library is light on examples, can anyone provide a basic how-to? Many thanks
upvote count: 3
downvote count: 1
type: Question
linked to: http://stackoverflow.com/q/2160343
tagged with: javascript
has answer: http://stackoverflow.com/a/27975476
tagged with: single-page-application

http://stackoverflow.com/comment/43545538
has text: @Kartikeya - gave you reps
comment on: http://stackoverflow.com/q/27559549
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27484612
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/27539147
tagged with: audio
type: AnsweredQuestion
type: Question
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27539147
has title: Embeding audio using textAngular
answer count: 1
tagged with: jquery
has body: I want to embed an audio file using textAngular toolbar. This is the code which I used for the purpose. userapp.config(function($provide){ $provide.decorator('taOptions', ['testFactory', 'taRegisterTool', '$delegate', function(tFact, taRegisterTool, taOptions){ console.log(taOptions); taRegisterTool('insertaudio', { iconclass: "fa fa-file-audio-o", buttontitle: 'Insert Image From Local Mechine or URL', action: function($deferred){ this.$editor().wrapSelection('inserthtml','&lt;audio controls="controls" SRC="http://olremix.org/mp3/Brunzolaitis_-_A_Link_To_OLR(Legend_of_Zelda_A_Link_to_the_Past).mp3"&gt;&lt;/audio&gt;'); $deferred.resolve(); } }); taOptions.toolbar[1].push('insertaudio'); return taOptions; }]); }); But the problem is that it omits the audio tag whenever I try to save it. I tried the taApplyCustomRenderers. But even then it is not rendering it properly. It is inserting when i press the toolbar button. But when I try to save the file it just omits the audio tag and all its attributes. Please help me

http://stackoverflow.com/comment/43559989
comment on: http://stackoverflow.com/a/27566321
score: 0
has text: you have to change this .text(0.00); => to this .text("0.00"); http://jsfiddle.net/veb4oypc/4/
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/43569929
has text: Both pages are angular. I'm using UI-Router, so I'm not actually loading another page - it's just changing the state of my application by setting the hash portion of the URL.
comment on: http://stackoverflow.com/q/27559112
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27541180
has comment: http://stackoverflow.com/comment/43510081
has comment: http://stackoverflow.com/comment/43510855
answers question: http://stackoverflow.com/q/27541105
has comment: http://stackoverflow.com/comment/43510589
has body: I think first you need to parse the Json by using jQuery.parseJSON(). Then it will return an object. var jObject = jQuery.parseJSON(jsonData); var monday = jObject.monday;
type: Answer
score: 0

http://stackoverflow.com/q/27595476
tagged with: javascript
score: 4
answer count: 1
tagged with: regex
has comment: http://stackoverflow.com/comment/43615217
favorite count: 0
accepted answer: http://stackoverflow.com/a/27595495
type: AnsweredQuestion
has title: Regex returning uncaptured group instead of captured
has body: I've run into a strange problem that I can't seem to get around... Basically, I've got this Regex that's returning the stuff that I don't have in a capture group, and it's not returning the actual captured group. Here is the Regex: "localhost/a/b/c".match(/\/a\/b\/(.*?)/g); To my knowledge, this is supposed to return ["c"]... But it returns: ["/a/b/"] What am I doing wrong? I thought captured groups were supposed to be returned, not ignored.
type: Question
upvote count: 4
has answer: http://stackoverflow.com/a/27595495
downvote count: 0

http://stackoverflow.com/a/27584342
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27582950
has body: You can solve this without using jQuery. Check out the solution below. No need to set the toggle on the ng-init directive, set it in the Controller. Use ng-click directive on the anchor tag Declare an alert function in the Directive and invoke it on ng-click, this eliminating the need for jQUery In the alert function check if the scope.toggle is true or false before you trigger the alert. HTML Hello {{name}}! Toggle Class Open the alert box! JS var app = angular.module('plunker', []); app.controller('MainCtrl', function ($scope) { $scope.name = 'World'; $scope.toggle = !$scope.toggle; }); app.directive('openAlert', function () { return { restrict: 'A', link: function (scope, element) { scope.alert = function () { if (!!scope.toggle) { alert('Yes!'); } }; } } }); JSFIDDLE

http://stackoverflow.com/a/27515604
score: 1
answers question: http://stackoverflow.com/q/27515503
type: Answer
has body: As others have illustrated already; via CTRL + S but not via the menu command Here's some jQuery that illustrates capture of the keystrokes: $(document).keydown(function(e) { if (e.key === "s" &amp;&amp; e.ctrlKey) { alert("user saved page"); } });
upvote count: 1
downvote count: 0

http://stackoverflow.com/comment/43481936
type: Comment
type: QuestionComment
has text: @codehx, but the value of map-txt input field is exactly 51.6111056367416, 0.08299685083337408!
comment on: http://stackoverflow.com/q/27526588
score: 0

http://stackoverflow.com/q/27561273
accepted answer: http://stackoverflow.com/a/27561340
upvote count: 1
tagged with: node.js
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/27561573
has body: I am currently trying to figure out how can I re-design an incoming url request in node.js and read the parameters from there.I am using restify. In my router.js : server.get('/myDomainName/myService/:location/:userId',myFunction); I am getting the "location" and "userId" as parameter from here and further processing. This is working perfectly. But I need to redesign the URL like , /myDomainName/myService?location={someLocation}&amp;userId={someID}. So, I have designed the URL like this : /myDomainName/myService?location=:x&amp;userId=:y But when I am trying to read the value of x and y (console.log(request.params.x)) , they are undefined. I need to use that x and y value for further processing. What I am doing wrong here for URL design ? How can I implement this ? Thanks in advance.
has answer: http://stackoverflow.com/a/27561573
type: Question
answer count: 2
linked to: http://stackoverflow.com/q/15830448
has answer: http://stackoverflow.com/a/27561340
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/43548437
has title: URL design in node.js routing

http://stackoverflow.com/q/27580000
favorite count: 0
has answer: http://stackoverflow.com/a/27592480
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
upvote count: 1
accepted answer: http://stackoverflow.com/a/27592480
type: Question
downvote count: 0
tagged with: javascript
has body: How to get keycode on keypress? I know that keydown and keyup will give keycodes for all keys but without considering the case for alphabets and also keypress will give case sensitive keycodes but donot give keycodes for meta keys like backspace, alt, ctrl, enter and shift. is there any method to get all the keycodes including meta and case sensitive keycodes? in javascript
tagged with: keypress
has title: Keycodes for meta keys[backspace][ctrl][alt] with upper and lower case letters
answer count: 1
score: 1

http://stackoverflow.com/a/27620011
type: Answer
answers question: http://stackoverflow.com/q/27501993
score: 0
has body: You need to wait until the javascript has changed the page. My experience is that this may take a while. Especially if calling of the server is part of it. So far My attempt is to poll the page until something changed the way I expect it to. Here is a method that waits for a given text to appear on the page; private static final int AJAX_MAX_TRIES_SECONDS = 30; /** * Waits until the given 'text' appeared or throws an * WaitingForAjaxTimeoutException if the 'text' does not appear before we timeout. * @param page * @param text The text which indicates that ajax has finished updating the page * @param waitingLogMessage Text for the log-output. Should indicate where in the code we are, and what are we waiting for * @throws WaitingForAjaxTimeoutException */ public static void waitForAjaxCallWaitUntilTextAppears(// @Nonnull final HtmlPage page, // @Nonnull final String text,// @Nonnull final String waitingLogMessage) throws WaitingForAjaxTimeoutException { LOGGER.debug("_5fd3fc9247_ waiting for ajax call to complete ... [" + waitingLogMessage + "]"); final StringBuilder waitingdots = new StringBuilder(" "); for (int i = 0; i &lt; AJAX_MAX_TRIES_SECONDS; i++) { if (page.asText().contains(text)) { waitingdots.append(" ajax has finished ['").append(text).append("' appeared]"); LOGGER.debug("_8cd5a34faf_ " + waitingdots); return; } waitingdots.append('.'); wait(page); } LOGGER.debug("_de5091bc9e_ " + waitingdots.append(" ajax timeout ['").append(text).append("' appeared NOT]").toString()); LOGGER.debug("_f1030addf1_ page source:\n" + page.asXml()); throw new WaitingForAjaxTimeoutException(); } Also make sure that javascript is enabled. (which is the default): webClient.getOptions().setJavaScriptEnabled(true);

http://stackoverflow.com/a/27531132
upvote count: 1
type: Answer
downvote count: 0
score: 1
has body: This requires a custom sort function. function compare( a, b ) { var aDate = new Date( a[1] ); var bDate = new Date( b[1] ); if( aDate &lt; bDate ) return -1; if( aDate &gt; bDate ) return 1; return 0; } What this compare function does is it converts the string date in array index 1 into an actual date which can be sorted properly. Then it compares the two dates together to order them. This will sort with earliest at the beginning. If you want to sort with latest at the beginning, you would swap the return values so that the first return value is 1, and the second return value is -1. This is a sample usage of ordering by date: var arr = [ ["A", "04/02/2014"], ["C", "06/06/2015"], ["B", "06/06/2014"] ]; arr.sort(compare); And you get: [["A", "04/02/2014"], ["B", "06/06/2014"], ["C", "06/06/2015"]] For more information on custom sorting, check out these SO posts: Sort array of objects by string property value in JavaScript or Sort an array with arrays in it by string
answers question: http://stackoverflow.com/q/27530948

http://stackoverflow.com/q/27629304
has title: InfoWindow not displaying address information from KML
type: Question
tagged with: google-maps
tagged with: javascript
tagged with: kml
tagged with: google-maps-api-3
score: 0
answer count: 1
has body: I'm pretty new to KML. I have an excel spreadsheet containing a bunch of (approx. 2000) addresses. It does not contain Lat/Long coordinates. Each part of the address is in a separate column. Address/Address2/City/State/Zip...etc. Using the google maps engine I was able to generate a map with a bunch of markers on it. I exported my map to KML via the link in google maps engine. That resulted in placemark data that looked like this: #icon-503-DB4436 Brun’s Apple Market 849 W 6th Ave. Eugene OR 47938 US ADDRESS1: 849 W 6th Ave. ADDRESS2: CITY: Eugene STATE: OR ZIPCODE: 47938 Country: US PHONE: 849 W 6th Ave. Eugene OR 47938 US The info windows contained the address and everything looked good. I then attempted to use that KML file on my page with the google maps api. This resulted in a map with no markers on it. As far as I can tell that is because my placemarks lacked Lat/Long coordinates. I looked around and found BatchGeo.com. I ran my spreadsheet of addresses through their online tool, created a map and exported the KML from them. The placemark part of the KML looks like this: #0 Brun’s Apple Market 849 W 6th St Eugene OR 47938 US -123.10554659123,44.053497015009,0 When I use that KML on my page with the google maps api I get my placemarks. What I don't get is any address information in the Info Window. When I cut and paste the ExtendedData tag from the first file into the second file, I get my address information in the InfoWindow. I'm hoping someone out there knows: -A way to get the ExtendedData field of the second file to have the proper data in it. OR -A way to get my InfoWindow to display the "address" values from the second file. OR -A way to get the google maps engine to put Lat/Long coordinates into the export. OR -Some option I had not considered to acquire a KML file in the proper format.
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27629382

http://stackoverflow.com/a/42297602
score: 4
answers question: http://stackoverflow.com/q/27586566
downvote count: 0
has body: svg.selectAll('rect') .on("mouseover", function(d) { var e = d3.select(this) e.attr('stroke', '#2378ae') e.attr('stroke-width', '3'); }) .on("mouseout", function(d){ d3.selectAll('rect').attr("stroke", "none"); }); this will togle your rect bar i dont know in that pie, hope this will give you idea, d3 have function to play with css use that,
type: Answer
upvote count: 4

http://stackoverflow.com/a/27634799
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/123061139
upvote count: 14
accepted answer of: http://stackoverflow.com/q/27634736
type: Answer
answers question: http://stackoverflow.com/q/27634736
has comment: http://stackoverflow.com/comment/117138399
downvote count: 0
has body: since both null and empty are falsy values div.variable if not null or empty will evaluate to true and if either of null or empty will evaluate to false something else
score: 14

http://stackoverflow.com/comment/43541383
type: QuestionComment
comment on: http://stackoverflow.com/q/27557548
score: 1
has text: so this is what javascript looked like before jQuery?
type: Comment

http://stackoverflow.com/comment/43679316
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27629189
has text: yes but using your JSFiddle why Can't I remove a class name? http://jsfiddle.net/vzn7bwww/1/

apache
tag name: apache
tags question: http://stackoverflow.com/q/27634784
tags question: http://stackoverflow.com/q/27559047
tags question: http://stackoverflow.com/q/27491703
type: Tag
tags question: http://stackoverflow.com/q/27547776

http://stackoverflow.com/comment/43520426
has text: Isn't this very similar to the previous answer 5 mins ago?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27547045

http://stackoverflow.com/comment/43391329
comment on: http://stackoverflow.com/q/27478414
has text: When anyone click on the button with an id "copy-button", the value from input with an id "salesinput2" will be copy. @ub3rst4r
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27528089
tagged with: javascript
tagged with: express
score: 0
has title: Match path with wildcard in Express
accepted answer: http://stackoverflow.com/a/27528112
has body: I would like Express to route /m/objectID and /m/someslug/ObjectID to the same function. I have the following: app.get("/m/:id",...); app.get("/m/(.*)/:id", ...); and the top route works fine, but the bottom one doesn't. I think that my regex isn't correct - where am I going wrong?
tagged with: regex
has answer: http://stackoverflow.com/a/27528112
type: AnsweredQuestion
type: Question
answer count: 1

http://stackoverflow.com/comment/43401436
comment on: http://stackoverflow.com/a/27481799
score: 0
type: AnswerComment
type: Comment
has text: @Mello, I've edited the answer to show you an example of reading and writing to localStorage.

http://stackoverflow.com/comment/43532142
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27551937
has text: Thanks for the answer. I have understood the first 3 steps. In step 4, I didn't understand how to refer to the particular selector changed by the user and how to trace its [siblings](http://api.jquery.com/siblings/) as they are not select elements but input and span elements.
type: AnswerComment

http://stackoverflow.com/comment/43661499
type: Comment
comment on: http://stackoverflow.com/q/27618045
score: 0
has text: I also love using native form items but sometimes it not depends on me. So i have to find "midle of gold" ( aphorism ). I see that most similar is radio inputs and i decided to write my own very simple select dropdown, (!) but I think there is some negatives of it, maby it's mobile devices. :/
type: QuestionComment

http://stackoverflow.com/comment/43557879
type: Comment
has text: but still you pointed out a good difference. but before accepting your answer, I will wait for some more time for a better answer which shows any big difference(if there is any! ) :)
comment on: http://stackoverflow.com/a/27566039
score: 0
type: AnswerComment

http://stackoverflow.com/q/27560199
has comment: http://stackoverflow.com/comment/43546727
has comment: http://stackoverflow.com/comment/43546633
favorite count: 0
has comment: http://stackoverflow.com/comment/43546527
score: 2
has answer: http://stackoverflow.com/a/27570538
downvote count: 0
tagged with: checkbox
type: AnsweredQuestion
has body: I'm using Fuelux Checkbox component and I'm trying to toggle some DIV based on checkbox checked. I'm doing as follow: $(document).ready(function(){ $('#chkSucursal').on('checked.fu.checkbox', function (evt, item) { $("#rifEmpresa").toggle(!this.checked); $("#rifSucursal").toggle(this.checked); }); $('#chkRif').on('checked.fu.checkbox', function () { $("#rifEmpresa").toggle(!this.checked); }); }); But is not working since #rifEmpresa is always show no matter what checkbox is checked or not. Te right way should be: Check the first visible checkbox "Click me" Hide #rifEmpresa DIV and show #rifSucursal right now that is show but the first is not hide Toggle #rifEmpresa on RIF? checkbox checked This is the related HTML code: Check me Find company(*) Some FORM element to Show RIF? (check me to show "Some Form Element to HIDE") RIF (*) Some FORM element to Hide Can any give me some help and tell me what I'm doing wrong and how to fix my code? Here is a simple Fiddle for testing purposes
accepted answer: http://stackoverflow.com/a/27560337
tagged with: fuelux
has comment: http://stackoverflow.com/comment/43546619
type: Question
upvote count: 2
possible better answer: http://stackoverflow.com/a/27570538
answer count: 2
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27560337
has comment: http://stackoverflow.com/comment/43546636
tagged with: http://stackoverflow.com/tag/html
has title: Toggle element on checkbox checked
has comment: http://stackoverflow.com/comment/43546763

http://stackoverflow.com/q/27475641
has answer: http://stackoverflow.com/a/27475688
tagged with: javascript
has comment: http://stackoverflow.com/comment/43385730
has title: javascript animation, a img move in the screen and every time when they touch the screen limit, they turn direction
has body: Hey guys i have been tried to made a code to move a image in the window, the img will keep moving to a same direction until it hits the screen limit, and them it will change the direct in order to keep moving, The code i have been made is below: var flySpeed = 5; var maxWidth = window.innerWidth; var maxHeight = window.innerHeight; var xPosition = 0; var yPosition =0; var xDirection = "right"; var yDirection = "down"; function movingBug() { var bug = document.getElementById("bugImg"); bug.style.left = xPosition + "px"; bug.style.top = yPosition + "px"; bug.style.position="absolute"; if (xDirection =="right") ++xPosition; else if (xDirection =="left") ++xPosition; if(yDirection =="down") ++yPosition; else if (yDirection =="up") --yPosition; if(xPosition == screen.availWidth - 100) { xDirection ="left"; yDirection = "down"; } if(xPosition == screen.availWidth - 10) { xDirection = "right"; yDirection = "up"; } if(yPosition == screen.availHeight - 100) { xDirection = "left"; yDirection = "down"; } if(yPosition == screen.availHeight - 10) { xDirection = "right"; yDirection = "up"; } } HTML part: &lt;body onload="setInterval('movingBug()',2);"&gt; &lt;div id="bugImg"&gt;&lt;img src = "Mosquito1.jpg" id ="bug1" width=100px; height=100px;&gt;&lt;/div&gt; &lt;/body&gt; Now, i think i need to use math random in order to let it move randomly, where should i add it?
downvote count: 4
upvote count: 0
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/27475688
type: AnsweredQuestion
score: -4
has comment: http://stackoverflow.com/comment/43385646
type: Question

http://stackoverflow.com/comment/43573673
score: 0
type: Comment
has text: I know how to get the demo, but i want the full version only off totaljerkface.com
type: AnswerComment
comment on: http://stackoverflow.com/a/27573517

http://stackoverflow.com/q/27538792
has answer: http://stackoverflow.com/a/27560285
type: Question
accepted answer: http://stackoverflow.com/a/27560285
tagged with: javascript
possible better answer: http://stackoverflow.com/a/32866304
has answer: http://stackoverflow.com/a/32866304
answer count: 3
downvote count: 0
has title: Instafeed js add wrapper around every 4 image
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/54720268
has body: I am using instafeed js to call photos from instagram. Is there a way to wrap every 4 images inside a div? is this even possible? Here is my code: jQuery(window).load(function(){ var userFeed = new Instafeed({ get: 'user', userId: 1509441625, accessToken: '1509441625.5b9e1e6.c20b3eb91b15404ab30084283ab3a9c9', limit : 4, resolution:'standard_resolution', template: '&lt;a target="_Blank" href="{{link}}"&gt;&lt;img src="{{image}}" /&gt;&lt;/a&gt; ', }); userFeed.run(); }); I reached out to the developer of instafeed and he gave me a untested chunck of code that im trying to debug: var count = 0; var userFeed = new Instafeed({ get: 'user', userId: 1509441625, accessToken: '1509441625.5b9e1e6.c20b3eb91b15404ab30084283ab3a9c9', limit : 4, resolution:'standard_resolution', filter: function(image) { count += 1; if (count % 4 === 0) { image.customTagOpen = '&lt;div&gt;'; image.customTagClose = '&lt;/div&gt;'; } else { image.customTagOpen = ''; image.customTagClose = ''; } return true; }, template: '{{model.customTagOpen}}&lt;a target="_Blank" href="{{link}}"&gt;&lt;img src="{{image}} /&gt;&lt;/a&gt;{{model.customTagClose}}'; }); userFeed.run(); }); But I get a error : missing "}" after property listing. any advice?
tagged with: http://stackoverflow.com/tag/html
tagged with: plugins
tagged with: instafeedjs
type: AnsweredQuestion
score: 2
upvote count: 2

http://stackoverflow.com/comment/43585397
has text: a little googling would give you the answer easily.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27580426

http://stackoverflow.com/a/27514795
upvote count: 2
has comment: http://stackoverflow.com/comment/43460112
score: 2
answers question: http://stackoverflow.com/q/27514759
has body: $('#slidercell01,#slidercell02,#slidercell03').contenthover({ effect: 'slide', slide_speed: 300, overlay_background: '#000', overlay_opacity: 0.8 });
downvote count: 0
type: Answer

http://stackoverflow.com/q/27592402
has comment: http://stackoverflow.com/comment/43609168
tagged with: css
tagged with: safari
has comment: http://stackoverflow.com/comment/43609802
answer count: 0
type: UnansweredQuestion
has title: why toggle menu responsive won't expand in safari?
has comment: http://stackoverflow.com/comment/43609589
tagged with: javascript
tagged with: navigation
type: Question
score: 0
has comment: http://stackoverflow.com/comment/43609940
tagged with: jquery
has body: does anybody know why toggle menu won't expand in safari? I tested in firefox and chrome was fine. Is it maybe because of flexbox issues? This is the css: a { display: block; width: 100%; height: 100%; } .menu-opener, .menu-opener:hover, .menu-opener.active, .menu-opener-inner, .menu-opener-inner::before, .menu-opener-inner::after, .menu, .menu.active { -webkit-transition: 250ms all; transition: 250ms all; } .menu-opener { cursor: pointer; height: 64px; position: absolute; top: 2%; left: 1%; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; width: 64px; } .menu-opener:hover, .menu-opener.active { background: #f1c40f; } .menu-opener-inner { background: #fff; height: .5rem; margin-left: .75rem; margin-top: 1.75rem; width: 2.5rem; } .menu-opener-inner::before, .menu-opener-inner::after { background: white; content: ''; display: block; height: .5rem; width: 2.5rem; } .menu-opener-inner::before { -webkit-transform: translateY(-0.75rem); -ms-transform: translateY(-0.75rem); transform: translateY(-0.75rem); } .menu-opener-inner::after { -webkit-transform: translateY(0.25rem); -ms-transform: translateY(0.25rem); transform: translateY(0.25rem); } .menu-opener-inner.active { background: transparent; } .menu-opener-inner.active::before { -webkit-transform: translateY(0rem) rotate(-45deg); -ms-transform: translateY(0rem) rotate(-45deg); transform: translateY(0rem) rotate(-45deg); } .menu-opener-inner.active::after { -webkit-transform: translateY(-0.5rem) translateX(0rem) rotate(45deg); -ms-transform: translateY(-0.5rem) translateX(0rem) rotate(45deg); transform: translateY(-0.5rem) translateX(0rem) rotate(45deg); } .menu { background: #f1c40f; color: transparent; height: 64px; position: absolute; top: 2%; left: 1%; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; width: 0rem; z-index: -1; } .menu.active { width: -webkit-calc(100% - 2rem); width: calc(100% - 2rem); } .menu.active .menu-link { …

http://stackoverflow.com/q/27632064
has comment: http://stackoverflow.com/comment/98788539
has comment: http://stackoverflow.com/comment/45415937
favorite count: 0
has answer: http://stackoverflow.com/a/28491663
has title: How to avoid mixed/insecure content warnings when having deep links to non-http schemes for mobile apps?
upvote count: 5
has comment: http://stackoverflow.com/comment/45273124
type: UnansweredQuestion
tagged with: android
has answer: http://stackoverflow.com/a/28557753
answer count: 4
has answer: http://stackoverflow.com/a/28560700
downvote count: 0
has body: Let's say I have a mobile app that listens to all "myawesomeapp" scheme links so it can open them in the app and I have a related website. Now when a page, for eg, https://myawesomeapp.com/home/ is loaded in the browser, I create an iframe dynamically and add it to the document with the src of myawesomeapp://myawesomeapp.com/home/ so that my app can try and open up that page within itself. But most modern browsers will display an insecure/mixed content warning when such a link is created from a page served over HTTPS. Is there a way around this behaviour?
tagged with: https
type: Question
score: 5
tagged with: mobile
tagged with: javascript
has answer: http://stackoverflow.com/a/28485991

http://stackoverflow.com/comment/43632306
comment on: http://stackoverflow.com/a/27605086
type: Comment
has text: @Alnitak Doesn't matter how big or small it is, it is stored 12/24 bytes away from the array pointer which fits in all CPU cache lines
score: 0
type: AnswerComment

http://stackoverflow.com/a/27491218
type: AcceptedAnswer
has body: Sure. I'm a bit shaky on what exactly you want to grab but here's something that should help. PRE JQuery 1.6 var customArray =[]; $('[data-head-ref]').each(function(){ var Items = ""; $("[data-head]", this).each(function(){ if(Items.length!=0){Items +=",";} Items +=$(this).attr("data-head"); }); customArray[$(this).attr('data-head-ref')] = { 'numberItems': $("[data-head]", this).length, 'nameItems': Items}; }); JQuery 1.6 + var customArray =[]; $('[data-head-ref]').each(function(){ var Items = ""; $("[data-head]", this).each(function(){ if(Items.length!=0){Items +=",";} Items +=$(this).prop("data-head"); }); customArray[$(this).prop('data-head-ref')] = { 'numberItems': $("[data-head]", this).length, 'nameItems': Items}; });
answers question: http://stackoverflow.com/q/27490580
type: Answer
accepted answer of: http://stackoverflow.com/q/27490580
has comment: http://stackoverflow.com/comment/43437683
has comment: http://stackoverflow.com/comment/43440638
score: 0

http://stackoverflow.com/comment/43606974
type: Comment
comment on: http://stackoverflow.com/a/27591523
has text: @Elist adding on to A. Wolff's comment, you could check `.length` also.
type: AnswerComment
score: 0

http://stackoverflow.com/a/27530785
type: AcceptedAnswer
has body: $.ajax returns a jQuery promise. You can then call then on that promise to chain completion to a function. The ajax data is passed as the promise parameter to any final callback function. That is because $.ajax "promises to return the Ajax data". If you follow the same pattern for all your functions you can chain everything as you wanted. By not calling the functions, or adding anonymous callbacks, it simply uses the resulting promises from each function call and combines them together. Something like: function CallWebService (uri, filter) { var data = {}; if (filter &amp;&amp; filter != '') data['$filter'] = filter; return jQuery.ajax({ url: '/_api/lists/' + uri + '/items', data: data, dataType: 'json' }); } function getGreenData() { return CallWebService("GreenData", "filter from InitialData"); } function getRedData() { return CallWebService("RedData", "filter from InitialData"); } function GetInitialData() { return CallWebService("InitialData", "").then(GetGreenData); } // Fetch green data then red data sequentially function GetFinalData () { return getGreenData().then(getRedData); } // Call the final one GetFinalData().done(function(greendata, reddata){ Alert("all done!"); }); To run promises in parallel, evaluate the functions immediately and let the resulting promises combine with $.when: e.g. // Fetch green data and red data in parallel function GetFinalData () { return $.when(getGreenData(), getRedData()); }
has comment: http://stackoverflow.com/comment/43492275
type: Answer
upvote count: 4
accepted answer of: http://stackoverflow.com/q/27530428
downvote count: 0
answers question: http://stackoverflow.com/q/27530428
score: 4
has comment: http://stackoverflow.com/comment/43513681

http://stackoverflow.com/q/27502870
tagged with: css
has body: The title may seem a bit peculiar but I will try explain as best as possible so confusion is minimized. Currently I am using the FullPage.js plugin with my website to create a horizontal 'slide' effect. Check the website out currently to see what I mean. http://carrotcrunchpvp.comule.com/ As you can see the navigation bar is slap bang in the middle of the page when you enter where everything is rotated and such. When I slide to the right using the arrow, I want the navigation bar to 'push' out so the Ethos link goes to the top left, privacy policy link goes adjacent to this (horizontally), then the path to healing. Then the logo will shift directly upward to form the middle of the navigation bar. NZ catholic church will shimmy to the right and up adjacent to the logo, contact us will go slightly further to the right and the about page will reach the far right of the navigation bar which will be all located at the top of the page. This will essentially be creating a header navigation bar Look at illustration for a better idea: The black lines are the path of transformations. However it's not as easy as it seems, I could do this with CSS3 transformations too... Now my problems, I'm capable with CSS, but my Jquery and Javascript knowledge is lacking. I'm unsure as to how to approach this. This is because I only want this transformation to occur when clicking from the homepage to the next page or one of the other pages with more content. It will essentially be turning into a fixed header. However when I go back to the homepage it will need to animate backwards to the original navigation bar... How would you go about this? This is a task my I.T teacher has set me to do over the holidays and I'm struggling to figure how to logically do this. If I've missed anything or you're still confused on what I want to achieve, feel free to comment and I will try clarify. To the mods, it's a subjective topic, I'll agree - but it's a topic which spreads creativity and shouldn't be fro…
type: Question
upvote count: 4
tagged with: javascript
tagged with: jquery
score: 4
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
answer count: 1
tagged with: fullpage.js
has answer: http://stackoverflow.com/a/27509570
has title: Transforming navigation bar to a fixed header over horizontal parallax website
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/27489700
answer count: 2
has comment: http://stackoverflow.com/comment/43411299
has comment: http://stackoverflow.com/comment/43411198
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/43411430
has comment: http://stackoverflow.com/comment/43411172
has answer: http://stackoverflow.com/a/27489951
favorite count: 0
has comment: http://stackoverflow.com/comment/43411199
upvote count: 1
has body: I have a function: function removeDiv() { var topmost = jQuery('.xx'); var totContent = topmost.find('.zz').length; var $target = jQuery('.xx').find('.zz').eq(0); if(totContent &gt; 5) { $target.hide('slow', function(){ $target.remove(); }); } } I use it in my ajax call, to remove extra div then there are more than 5, hovewer it remove first div only once! And this is how ajax call looks: function saveClubs(array) { for(i=0; i&lt;array.length; i++) { var id = array[i]; jQuery.ajax({ type: "GET", async: true, url: 'index.php?option=com_events&amp;task=club.save&amp;id=' + id, dataType: 'json', success: function(data) { jQuery('.xx').append('&lt;div class="zz"&gt;'+data+'&lt;/div&gt;'); removeDiv(); } }); } } Any ideas ?
has comment: http://stackoverflow.com/comment/43411168
has comment: http://stackoverflow.com/comment/43411248
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27489944
accepted answer: http://stackoverflow.com/a/27489944
has title: jQuery removes first div only once
score: 1
possible better answer: http://stackoverflow.com/a/27489951
type: Question

http://stackoverflow.com/comment/103390681
score: 0
type: AnswerComment
type: Comment
has text: @Nik It works well in typescript as my testing. You need update your typescript to new version.
comment on: http://stackoverflow.com/a/38936104

http://stackoverflow.com/q/27563356
has answer: http://stackoverflow.com/a/27563419
linked to: http://stackoverflow.com/q/11191966
type: Question
has body: I'm fairly new with Jasmine and I'm trying to test a very simple scenario Code under test $(function () { $("#add_distribution_list").click(function () { CommonNs.Utils.setWindowLocationHRef("hello.html"); }); }); Fixture &lt;input type='button' value='Add' id='add_distribution_list'/&gt; Test describe("Distribution List Page", function () { beforeEach(function(){ loadFixtures('button.html'); spyOn(CommonNs.Utils, 'setWindowLocationHRef'); }); it("button redirects to action2", function () { $('#add_distribution_list').click(); expect( CommonNs.Utils.setWindowLocationHRef).toHaveBeenCalled(); }); }); Result Expected spy setWindowLocationHRef to have been called. My SpecRunner.html imports jquery, jasmine-jquery, and the utility file in which CommonNs.Utils lives. How can I assert that the method on CommonNs.Utils has been called?
tagged with: javascript
tagged with: jasmine-jquery
answer count: 1
downvote count: 0
tagged with: jasmine
favorite count: 0
has title: How to test a function call inside a click event with Jasmine
type: UnansweredQuestion
score: 2
upvote count: 2

http://stackoverflow.com/comment/43402470
type: Comment
has text: why you don't append the Raphael object to the DOM in your directive? Can you explain this? or please provide a fiddle link with example.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27483261

http://stackoverflow.com/comment/43620891
type: Comment
type: QuestionComment
has text: Thanks for the reply Jeff. I have added the source code of my routes.js file.
comment on: http://stackoverflow.com/q/27598645
score: 0

http://stackoverflow.com/comment/43676987
type: QuestionComment
comment on: http://stackoverflow.com/q/27627221
score: 0
type: Comment
has text: I think there may be some confusion as to what I'm expecting to happen. First, valid input would be any number of numerals with the possibility of only *one* decimal point. The current behavior: The user enters characters one by one, if they are valid characters they will show up. If the character is invalid (e.g. the letter A) the field will replace that character with ''(essentially behaving like a backspace immediately after filling the character in. What I need is the same behavior for the addition of one too many decimal points.

http://stackoverflow.com/comment/43491178
score: 0
type: Comment
type: QuestionComment
has text: you are using $.ajax($.post or $.get )???
comment on: http://stackoverflow.com/q/27531081

http://stackoverflow.com/comment/43390883
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27478201
has text: have you checked for trailing comma's - just open the csv up in a text editor to check. When js parses a string of black space to a numbers with the + operator it comes up with 0.
score: 0

http://stackoverflow.com/q/27553365
tagged with: javascript
has answer: http://stackoverflow.com/a/27553984
score: 0
has comment: http://stackoverflow.com/comment/43533026
tagged with: external
has answer: http://stackoverflow.com/a/27553463
has body: I have an HTML page that I want to perform several lines of js code on. For now I'm just trying one thing: document.getElementById("title").style.color = "blue"; This is in jsPage.js the within the head of my html page I have &lt;script src="jsPage.js"&gt;&lt;/script&gt; I thought this was all that was necessary. But my title is staying red (this is what it is set to in the css doc attached to html page) instead of turning blue. Am I missing some standard declaration or something in the js file?
has answer: http://stackoverflow.com/a/27553426
has title: Add one external js file for everything?
has answer: http://stackoverflow.com/a/27553430
answer count: 4
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27553430
type: Question
accepted answer: http://stackoverflow.com/a/27553426

http://stackoverflow.com/q/27537351
upvote count: 1
tagged with: angular-ui-router
score: 1
has comment: http://stackoverflow.com/comment/43504055
has comment: http://stackoverflow.com/comment/43504107
type: Question
has answer: http://stackoverflow.com/a/27566761
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I want to display an animation on an element in the page as the user is leaving a state. This is what I currently have: { ....., views: { ... }, onExit: function(){ someEle.classList.remove("someClass"); //CSS transition } } However, as soon as the state is being left, the view of the exiting state gets destroyed and there is no animation. Is there a way to "hold up" the exit of the state for certain amount of time until the animation is done?
answer count: 1
has title: Holding onExit in ui-router
tagged with: css
has comment: http://stackoverflow.com/comment/43504038
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/q/27557164
has answer: http://stackoverflow.com/a/27557488
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43540618
has comment: http://stackoverflow.com/comment/43540633
has answer: http://stackoverflow.com/a/27557226
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43572469
score: 0
has body: I have HTML as follows: things I would like to do something like: NOTE: I know how to re-position an element after it has already been defined. What I want to do is position the element dynamically as it is being defined. In other words, I don't want to "re-position" the element at all -- I want it to be initially positioned based on the location of a different element.
type: Question
tagged with: javascript
has title: Can I use JavaScript to set inline style for an element as I am rendering it in the HTML? I would like to define positioning based on a previous div
has comment: http://stackoverflow.com/comment/43564352
answer count: 2

http://stackoverflow.com/q/27617956
answer count: 1
tagged with: asp.net
tagged with: twitter-bootstrap
has title: how to play video as popup and make background disable and fade out with bootstrap in asp.net
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27618498
has body: Currently, I am able to view the video on a page itself which I can view as full screen also. I done this with jquery UI and bootstrap class &lt;div class="videoUiWrapper thumbnail"&gt; I want to play video in webpage, but when I will click on play button, video should play as popup and webpage should be disabled and fade out. How can I do this with bootstrap? or with anything else. I am developing website in asp.net c#
type: Question
tagged with: c#
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27618498
score: 0

http://stackoverflow.com/q/27567355
has body: This here is my code. $(document).ready(function(){ $(".btn.btn-default.btn-lg.remove").click(function(){ $(this).parent().remove(); }); }); I want the entire div to get deleted when the button of class="btn btn-default btn-lg remove" gets clicked. I cant use id because i am dynamically appending the above div using append jquery.
favorite count: 0
tagged with: twitter-bootstrap
type: AnsweredQuestion
score: 3
upvote count: 3
has answer: http://stackoverflow.com/a/27567404
type: Question
downvote count: 0
possible better answer: http://stackoverflow.com/a/27567475
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27567475
has answer: http://stackoverflow.com/a/27567403
answer count: 3
has title: How to select a button and delete a grandparent div of that button when the button is clicked?
accepted answer: http://stackoverflow.com/a/27567404

http://stackoverflow.com/comment/43437908
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/66995/discussion-between-sam-and-creeper).
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27503056

http://stackoverflow.com/q/27631022
upvote count: 0
type: Question
has comment: http://stackoverflow.com/comment/43691192
score: -2
tagged with: javascript
tagged with: jquery
answer count: 2
downvote count: 2
has body: I am new to require js and have been looking online for tutorials but do not really understand them. I have placed all my jquery and require js in the same folder as my html file. Test.html &lt;html&gt; &lt;head&gt; &lt;script data-main = "main" src = "require.js" type = "text/javascript"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; testing &lt;/body&gt; &lt;/html&gt; Main.js (require main file) requirejs.config( { paths: { 'jquery': 'jquery-2.1.3.min' } }); require( ['test'] function(test){ test.msg(); } ); test.js define('alerts', ['jquery'] function($){ var msg = function(){ $(document).ready(function(){ alert('i am just learning'); }); }; return {msg:msg}; }); am i doing something wrongly? the error in the debugger showed that msg was an undefined reference. I have somewhat tried to follow tutorials and tried to change parts of it to explore
favorite count: 0
has title: alert box not popping out when using requirejs
has answer: http://stackoverflow.com/a/27631590
type: UnansweredQuestion
tagged with: requirejs
has answer: http://stackoverflow.com/a/27634687

http://stackoverflow.com/a/27510912
has comment: http://stackoverflow.com/comment/43459063
upvote count: 0
type: AcceptedAnswer
type: Answer
has body: The idea is that you expect value is passed by reference while it is value based check this SO question Does Javascript pass by reference? you have to return the updated value after updating it as follows: my_function = function (my_array) { my_array = global_fun().slice(); console.log(my_array.length); // &gt;&gt; 10 !!!!!! return my_array; } Then call it as follows: var updatedArray = my_function (my_array); console.log(updatedArray .length);
downvote count: 1
accepted answer of: http://stackoverflow.com/q/27510609
has comment: http://stackoverflow.com/comment/43458827
score: -1
answers question: http://stackoverflow.com/q/27510609

http://stackoverflow.com/comment/43423695
score: 0
comment on: http://stackoverflow.com/q/27494247
has text: Is your errorHandler function defined? If not, that could be causing the problem.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27618860
has title: How to calculate percentage of not equal number
downvote count: 0
has comment: http://stackoverflow.com/comment/43658663
has comment: http://stackoverflow.com/comment/43659509
accepted answer: http://stackoverflow.com/a/27619010
type: AnsweredQuestion
has body: I need to calculate percentage of some not equal number. I am counting percentage using parseFloat, but it's work only for rounded numbers like 2000, or 200 which gives me 20% and 2%. I's not working for 2200 or 220 to reach 2.2% or 22.2%. $(document).on('keyup', '.js-baOfferPrice.percentage', function(e) { var s, target = $(e.target); var p = $('.js-baAppPrice').text(); s = parseFloat(parseInt(target.val(), 10) * 100) / parseInt(p, 10); target.val() === "" ? target.val("") : target.val(Math.round(s).toFixed(0)); }); Can anybody help?
possible better answer: http://stackoverflow.com/a/27618918
score: 1
has answer: http://stackoverflow.com/a/27619010
type: Question
has comment: http://stackoverflow.com/comment/43658825
answer count: 2
has comment: http://stackoverflow.com/comment/43658674
tagged with: javascript
tagged with: jquery
upvote count: 1
has answer: http://stackoverflow.com/a/27618918
linked to: http://stackoverflow.com/q/566564
has comment: http://stackoverflow.com/comment/43658686
favorite count: 0

http://stackoverflow.com/q/27513732
accepted answer: http://stackoverflow.com/a/27513755
type: AnsweredQuestion
upvote count: 0
duplicate of: http://stackoverflow.com/q/9421505
has title: Injecting a src into HTML5's audio tag
type: Question
tagged with: audio
score: -1
linked to: http://stackoverflow.com/q/9421505
has body: I'm trying to use HTML5's audio controls and inject a dynamic path into the audio source, using JavaScript/jQuery. Here's my markup: &lt;audio id="marker" controls&gt; &lt;source src="placeholder.mp3" type="audio/mp3"&gt; &lt;/audio&gt; and here's my attempt to overwrite the placeholder source: var audio = $('#marker'); audio.src(path.mp3); My expected result is that I can use the audio controls to play the audio located at path.mp3, but instead the audio controls are greyed out, and it plays nothing. Any ideas?
answer count: 1
downvote count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43457778
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27513755

http://stackoverflow.com/comment/43441729
comment on: http://stackoverflow.com/q/27505829
score: 0
type: Comment
type: QuestionComment
has text: sorry I fixed my quesiton

http://stackoverflow.com/q/27536082
has body: My highcharts labels are cut off. How can I fix this? Please see attached screenshot.
upvote count: 7
answer count: 1
has comment: http://stackoverflow.com/comment/43500677
favorite count: 0
type: UnansweredQuestion
has title: Highcharts labels cut off
downvote count: 0
score: 7
has comment: http://stackoverflow.com/comment/43500719
type: Question
has answer: http://stackoverflow.com/a/27536181
tagged with: highcharts
linked to: http://stackoverflow.com/q/11421748
tagged with: javascript

http://stackoverflow.com/a/27498573
type: Answer
answers question: http://stackoverflow.com/q/27498495
has body: For loading message $(document).ready(function() { var module_url = $('#module_url').val(); $('#loading').html('&lt;p&gt; loading...&lt;/p&gt;'); // #loading is a id to a div element $.ajax({ url : module_url, cache: false, dataType: "json", type: "GET", async: false, data: { 'request_type':'ajax', 'op':'get_all_stores' }, success: function(result, success) { $('#loading').html(''); // when success remove message } else { $('#loading').html('Error Occurred Please try again '); // when error } } }); });
score: 0

http://stackoverflow.com/a/27548593
score: 0
type: Answer
has body: why don't you try jQuery. Loop through each row i.e. $('#TableID').find('input').each(function.....
answers question: http://stackoverflow.com/q/27548048

http://stackoverflow.com/q/27511184
type: Question
score: 0
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/27533122
has body: I am trying to use JavaScripts WebWorkers and setTimeout to have a asynchronous Timeout on a ChromeCast Application. This is used inside of jQuery, but the call to the asynch javascript file is outside of jQuery. This is the minimal sample (without jquery and working standalone): index html: timer.js: setTimeout(continueExecution, 10000) //wait ten seconds before continuing function continueExecution() { postMessage(null); } the callback works inside the chromecast and jQuery, but is executed instantaneously without the delay of 10 seconds. Does anyone know how the chromecast handles timeouts ?
type: UnansweredQuestion
tagged with: chromecast
has title: Is it possible to use setTimout in Web Worker on ChromeCast
tagged with: settimeout
tagged with: javascript

http://stackoverflow.com/q/27511834
answer count: 1
has answer: http://stackoverflow.com/a/27511909
tagged with: javascript
score: 0
has body: I have this function: var save = document.getElementById('savethis'+this.parentNode.childNodes[1].id); save.addEventListener('click', savethis.bind(this), false); function savethis() { this.removeEventListener('click', edit); var a = this.childNodes[0].childNodes[0].id; console.log(a); var b = document.getElementById(a); console.log(document.getElementById(a).id.replace('minedit','')); console.log(b.value); this.innerHTML = b.value; this.parentNode.cells[4].className = 'text-center min-edit'; setTimeout(function() {this.addEventListener('click',edit);},1); } In another function: var minedit = document.getElementsByClassName('min-edit'); for (var m=0;m<minedit.length;m++){ minedit[m].addEventListener('click', edit); } function edit(){ var avalue = this.innerHTML; console.log(avalue); if (this.className.indexOf('input-open')>=0){ } else { this.className += ' input-open'; var content = ''; content += ' '; this.innerHTML = content; valuenow = document.getElementById('minedit'+this.parentNode.childNodes[1].id).value; id = document.getElementById('minedit'+this.parentNode.childNodes[1].id).id; var save = document.getElementById('savethis'+this.parentNode.childNodes[1].id); save.addEventListener('click', savethis.bind(this), false); } } function savethis() { this.removeEventListener('click', edit); var a = this.childNodes[0].childNodes[0].id; var b = document.getElementById(a); this.innerHTML = b.value; this.parentNode.cells[4].className = 'text-center min-edit'; setTimeout(function() {this.addEventListener('click',edit);},1); } As you can see in the fiddle, the opening and closing of the input box works on the first click, but on the second click I get an error saying TypeError: this.className is undefined pointing to this line: if (this.className.indexOf('input-open')>=0){ I totally don't get why className could possibly be undefined, as I define it's name within the savethis function. Can someone explain and help?
accepted answer: http://stackoverflow.com/a/27511909
tagged with: classname
type: AnsweredQuestion
type: Question
has title: className not found/undefined after function

http://stackoverflow.com/a/27638634
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/43696405
has comment: http://stackoverflow.com/comment/43696323
has body: You can do this with simple CSS animations. Not sure, how much cross-browser compatible this is though. Works fine with Chrome and Firefox. HTML: &lt;input type="text" placeholder="Enter Text Here" class="textbox"&gt; CSS: input[class="textbox"]::-webkit-input-placeholder { color:blue; -webkit-animation-name: blinker; -webkit-animation-duration: 1s; -webkit-animation-timing-function: linear; -webkit-animation-iteration-count: infinite; } input[class="textbox"]::-moz-placeholder { color:blue; -moz-animation-name: blinker; -moz-animation-duration: 1s; -moz-animation-timing-function: linear; -moz-animation-iteration-count: infinite; } @-moz-keyframes blinker { 0% { opacity: 1.0; } 50% { opacity: 0.0; } 100% { opacity: 1.0; } } @-webkit-keyframes blinker { 0% { opacity: 1.0; } 50% { opacity: 0.0; } 100% { opacity: 1.0; } } @keyframes blinker { 0% { opacity: 1.0; } 50% { opacity: 0.0; } 100% { opacity: 1.0; } } Fiddle: http://jsfiddle.net/rkwa19se/6/
has comment: http://stackoverflow.com/comment/43696243
answers question: http://stackoverflow.com/q/27638468
upvote count: 7
score: 7
has comment: http://stackoverflow.com/comment/43696350

http://stackoverflow.com/q/27494330
upvote count: 1
has comment: http://stackoverflow.com/comment/43420594
tagged with: asp.net
favorite count: 0
has body: In the C# backend code for a website, I have the following code that displays a message for the user, enumerating the data they are about to submit, and asking for human-confirmation that the information appears accurate. This is executed within C#, not within JavaScript, so how can I access the result of the confirm function? My C# logic needs to follow a different path if they click OK, versus if they click Cancel. I'm working on a very old application (13 years), that has been untouched for quite some time. As a result, I don't have the ability to alter the general design of the application. ClientScript.RegisterStartupScript(this.GetType(), "InvalidEntrySubTypeAlert", "confirm('" + "Are you sure you want to create the following deal?\n" + "\nDeal ID :\t\t\t" + nDealID + "\nCompany Name :\t\t" + txtCompanyName.Text + "\nEntry Subject :\t\t" + txtEntrySubject.Text + "\nBusiness Lead :\t\t" + ddlBusinessLead.SelectedItem.Text + "\nLicense Status :\t\t" + ddlLicenseStatus.SelectedItem.Text + "\nEffective Date :\t\t" + string.Format("{0:MM/dd/yyyy}", calEffectiveDate.SelectedDate) + "\nExpiration Date :\t\t" + string.Format("{0:MM/dd/yyyy}", calExpirationDate.SelectedDate) + "\nLicense Location :\t\t" + txtLicenseLocation.Text + "\nEntry Sub Type :\t\t" + ddlEntrySubType.SelectedItem.Text.Split(' ')[0] + "');", true);
has comment: http://stackoverflow.com/comment/43420438
has comment: http://stackoverflow.com/comment/43421140
has answer: http://stackoverflow.com/a/27495278
has comment: http://stackoverflow.com/comment/43421765
has answer: http://stackoverflow.com/a/27495033
accepted answer: http://stackoverflow.com/a/27495033
possible better answer: http://stackoverflow.com/a/27494409
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43420499
type: Question
tagged with: c#
tagged with: javascript
has comment: http://stackoverflow.com/comment/43420409
has answer: http://stackoverflow.com/a/27494409
has comment: http://stackoverflow.com/comment/43420614
answer count: 3
has title: ASP.NET C# backend, did the user press OK or Cancel from JavaScript confirm box?
tagged with: confirm

http://stackoverflow.com/q/27587697
tagged with: ajax
type: Question
has title: how to ajax Get result in a php file from another php file echo
has answer: http://stackoverflow.com/a/27587786
score: 0
linked to: http://stackoverflow.com/q/27582555
has comment: http://stackoverflow.com/comment/43599657
answer count: 1
duplicate of: http://stackoverflow.com/q/27582555
has body: I am using a long polling script, where I want show result into user.php page "#updatapost" div which get result from update.php page echo'' with Ajax, Please see my code for clear about my problem Here, If I used any text as below for test purpose, Its work well success: function(data){ $("#updatetime").append("Test working"); But I want to append here my update.php page echo' '; my script used at user.php page function waitForMsg(){ $.ajax({ type: "GET", url: "update.php", async: true, cache: false, timeout:50000, success: function(data){ /* Here above I want to append update.php page echo */ $("#updatepost").append(data.responseText); setTimeout( waitForMsg, 1000 ); }, error: function(XMLHttpRequest, textStatus, errorThrown){ addmsg("error", textStatus + " (" + errorThrown + ")"); setTimeout( waitForMsg, 15000); } }); } $(document).ready(function () { waitForMsg(); }); My user.php page where result want to show &lt;div id="updatepost"&gt; result will goes here from update.php page echo''; &lt;/div&gt; My update.php page $u = mysqli_query($dbh,"SELECT * FROM updateside WHERE `parent_id`='".$parent."' AND `created` &gt; '".$timestamp."' ORDER BY created DESC") or die(mysqli_error($dbh)); while ($row = mysqli_fetch_array($u)) { $from_id = $row['from_id']; $parent_id = $row['parent_id']; $to_id = $row['to_id']; $sub = $row['sub']; $detail = $row['detail']; echo '&lt;div class="upbox" id="'.$parent_id.'"&gt; // All result of above query &lt;/div&gt;'; }
accepted answer: http://stackoverflow.com/a/27587786
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/27530859
tagged with: javascript
score: 0
has title: Maximum height of element by class isn't updating on screen resize
answer count: 1
tagged with: jquery
has body: I am using this script to get the maximum height of the target element (a "p" element within an element with class "col4home2"): var maxHeight=0; $('.col4home2 p').each(function(){ maxHeight=Math.max(maxHeight, $(this).height()); }).height(maxHeight); It works on page load. However, I call this script again when the window is resized. When that happens, I get the same value for the maximum height, even though the resize causes the text to reflow, and the height of the "p" element is clearly larger. Is this a browser issue? Or something in my code is not refreshing the value of maxHeight? Thanks!
accepted answer: http://stackoverflow.com/a/27530997
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27530997
type: Question

http://stackoverflow.com/q/27524757
has body: How abstract states work? What is the purpose of the abstract tabs? What is the purpose of the template included in abstract tab? Can I have more than one abstract states? Can I switch from one state to another which are in different abstract states? I modified the app.js to have 2 abstract states from the default tab template. https://gist.github.com/ashoksahoo/6bcad2c62e1abaa3de74 But I cant get index.html#/friend/:id working, and FriendDetailCtrl is also not firing.
tagged with: javascript
has answer: http://stackoverflow.com/a/27524936
has title: How abstract states work in Ionic?
answer count: 1
downvote count: 0
favorite count: 0
score: 8
tagged with: cordova
tagged with: angularjs
upvote count: 8
accepted answer: http://stackoverflow.com/a/27524936
type: AnsweredQuestion
tagged with: ionic-framework
type: Question

http://stackoverflow.com/q/27619233
tagged with: arrays
has comment: http://stackoverflow.com/comment/43659621
has comment: http://stackoverflow.com/comment/43659553
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/43659576
has comment: http://stackoverflow.com/comment/43659688
has comment: http://stackoverflow.com/comment/43659980
tagged with: restangular
has answer: http://stackoverflow.com/a/27619313
has comment: http://stackoverflow.com/comment/43659554
tagged with: angularjs
type: UnansweredQuestion
has title: How to extract data from array in javascript
has answer: http://stackoverflow.com/a/27620063
has comment: http://stackoverflow.com/comment/43659937
has comment: http://stackoverflow.com/comment/43660407
has comment: http://stackoverflow.com/comment/43659636
linked to: http://stackoverflow.com/q/6847697
has comment: http://stackoverflow.com/comment/43659836
has comment: http://stackoverflow.com/comment/43659457
has answer: http://stackoverflow.com/a/27619609
type: Question
has body: I have an object (array type) ,its console representation looks like following image . please see the image This array is created by restangulr using following code , restangularProvider.addResponseInterceptor(function (data, operation, what, url, response, deferred) { if (operation == "getList") { var extractedData; extractedData = data.result; extractedData.paginginfo = data.paginginfo; return extractedData; } if (operation != "get") { var item = { status: response.status }; feedBackFactory.showFeedBack(item); } return response.data; }); How can I read the elements from this array, I want to extract properties like paginginfo ,also object collection // The EDIT :1 js libraries I used here angularjsu 1.3.4, and restangular 1.4 My app.js : here I configured rest angular provider restangularProvider.addResponseInterceptor(function(data, operation, what, url, response, deferred) { if (operation == "getList") { var extractedData; extractedData = data.result; extractedData.paginginfo = data.paginginfo; return extractedData; } if (operation != "get") { var item = { status: response.status }; feedBackFactory.showFeedBack(item); } return response.data; }); // according to my knowledge this function will intercept every ajax call (api calls) and modify the response , unfortunately I need to apply custom modification because the getlist method must return collection but my api returning object, so according to restangular ,the above code is the possible solution, and here its fine its fetching the data. userservice.js : this is angular service which using restangular function(restangular) { var resourceBase = restangular.all("account"); this.getUsers = function(pagenumber, recordsize) { var resultArray = resourceBase.getList({ page: pagenumber, size: recordsize }).$object; }; }; according to my knowledge .$object in restangulr resolve the promise and bring back the data, also I am getting the resultArray its looks like in the image in the console, here I can log this array s…
has comment: http://stackoverflow.com/comment/43659804

http://stackoverflow.com/q/27538722
has answer: http://stackoverflow.com/a/27538964
type: Question
answer count: 2
has body: I have a little problem that I would share with you. I can do a fadout fadin on a whole page by clicking html links. The code is ok BUT when i put the condition only FF browser return OK... IE, Chrome and Safari nothing. Impossible to link HREF with window.location... Please help me ! Below my code to fadeIn and fadeOut between pages html without condition and with : Without running ok : (window).load(function() { $("#overlay").fadeOut(1500); $("a.transition").click(function(event) { event.preventDefault(); linkLocation = this.href; $("#overlay").fadeIn(1000, function() { window.location = linkLocation; return false; }); }); }); With condition NOK except FF : $(window).load(function () { $("#overlay").fadeOut(1500); $("a.transition").click(function (event) { event.preventDefault(); linkLocation = this.href; if (linkLocation.contains("index.html")) { var e = document.getElementById("overlay"); e.id = "overlay2"; $("#overlay2").fadeIn(1000, function () { window.location = linkLocation; return false; }); } else if (linkLocation.contains("medias.html")) { var e = document.getElementById("overlay"); e.id = "overlay2"; $("#overlay2").fadeIn(1000, function () { window.location = linkLocation; return false; }); } else if (linkLocation.contains("competences.html")) { var e = document.getElementById("overlay"); e.id = "overlay3"; $("#overlay3").fadeIn(1000, function () { window.location = linkLocation; return false; }); } }); }); I have trouble with window.location = linkLocation for the condition... Why ? I'm novice Thanks !
upvote count: 1
has answer: http://stackoverflow.com/a/27539117
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
score: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/43505795
has title: window.location and condition not working IE, CHROME, SAFARI
has comment: http://stackoverflow.com/comment/43505773
tagged with: http://stackoverflow.com/tag/html
favorite count: 0

http://stackoverflow.com/q/27504797
has comment: http://stackoverflow.com/comment/43440718
upvote count: 2
has body: I want to load CSS background images asynchronously in a non-blocking way. I can see in Chrome that if I put the image into a class and load the image by adding the class to the DOM element, it works. Demo: setTimeout(function(){$("#imageContainer").addClass("imageClass");},10000); The network monitor shows that the actual image file is only loaded when the class is applied. However, I imagine the browser might as well already load the image file when it loads the CSS (which would probably block rendering). Question: Does the standard demand that the image file is only loaded when the class is applied? I am sorry I wouldn't even know where to start looking for this detail. Addendum: same question goes for font files, too! If a fancy font is part of one class and the class is applied asynchronously - will the font file also be loaded asynchronously?
tagged with: asynchronous
favorite count: 0
has comment: http://stackoverflow.com/comment/43439629
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/2396909
has comment: http://stackoverflow.com/comment/43439623
tagged with: css
has title: deferred CSS background image (or font) files
tagged with: deferred-loading
score: 2
answer count: 0
downvote count: 0
has comment: http://stackoverflow.com/comment/43439672
has comment: http://stackoverflow.com/comment/43440643
type: Question
tagged with: javascript
tagged with: image
has comment: http://stackoverflow.com/comment/43441147

http://stackoverflow.com/q/27631984
tagged with: http://stackoverflow.com/tag/html
answer count: 4
has comment: http://stackoverflow.com/comment/43684221
type: Question
has answer: http://stackoverflow.com/a/27632190
tagged with: javascript
has answer: http://stackoverflow.com/a/27632111
has comment: http://stackoverflow.com/comment/43684227
has title: Adding input values and default values
score: 0
tagged with: jquery
has answer: http://stackoverflow.com/a/27632169
has answer: http://stackoverflow.com/a/27632198
has comment: http://stackoverflow.com/comment/43684372
type: UnansweredQuestion
has body: I have this short form that when the user selects the first option in a dropdown menu, three fields will appear. The first field has a default value while the other two should be fill up by the user. Then I need to get the total of the three fields. If the user selcts the second option, the three fields will not appear. As of now, this is what I've got: HTML New Satisfied This is a default value Preferred Value: Number of Contributors: Total: jquery $("#select1").change(function(){ if($(event.target).val() == 'A'){ $('#d1').show(); }else{ $('#d1').hide(); } }); js function total(){ var a = $("#input1").val(); var b = $("#input2").val(); var c = $("#input3").val(); var d = parseFloat(a, 10); var e = parseFloat(a, 10); var f = parseFloat(a, 10); total = d + e + f; $('#txt1').val(total.toFixed(2));$( }

http://stackoverflow.com/q/27613481
type: AnsweredQuestion
tagged with: interpreter
has title: What's the point of returning an "Undefined Value" when re-defining "print()" function for QScriptEngine?
has comment: http://stackoverflow.com/comment/43724229
upvote count: 7
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27735721
has comment: http://stackoverflow.com/comment/43724045
answer count: 2
has comment: http://stackoverflow.com/comment/43779447
possible better answer: http://stackoverflow.com/a/27735524
downvote count: 0
has comment: http://stackoverflow.com/comment/43724217
score: 7
has answer: http://stackoverflow.com/a/27735524
favorite count: 0
has comment: http://stackoverflow.com/comment/43754325
has comment: http://stackoverflow.com/comment/43724088
has body: [Background] The default print() function of QScriptEngine prints the result to the terminal of Qt Creator IDE for debugging purpose. As a result, the output must be redirected to our texteditor if we are going to make a ECMA script interpreter ourselves. This part of the document "Making Applications Scriptable" remains untouched since Qt 4.3. Section "Redefining print()": Qt Script provides a built-in print() function that can be useful for simple debugging purposes. The built-in print() function writes to standard output. You can redefine the print() function (or add your own function, e.g. debug() or log()) that redirects the text to somewhere else. The following code shows a custom print() that adds text to a QPlainTextEdit. So here is the suggested re-definition of print(): QScriptValue QtPrintFunction(QScriptContext *context, QScriptEngine *engine) { QString result; for (int i = 0; i &lt; context-&gt;argumentCount(); ++i) { if (i &gt; 0) result.append(" "); result.append(context-&gt;argument(i).toString()); } QScriptValue calleeData = context-&gt;callee().data(); QPlainTextEdit *edit = qobject_cast&lt;QPlainTextEdit*&gt;(calleeData.toQObject()); edit-&gt;appendPlainText(result); return engine-&gt;undefinedValue(); } At first, I doubted the need of returning an "Undefined Value" by return engine-&gt;undefinedValue();, and it looks like the role of the argument *engine is just to return this void value. So here is what I've done to change the function: QScriptValue myPrintFunction(QScriptContext *context, QScriptEngine *engine) { QString result; for (int i = 0; i &lt; context-&gt;argumentCount(); ++i) { if (i &gt; 0) result.append(" "); result.append(context-&gt;argument(i).toString()); } /* QScriptValue calleeData = context-&gt;callee().data(); QPlainTextEdit *edit = qobject_cast&lt;QPlainTextEdit*&gt;(calleeData.toQObject()); edit-&gt;appendPlainText(result); return engine-&gt;undefinedValue(); */ return engine-&gt;toScriptValue(result); // ---&gt; return the…
has comment: http://stackoverflow.com/comment/43723948
accepted answer: http://stackoverflow.com/a/27735721
has comment: http://stackoverflow.com/comment/43780736
tagged with: read-eval-print-loop
tagged with: qt
tagged with: c++

http://stackoverflow.com/comment/43392496
has text: it was, indeed, a very "beginner" mistake. Answer accepted, thanks!
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27479527
type: AnswerComment

http://stackoverflow.com/a/42087743
answers question: http://stackoverflow.com/q/27552280
has body: If you're using ES2015 synax you can you initialize state directly in constructor function: constructor() { super(); this.state = {...} }
type: Answer
score: 0

http://stackoverflow.com/a/27591523
has comment: http://stackoverflow.com/comment/43607330
has body: document.querySelector only selects the element if it is in DOM. When you do var value= checkbox.value;, it is just using the internally set value, which was not in the DOM when it was parse. Try adding the following line and things should work. It changes the DOM so, it will work. checkbox.setAttribute("value", "on"); // it updates markup hence works Full code: var checkbox = document.querySelector("INPUT[type='checkbox'][name='vehicle']"); var value= checkbox.value; // evaluates to: 'on' checkbox.setAttribute("value", "on"); try { document.querySelector("INPUT[type='checkbox'][name='vehicle'][value='" + value + "']").checked=true; } catch (ex) { console.log(ex.message); }
has comment: http://stackoverflow.com/comment/43606974
has comment: http://stackoverflow.com/comment/43607256
has comment: http://stackoverflow.com/comment/43607080
has comment: http://stackoverflow.com/comment/43606965
downvote count: 0
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/43606934
has comment: http://stackoverflow.com/comment/43606716
has comment: http://stackoverflow.com/comment/43606721
answers question: http://stackoverflow.com/q/27591404
score: 1
has comment: http://stackoverflow.com/comment/43608275
has comment: http://stackoverflow.com/comment/43607276
has comment: http://stackoverflow.com/comment/43606801

http://stackoverflow.com/q/27557972
type: AnsweredQuestion
upvote count: 3
has answer: http://stackoverflow.com/a/27558040
possible better answer: http://stackoverflow.com/a/27558023
has answer: http://stackoverflow.com/a/27558023
type: Question
score: 3
tagged with: javascript
has body: I would like to understand why MY code doesn't work, to understand better where is the problem. This is my first JavaScript try, and I simply want to show/hide some divs when clicking on another div. Specifically, with the following JavaScript code, I would like to hide all the divs (in case a div was already shown), and then show the div I'd like to show. These are the files: index.html JavaScript First Try Mario regala collana a Sandrone Lorem ipsum dolor sit amet, consectetur adipisci elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Mario regala collana a Silvia.jpg Lorem ipsum dolor sit amet, consectetur adipisci elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Mario regala collana a Cazzo Lorem ipsum dolor sit amet, consectetur adipisci elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. main.css body { font-family: Helvetica-light; } .title { height: 25px; border-bottom: 1px solid #a0a0a0; } .description { display: none; } description.js /*global $, jQuery, alert*/ var main = function () {…
answer count: 2
accepted answer: http://stackoverflow.com/a/27558040
downvote count: 0
tagged with: jquery
has title: Hiding/Showing with JavaScript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/comment/43657534
comment on: http://stackoverflow.com/q/27618230
score: 0
has text: i didn't, is that a mandetory?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43428035
type: QuestionComment
comment on: http://stackoverflow.com/q/27498419
has text: Just take the part of the canvas you want to show, wipe everything, and then draw it where you want it.
score: 0
type: Comment

http://stackoverflow.com/q/27614113
has title: How to execute an action when user clicks browser action and there is a popup (Chrome extension)
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: google-chrome-extension
tagged with: events
accepted answer: http://stackoverflow.com/a/27620079
has body: I'm trying to create a Chrome extension that features a browser action and a popup. I need to refresh the content I serve in the popup every time the user opens it, but since the on clicked event will not fire if a popup is assigned to the browser action, I don't know how to trigger the logic to refresh the content. I'm trying to do this in the background page, but I understand that that might not be the best way. Does anybody have an idea of how to approach this? Thanks for any help.
favorite count: 0
upvote count: 1
type: AnsweredQuestion
tagged with: popup
score: 1
type: Question
has answer: http://stackoverflow.com/a/27620079

http://stackoverflow.com/comment/43542411
has text: Ugh sorry, the example was wrong, I corrected it.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27558027
score: 0

http://stackoverflow.com/q/27491703
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has answer: http://stackoverflow.com/a/27491813
tagged with: http://stackoverflow.com/tag/mp3
type: Question
has title: How to support mp3 download from all browsers
tagged with: javascript
score: 0
tagged with: apache
answer count: 1
has body: I want to offer an mp3 file and have it available for download from every browser possible. It seems to be a mess. The link already has the download attribute, which works in some places. Then I tried with the apache configRewriteEngine On RewriteCond %{QUERY_STRING} ^view=download$ RewriteRule .*\.mp3$ - [L,T=applicaton/octet-stream] or &lt;FilesMatch "\.(?i:mp3)$"&gt; ForceType audio/mpeg SetEnvIf Request_URI "^.*/?([^/]*)$" FILENAME=$1 Header set Content-Disposition "attachment; filename=%{FILENAME}e" UnsetEnv FILENAME &lt;/FilesMatch&gt; And others I found online but none seem to let me download from mobile chrome on Android, is there any all around solution or combination so solutions?
type: UnansweredQuestion

http://stackoverflow.com/comment/43624680
score: 0
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/67454/discussion-between-asr-and-sampath-liyanage).
type: Comment
comment on: http://stackoverflow.com/a/27596998
type: AnswerComment

http://stackoverflow.com/comment/103046348
type: Comment
has text: it's more probably because "ToNumber" routine is called on both side before the comparaison is made, and "ToNumber" set both false and null to +0.
comment on: http://stackoverflow.com/a/42768040
type: AnswerComment
score: 0

http://stackoverflow.com/comment/43694190
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27625574
has text: Ah okay thanks, but i dont like the fact that every vehicle_type is stored in one array. How would i do it that i can send more data to PHP?
type: AnswerComment

http://stackoverflow.com/comment/43417439
comment on: http://stackoverflow.com/a/27492757
score: 0
has text: @Noob_Number_1 whoever wrote that exercise needs to go back to programming 101
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27538438
accepted answer of: http://stackoverflow.com/q/27538348
has comment: http://stackoverflow.com/comment/43505137
type: Answer
answers question: http://stackoverflow.com/q/27538348
has comment: http://stackoverflow.com/comment/43505086
upvote count: 1
score: 1
has body: So, if you're using jQuery, here's the solution you would want: var insertIntoTextArea = null; $('.data').on('click', function(){ insertIntoTextArea += $(this).text(); $("#text-area").val(insertIntoTextArea); }); Now, you can create the identifier any way you would like, but I used a class just to make it easier. One thing to remember is it's not usually a good idea to mix JS and PHP together. It just ends up being a mess and you'll run into so many problems. Also, it's not how jQuery is meant to operate. That said, what I did was create a click event handler that will know that on click, append it to the textarea's value and make sure it is ADDED to the existing data, rather than overwrite what they previously had in the textarea. Does this help? Here's a JSfiddle just in case
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/27617323
answers question: http://stackoverflow.com/q/27616837
has body: This is the function can do more than you expected: function blink(elem, times, speed) { if (times &gt; 0 || times &lt; 0) { if ($(elem).hasClass("blink")) $(elem).removeClass("blink"); else $(elem).addClass("blink"); } clearTimeout(function () { blink(elem, times, speed); }); if (times &gt; 0 || times &lt; 0) { setTimeout(function () { blink(elem, times, speed); }, speed); times -= .5; } } And you can use it as: $(document).ready(function () { blink(".test", 4, 500); }); See complete JSFiddle in: http://jsfiddle.net/jadendreamer/Nx4qS/ Hope this help. Edit: For using animate function see this post: How to create a jQuery button with blinking text without changing the background colour?
score: 0
type: Answer

http://stackoverflow.com/q/27497411
has comment: http://stackoverflow.com/comment/43426261
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/40402742
tagged with: javascript
tagged with: jquery
score: -1
has comment: http://stackoverflow.com/comment/68055374
has comment: http://stackoverflow.com/comment/43426635
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/43426476
favorite count: 0
has comment: http://stackoverflow.com/comment/68055831
has body: I have been working on this for the past several weeks, and I am still right where I started. I finally found a chunk of server code that linked a javascript file (in the same location as my javascript file): &lt;?php OCP\Util::addscript('core', 'visitortimezone'); ?&gt; So, I linked my file like this: &lt;?php OCP\Util::addscript('core', 'myJavascript'); ?&gt; But it still isn't working. My javascript, HTML, and CSS all worked perfectly in my Jsfiddle (http://jsfiddle.net/khenckel/963m7tzc/). I was hoping someone could point me in the right direction. Could there be an issue linking because I am using PHP, or because the file is Jquery instead of pure Javascript?
type: UnansweredQuestion
has title: Link Javascript file in PHP
downvote count: 2
tagged with: php
tagged with: css

http://stackoverflow.com/comment/43461684
comment on: http://stackoverflow.com/q/27515386
has text: Yes, you could also escape ":" if you wanted to, or just disallow URL values that start with "javascript:".
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43496753
has text: @JMerino Ah ok that is the one I wanted. "npm install --save node-mysql" won't install globally right?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27533916

http://stackoverflow.com/q/27559027
tagged with: javascript
has body: I am trying to take a screenshot of the second page on a website that uses ajax, using casperjs. I used Chrome and Ressurectio to create a test script and changed it slightly in order to suit my needs. However, when I run the script, the second screenshot only shows the "loading" page, which at first I thought it's due to ajax being slow... The problem is that even with a timeout of 15 seconds, it still doesn't take the screenshot that I want. Maybe I'm forgetting something? Here's my script: var x = require('casper').selectXPath; casper.options.viewportSize = {width: 1366, height: 667}; casper.on('page.error', function(msg, trace) { this.echo('Error: ' + msg, 'ERROR'); for(var i=0; i&lt;trace.length; i++) { var step = trace[i]; this.echo(' ' + step.file + ' (line ' + step.line + ')', 'ERROR'); } }); casper.test.begin('Resurrectio test', function(test) { casper.start('http://recrutamento.auchan.pt/listaofertas.aspx'); casper.waitForSelector(x("//a[normalize-space(text())='&gt;&gt;&gt;']"), function success() { this.capture('click1.png') test.assertExists(x("//a[normalize-space(text())='&gt;&gt;&gt;']")); this.click(x("//a[normalize-space(text())='&gt;&gt;&gt;']")); this.wait(7000); this.capture('click2.png') }, function fail() { test.assertExists(x("//a[normalize-space(text())='&gt;&gt;&gt;']")); }); casper.run(function() {test.done();}); });
score: 0
answer count: 1
tagged with: casperjs
type: AnsweredQuestion
has title: Clicking to next page on casperjs not working
type: Question
has answer: http://stackoverflow.com/a/27563077
accepted answer: http://stackoverflow.com/a/27563077

http://stackoverflow.com/a/27537754
type: Answer
upvote count: 4
has body: From the MDN Most browsers stop playing audio outside playbackRate bounds of 0.5 and 4, leaving the video playing silently. It's therefore recommended for most applications that you limit the range to between 0.5 and 4. Edit: Each browser handles moving outside of this recommended range differently. Firefox happens to clamp the value range from 0.5 to 5. Chrome clamps from 0.5 to 16. If you go outside the recommended range, you will get different behavior across all browsers so I suggest clamping it in your code to 4x.
downvote count: 0
has comment: http://stackoverflow.com/comment/58905962
has comment: http://stackoverflow.com/comment/43503811
score: 4
has comment: http://stackoverflow.com/comment/58906491
answers question: http://stackoverflow.com/q/27537694
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27537694

http://stackoverflow.com/q/27509218
tagged with: cordova
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/40200689
downvote count: 0
has title: Email composer with base64 img attachment not working
score: 1
tagged with: ionic-framework
type: Question
tagged with: javascript
has body: I'm not a pro programmer but I'm trying to attach a img file using this plugin in a mobile web app. Now, the plugin says I have to do something like this to add an attachment attachments: 'base64:icon.png//iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/...' And my base64 img for example is: data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJ....... which is saved in the var imgURI I've tried to do attachment: "base64:icon.png//" + $rootScope.imgURI.substring(24), And also without substring or with substring 25, 26. In every case the attachment isn'ìt passed to the email composer. to:, subject:, body:, are working fine. What am I doing wrong? Can you please help me? Thanks
upvote count: 1
answer count: 1
favorite count: 0

http://stackoverflow.com/a/27495826
score: 1
has body: You will need to name your splat parameter. "..." is not a valid variable name. You seem to want sum = (x, xs...) -&gt; if arguments.length &lt; 1 then 0 else x + sum xs
upvote count: 1
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/27495686

http://stackoverflow.com/a/27594716
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43624258
accepted answer of: http://stackoverflow.com/q/27592557
answers question: http://stackoverflow.com/q/27592557
has comment: http://stackoverflow.com/comment/43619647
type: Answer
upvote count: 4
downvote count: 0
has comment: http://stackoverflow.com/comment/43629941
has body: Pass the updated property into the Point.update() method. point:{ events:{ click: function(){ // determine toggle state // on first click this.dataLabels is undefined... var e = !this.dataLabels || this.dataLabels.enabled ? false : true; this.update({ dataLabels:{ enabled: e } }); } } } Here's an example which toggles them.
score: 4

http://stackoverflow.com/a/27552899
downvote count: 2
score: -2
upvote count: 0
has comment: http://stackoverflow.com/comment/43532152
has body: undefined is an object(not a type) try this: if (user_role === undefined) {}
answers question: http://stackoverflow.com/q/27552806
type: Answer

binary
tags question: http://stackoverflow.com/q/27571221
tag name: binary
type: Tag

http://stackoverflow.com/comment/43692142
score: 0
has text: Should you preserve source array?
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27636161

http://stackoverflow.com/q/27480368
tagged with: sencha-architect
score: 2
downvote count: 0
has body: I am using Sencha touch 2 to create a disabled selectfield, populated with default value. The problem is that if I disable the selectfield, then the value is not shown on iOS devices(it is blank and disabled)., but the value is shown properly on other platforms (android,chrome browser). How can I make the value visible? Here's my code for the selectfield. xtype: 'selectfield', disabled: true, id: 'lengthUnit', label: 'Length unit', labelWidth: '35%', labelWrap: true, name: 'lengthUnit', options: [ { text: 'km', value: 'km' }, { text: 'mi', value: 'mi' } The value is set by calling setRecord function on the parent container. The values populate properly if the selectfield is not disabled. This problem occurs only on iOS devices!
type: Question
type: AnsweredQuestion
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27495589
upvote count: 2
answer count: 1
tagged with: ios
has answer: http://stackoverflow.com/a/27495589
favorite count: 0
tagged with: extjs
tagged with: sencha-touch-2
has title: Show values in disabled selectfiled on iOS

http://stackoverflow.com/comment/43490479
type: Comment
has text: No. When I print name.getText() to the console, I get [object Object]. And it is never entering the if condition.
comment on: http://stackoverflow.com/a/27517532
type: AnswerComment
score: 0

http://stackoverflow.com/q/27565863
has answer: http://stackoverflow.com/a/27566370
has comment: http://stackoverflow.com/comment/43556964
score: 1
upvote count: 1
type: Question
tagged with: javascript
has body: hi I have this plunkr that has draggable image what I need is i want to add resizable property this is my html Size &lt;input type="number" ng-model="updatesize"&gt; Position X &lt;input type="number" ng-model="updateX"&gt; Positon Y &lt;input type="number" ng-model="updateY"&gt; &lt;div style ="width:900px; height:400px; background-color:red"&gt; &lt;img my-resize my-draggable src="../coffee.jpg" style="width:{{updatesize}}px; top:{{updateY}}px; left:{{updateX}}px; position:relative; cursor:pointer"&gt; &lt;div&gt; this is my script.js angular.module('myApp', []) .controller('mainController',['$rootScope', '$scope', function($rootScope, $scope) { $scope.updatesize = 250; $scope.updateX = 60; $scope.updateY = 70; }]) .directive('myDraggable', ['$document', function($document) { return function(scope, element, attr) { var startX = 0, startY = 0, x = 0, y = 0; element.css({ position: 'relative', width: scope.updatesize + 'px', top: scope.updateY + 'px', left: scope.updateX + 'px', cursor: 'pointer' }); element.on('mousedown', function(event) { // Prevent default dragging of selected content event.preventDefault(); startX = event.pageX - x; startY = event.pageY - y; $document.on('mousemove', mousemove); $document.on('mouseup', mouseup); }); function mousemove(event) { y = event.pageY - startY; x = event.pageX - startX; scope.updateX = x; scope.updateY = y; scope.$apply(); element.css({ top: y + 'px', left: x + 'px' }); } function resize(event){ } function mouseup() { $document.off('mousemove', mousemove); $document.off('mouseup', mouseup); } }; }]) when we edit the value in the textbox the image respond to it. if the resizable is achieved I need to that width pixel value to be the value of size textbox. could anyone help me please.
downvote count: 0
answer count: 1
tagged with: jquery
has title: Angular Image drag and resize
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/comment/43586629
score: 2
has text: You can do non-padded RSA with phpseclib using the technique described at http://stackoverflow.com/a/4534385/569976
comment on: http://stackoverflow.com/a/27544110
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27597575
has answer: http://stackoverflow.com/a/27665027
has comment: http://stackoverflow.com/comment/43727994
favorite count: 0
has body: I have an app in nodejs. In it, I define some global variables that are shared across multiple files. For example: //common.js async = requires("async"); isAuthenticated = function() { //... return false; }; //run.js require("common.js"); async.series([function () { isAuthenicated(); }], function () { console.log("done"); }); I want the async and isAuthenticated variables to be minified, but minified to the same thing in all files. It would look like the following: //common.min.js a = requires("async"); b = function() { //... return false; }; //run.min.js require("common.js"); a.series([function () { b(); }], function () { console.log("done"); }); How to do it in uglifyjs? I'm currently looping through the files and using the command uglifyjs $file -m "sort,toplevel" -c &gt; $file.min on each.
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/5447771
has answer: http://stackoverflow.com/a/27721901
upvote count: 4
tagged with: uglifyjs2
answer count: 4
tagged with: node.js
score: 3
linked to: http://stackoverflow.com/q/15590702
type: Question
has comment: http://stackoverflow.com/comment/43727872
has answer: http://stackoverflow.com/a/27658816
has comment: http://stackoverflow.com/comment/43745933
has comment: http://stackoverflow.com/comment/43703877
tagged with: javascript
has comment: http://stackoverflow.com/comment/43703267
has comment: http://stackoverflow.com/comment/43899889
has comment: http://stackoverflow.com/comment/43721668
has comment: http://stackoverflow.com/comment/43701434
has answer: http://stackoverflow.com/a/41967583
downvote count: 1
has comment: http://stackoverflow.com/comment/43731920
has title: Uglify the global variable

http://stackoverflow.com/q/27629603
has body: I need to put the return of the function validarCartao() into that HiddenField value. The alert(response.brand.name) works fine but I cant get this, even if I move the HiddenField to inside the function. I've tried lots of ways but nothing works. I really appreciate any help you can provide. Thanks. var hiddenBandeiraTemp = document.getElementById('&lt;%=hiddenBandeira.ClientID%&gt;'); hiddenBandeiraTemp.value = validarCartao(tbNumeroCartao.value); function validarCartao(element) { var cardNum = element.replace(/[^\d.]/g, ''); var card_invalid = 'Número do cartão inválido.'; if (cardNum.length &gt;= 6) { PagSeguroDirectPayment.getBrand({ cardBin: cardNum.substr(0, 6), success: function (response) { if (typeof response.brand.name != 'undefined') { alert(response.brand.name); // OK return response.brand.name; // &lt;&lt;-- } else { alert(card_invalid); } }, error: function (response) { alert(card_invalid); } }); } }
has answer: http://stackoverflow.com/a/27638546
has answer: http://stackoverflow.com/a/27629896
has comment: http://stackoverflow.com/comment/43680003
has comment: http://stackoverflow.com/comment/43694240
tagged with: asp.net
has title: How to put this Javascript function return in a HiddenField c# object?
tagged with: hiddenfield
type: AnsweredQuestion
score: 0
accepted answer: http://stackoverflow.com/a/27629896
type: Question
tagged with: c#
answer count: 2
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27638546

http://stackoverflow.com/q/27481580
has title: No onkeypress event fired on pressing cmd+z/y in UIWebView
tagged with: uiwebview
answer count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: safari
tagged with: ios8
score: 1
type: Question
has comment: http://stackoverflow.com/comment/50561060
downvote count: 0
tagged with: javascript
has body: I have a HTML5 based web app which contains a text editor. I have handled undo/redo actions inside js code. But when i use my app inside UIWebview i am not able to handle undo/redo events because of undoManager of UIWebView. No "onkeypress" event is fired on the document. Also same issue when i use predictive text suggestions feature of iOS 8. No keypress event is fired. Any suggestions??
favorite count: 0

http://stackoverflow.com/q/27568200
answer count: 1
has title: Javascript subclassing
has comment: http://stackoverflow.com/comment/43561591
has body: I expect this results in console: "2" and "11". But instead it gives me "2" and "2". Why publicFunc2 is not overriden? http://jsfiddle.net/17b5ytmq/1/. I guess I don't understand something about subclassing in Javascript. function MyClass() { var self = this; this._protectedArr = [1]; this.publicFunc = function() { this._protectedArr.forEach(function(element, index, array) { console.log(element + self.publicFunc2()); }); } this.publicFunc2 = function () { return 1; } } function MyClassChild() { this.publicFunc2 = function () { return 10; } } var myClass = new MyClass(); myClass.publicFunc(); MyClassChild.prototype = myClass; var myClassChild = new MyClassChild() myClassChild.publicFunc();
tagged with: subclass
linked to: http://stackoverflow.com/q/15040955
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43561761
has answer: http://stackoverflow.com/a/42190786
has comment: http://stackoverflow.com/comment/43561890
tagged with: oop
type: Question
has comment: http://stackoverflow.com/comment/43562371
has comment: http://stackoverflow.com/comment/43561637
has comment: http://stackoverflow.com/comment/43561648
tagged with: javascript
has comment: http://stackoverflow.com/comment/43561816
tagged with: prototype
score: 0
has comment: http://stackoverflow.com/comment/43561752

http://stackoverflow.com/q/27515710
answer count: 3
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
has title: How to Change the color of a div with only JS (not jquery) and without an ID or onclick on the element?
has answer: http://stackoverflow.com/a/27515809
has comment: http://stackoverflow.com/comment/43461823
has answer: http://stackoverflow.com/a/27515865
tagged with: css
has comment: http://stackoverflow.com/comment/43461812
favorite count: 0
has comment: http://stackoverflow.com/comment/43461853
accepted answer: http://stackoverflow.com/a/27515779
has body: So when I click c1 I want it to turn black (just c1) and the back to red when clicked again. Same for c2 and c3. So I want to do this without IDs and without putting onclick"" on the elements. Oh did I forget to mention no jQuery :] I know it has to do with using select. This is purely for learning/trying purposes. http://jsfiddle.net/hy58knvc/ ???
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27515809
has answer: http://stackoverflow.com/a/27515779
type: Question
has comment: http://stackoverflow.com/comment/43461968
tagged with: javascript
score: 0

http://stackoverflow.com/q/27546956
upvote count: 2
has comment: http://stackoverflow.com/comment/43520419
has body: I have one formPanel with 3 buttons (Filtrar, Limpiar and Nuevo Borrador). Im trying to show two buttons in one line (Filtrar and Limpiar) and under this buttons the Nuevo Borrador button . Something like this: This is the code of the formPanel. formPanel = new Ext.form.FormPanel({ id:'formulario', title: '<bean:message key="label.gi.puestosTipo.criteriosBusqueda" />' ,region: 'west' ,width: 300 ,height: 500 ,collapsible : true ,labelWidth: 77 ,bodyStyle:'padding:5px 0px 0px 3px;' ,autoHeight: true ,method: 'POST' ,params: {"method": "buscarInformes"} // Buscar informe. TODO ,frame:true ,style: 'text-align: left;' ,defaultType: 'textfield' ,buttonAlign: 'center' ,items: [{ xtype: 'fieldset', title: 'Datos del documento', columnWidth: 0.5, collapsible: false, defaultType: 'textfield', defaults: { anchor: '100%' }, layout: 'anchor', items: [{ xtype: 'combo', fieldLabel: 'Tipo documento ', emptyText: 'Tipo', hiddenName: 'tipo', store: new Ext.data.SimpleStore({ data: [ [0, 'Borrador'], [1, 'Final'], ], id: 0, fields: ['value', 'text'] }), valueField: 'value', displayField: 'text', triggerAction: 'all', editable: false },{ fieldLabel: '<bean:message key="label.analisisGestionRiesgo.salvaguardas.codigo" />', name: 'codigo', },{ fieldLabel: '<bean:message key="label.agr.denominacion" />', name: 'denominacion', } ]},{ xtype: 'fieldset', title: 'Rango de fecha', columnWidth: 0.5, collapsible: true, defaultType: 'textfield', defaults: { anchor: '100%' }, layout: 'anchor', items: [ { xtype: 'datefield', fieldLabel: 'Desde', name: 'fechaDesde', },{ xtype: 'datefield', fieldLabel: 'Hasta', name: 'fechaHasta', }] },{ xtype: 'button', text: 'Limpiar', style: 'margin: 0 1 0 1 ;' },{ xtype: 'button', text: 'Enviar', style: 'margin: 0 1 0 1 ;' },{ xtype: 'button', text: 'Nuevo borrador', style: 'margin: 0 1 0 1 ;' } ] } i tried to center the buttons too using alignTarget: 'center' (in xtype: 'button' element) and buttonAlign: 'center' as i see in ext docs but doesnt work. What metho…
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27547608
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27547608
tagged with: extjs
score: 2
answer count: 1
downvote count: 0
tagged with: extjs5
has title: change button position in formPanel
favorite count: 0

http://stackoverflow.com/a/27565761
has comment: http://stackoverflow.com/comment/43556771
has comment: http://stackoverflow.com/comment/43557035
has comment: http://stackoverflow.com/comment/43556717
has body: The this in the start and stop methods don't necessarily point to the same this as in the init. This is because they are callback functions. If you want to refer to the same object context then try the following: var demo = { init : function(){ $('#test').hover(this.stop.bind(this), this.start.bind(this)); }, start: function(){ //here is the error alert(this.name); } stop: function(){ alert(this.age); // 'this' does not mean the Demo object, but $('#test') object. } } Using bind will pass the this context through to the callbacks. MDN docs for bind are here.
answers question: http://stackoverflow.com/q/27565686
has comment: http://stackoverflow.com/comment/43558886
has comment: http://stackoverflow.com/comment/43557806
has comment: http://stackoverflow.com/comment/43560191
has comment: http://stackoverflow.com/comment/43556979
type: Answer
has comment: http://stackoverflow.com/comment/43556759
downvote count: 1
score: 3
has comment: http://stackoverflow.com/comment/43557071
has comment: http://stackoverflow.com/comment/43556483
upvote count: 4
has comment: http://stackoverflow.com/comment/43556869

http://stackoverflow.com/comment/43467956
type: Comment
comment on: http://stackoverflow.com/q/27519092
score: 1
type: QuestionComment
has text: What do you get in the alert for alert(arrData); ?

http://stackoverflow.com/q/27488878
has comment: http://stackoverflow.com/comment/43410351
has comment: http://stackoverflow.com/comment/43409763
favorite count: 0
answer count: 0
type: UnansweredQuestion
tagged with: three.js
upvote count: 1
score: 1
has title: THREE JS TWEEN JS not smooth
has comment: http://stackoverflow.com/comment/43409984
has comment: http://stackoverflow.com/comment/43409871
tagged with: tween
type: Question
has body: Im using TWEEN on THREE JS https://github.com/sole/tween.js/ and facing smooth problem. when i pot tween number from 1 to 2 i get this numbers: You can see numbers are sometimes overtaken. That prevent to have smooth animations. This is my scene animation config: function animate() { requestAnimationFrame( animate ); render(); controls.update(); TWEEN.update(); stats.update(); } function render() { renderer.clear(); renderer.render( scene, camera ); updateHUDSprites (); renderer.clearDepth(); renderer.render( sceneOrtho, cameraOrtho ); } TWEEN function: var lineTween = new TWEEN.Tween({value:1}).to({value:1000},100).easing(TWEEN.Easing.Linear.None).onStart(function(){ }).onUpdate(function () { console.log(this.value); }).onComplete(function () { }).start(); Is the some experience with this? Why can it be?
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/43409888

http://stackoverflow.com/q/27571140
upvote count: 1
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/43568002
tagged with: http://stackoverflow.com/tag/html
has title: NotFoundError Node was not found image_div.parentNode.removeChild(img)
accepted answer: http://stackoverflow.com/a/27573111
downvote count: 0
has answer: http://stackoverflow.com/a/27573111
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43570195
score: 1
has comment: http://stackoverflow.com/comment/43568184
has comment: http://stackoverflow.com/comment/43567833
has body: I am having problems getting removeChild() to work. I am getting "NotFoundError: Node was not found image_div.parentNode.removeChild(img);" error Here is my code: &lt;div id="imagesframe"&gt; &lt;/div&gt; &lt;script&gt; images_array = [image1.jpg,image2.jpg,image3.jpg,image4.jpg,image5.jpg]; var image_div = document.getElementById('imagesframe'); for(var i=0 ; i&lt;images_array.length ; i++) { var img = new Image(); img.src = images_array[i]; img.style.width = '500px'; img.style.height = '500px'; setTimeout(function(){image_div.appendChild(img)},1000); image_div.parentNode.removeChild(img); } &lt;/script&gt; the last line: image_div.parentNode.removeChild(img); is causing the problem. What could be causing this?

http://stackoverflow.com/q/27546104
tagged with: php
has comment: http://stackoverflow.com/comment/43525342
has body: I have the following code which is supposed to pull data from mysql database if search box value matches row &amp; attribute Client_Name in MYSQL. please see http://www.recruitingblt.comli.com/add-new-sales-record.html. When a match is found, the form reverts back (try James Dean) and does not autopopulate the fields I want it to (for now I am just asking for Client_Address, Client_Phone &amp; Attn_Email1 to test). These are the names of columns in mysql table bltrecruiting). I am thinking that maybe Client_Name needs to be unique, say I have company Microsoft, and there is more than one row, will the query not be able to pull through address, phone etc despite being the same for all Microsoft records? Does the look up value need to be unique? &lt;?php $regnum = $_GET['regnum']; //////////regnum is named box at top of form page (Client Name Box) //////Connection which seems to work fine $db_host = 'mysql6.000webhost.com'; $db_username = '********'; $db_password = '********'; $db_name = 'a8748341_bltrec'; mysql_connect( $db_host, $db_username, $db_password) or die(mysql_error()); mysql_select_db($db_name); ////// Check for the Client Name which is a field Client_Name in the database - Should Client_Name be unique? $result = mysql_query("SELECT * FROM bltrecruiting WHERE Client_Name='$regnum'") or die(mysql_error()); $row = mysql_fetch_array( $result ); if (empty($row[Client_Name])) { echo "No previous record of Client: $regnum &lt;br&gt;"; echo "Please try again &lt;br&gt;" ?&gt; &lt;div id=regcon&gt; &lt;FORM NAME = "reg" action=database.php&gt; &lt;div style=width:150px; float:left; display:inline-block; font-family: Verdana; font-size: 12px; padding-left:13px;&gt; Client Name: &lt;/div&gt; &lt;input type="text" id="textbox" name="regnum" size="20"/&gt; &lt;input name="Submit" type="submit" value="Get Form"/&gt; &lt;/form&gt; &lt;/div&gt; } else { ///////// Get the fields from the database $address = $row['Client_Address']; $phonenumber = $row['Client_Phone']; $nam…
has comment: http://stackoverflow.com/comment/43525630
score: 0
has comment: http://stackoverflow.com/comment/43526087
tagged with: mysql
tagged with: forms
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27549910
has comment: http://stackoverflow.com/comment/43524268
has comment: http://stackoverflow.com/comment/43524351
answer count: 1
has comment: http://stackoverflow.com/comment/43523120
has title: Why is mysql data not pulling into form despite query finding record, does look up value need to be unique?
type: UnansweredQuestion

http://stackoverflow.com/a/45338247
has body: In Checkout page: jQuery(document.body).trigger("update_checkout") In Cart page: jQuery(document.body).trigger("wc_update_cart");
score: 11
answers question: http://stackoverflow.com/q/27635186
downvote count: 0
type: Answer
upvote count: 11

http://stackoverflow.com/q/27624914
has title: ASP.NET with angularJS fails to load template (Blank page with no error)
score: 1
has comment: http://stackoverflow.com/comment/43670643
upvote count: 1
type: AnsweredQuestion
tagged with: c#
accepted answer: http://stackoverflow.com/a/27625479
tagged with: asp.net-mvc
tagged with: javascript
type: Question
has body: I have problem with routing inside ASP.NET application. When I move my angularJS outside of ASP.NET MVC it's working fine (on XAMPP) but when I run it inside Visual Studio 2013 my Index page is blank. I really don't know where's the problem... Does someone knows where's the problem? Here is code that I am using: angularJS routing script: var app = angular.module('contactsManager', ['ngRoute']); app.config(function ($routeProvider) { $routeProvider .when('/contacts', { controller: 'ContactsController', templateUrl: 'templates/contacts.html' }) .when('/add-contact', { controller: 'ContactAddController', templateUrl: 'templates/addContact.html' }) .when('/edit-contact/:contactId', { controller: 'ContactEditController', templateUrl: 'templates/editContact.html' }) .when('/display-contact/:contactId', { controller: 'ContactDetailsController', templateUrl: 'templates/displayContact.html' }) .otherwise({ redirectTo: 'templates/contacts' }); }); ASP.NET Home Controller: public class HomeController : Controller { public ActionResult Index() { return View(); } public ActionResult Templates() { return PartialView(); } public ActionResult Contact() { ViewBag.Message = "Your contact page."; return View(); } } ASP.NET Route Config: public class RouteConfig { public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute("templates", "templates/{action}/{name}", new { controller = "Home", action = "Templates", name = "" } ); routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } ); } }
has comment: http://stackoverflow.com/comment/43670877
answer count: 1
downvote count: 0
tagged with: asp.net
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/27625479

http://stackoverflow.com/a/27523674
type: Answer
downvote count: 0
has body: This will help you. You can use jquery method for handling selection event. $("#option1 li").click(function() { alert($(this).html()); });
score: 1
answers question: http://stackoverflow.com/q/27523379
upvote count: 1

http://stackoverflow.com/q/27496436
has title: Create AngularJS Directive to Validate on Blur
type: Question
tagged with: angularjs-directive
has answer: http://stackoverflow.com/a/27516506
has body: Hoping to re-create some of the functionality that's available to us in Angular 1.3.X -- the app I am creating has to work well (or at least well-enough) in IE 8. For that reason, I am (sadly) constrained to not using 1.3.X. I've been running into some trouble trying to emulate the $ng-touched attr that is available in 1.3.X. One part of our app needs to alert users that their form element is invalid if they've tab-bed through it. As it stands, it doesn't set the $invalid attr on any form elements unless I've entered in text and deleted it. I tried using $pristine and $dirty to achieve $invalid after tabbing through, but they both seem to act based on the input's value, not whether it's been touched (maybe this was one of the big advantages of 1.3.X) Goal: when a user tabs through a form, validations can be fired and set each empty form element as $invalid if it's blank. Basically to emulate the behavior of the $ng-touched attr in 1.2.X. Here's what I have so far: angular.module('goodStewardApp') .directive('chf-validate', function () { return { require: 'ngModel', link: function(scope, elm, attrs, ctrl) { $(elm).blur( function(elm) { ctrl.$setValidity(elm, false); } ); } }; }); Any help would be greatly appreciated. Thanks!
tagged with: javascript
score: 0
answer count: 1
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43424475

http://stackoverflow.com/comment/43540767
score: 0
type: Comment
type: QuestionComment
has text: Did you not notice all those red errors at the bottom of your JavaScript tab?
comment on: http://stackoverflow.com/q/27557204

http://stackoverflow.com/comment/43464150
has text: Is there anyway to avoid hitting tinyurl? My answer below clearly wouldn't work because the request just redirects to the same end url which doesn't change. Why not just hit the url directly? http://weathersticker.wunderground.com/weathersticker/cgi-bin/banner/ban/wxBanner?bannertype=wu_simplewhite&airportcode=KTTN&ForcedCity=Princeton&ForcedState=NJ&zip=08540&language=EN
comment on: http://stackoverflow.com/q/27515962
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/43564563
type: Comment
type: QuestionComment
has text: you shouldnt set `var count` inside the function. You reinitialize the variable
comment on: http://stackoverflow.com/q/27569611
score: 0

http://stackoverflow.com/q/27579032
tagged with: javascript
score: 0
linked to: http://stackoverflow.com/q/754607
has comment: http://stackoverflow.com/comment/43583877
tagged with: jquery
has comment: http://stackoverflow.com/comment/43586326
favorite count: 0
has comment: http://stackoverflow.com/comment/43583774
has body: I would like to ask how i going to insert stylesheet style with media query by using jss.js. Currently i am using code below to insert style with class, but i wonder how to insert style with class with media query ? jss.set('.demo', { 'font-size': '15px', 'color': 'red'. 'background' : '#000' }); The Jss plugin https://github.com/Box9/jss Js fiddle link example http://jsfiddle.net/L8wvuonq/1/ I would appreciate if anyone can help. I really need to insert style with media query by using stylesheet or others way which can insert and retrieve style rules so that i can compile together. Thanks.
has title: Jss plugin that allow insert stylesheet with media query
has comment: http://stackoverflow.com/comment/43583800
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
linked to: http://stackoverflow.com/q/524696
has comment: http://stackoverflow.com/comment/43582860
answer count: 0
upvote count: 1
tagged with: stylesheet
has comment: http://stackoverflow.com/comment/43582758
downvote count: 1
type: Question

xlink
type: Tag
tags question: http://stackoverflow.com/q/27576143
tag name: xlink

http://stackoverflow.com/comment/43658839
comment on: http://stackoverflow.com/a/27618944
score: 0
type: AnswerComment
has text: I guess the only thing to add here is that in javascript functions are first class citizens so you can pass them around just like you can other objects/ints etc.
type: Comment

http://stackoverflow.com/comment/43504038
comment on: http://stackoverflow.com/q/27537351
has text: I'm not familiar with Angular JS, but have you tried catching the exit event, prevent it from firing using `preventDefault()` at the beginning of your `onExit` event handler, setting a timeout for the duration of the css transition and sending the event again on completion?
score: 0
type: Comment
type: QuestionComment

stylesheet
tags question: http://stackoverflow.com/q/27579032
tag name: stylesheet
tags question: http://stackoverflow.com/q/27540082
type: Tag

http://stackoverflow.com/comment/43729717
comment on: http://stackoverflow.com/a/27619579
type: Comment
has text: Please read the question in full before answering. I'm looking for a solution that doesn't address the parent.
score: 0
type: AnswerComment

http://stackoverflow.com/q/27588739
favorite count: 0
tagged with: jsx
accepted answer: http://stackoverflow.com/a/27595228
has title: Photoshop Scripting (JS): Duplicate layer set and subs
has body: I would like to duplicate a layer set and all it's contents (layers + layersets) via Photoshop scripting (JS). Is it possible to completely clone a layer set out of the box, or does anyone known of a known script that suits that purpose?
type: AnsweredQuestion
upvote count: 1
type: Question
tagged with: photoshop-script
has answer: http://stackoverflow.com/a/27595228
possible better answer: http://stackoverflow.com/a/79075019
tagged with: javascript
has answer: http://stackoverflow.com/a/79075019
answer count: 2
downvote count: 0
score: 1
tagged with: photoshop

size
type: Tag
tags question: http://stackoverflow.com/q/27549518
tags question: http://stackoverflow.com/q/27568143
tags question: http://stackoverflow.com/q/27579781
tag name: size

http://stackoverflow.com/q/27587646
has comment: http://stackoverflow.com/comment/43609847
tagged with: firefox
tagged with: javascript
score: 0
has body: I have a strange problem and am not quite sure how to narrow the source of the bug (not a web developer). A web page[1] which visualizes about 8 megs of data renders correctly on chrome and safari, but blows up on firefox (possibly IE as well). I'm using dimplejs visualization library, which is based on D3. I wrapped the dimple library in my custom created tags (created using x-tag/webcomponents) to remove chunks of imperative javascript. Firefox shows only one of the 35 charts, and even that is extremely garbled. Further, firefox console shows "NS_ERROR_FAILURE: " error in the dimple library, but I can't find much information on that error (seems to be a catch all error). I'm not clear on the error being in firefox, dimple, my x-tag implementation or some combination of all three. Dimple is not too popular yet and x-tag is extremely obscure, hard to find info on them. Forget about a solution, how can I find out which component/library is causing the problem? [1]http://rule605.targetcompid.com/report.htm?mc=ALL&amp;symbol=ALL&amp;month=201409
tagged with: x-tag
has title: web page using dimplejs, x-tag, shows up fine in chrome and safari, blows up in firefox
tagged with: d3.js
type: UnansweredQuestion
tagged with: dimple.js
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/43600717

http://stackoverflow.com/a/27560578
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27560516
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43547217
answers question: http://stackoverflow.com/q/27560516
type: Answer
has body: The Javascript is probably running before the DOM has loaded all the content. You should be able to wrap that so that it runs after the DOM has loaded. document.addEventListener("DOMContentLoaded", function(event) { element = document.getElementById("test"); function sayTest() { alert(element.innerHTML); } }); Where are you actually calling the sayTest function? If I run the following it works fin element = document.getElementById("test"); function sayTest() { alert(element.innerHTML); } sayTest(); With the information you have given. The following should work. index.html file Click Me! Hello World! script.js file element = document.getElementById("test"); function sayTest() { alert(element.innerHTML); }
has comment: http://stackoverflow.com/comment/43547273
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43547319

http://stackoverflow.com/q/27543124
score: 1
type: Question
has title: d3.js(maps) svg elements not appearing when adding them on top of existing svg elements
answer count: 2
possible better answer: http://stackoverflow.com/a/27544594
tagged with: javascript
has answer: http://stackoverflow.com/a/27543352
accepted answer: http://stackoverflow.com/a/27543352
upvote count: 1
tagged with: geo
has body: I'm using GeoJson files to draw d3 map polygons on an svg object. As such : var g = svg.append("g") .style("stroke-width", "1.5px"); d3.json(file, function (error, json) { g.selectAll("path") .data(json.features) .enter() .append("path") .attr("class", function (d) { return "subunit " + d.properties.id + " feature"; }) .attr("d", path) .on("click", clicked); }); So for example sake lets say this is drawing the map of the UK with Countries view. I have a GeoJson file that (file 2) that covers the regions inside England. So I have a clicked function as you can see which I process (.on("click", clicked). In the clicked function I process the second geojson file and try to append all of it's polygons (which are its regions) onto the England country. I read somewhere that svg orders elements based on when they are populated. I've been inspecting into the elements and my region elements are definitely showing up after the full UK maps elements. They just won't appear. What I've tried : I've tried to set the opacity of the previous svg object (England) to 0. I've tried to completely remove it but no luck. The new polygons just won't show. Here is how I'm trying to add them over. var region = svg.append("region"); d3.json(scope.json.england_regions, function (error, json) { // Set the opacity of the England country to 0 d3.select("path").style("opacity", 0); console.log(json); region.selectAll("path") .data(json.features) .enter() .append("path") .attr("class", function (e) { console.log(e); return "region " + e.properties.id + " feature"; }) .attr("d", path) .on("click", function (e) { reset(); }); }); } I've been debugging the geojson (the 2nd geojson file) to ensure that it definitely gets populated. Heck if I load it on its own it works fine. I can see all the polygons from the England regions file. Has anyone else had this issue? I've tried searching for some similar scenarios but I can't seem to find where other people are trying to do this.
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
downvote count: 0
tagged with: d3.js
has answer: http://stackoverflow.com/a/27544594
tagged with: css
type: AnsweredQuestion

http://stackoverflow.com/comment/43576217
type: Comment
has text: Indeed, your example (my code) works in the plunker link. I need to determine why it works there, but not in my app. I will do that and report back. Thanks for the help. Stay tuned...
type: AnswerComment
comment on: http://stackoverflow.com/a/27559043
score: 0

http://stackoverflow.com/a/27482983
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/43460354
type: Answer
upvote count: 2
has body: According to http://goldfirestudios.com/blog/104/howler.js-Modern-Web-Audio-Javascript-Library sound.pos() should get the current position. The posmethod can get or set, depending on whether you pass through the optional position parameter.
has comment: http://stackoverflow.com/comment/43473548
answers question: http://stackoverflow.com/q/27482375

http://stackoverflow.com/q/27540502
type: UnansweredQuestion
tagged with: pdf-generation
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/70881921
has answer: http://stackoverflow.com/a/28960603
tagged with: image
score: 0
tagged with: jspdf
answer count: 2
has title: Adding Image to a PDF using jspdf makes the image black
has body: When i try to add the image in the URL to a PDF file the image comes completley black. But when I click the download pdf button again the image gets added to the PDF.Only when I do it the first time, the image comes as black. function getBase64Image(url) { alert(url); var canvas = document.getElementById('myCanvas'); var context = canvas.getContext('2d'); var img = new Image(); img.src = url; img.style.height ="181px"; img.style.width ="183px"; //img.crossOrigin ="Anonymous"; context.drawImage(img,0,0); var dataURL = canvas.toDataURL("image/jpeg"); alert(dataURL); document.body.appendChild(img); var doc = new jsPDF('landscape'); doc.addImage(img,'JPEG',0,0,50,50); doc.save('Saved.pdf'); } getBase64Image("http://localhost:64931/jspdf/download.png");

http://stackoverflow.com/comment/43643124
has text: Chrome is my browser, but the String wasnt the problem ! Thanks for your help- My internal API didnt get the values properly
comment on: http://stackoverflow.com/q/27610309
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43529543
type: QuestionComment
has text: I'm not sure what the problem is, it's working as _I_ would expect it. Could you maybe reword your question or flesh out a more complete example? What do you mean by "the baseViewModel gets written everytime when added to the array?" Isn't it supposed to do that?
score: 1
comment on: http://stackoverflow.com/q/27549830
type: Comment

http://stackoverflow.com/comment/43440849
type: QuestionComment
type: Comment
has text: It's already on. But no effect? Thanks
comment on: http://stackoverflow.com/q/27505245
score: 0

http://stackoverflow.com/comment/43642911
type: QuestionComment
type: Comment
has text: Is there more code elsewhere? This seems to be working fine in both FF and Chrome.
comment on: http://stackoverflow.com/q/27610309
score: 0

http://stackoverflow.com/a/45856974
answers question: http://stackoverflow.com/q/27634285
upvote count: 4
downvote count: 0
has body: Thanks lukasgeiter, you make my day. It works. Only must to change the replace method because laravel scape ":" to "%3A" var url = '{{ url("/admin/solicitud", ":id") }}'; url = url.replace('%3Aid', data.datos[i].id); dhtml+=' Ver más... '; or simple let the id string only var url = '{{ url("/admin/solicitud", "id") }}'; url = url.replace('id', data.datos[i].id); dhtml+=' Ver más... ';
score: 4
type: Answer

http://stackoverflow.com/q/27501045
tagged with: web-services
type: Question
has answer: http://stackoverflow.com/a/27501193
tagged with: cors
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: rest
tagged with: angularjs
has comment: http://stackoverflow.com/comment/43432658
has comment: http://stackoverflow.com/comment/43432679
has comment: http://stackoverflow.com/comment/43436977
score: 2
upvote count: 2
type: UnansweredQuestion
has body: I'm trying to use $resource to get datas from a REST web service. here is my code : return $resource('http://serverURL', {}, { getQuartiers: { method: 'GET', headers: { 'Authorization': 'Basic base64login:pseudostring', }, }, }); The problem is that with headers like this, it's an option request that is send and i get an error 401 Unauthorized. If i remove headers, it's a GET request. But i need headers to send my Authorization string ! Otherwise the webservice is ok, either by going with chrome directly to the url => popup with login/pwd => correct datas at json format or by using postman chrome extension, which send a GET request. What's the matter ?
has title: AngularJS performs an OPTIONS HTTP request for a cross-origin resource => error 401

http://stackoverflow.com/a/27642421
accepted answer of: http://stackoverflow.com/q/27609144
answers question: http://stackoverflow.com/q/27609144
upvote count: 1
score: 1
has body: Missing a comma in server.js. Not sure what made me check it, but that was my issue.
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/43508959
type: Comment
comment on: http://stackoverflow.com/a/27540215
has text: This is the same validator.js, that I referred to. :)
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43557998
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27563263
has text: You seem to be confusing arrays with object. An empty array literal looks like this: `[]`. An empty object looks like this: `{}`. You should not generally assign non-numeric properties to arrays, but you seem to be assigning _only_ non-numeric properties to your arrays.
score: 0

http://stackoverflow.com/comment/43426399
type: QuestionComment
comment on: http://stackoverflow.com/q/27497425
has text: @RobG - which is, conceptually, the same as "hoisting". Same result. (But of course you're right that the declarations aren't literally _moved_ to the top.)
score: 0
type: Comment

http://stackoverflow.com/q/27596759
tagged with: output
type: Question
possible better answer: http://stackoverflow.com/a/27596810
has answer: http://stackoverflow.com/a/27596829
has answer: http://stackoverflow.com/a/27596827
has answer: http://stackoverflow.com/a/27596810
has answer: http://stackoverflow.com/a/27596834
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/43617310
has body: hey guys I'm a noobie with javascript and I've been messing around with it and I was wondering if there is any chance of control the event that results in an output like for example a "for loop", here it's what i've got: var stuff= ["cat","dog","parrot","wolf"]; var output = ""; for(var i = 0; i &lt; stuff.length; i++){ output += stuff[i] + "&lt;/br&gt;"; } document.getElementById("result").innerHTML = output; it will output inside my div 'result': cat dog parrot wolf what I've been trying to do is to set intervals of 1 second between each output...so cat appear first then a second after dog and so on... is that possible? thanks in advance
accepted answer: http://stackoverflow.com/a/27596827
tagged with: intervals
tagged with: events
has title: set an interval in a for loop to show up the results
favorite count: 0
answer count: 5
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27596930
score: 1

http://stackoverflow.com/comment/43386399
has text: Sorry, the `form.attr('action')` points to `formProcess.php`. I am sure I'm hitting the url of `formProcess.php` because the `echo` calls appear in my `result` and are `.append`ed to my `#sucMsg` and then faded in.
score: 0
comment on: http://stackoverflow.com/q/27475960
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43563976
type: Comment
score: 1
has text: It's important to point out that the reason `one` and `two` share a reference is prototypical inheritance - the child objects share a reference to a parent property.
type: AnswerComment
comment on: http://stackoverflow.com/a/27567800

http://stackoverflow.com/a/27516858
has comment: http://stackoverflow.com/comment/43464867
answers question: http://stackoverflow.com/q/27515962
has comment: http://stackoverflow.com/comment/43464842
upvote count: 3
has comment: http://stackoverflow.com/comment/43465133
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43464898
has comment: http://stackoverflow.com/comment/43464026
type: Answer
has comment: http://stackoverflow.com/comment/43465268
has comment: http://stackoverflow.com/comment/43465274
has comment: http://stackoverflow.com/comment/43464055
downvote count: 0
has body: I'm not sure where your difficulties are. Cache busting is the way to go. The first thing is you shouldn't be using the url shortener. Just access the end url directly. All you need to do is add a cache busting parameter and a random value to the end of each url request. I've setup a codepen that demonstrates this. It gets the updated image every 2 seconds. Monitor the image requests in dev tools and you can see the images are not being cached. http://codepen.io/anon/pen/EayVJO window.addEventListener('load', function () { var url = 'http://weathersticker.wunderground.com/weathersticker/cgi-bin/banner/ban/wxBanner?bannertype=wu_simplewhite&amp;airportcode=KTTN&amp;ForcedCity=Princeton&amp;ForcedState=NJ&amp;zip=08540&amp;language=EN'; var weatherbug = document.querySelector('#weatherbug'); setInterval(function () { var rand = Math.floor(Date.now() * Math.random()); weatherbug.style.background = 'url(' + url + '&amp;qqq=' + rand + ') center center no-repeat'; }, 2000); });
has comment: http://stackoverflow.com/comment/43464774
has comment: http://stackoverflow.com/comment/43464798
accepted answer of: http://stackoverflow.com/q/27515962
score: 3
has comment: http://stackoverflow.com/comment/43465284

http://stackoverflow.com/q/27596927
has body: I have a link button in an ASP.NET application as below. When i click the link button it calls Javascript function which shows another div file and the overlay. However, in this case, the overlay is appearing OVER the div instead of beneath it. Any guess on what could be wrong? I have copied this from another form which works fine. &lt;asp:LinkButton Text='&lt;%# Eval("CorrectiveActionName") %&gt;' OnClientClick='&lt;%# Eval("ProductionID", "return ShowCorrectiveActionDiv({0});") %&gt;' runat="server" OnClick="lnkbtnCorrectiveAction_Click" CausesValidation="false" ID="lnkbtnCorrectiveAction"&gt; &lt;/asp:LinkButton&gt; The javascript for ShowCorrectiveActionDiv is function ShowCorrectiveActionDiv(objectid) { $("#divCorrectiveActionStatusChild").show(); $(".overlay").show(); var productionIdValue = document.getElementById("ContentPlaceHolder1_hdnProductionDIVID"); productionIdValue.value = objectid; return true; } The CSS for overlay class is .overlay { width: 100%; height: 100%; position: fixed; left: 0; top: 0; background: #083371; opacity: 0.5; filter:alpha(opacity=50); } The overlay div in master page is &lt;div class="overlay" runat="server"&gt;&lt;/div&gt;
has title: Why is the overlay covering the new div
tagged with: css
type: Question
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43617573
tagged with: asp.net
has comment: http://stackoverflow.com/comment/43617652
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/70402255
has text: @JBCP ASA2 - do either of you have an example that you can share of Typescript + Loopback (specifically the models). I'm also interested in any build jobs that may exist.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27572943
score: 0

http://stackoverflow.com/comment/43693006
comment on: http://stackoverflow.com/a/27635930
type: Comment
score: 0
has text: Ok - for me this is not "long polling". You are just requesting the server every 15 seconds. Even if this doesn't solve your problem right now you should try Server Sent Events - super easy to implement and less overhead. Check this simple example here:http://www.html5rocks.com/en/tutorials/eventsource/basics/
type: AnswerComment

http://stackoverflow.com/comment/43609215
has text: @Teemu that comment was made when answer was using `parseInt`
type: Comment
comment on: http://stackoverflow.com/a/27592711
type: AnswerComment
score: 0

http://stackoverflow.com/comment/43410756
has text: This is taking the whole URL adress, how can i get only the domain ? for example: google.com without the `http://` and `www`
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27489521

http://stackoverflow.com/q/27574421
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: Trying to figure this out. I am inexperienced at jQuery, and not understanding how to loop through elements and match one. I have 3 divs: And off to the side, links in a div named 'copy' with rel = first-image, etc.: ... Clicking the link will fade up the image in the associated div (using GSAP TweenMax) Here is the function I've been working on to do this... but I am not fully understanding how to loop through all the "rel" elements, and make a match to the one that has been clicked on. What am I doing wrong? I don't even get an error in my browser. :-( Thanks to the answer below, I got farther. Here is my revised code. $('[rel]').each(function(k, v){ if (v == slideName) { var change_screens_tween = TweenMax.to('.'+slideName+'', 1, { autoAlpha:1 }); } else { var change_screens_tween = TweenMax.to('.'+slideName+'', 1, { autoAlpha:0 }); } }); }); This is starting to work, but makes the screenshots appear and then instantly fade out. And it only works once. Any thoughts?
has answer: http://stackoverflow.com/a/27574447
tagged with: css
type: AnsweredQuestion
type: Question
has title: Loop through element and change based on link attribute
accepted answer: http://stackoverflow.com/a/27574447
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/43635286

http://stackoverflow.com/comment/43659613
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27619303
has text: Yes you don't have proper opening and closing braces. and try to trim your value before pattern matching.

http://stackoverflow.com/comment/43588060
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27581756
has text: `console.log("first name: "+ myFriend.Fname); console.log("last name: "+ myFriend.Lname)` like this
type: Comment

http://stackoverflow.com/q/27479475
tagged with: extjs
has body: I am architecting a Sencha Touch project. Sencha Touch command line lets you create controllers, views, models, stores but there is no standard way to architect the project. I want to place all my routes in one file, say app.routes.js. Main controller to load views in one file, say mainController.js in which I want to write code to load different views. Also I want to keep all templates in one file for ease of UI designers in one file, say app.templates.html so that I can append template file to document head on load and access different layouts and views using standard jQuery. I went through different answers but didn't find any relevant answer. Here's how am implementing routers- Ext.Viewport.setActiveItem({xtype : 'main'}); break; case '#_login': Ext.Viewport.setActiveItem({xtype : 'login'}); break; case '#_terms': Ext.Viewport.setActiveItem({xtype : 'terms'}); break; case '#_exams': Ext.Viewport.setActiveItem({xtype : 'exam'}); break; case '#_enrollments': Ext.Viewport.setActiveItem({xtype : 'enroll'}); break; case '#_examdetails': Ext.Viewport.setActiveItem({xtype : 'exammaterials'}); break; case '#_enrollmentdetails': Ext.Viewport.setActiveItem({xtype : 'enroll'}); break; case '#_mapdetails': Ext.Viewport.setActiveItem({xtype : 'mapview'}); break;
score: 0
accepted answer: http://stackoverflow.com/a/27486730
answer count: 1
has title: How to implement folder structure for Sencha Touch projects?
tagged with: sencha-touch
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27486730
type: Question
tagged with: mobile
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/27511195
possible better answer: http://stackoverflow.com/a/27511281
has answer: http://stackoverflow.com/a/27517480
type: Question
upvote count: 5
has answer: http://stackoverflow.com/a/27511311
has answer: http://stackoverflow.com/a/27511370
score: 5
has body: I am trying to center these boxes in the middle of the screen both horizontally and vertically. Another question is how can I make it where it re-sizes automatically when I scale my page? /*------------------------- Simple reset --------------------------*/ *{ margin:0; padding:0; } /*------------------------- General Styles --------------------------*/ /*---------------------------- Color Themes -----------------------------*/ .nav-colors{ position: relative; background: white; height: 200px; width: 60%; margin: 0 auto; padding: 20px; overflow: auto; } .home-link{ background-color:#00c08b; width: 15%; height: 80px; display: inline-block; margin-left: 10%; } .portfolio-link{ background-color:#ea5080; width: 15%; height: 80px; display: inline-block; } .social-link{ background-color:#53bfe2; width: 15%; height: 80px; display: inline-block; } .contact-link{ background-color:#f8c54d; width: 15%; height: 80px; display: inline-block; } .blog-link{ background-color:#df6dc2; width: 15%; height: 80px; display: inline-block; } Neiko Anglin | Front-End Develper
has title: Centering CSS Boxes(Html and Css)
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
answer count: 5
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27511281
accepted answer: http://stackoverflow.com/a/27511311
tagged with: css
has answer: http://stackoverflow.com/a/27511330
type: AnsweredQuestion

http://stackoverflow.com/comment/43671308
type: Comment
type: QuestionComment
score: 1
has text: Why not simply give it a try? It's only 10 lines of code. http://nodejs.org/api/modules.html
comment on: http://stackoverflow.com/q/27625349

http://stackoverflow.com/q/27605583
tagged with: asp.net
favorite count: 0
tagged with: ajax
type: UnansweredQuestion
has title: Jquery ajax displays [object Object]
tagged with: http://stackoverflow.com/tag/json
has body: I basically have 2 drop-down lists and 2 labels. The first drop-down list is the category selection and the second list loads dynamically the items based on the category. All is good until now. At the labels I am trying to display the ItemName and the ItemDescription. ItemName displays fine but when it comes to ItemDescription for some reason it shows [object Object]. I noticed in console that ItemDescription information is posted correctly, can you please help me find the way to display it correctly? Jquery: &lt;script type="text/javascript"&gt; $('#ItemsDivId').hide(); $('#SubmitID').hide(); $('#ItemTypeID').on('change', function () { $.ajax({ type: 'POST', url: '@Url.Action("GetItemTypeForm")', data: { itemTypeId: $('#ItemTypeID').val() }, success: function (results) { var options = $('#ItemsID'); options.empty(); options.append($('&lt;option /&gt;').val(null).text("- Select an Item -")); $.each(results, function () { options.append($('&lt;option /&gt;').val(this.ItemsID).text(this.Value)); }); $('#ItemsDivId').show(); $('#ItemsID').change(function (results) { $('#SubmitID').show(); $('#ItemName').text($("#ItemsID option:selected").text()); $('#ItemDescription').text($("#ItemsID option:selected").text(this.ItemDescription)); }); } }); }); &lt;/script&gt; Json: [HttpPost] public JsonResult GetItemTypeForm(string itemTypeId) { //pseudo code var data = from s in db.Items where s.ItemType.ItemTypeName == itemTypeId &amp;&amp; s.ItemActive == true select new { Value = s.ItemName, ItemsID = s.ItemId ,ItemDescription = s.ItemDescription }; return Json(data); }
downvote count: 1
type: Question
answer count: 2
upvote count: 0
has answer: http://stackoverflow.com/a/27605641
tagged with: javascript
tagged with: jquery
score: -1
has answer: http://stackoverflow.com/a/27619162

http://stackoverflow.com/comment/43463820
has text: Solved it by observing in web inspector what the zoom plugin does. It creates a "zoom-viewer" div when over an image. So, I just set `display: none` on that div in the onSlideLoad callback. However, your first suggestion helped to fine-tune it, so no zooming occurs during the actual animation. Thanks
comment on: http://stackoverflow.com/a/27515230
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/27511118
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/27511685
tagged with: dependencies
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43452977
upvote count: 2
type: Question
accepted answer: http://stackoverflow.com/a/27511685
has body: I decided to learn how to test my angular code with Jasmine. Everything works when I don't use specific dependencies but if there are some dependencies I have problems. For example we have controllers.js: angular.module('myApp', ['jmdobry.angular-cache']) .controller('MyCtrl', ['$scope', '$http', function($scope, $http) { $scope.myName = "Wojtek"; /... }]); And now I want to test: describe('myApp', function() { var scope, controller; beforeEach(angular.mock.module('myApp')); describe('MyCtrl', function() { beforeEach(inject(function ($rootScope, $controller) { scope = $rootScope.$new(); controller = $controller('MyCtrl', { '$scope': scope }); })); it('sets proper name', function () { expect(scope.myName).toBe("Wojtek"); }); }); }); My question is - how to mock that 'jmdobry.angular-cache' dependency?
tagged with: javascript
has title: Test angular controllers with Jasmine - module issue
has comment: http://stackoverflow.com/comment/43453143
downvote count: 0
answer count: 1
tagged with: jasmine

http://stackoverflow.com/a/27556868
type: Answer
has body: Well, it turned out that as part of the router there was this function: Router.waitOn(function() { if (Meteor.loggingIn() || Meteor.user()) return Meteor.subscribe("userGroups"); }); The change in Meteor.loggingIn() caused this function to run, which we saw with our loading page getting displayed briefly. We're changed the if statement so that it no longer contains the Meteor.loggingIn() check. A little embarrassing, really--I swear I looked at that line before. Not sure what happened in my thought process to miss this. At least now I have a better understanding of Iron Router.
score: 0
answers question: http://stackoverflow.com/q/27517429

http://stackoverflow.com/a/27561406
type: Answer
answers question: http://stackoverflow.com/q/27561028
score: 1
upvote count: 1
has body: It sounds like this doesn't have to be done with inheritance. It sounds like you could use a helper object that contains a handful of functions that you need access to across multiple pages. You could do something like: var myHelperFunctions = { func1: function(){ your code here }, func2: function(){ some other code here}; }
downvote count: 0

http://stackoverflow.com/q/27607124
type: Question
score: 5
answer count: 1
has body: I have started using ReactJS with a Python Flask Backend. I get the following client error in Chrome Console, when rendering the template via Flask. Error: Cannot find module 'jstransform/visitors/es6-templates-visitors' Server: @app.route("/") def start(): return render_template('index.html') Client: index.html <!--[if lt IE 9]> <![endif]--> Why is this causing a problem, each file seems to be found within static. Why is JSX failing? Do I have to compile the JSX into Javascript first? Thanks UPDATE: golden-record.js var SearchBox = React.createClass({...}); React.render( <SearchBox url="http://localhost:5000"/>, document.getElementById('content') );
accepted answer: http://stackoverflow.com/a/27608525
has title: Flask and Reactjs throw JSX Transform error
has comment: http://stackoverflow.com/comment/43636464
tagged with: reactjs
upvote count: 5
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/43636539
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27608525
tagged with: python
favorite count: 0

http://stackoverflow.com/a/27504507
score: 2
downvote count: 0
type: AcceptedAnswer
upvote count: 2
has comment: http://stackoverflow.com/comment/43441785
type: Answer
has body: Note that in the constructor: function Employee() { this.name = "NoName"; this.dept = "NoDept"; } when called as: new Employee(); name and dept properties are added directly to the the new object assigned to this. They aren't inherited, they are directly on the instance. In the first version, the name property is accessible even though we don't use prototype inheritance Because when you do: Employee.call(this); you are adding a name property directly to the instance of Manager. It isn't inherited, it's directly on the instance. In the second version, we comment out the call() and define the prototype chain, and yet the name property is inaccessible Because the name property isn't on the prototype chain, the Employee constructor puts it directly on its this (which would normally be an instance of Employee but because of how you call it from Manager, it's an instance of Manager). This leaves me wondering, then, why bother with Manager.prototype? So that instances of Manager will inherit from Employee.prototype. But you haven't added any methods to Employee.prototype so there's nothing to inherit.
accepted answer of: http://stackoverflow.com/q/27504223
answers question: http://stackoverflow.com/q/27504223

http://stackoverflow.com/q/27592660
has body: I added a jQuery validation rule, so at least one checkbox of class "require-one" has to be checked in order for the form to validate. $(".require-one").rules("add", { required: true, minlength: 1, messages: { required: "Check at least one" } }); It works great, the form does not submit and focus is set to the first checkbox. But how do I get it to show the error message in: &lt;span id="require-one-errormessage&gt;&lt;/span&gt; Thanks in advance
tagged with: jquery-validate
type: AnsweredQuestion
score: 2
downvote count: 0
accepted answer: http://stackoverflow.com/a/27592877
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43609325
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/43609372
upvote count: 2
has title: jQuery validation, how to hook error message up to div
answer count: 1
has answer: http://stackoverflow.com/a/27592877

http://stackoverflow.com/comment/43771757
type: Comment
has text: After ajax request you can use .done(function() { });
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27638068

http://stackoverflow.com/a/45048369
score: 0
answers question: http://stackoverflow.com/q/27502754
has body: But doing as per the accepted answer, there is a warning of Deprecation that is thrown. Deprecation warning in moment js However this doesn't seem to throw a warning now. Not sure if the resultant value is how you may need it to be. &gt; moment("12-25-1995", ["MM-DD-YYYY", "YYYY-MM-DD"]).format('MM-DD-YYYY') &gt; "12-25-1995" If you have Date object convert it toString() and then apply the .format()
type: Answer

http://stackoverflow.com/comment/43637405
comment on: http://stackoverflow.com/q/27607544
score: 0
type: Comment
has text: You want someone to code that up for you? Or have you tried something that doesn't work?
type: QuestionComment

http://stackoverflow.com/a/27484011
type: Answer
upvote count: 2
has comment: http://stackoverflow.com/comment/43400559
has comment: http://stackoverflow.com/comment/43400751
has body: Since your widget isn't initialized yet, there is no ID assigned yet. The ID will be available in the widget lifecycle after postMixInProperties has been run: require([ 'dojo/_base/declare', 'dijit/_WidgetBase', ], function (declare, _WidgetBase) { declare("CustomWidget", [ _WidgetBase ], { preamble: function () { console.log('preamble: ' + this.id); }, constructor: function () { console.log('constructor: ' + this.id); }, postMixInProperties: function () { console.log('postMixInProperties: ' + this.id); }, buildRendering: function () { console.log('buildRendering: ' + this.id); }, postCreate: function () { console.log('postCreate: ' + this.id); }, startup: function () { console.log('startup: ' + this.id); } }); var customWidget = new CustomWidget(); customWidget.startup(); }); Gives the follow results: preamble: constructor: postMixInProperties: buildRendering: CustomWidget_0 postCreate: CustomWidget_0 startup: CustomWidget_0 So if you need to do something with that ID you must do it in buildRendering, postCreate or startup.
score: 2
has comment: http://stackoverflow.com/comment/43400313
accepted answer of: http://stackoverflow.com/q/27481762
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27481762

http://stackoverflow.com/comment/43396796
comment on: http://stackoverflow.com/q/27482073
score: 0
has text: is the submit working? I'd assume you'd need an action/method property on the form before submit would fire, and without submit I wouldnt expect the validation to kick in
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27592694
accepted answer of: http://stackoverflow.com/q/27592608
type: Answer
answers question: http://stackoverflow.com/q/27592608
score: 0
type: AcceptedAnswer
has body: http://learn.jquery.com/plugins/basic-plugin-creation/ According to this guide you can add functions to the $.fn object. In their example: $.fn.greenify = function() { this.css( "color", "green" ); }; $( "a" ).greenify(); you can access the underlying javascript elements retrieved from the selector with this or you can convert them to jQuery objects with $(this). For your function you would want to do something like this: $.fn.getdata = function(url, param) { $.ajax({ url:url, success:function(result){ return result; } }); }; $('element').getdata('example.com/example.txt','parameter=1'); There isn't much of a reason to do this though if you aren't using the selected elements.

jssor
tags question: http://stackoverflow.com/q/27569759
tags question: http://stackoverflow.com/q/27531142
tag name: jssor
tags question: http://stackoverflow.com/q/27536982
type: Tag

http://stackoverflow.com/a/38860639
has comment: http://stackoverflow.com/comment/104419839
type: Answer
has comment: http://stackoverflow.com/comment/98480800
has body: Sorry I know this is an old question, and you've probably come up with a solution by now. Below, however, you'll code for a very simple PDF.js page (which I made by tinkering with the sample on Mozilla's webpage) with zoom in and zoom out buttons that work. Simple PDF.js with zoom Simple PDF.js with zoom next page prev page zoom in zoom out Sorry I haven't examined your code above to see how it differs from mine, or determine what about it doesn't work, but perhaps this will give you what you need.
answers question: http://stackoverflow.com/q/27607526
score: 27
upvote count: 27
downvote count: 0

http://stackoverflow.com/q/27502487
downvote count: 0
tagged with: minify
tagged with: partial
favorite count: 0
has body: In my project I have directory with partials of javascript files. In this directory I have files like: _register.js, _user.js, _cart.js, _common.js and I wanna make some full files user.js must have _user.js, _common.js, _register.js product.js must have _user.js, _common.js, _cart.js and this should be compiled to 2 directories dev/ and prod/ in dev I must have normal javascript and in prod I must have minified versions, how to get it with grunt?
answer count: 0
upvote count: 2
type: UnansweredQuestion
has title: grunt and javascript partial file
has comment: http://stackoverflow.com/comment/43435616
score: 2
has comment: http://stackoverflow.com/comment/43435187
type: Question
tagged with: javascript
tagged with: gruntjs

http://stackoverflow.com/q/27507750
has title: How I can showing div element after I hover another div?
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43445634
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43445921
has answer: http://stackoverflow.com/a/27507964
tagged with: css
accepted answer: http://stackoverflow.com/a/27507964
possible better answer: http://stackoverflow.com/a/27508001
favorite count: 0
upvote count: 0
score: -4
has answer: http://stackoverflow.com/a/27508001
type: AnsweredQuestion
has body: I have this jQuery code: menu_btn.hover(function(){ menu_popup.css('display', 'block'); },function(){ menu_popup.css('display', 'none'); }); It works, after I hover over menu_btn, my next div(menu_popup) is showing. But after I hover over menu_popup, menu_popup disappears. How to make sure that when I hover the mouse on the button(menu_btn), I show the menu and after I move mouse to menu(menu_popup), it does not disappear, and disappear only if I'll take the mouse from this block?
type: Question
has comment: http://stackoverflow.com/comment/43445769
answer count: 2
downvote count: 4

http://stackoverflow.com/a/27490824
has body: No while loop needed. You can just use setInterval: var w = 100; var h = 100; var foo = setInterval(function () { if(w>1000) cancelInterval(foo) w = w + 5; h = h + 5; document.getElementById('box').style.width = w + 'px'; document.getElementById('box').style.height = h + 'px'; }, 1000);
has comment: http://stackoverflow.com/comment/43415029
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27490581
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27490581
type: Answer
score: 6
upvote count: 6
has comment: http://stackoverflow.com/comment/43413587

http://stackoverflow.com/q/27530110
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43489170
score: 0
tagged with: infinite-scroll
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/43489295
type: UnansweredQuestion
tagged with: google-chrome
has answer: http://stackoverflow.com/a/27531047
has title: Infinite scroll only working in Chrome
has body: This piece of code is creating a infinite scroll effect on my site and it works perfectly but only in the latest version of Chrome. Safari, FF &amp; IE do not initialise the ajax call and instead use the fall back which is a Load more button. Although it isn't working, I've created a jsFiddle that represents the markup I'm using in my Shopify collection page to hopefully give you a better idea of my setup: http://jsfiddle.net/qpka6pyv/1/ Am I doing something wrong? FYI I'm using the doTimeout plugin to create the delay (not entirely necessary) and I'm attaching and loading more items within the scrollable div called '.st-content' not the html or body. So when you scroll to the bottom of '.st-content' load the next X amount of products. Currently this only works in Chrome. Here's the jQuery: function ScrollExecute() { if($(document).height() - 350 &lt; ($(document).scrollTop() + $(window).height())) { scrollNode = $('.scrollnode #more').last(); scrollURL = $('.scrollnode #more p a').last().attr("href"); if(scrollNode.length &gt; 0 &amp;&amp; scrollNode.css('display') != 'none') { $.ajax({ type: 'GET', url: scrollURL, beforeSend: function() { scrollNode.clone().empty().insertAfter(scrollNode).append('&lt;img src=\"{{ "loading.gif" | asset_url }}\" /&gt;'); scrollNode.hide(); }, success: function(data) { // remove loading feedback scrollNode.next().remove(); var filteredData = $(data).find(".scrollnode"); filteredData.insertBefore( $("#product-list-foot") ); }, dataType: "html" }); } } } $(document).ready(function () { $('.st-content').scroll(function(){ $.doTimeout( 'scroll', 100, ScrollExecute); }); }); As a reference I got the code from this blog article: http://www.davecap.com/post/9675189741/infinite-scroll-for-shopify-collections
type: Question
has comment: http://stackoverflow.com/comment/43489253

http://stackoverflow.com/q/27624116
has body: I am new to sails.js and trying to develop a simple app on a remote sandbox server. When I do 'sails lift' to test running the app, I cannot access it by 'localhost'. I am wondering what's the right way of running sails on a specific IP during development. I tried 'sails lift --ip xxx.xxx.xx.xx', but it does not work, and the documentation on this seems lacking. Does anyone know how to run sails.js on an IP without needing deployment?
upvote count: 7
has answer: http://stackoverflow.com/a/66131432
has title: Run sails.js on a specific IP address during development
tagged with: sandbox
tagged with: ip
type: AnsweredQuestion
tagged with: sails.js
possible better answer: http://stackoverflow.com/a/66131432
score: 7
type: Question
accepted answer: http://stackoverflow.com/a/31840757
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/31840757

http://stackoverflow.com/q/27515381
tagged with: css
has comment: http://stackoverflow.com/comment/43461085
answer count: 0
has comment: http://stackoverflow.com/comment/43461095
tagged with: fixed
has body: I'm using this code for my fixed menu: $(document).ready(function () { function my_function() { var scroll_value = document.body.scrollTop; if (scroll_value &gt; 0) { $("#my_div").fadeOut(500); } else { $("#my_div").fadeIn(500); } if (scroll_value &gt;= 650) { $('#sl_userNav').show('slide', { direction: 'up' }, 750); } else { $('#sl_userNav').hide('slide', { direction: 'up' }, 750); } document.getElementById("sl_userNav").style.marginTop = scroll_value.toString() + "px"; } setInterval(my_function, 5); my_function(); }); jQuery 2.1.1 and jQuery UI 1.10.2 has been included. I have 2 problems with that code: the first one - "#my_div" disappear but not in a smooth way (fadeIn/fadeOut doesn't work) the second - my fixed menu jump up and down on fast scrolling I can't use just a 'fixed' in CSS because due to my parallax effect it is scroll like the rest of the page.
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/43461206
tagged with: parallax
has title: Fixed menu doesn't hold position when scrolling
type: UnansweredQuestion

http://stackoverflow.com/comment/43505515
has text: In any event, this whole performance consideration isn't worth discussing as it is very context specific and @user3361996 didn't specify the amount of items being rendered. So while it is an interesting side note, it may never actually be a problem for him/her. Making a blanket statement such as "avoid using filters if at all possible" without specifying the context in which this holds is highly dubious.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27516788
type: AnswerComment

http://stackoverflow.com/comment/43593127
type: AnswerComment
comment on: http://stackoverflow.com/a/27549906
has text: Hmm, I have to test it. Actually, my primary intention is not only to read a value (which would work with this approach) but to set a new value. When I am right, you extract the value by reducing the original object to the parts described by the path array but you also destroy the original object.
type: Comment
score: 0

http://stackoverflow.com/comment/43480218
type: Comment
has text: Also: "html" could've just as well been an actual jquery collection of the DOM, saved earlier in the code, not a wrong selector. So downvoting the other valid answers is just wrong.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27525474

http://stackoverflow.com/comment/43501725
has text: I edited the code. Now I'm getting SyntaxError: missing } after property list. I just don't see it.
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/27536439

http://stackoverflow.com/q/27622697
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43665896
has comment: http://stackoverflow.com/comment/43666116
has comment: http://stackoverflow.com/comment/43667087
type: Question
has comment: http://stackoverflow.com/comment/43665928
tagged with: split
has title: Find a value between spaces in a javascript string
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/43665946
score: -4
has answer: http://stackoverflow.com/a/27622840
has comment: http://stackoverflow.com/comment/43665986
downvote count: 4
has answer: http://stackoverflow.com/a/27622781
has comment: http://stackoverflow.com/comment/43666079
upvote count: 0
tagged with: jquery
tagged with: string
has comment: http://stackoverflow.com/comment/43665988
favorite count: 0
has comment: http://stackoverflow.com/comment/43666181
has answer: http://stackoverflow.com/a/27622841
has body: I have a string and an array: var first = 'b c da e f a s'; var second = ["g","h","i","j","a"]; I need to find the first occurrence of "a", derived from the array as last character, in the string, so I did: var first = 'b c da e f a s'; var second = ["g","h","i","j","a"]; var myArray = second.reverse(); var arrayLength = myArray.length; for (var i = 0; i &lt; arrayLength; i++) { var x = first.split(myArray[i])[1]; if (typeof x !== 'undefined'){ alert($.trim(myArray[i] + x)) break; } } This outputs a e f while it should be a s. Apparently it splits up the word da, But I only need it to split at a whole value, so it should skip da unless Im looking for the entire value da Example at jsfiddle
possible better answer: http://stackoverflow.com/a/27622779
answer count: 5
has answer: http://stackoverflow.com/a/27622816
has answer: http://stackoverflow.com/a/27622779
accepted answer: http://stackoverflow.com/a/27622840
has comment: http://stackoverflow.com/comment/43665869

http://stackoverflow.com/q/27573064
has comment: http://stackoverflow.com/comment/43572692
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27574703
score: 2
upvote count: 2
has title: Find value in all TD with Highlighting
type: Question
has answer: http://stackoverflow.com/a/27573591
has answer: http://stackoverflow.com/a/27573703
has body: I have this script for searching in table with Highlighting value from "input". But only for first TD in all TR. Function remove Highlighting function removeHighlighting(highlightedElements){ highlightedElements.each(function(){ var element = $(this); element.replaceWith(element.html()); }) } Function add Highlighting function addHighlighting(element, textToHighlight){ var text = element.text(); var highlightedText = '&lt;em&gt;' + textToHighlight + '&lt;/em&gt;'; var newText = text.replace(textToHighlight, highlightedText); element.html(newText); } Searching in table but only in first TD in TR $("#search").on("keyup", function() { var value = $(this).val(); removeHighlighting($("table tr em")); $("table tr").each(function(index) { if (index !== 0) { $row = $(this); var $tdElement = $row.find('td:first'); var id = $tdElement.text(); var matchedIndex = id.indexOf(value); if (matchedIndex != 0) { $row.hide(); } else { addHighlighting($tdElement, value); $row.show(); } } }); }); I don´t know how can I searching in all TD and How can I write e.g. some alert if "matchedIndex == -1" (if not found some value from input)
has comment: http://stackoverflow.com/comment/43572822
tagged with: javascript
answer count: 3
downvote count: 0
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/43451767
type: AnswerComment
comment on: http://stackoverflow.com/a/27510657
type: Comment
has text: Lol thanks. I was so sure I was messing up my js I missed that. Thank you!
score: 0

http://stackoverflow.com/comment/43526495
score: 0
comment on: http://stackoverflow.com/a/27549841
type: AnswerComment
type: Comment
has text: Why do you need to set min-width?

http://stackoverflow.com/comment/43673757
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27617205
has text: @PaulB I checked out the code and it turns out my memory failed me and I was factually incorrect :-/ Looking at printing routines in the `objects.cc` (namely `HeapObjectShortPrint`) I saw that it is actually HeapNumbers that are printed like `<Number: val>` not `Number` wrappers (which is somewhat confusing). So it should not deopt due to `x`. Thus my answer is kinda incorrect. I have corrected my answer. Sorry for the confusion.

http://stackoverflow.com/a/27528593
upvote count: 1
has body: You'll need a recursive search, something vaguely like: var profiles = { Nicholas_Phillips: { Name: "Nicholas_Phillips" } }; function find(obj, value, path) { if (Object.keys(obj).some(function(key) { var thisValue = obj[key]; var p; if (thisValue === value) { // Found it, set the path and return true to stop looping (true = stops `some`) path = path ? path + "." + key : key; return true; } if (typeof thisValue === "object") { // Found an object, recurse into it p = find(thisValue, value, path ? path + "." + key : key); if (p) { // We found it (somewhere) in that object, set the path and stop looping path = p; return true; } } })) { // We found it, return path return path; } // Not found, return undefined return undefined; } snippet.log(find(profiles, "Nicholas_Phillips")); // "Nicholas_Phillips.Name" snippet.log(find(profiles, "foo")); // undefined &lt;!-- Script provides the `snippet` object, see http://meta.stackexchange.com/a/242144/134069 --&gt; &lt;script src="http://tjcrowder.github.io/simple-snippets-console/snippet.js"&gt;&lt;/script&gt; That implementation of find returns the path to the property it found. It is not extensively tested, but it should point you the right way.
answers question: http://stackoverflow.com/q/27528364
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/27528364

http://stackoverflow.com/q/27488557
has body: I was surpised to see the jQuery did not include any functionality in the resulting element of a $.clone() operation to recall the source element. My work-around was to simply include the jQuery object of the original element in the clone's data store like this var $elOriginal = $('SomeUniqueSelector'); var $elClone = $elOriginal); // Save a jQuery object of the original element in the // clone's data store $elClone.data('original', $elOriginal); When I need to reference the original, I dig into my clone's data store, $elOriginal = $elClone.data('original'); Personally, I'm not thrilled with this approach. (Of course I considered tagging the original element with an id and simply storing that, but then I'm forced to adding an id to the element. Not elegant.) Anyone have any better ideas?
downvote count: 0
has comment: http://stackoverflow.com/comment/43408775
tagged with: jquery
has answer: http://stackoverflow.com/a/27488670
has comment: http://stackoverflow.com/comment/43408813
favorite count: 0
has answer: http://stackoverflow.com/a/27489275
has comment: http://stackoverflow.com/comment/43412900
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43413295
has comment: http://stackoverflow.com/comment/43409693
has comment: http://stackoverflow.com/comment/43412822
score: 1
has comment: http://stackoverflow.com/comment/43409606
has comment: http://stackoverflow.com/comment/43412203
upvote count: 1
has title: Maintain reference in jQuery.clone() element to original element
has comment: http://stackoverflow.com/comment/43408899
type: Question
has comment: http://stackoverflow.com/comment/43408828
tagged with: javascript
has comment: http://stackoverflow.com/comment/43412499
answer count: 2

http://stackoverflow.com/comment/43721191
has text: **To anyone going through the review queues:** This is not a duplicate of [Hide DIV within Iframe](https://stackoverflow.com/questions/18682782/hide-div-within-iframe). This question concerns manipulations within the *same domain*, whereas that question concerns manipulations for *a different domain*.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27637476

http://stackoverflow.com/a/27754610
has comment: http://stackoverflow.com/comment/43993441
has body: you can use WURFL APIs to detect device type http://wurfl.sourceforge.net/wurfl_schema.php
type: Answer
answers question: http://stackoverflow.com/q/27612024
downvote count: 0
score: 1
upvote count: 1

http://stackoverflow.com/comment/43629995
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27603630
has text: nope as I have declared my own css for the error, all I need is to move the error class on '.male-female-select'

http://stackoverflow.com/q/27542785
has comment: http://stackoverflow.com/comment/43512790
type: Question
has comment: http://stackoverflow.com/comment/43516942
linked to: http://stackoverflow.com/q/7279477
has body: I'm using an iframe to load an external URL. Here's the structure - &lt;iframe id="iframe-wrapper" src="http://blog.kpmg.ch/" style="width: 100%; height: 100%; overflow-y: scroll"&gt;&lt;/iframe&gt; I'm trying to do something when I scroll through the iframe contents. I tried various ways, nothing worked. Here are some things I tried already - 1) jQuery iframe scroll event (IE) $(window).load(function(){ $($('#iframe-wrapper').contents()).scroll(function(){ alert("Scrolling"); }); }); 2) jQuery iframe scroll event (IE) $('#iframe-wrapper').load(function(){ $($(this)[0].contentWindow).scroll(function(){ alert("Scrolling"); }); }); 3) How to make IFRAME listen to scroll events as parent when click event within parent iframe is triggered $("#iframe-wrapper").load(function(){ var iframeContent = getFrameTargetElement( document.getElementById("iframe-wrapper") ); iframeContent.onscroll = function(e){ alert("Scrolling"); }; }); 4) Jquery and binding an event to an iframe $("#iframe-wrapper").load(function(){ $("#iframe-wrapper").contents().find("body").scroll( function(e) { alert("Scrolling"); }); });
has comment: http://stackoverflow.com/comment/43513257
tagged with: javascript
tagged with: jquery
score: 4
has comment: http://stackoverflow.com/comment/43514170
tagged with: http://stackoverflow.com/tag/html
answer count: 1
linked to: http://stackoverflow.com/q/12139953
has answer: http://stackoverflow.com/a/27545729
has comment: http://stackoverflow.com/comment/43512692
linked to: http://stackoverflow.com/q/930779
accepted answer: http://stackoverflow.com/a/27545729
favorite count: 0
has comment: http://stackoverflow.com/comment/43512886
duplicate of: http://stackoverflow.com/q/7279477
has comment: http://stackoverflow.com/comment/43514242
has title: Binding scroll event to iframe
upvote count: 4
has comment: http://stackoverflow.com/comment/43514411
type: AnsweredQuestion
downvote count: 0
tagged with: iframe
linked to: http://stackoverflow.com/q/2526726
linked to: http://stackoverflow.com/q/3076414
linked to: http://stackoverflow.com/q/10864870
has comment: http://stackoverflow.com/comment/43514063
has comment: http://stackoverflow.com/comment/43513607

http://stackoverflow.com/a/27498000
has comment: http://stackoverflow.com/comment/43450410
score: 0
answers question: http://stackoverflow.com/q/27484355
type: Answer
has comment: http://stackoverflow.com/comment/43500882
has comment: http://stackoverflow.com/comment/43467349
has body: The Function constructor creates a new Function object. In JavaScript every function is actually a Function object. var f = new Function();//f is a function and not an normal object var b = new f();//work expected as f is a function Reason why new a() will not work function A() {}//A is function var a = new A();//a is not a function rather an object var b = new a();//throw error as 'new' expect function new operator: The new operator expects a constructor function. var a = new foo[([arguments])]//foo must be a function. When the code new foo(...) is executed, the following things happen: A new object is created, inheriting from foo.prototype. The constructor function foo is called with the specified arguments and this bound to the newly created object. new foo is equivalent to new foo(), i.e. if no argument list is specified, foo is called without arguments. The object returned by the constructor function becomes the result of the whole new expression. If the constructor function doesn't explicitly return an object, the object created in step 1 is used instead. (Normally constructors don't return a value, but they can choose to do so if they want to override the normal object creation process.) e.g function f() { this.y = 50;//will be overridden due to below return statement return function () { this.x = 5; } } var b = new f();//b is a function as f() is returning a function and hence it will override the normal function creation alert(b.y);//undefined as y is no more property of instance b as function constructer has a return statement returning object(function object in this case) var c = new b(); alert(c.x);//c.x = 5;

http://stackoverflow.com/a/27589522
answers question: http://stackoverflow.com/q/27589494
type: Answer
has body: with var a you cant access the variable outside the scope however assigning with this can be accessed when you make an object We add properties to this when we want the properties to exist with the life of the object.We Use var for local variables. "I am ONLY interested in accessing variables from inside the object, not from outside." Answer to this statement is use var if you want to use only inside the function not outside as variable defined with var are accessible only to code in the scope in which they were declared, or in lexically nested scopes. so as Shomz suggested you can check it as: var o = new MyObject(); a will be undefined as it is defined with var o.a; // undefined while b will be return 2 as it is on this o.b; // 2
downvote count: 1
upvote count: 19
score: 18

http://stackoverflow.com/comment/43658686
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27618860
has text: Can you post a jsfiddle? I don't quite understand the problem you are describing.
score: 0

http://stackoverflow.com/a/27633233
upvote count: 1
has body: StuartLC's answer will be enough.JSON is very good option for that purpose. Other option can be to register client script in aspx.cs. Here is another SO question regarding that How do I pass data from c# to jquery/javascript?
answers question: http://stackoverflow.com/q/27632648
downvote count: 0
score: 1
type: Answer

http://stackoverflow.com/comment/105542652
has text: Not what was asked - see the Array.from way
comment on: http://stackoverflow.com/a/53065636
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/43458698
type: Comment
has text: Adding a second line did something unexpected... With that in place it started having the early issue where it either showed an image or description, but not both... very perplexing.
comment on: http://stackoverflow.com/a/27513959
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43617083
type: Comment
type: AnswerComment
score: 0
has text: did you want to capture the optional values?
comment on: http://stackoverflow.com/a/27596630

http://stackoverflow.com/comment/43605535
type: Comment
comment on: http://stackoverflow.com/a/27590870
has text: OK ... I'll give you a maybe on performance, but the concept is to monitor above where the element will be added and I don't know his code so can't guarantee other elements.
type: AnswerComment
score: 1

http://stackoverflow.com/comment/43489853
comment on: http://stackoverflow.com/q/27530602
type: Comment
type: QuestionComment
score: 0
has text: The problem is not that you can't put the value into the global scope, it is that you are trying to read it before you do. asynchronous javascript and xml is asynchronous.

http://stackoverflow.com/q/27615396
has title: jQuery .width() function does not accurately return width of text within tag
tagged with: google-chrome
has answer: http://stackoverflow.com/a/27615415
tagged with: polymer
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has body: I am trying to get the width of a line of text enclosed within a div tag. However when i compare the width value returned by jQuery's .width, it is different from the values shown by chrome's element viewer. The console printed value is 238px, however the chrome's element viewer shows 283px The div tag is part of the shadow DOM of a custom polymer element, could this be the reason? Is there any solution to this issue? This is the tag for the line of text &lt;div id = "label" class={{buttonLoc}}&gt;{{label}}&lt;/div&gt; The javascript calling the jQuery .width() function console.log($(this.$.label).width()); Thanks!
linked to: http://stackoverflow.com/q/17845027
type: Question
answer count: 2
score: 0
has answer: http://stackoverflow.com/a/27615529

http://stackoverflow.com/q/27490851
has answer: http://stackoverflow.com/a/27492029
has comment: http://stackoverflow.com/comment/43413863
answer count: 1
downvote count: 0
tagged with: web
favorite count: 0
tagged with: ruby
has comment: http://stackoverflow.com/comment/43413996
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43414848
has comment: http://stackoverflow.com/comment/43413754
has body: I have a Rack app where I need to respond with JavaScript. I am trying set content type as JavaScript, while sending the response but its not working, it seems like I am missing somthing. The simple response I am sending is: require 'rubygems' require 'rack' run Proc.new { |env| ['200', {'Content-Type' =&gt; 'application/javascript'},["alert('hi')"]]} Can a Rack app respond with a JavaScript content-type? Or could it be the browser is not executing the received JavaScript?
score: 1
tagged with: rack
linked to: http://stackoverflow.com/q/7717382
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/43413508
tagged with: javascript
has comment: http://stackoverflow.com/comment/43413934
has title: Respond with JavaScript in Rack app

http://stackoverflow.com/a/27614977
answers question: http://stackoverflow.com/q/27614800
has body: Try following code Here is JSFIDDLE Hello world! Click to slide up panel
type: Answer
has comment: http://stackoverflow.com/comment/43683491
has comment: http://stackoverflow.com/comment/43652413
has comment: http://stackoverflow.com/comment/43653323
score: 0
has comment: http://stackoverflow.com/comment/43652827
has comment: http://stackoverflow.com/comment/43651901

http://stackoverflow.com/comment/43524187
comment on: http://stackoverflow.com/q/27548894
score: 1
has text: should the "staticTextHere" be within the input or "just as it is" text anywhere on the page?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43417063
has text: may be also some like `(/\n\s*\n/g, '\n')`...
comment on: http://stackoverflow.com/q/27492650
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/43562397
comment on: http://stackoverflow.com/a/27568535
score: 0
type: AnswerComment
has text: its more that you can not style a native option tag in css, you'd have to either style another element and use that to fake the option tag or style the select (which only allows some styling options)
type: Comment

http://stackoverflow.com/comment/43618726
type: Comment
score: 0
has text: while you're checking msie inside iframe, just use there...
comment on: http://stackoverflow.com/q/27597552
type: QuestionComment

http://stackoverflow.com/comment/43497609
type: AnswerComment
comment on: http://stackoverflow.com/a/27534614
score: 0
type: Comment
has text: I think your answer might have given me what I wanted to know. I am running this application in a local network (both, client and server, will be on the same network). I am receiving a UDP broadcast message, to which I will respond with my own IP address. So this will be meaning full enough for me - I will write back once I know if it worked or not.

http://stackoverflow.com/a/27587786
type: Answer
accepted answer of: http://stackoverflow.com/q/27587697
has comment: http://stackoverflow.com/comment/43600682
has comment: http://stackoverflow.com/comment/43632374
answers question: http://stackoverflow.com/q/27587697
has body: If you want to append data from server you must return current result. In your example you return text but in js you try apped this text- that is your problem. This is a example: user.php $u = mysqli_query($dbh,"SELECT * FROM updateside WHERE `parent_id`='".$parent."' AND `created` &gt; '".$timestamp."' ORDER BY created DESC") or die(mysqli_error($dbh)); while ($row = mysqli_fetch_array($u)) { $result['from_id'] = $row['from_id']; $result['parent_id'] = $row['parent_id']; ...... .... header('Content-Type: application/json'); echo json_encode($result); exit; } and your success method success: function(data){ if(data) { //create your html structs as you access data : data.from_id or data.parent_id } },
has comment: http://stackoverflow.com/comment/43621210
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43600263
score: 0

http://stackoverflow.com/a/27571625
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27568295
has body: Use this regex: (['"]).*?\1|(%) and the second capture group will have all the % signs that are not inside single or double quotes. Breakdown: (['"]).*?\1 captures a single or double quote, followed by anything (lazy) up to a matching single or double quote |(%) captures a % only if it wasn't slurped up by the first part of the alternation (i.e., if it's not in quotes)

http://stackoverflow.com/q/27513766
tagged with: jsp
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/43459951
has comment: http://stackoverflow.com/comment/43457925
accepted answer: http://stackoverflow.com/a/27645739
has title: JS file has wrong type when run on Server (AngularJS)
has comment: http://stackoverflow.com/comment/43458026
type: AnsweredQuestion
has body: Im still new to Angular and what I'm trying to do is to create an angular controller in a separate js file and map it with my jsp file. The problem is that I cannot get angular work. Though it works just fine if I include controller script into the jsp file itself. Somehow the server cannot find those script files and it throws 404 error. Nevertheless I specify the files paths correctly in my opinion. Here is a screenshot: And this is my home.jsp: <%@page contentType="text/html" pageEncoding="UTF-8"%> Home Hello World! This is the homepage! Supposed to be cool The ID is {{first.id}} The content is {{first.content}} Might this type thingy be a problem? if not, why is it impossible to find these files? Thanx in advance. EDIT Server side code: dispatcher-servlet: <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/schema/p" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"> <context:component-scan base-package="vermilion.calendar.controller" /> <context:component-scan base-package="vermilion.calendar.model" /> <context:component-scan base-package="vermilion.calendar.service" /> <context:component-scan base-package="vermilion.calendar.dao" /> <tx:annotation-driven transaction-manager="transactionManager" /> ${hibernate.dialect} ${hibernate.transaction.factory_class} HomeController: package vermilion.calendar.controller; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.ui.ModelMap…
possible better answer: http://stackoverflow.com/a/27517900
has comment: http://stackoverflow.com/comment/43457931
has answer: http://stackoverflow.com/a/27645739
has comment: http://stackoverflow.com/comment/43458244
type: Question
has answer: http://stackoverflow.com/a/27517900
answer count: 2

http://stackoverflow.com/comment/43663180
score: 0
type: Comment
has text: ok, but it can do any deffer sir?
type: QuestionComment
comment on: http://stackoverflow.com/q/27620467

http://stackoverflow.com/q/27511540
answer count: 2
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/27511742
favorite count: 0
has title: Hide/show content depending on selected checkbox
has answer: http://stackoverflow.com/a/27511640
has comment: http://stackoverflow.com/comment/43453402
upvote count: 1
tagged with: checkbox
has body: I'm trying to make a form which contains a checkbox question of "yes" or "no". If the user answers the checkbox "yes", the rest of the form will show, but if the user answers "no" then the rest of the form will keep the hidden properties. I have this fiddle http://jsfiddle.net/Eliasperez/c3ay7jdy/2/ Both codes work great but I can't seem to make them work together. I'd love to have some help with this. I want the user to select one checkbox only and to have the fields hidden until the user checks the "yes" option. The "no" option should be checked by default. Feel free to ask for any further explanation or info. &lt;script&gt; $("#CAT_Custom_1186889_1").change(function(){ var self = this; $("#tableID tr.rowClass").toggle(!self.checked); }).change(); $('input[type="checkbox"]').on('change', function () { $('input[name="' + this.name + '"]').not(this).prop('checked', false); }); &lt;/script&gt; &lt;table id="tableID"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt; &lt;label class="label16"&gt;¿Cuentas con Embajador Blive?&lt;/label&gt; &lt;br /&gt; &lt;input type="checkbox" name="CAT_Custom_1186889" id="CAT_Custom_1186889_0" value="Si" class="boxcheck"&gt;Si &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;input checked="checked" type="checkbox" name="CAT_Custom_1186889" id="CAT_Custom_1186889_1" value="No" class="boxcheck"&gt;No &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr class="rowClass"&gt; &lt;td&gt;This 2 rows will disapear! &lt;/td&gt; &lt;/tr&gt; &lt;tr class="rowClass"&gt; &lt;td&gt;This 2 rows will disapear!&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt;
type: AnsweredQuestion
downvote count: 2
type: Question
accepted answer: http://stackoverflow.com/a/27511640
has comment: http://stackoverflow.com/comment/43453397
has comment: http://stackoverflow.com/comment/43453531
tagged with: javascript
tagged with: jquery
score: -1
tagged with: show-hide
has answer: http://stackoverflow.com/a/27511742

http://stackoverflow.com/comment/43658837
comment on: http://stackoverflow.com/a/27618919
type: Comment
has text: Thanks for your help. I've just tried that solution and it doesn't stop the page going to youtube.
score: 0
type: AnswerComment

datetime
tags question: http://stackoverflow.com/q/27483334
tags question: http://stackoverflow.com/q/27541414
tags question: http://stackoverflow.com/q/27563146
tags question: http://stackoverflow.com/q/27481079
tags question: http://stackoverflow.com/q/27489489
tags question: http://stackoverflow.com/q/27505460
tag name: datetime
tags question: http://stackoverflow.com/q/27477496
tags question: http://stackoverflow.com/q/27522193
type: Tag
tags question: http://stackoverflow.com/q/27557726
tags question: http://stackoverflow.com/q/27535762
tags question: http://stackoverflow.com/q/27538537
tags question: http://stackoverflow.com/q/27526086
tags question: http://stackoverflow.com/q/27608578
tags question: http://stackoverflow.com/q/27520368
tags question: http://stackoverflow.com/q/27480262

http://stackoverflow.com/comment/91352469
type: AnswerComment
type: Comment
has text: One can delete session variables too using delete Session.keys[sessionName]. Link : https://stackoverflow.com/questions/10743703/how-do-i-delete-or-remove-session-variables
score: 0
comment on: http://stackoverflow.com/a/44064429

http://stackoverflow.com/a/27537635
upvote count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/43504339
answers question: http://stackoverflow.com/q/27537588
type: AcceptedAnswer
has body: No, you can't force the client to execute a native application via the browser like that. It would present a very large security hole that would allow any hacker to come along and execute arbitrary violent code on any client and this is strictly prevented. You can execute the C++ add-on on the server side via an API though, and that should solve most use cases.
has comment: http://stackoverflow.com/comment/43504178
accepted answer of: http://stackoverflow.com/q/27537588
type: Answer
score: 1

http://stackoverflow.com/comment/43693994
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27628852
type: Comment
has text: This is the closest anyone's gotten yet. Though something funny is happening with the dots. If I type 1.5 it is accepted. If I add any numbers after that, it too is accepted (desired behavior.) However, if I have 1.5 in the text box, then add another dot (1.5.) the first dot is removed (*not* desired) and the second dot remains. So, when typing 1.5. (trailing dot) I get 15.1 (bad, should remove the last dot and leave it at 1.5) If I add a 1 at the end (characters entered: 1.5.1) I end up with 15.1. If I add another dot, I get 151. Any ideas? I can send more of my code if you need it.

http://stackoverflow.com/comment/43541894
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27557740
has text: Are you sure it is that less efficient? I use such a library for all financial calculation without any noticeable performance impact.
type: Comment

http://stackoverflow.com/a/27517765
type: Answer
has body: You have an id for the div, so need to use id selector(prefix #) not class selector(prefix .), also show is a method so you need to invoke it(add () at the end) $(document).ready(function() { ListUsers=function(em){ var emid = em.title; $('#userslistdiv').text('id-' + emid); $('#userslistdiv').show(); //alert("it worked-" + emid); // both these can be combined to //$('#userslistdiv').text('id-' + emid).show() }; });
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27517739
answers question: http://stackoverflow.com/q/27517739
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/27549418
tagged with: object
tagged with: javascript
has comment: http://stackoverflow.com/comment/43525288
has title: Javascript object transform
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/43525159
favorite count: 0
has comment: http://stackoverflow.com/comment/43525162
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/27549664
upvote count: 3
has comment: http://stackoverflow.com/comment/43534551
has body: I want to transform this object so that I can call it that way cars.ox, bikes.ox var baseValue = [ { '2014-12-01': { 'cars;ox;2014-12-01':100, 'cars;ot;2014-12-01':150, 'bikes;ox;2014-12-01':50, 'bikes;ot;2014-12-01':80 }, '2014-12-02': { 'cars;ox;2014-12-02':100, 'cars;ot;2014-12-02':150, 'bikes;ox;2014-12-02':50, 'bikes;ot;2014-12-02':80 } } ] I try do this in many ways, but at the end i completely lost all hope. var category = [] var obj = baseValue[0] Object.keys(obj).forEach(function(key) { var dane = obj[key] Object.keys(dane).forEach(function(key) { splitted = key.split(';') var category = splitted[0] var serviceName = splitted[1]; }) }) I would be grateful if anyone help me with this
accepted answer: http://stackoverflow.com/a/27549664
type: Question

http://stackoverflow.com/q/27627040
possible better answer: http://stackoverflow.com/a/27627295
type: Question
accepted answer: http://stackoverflow.com/a/27627403
tagged with: javascript
has body: I have a table with Column title. There is also a edit button. If I click the button, Table title should be a Input field with title name as a value in it. Edit button will turn into Save Button. I can rename the title and Save the new names. I not good in jquery and what I made creating bunch of input fields and I can't save new names. FIDDLE Any help will save my day. Thanks in advance. jQuery: var textInfo = $('.table th').text(); $("html").on('click', '.btn-danger', function() { $('.table th').append('&lt;input id="attribute" type="text" class="form-control" value="' + textInfo + '" &gt;'); $('.btn-danger').text('Save'); }) ;
score: 0
answer count: 2
tagged with: jquery
has answer: http://stackoverflow.com/a/27627403
has title: Click button to Edit Table titles
has answer: http://stackoverflow.com/a/27627295
type: AnsweredQuestion

http://stackoverflow.com/q/27637597
type: Question
has answer: http://stackoverflow.com/a/27637624
accepted answer: http://stackoverflow.com/a/27637624
tagged with: javascript
upvote count: 2
answer count: 2
possible better answer: http://stackoverflow.com/a/27638124
has answer: http://stackoverflow.com/a/27638124
favorite count: 0
has title: How to allow tab after having disable keyCodes
tagged with: http://stackoverflow.com/tag/html
has body: I have an input field where I only want digits to be inserted into it. To achieve this, I've added the following attribute into the input : onkeypress="return event.charCode == 8 || event.charCode == 9 || event.charCode == 37 || event.charCode == 39 || event.charCode == 46 || event.charCode &gt;= 48 &amp;&amp; event.charCode &lt;= 57" note : /* keycodes allowed : 37 : left 39: right 46: decimal 48-57: digits + - 8: backSpace 9: tab */ The issue I have (only in Firefox), is that the TAB doesn't work to switch from one field to another. Any idea on how to achieve it?
score: 2
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/comment/43447843
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27498615
type: Comment
has text: you do that by redrawing.

http://stackoverflow.com/a/27518464
answers question: http://stackoverflow.com/q/27518156
type: Answer
type: AcceptedAnswer
score: 0
accepted answer of: http://stackoverflow.com/q/27518156
has body: You can implement periodic updates using client-site Javascript functions, either setInterval() or setTimeout(), with syntax like following: // start digital clock function StartTopClock() { _pID = window.setInterval('UpdateTopClock()', 100);} which provides periodic updates every 100 ms. Detailed description is available at: http://digiclock.codeplex.com/, working demo at: http://webinfocentral.com/ Hope this will help. Best regards,

http://stackoverflow.com/comment/43574180
type: Comment
has text: Wow. We both posted literally the same answer at almost the same time :-D
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/27574340

http://stackoverflow.com/comment/43409893
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27488698
has text: lolka_bolka, you code above did help, but it is only adding one column in the table. Each comma separated word is still acting like one string. Is there a way to get each word in this array into separate columns?

http://stackoverflow.com/comment/95798273
has text: As to why I want images to maintain the original path and filename; debugging mostly, same reason you'd use sourcemaps, but also [SEO](https://yoast.com/image-seo/#name). Regardless, the answer to my question was actually very simple...`[path][name].[ext]` and there's plenty of flexibility provided to modify this for specific environment or use case...[file-loader](https://webpack.js.org/loaders/file-loader/#function)
comment on: http://stackoverflow.com/a/53905362
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/a/27495278
type: Answer
has body: You can create 2 functions in client side function functionOK() { //some code } function functionCancel() { //some code } and change your code like this ClientScript.RegisterStartupScript(this.GetType(), "InvalidEntrySubTypeAlert", "if(confirm('" + "Are you sure you want to create the following deal?\n" + "\nDeal ID :\t\t\t" + nDealID + "\nCompany Name :\t\t" + txtCompanyName.Text + "\nEntry Subject :\t\t" + txtEntrySubject.Text + "\nBusiness Lead :\t\t" + ddlBusinessLead.SelectedItem.Text + "\nLicense Status :\t\t" + ddlLicenseStatus.SelectedItem.Text + "\nEffective Date :\t\t" + string.Format("{0:MM/dd/yyyy}", calEffectiveDate.SelectedDate) + "\nExpiration Date :\t\t" + string.Format("{0:MM/dd/yyyy}", calExpirationDate.SelectedDate) + "\nLicense Location :\t\t" + txtLicenseLocation.Text + "\nEntry Sub Type :\t\t" + ddlEntrySubType.SelectedItem.Text.Split(' ')[0] + "')){ functionOK();} else{functionCancel()}", true);
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/27494330
downvote count: 0

http://stackoverflow.com/comment/43432924
score: 0
comment on: http://stackoverflow.com/q/27500617
type: Comment
type: QuestionComment
has text: Looks fine at first glance. Could you elaborate on how it's not working please?

http://stackoverflow.com/a/27532269
has comment: http://stackoverflow.com/comment/43493111
type: Answer
has body: You should be able to concatenate like so: ng-options="(player.number + ' - ' + player.name) for player in division"
upvote count: 3
answers question: http://stackoverflow.com/q/27532221
accepted answer of: http://stackoverflow.com/q/27532221
score: 3
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/43477762
score: 0
type: Comment
has text: i can easily add a class to those that come from db and are disalbed but how can i pass them with js ? and simon it's not working as intended because it removes disabled class even to those that are disabled from start
type: QuestionComment
comment on: http://stackoverflow.com/q/27524191

http://stackoverflow.com/comment/43470064
has text: I just replaced my setTimeout() part with your second example. also i tried both. would you please share yours so i can test it.
comment on: http://stackoverflow.com/a/27479477
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/43455883
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27512641
has text: @t.niese: I looked at that too. That question is about a scroll done by the user vs being done programmatically. So it doesn't answer my question.

http://stackoverflow.com/q/27622366
favorite count: 0
type: Question
upvote count: 2
tagged with: xmlhttprequest
tagged with: internet-explorer-11
answer count: 1
has title: status code 12004 while doing a service call
has comment: http://stackoverflow.com/comment/43846688
tagged with: javascript
type: UnansweredQuestion
tagged with: ajax
has answer: http://stackoverflow.com/a/27717415
score: 2
downvote count: 0
has body: I am doing a service call in my javascript which return xml data using xmlHttpRequest.My service call is working in chrome and firefox perfectly and getting the data(it is a https call).But when i try the same with IE11 it is giving status code 12004 .I tried searching it on google i found only one answer saying it means ERROR_INTERNET_INTERNAL_ERROR. I tried opening fiddler to see the request but when i open up fiddler service call is working fine,but when i close fiddler it is showing same error code.

http://stackoverflow.com/comment/43474430
has text: Are you adding _div_ dynamically?
score: 2
comment on: http://stackoverflow.com/q/27522730
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43430885
type: Comment
score: 1
has text: thanks a lot Michael. i did a little here and there in my codes, and even updated the angular version to the latest one. it works fine now. thanks.
comment on: http://stackoverflow.com/a/27499533
type: AnswerComment

http://stackoverflow.com/comment/43621222
type: AnswerComment
has text: Use [`instanceCreated`](http://docs.ckeditor.com/#!/api/CKEDITOR-event-instanceCreated) instead of [`instanceLoaded`](http://docs.ckeditor.com/#!/api/CKEDITOR-event-instanceLoaded). Otherwise you lose the initial `toHtml` (when data comes from textarea), fired before `instanceLoaded`.
comment on: http://stackoverflow.com/a/27579984
type: Comment
score: 1

http://stackoverflow.com/q/27630341
has body: I'm trying to replicate this behavior (https://www.airbnb.ca/s/toronto-ontario?checkin=17-12-2014&amp;checkout=24-12-2014&amp;sw_lat=43.56960969393856&amp;sw_lng=-79.59977045062669&amp;ne_lat=43.8614845983898&amp;ne_lng=-79.23172845843919&amp;zoom=11&amp;search_by_map=true&amp;ss_id=8dvu26gm), Basically I've been trying to catch the lat/long when when the mouse moves over the map with no success. here is my attempt: http://www.ananietodiseno.com/maps/ I've been trying it using the mouseover event. Is there someone who can point me in the right direction with this subject? thanks in advance.
upvote count: 1
has comment: http://stackoverflow.com/comment/43686979
has answer: http://stackoverflow.com/a/27641085
score: -2
downvote count: 3
has title: Execute event when I move the map
type: Question
answer count: 1
has comment: http://stackoverflow.com/comment/43695255
tagged with: javascript
has comment: http://stackoverflow.com/comment/43688902
favorite count: 0
tagged with: ajax
tagged with: google-maps-api-3
type: UnansweredQuestion

http://stackoverflow.com/a/27481754
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27480984
has comment: http://stackoverflow.com/comment/43398011
has comment: http://stackoverflow.com/comment/43431014
upvote count: 2
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/43396917
answers question: http://stackoverflow.com/q/27480984
has body: Not a pretty solution but on some Android devices I've solved similar problems only by a timeout like; setTimeout(function () { document.body.classList.add("gray"); }, 0); The timout of "0" generally works but in some rare cases even later execution is needed. The above code will wait for all the execution queue to catch up and changes the class. Especially on some low performance devices some changes have not enough time to be rendered while JS is executing (possibly due to a bug in HTML renderer). But it is also important to keep in mind that your code may have other parts that may result in this behaviour. Also it is possible to force the browser to redraw using the method explained in Force Redraw If this still does not solve the issue, the redraw itself can be delayed using a SetTimeout.
has comment: http://stackoverflow.com/comment/43396348
has comment: http://stackoverflow.com/comment/43416830
downvote count: 0

http://stackoverflow.com/q/27523844
has comment: http://stackoverflow.com/comment/43490889
tagged with: javascript
type: UnansweredQuestion
score: 2
downvote count: 0
has body: I am trying to print a sql query using plv8.elog() in a plv8 procedure. plv8.elog(NOTICE, 'Notice:', str); I don't know why but I am unable to see any output on the console. I searched for the possible solution and found a useful information that plv8 can print a string up to max length 512 characters. Link is given below. http://code.google.com/p/plv8js/issues/detail?id=78 For verifying this I tried to print same string with str.slice plv8.elog(NOTICE, 'Notice:', str.slice(0,512)); This time I can see the log output as expected. Can someone please suggest, How can we log string having more than 512 characters?
favorite count: 0
tagged with: postgresql
tagged with: plv8
has answer: http://stackoverflow.com/a/30642129
type: Question
has comment: http://stackoverflow.com/comment/43488566
tagged with: logging
upvote count: 2
has title: How to log a string in a postgres plv8 procedure?
answer count: 1

http://stackoverflow.com/comment/43496003
comment on: http://stackoverflow.com/q/27533621
type: QuestionComment
type: Comment
has text: Just mark the question as answered--'accept' the answer Brewal offered below. :)
score: 0

button
tags question: http://stackoverflow.com/q/27549949
tags question: http://stackoverflow.com/q/27528883
tags question: http://stackoverflow.com/q/27573573
tags question: http://stackoverflow.com/q/27553757
tags question: http://stackoverflow.com/q/27508025
type: Tag
tags question: http://stackoverflow.com/q/27517115
tags question: http://stackoverflow.com/q/27477187
tags question: http://stackoverflow.com/q/27552624
tag name: button
tags question: http://stackoverflow.com/q/27559438
tags question: http://stackoverflow.com/q/27496515

http://stackoverflow.com/a/27650869
downvote count: 0
upvote count: 3
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27609887
answers question: http://stackoverflow.com/q/27609887
type: Answer
has body: Did you install a custom menu (i.e. overriding the default Atom Shell menu?) Once you do this, you'll actually have to explicitly implement the Devtools shortcut to get it to work.
score: 3

http://stackoverflow.com/q/27568461
tagged with: amd
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/43566798
has answer: http://stackoverflow.com/a/27569552
answer count: 3
has title: Including Superagent as AMD
linked to: http://stackoverflow.com/q/21021621
tagged with: superagent
favorite count: 0
has answer: http://stackoverflow.com/a/27568969
has comment: http://stackoverflow.com/comment/43564329
has body: I am a little confused about multiple ways of importing files in Javascript (script tag, RequireJS, Component - if it is another way to include files). In my project, I am using AMD with RequireJS. Now, I want to use superagent library. I donwnloaded superagent.js file, and I included it in some test pages using script tag. Then, I can use a require function (defined in superagent.js), and I definitely have access to superagent functions, if I write: var request = require('superagent'); in my JS file. Is there a way to use Superagent library in my poject, which is based on RequireJS? I hope to still use: var request = require('superagent'); , but clearly it is not working.
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29655692
tagged with: requirejs
upvote count: 1
type: Question
score: 1

http://stackoverflow.com/comment/43579327
type: Comment
comment on: http://stackoverflow.com/a/27577071
has text: Don't forget to specify the **Content-Type**
type: AnswerComment
score: 2

http://stackoverflow.com/comment/43408225
has text: @ElatedOwl yes signup is being called. It's going into the error function
score: 0
comment on: http://stackoverflow.com/q/27488181
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43412152
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27488398
has text: where does `$('#myModal')` come from? is this the correct element? Does the `'hidden.bs.modal'` event ever trigger?

http://stackoverflow.com/q/27519665
tagged with: windows
tagged with: cleartype
tagged with: css
has title: How to Enable font cleartype in windows with javascript
has body: I am using a client font(Custom web fonts) in a webpage which requires a small setting in controlpanel to be done. We have to select the font clear type in control panel. (As shown in the pic). Otherwise the font comes up with uneven edges. Other than manual selection is there any way to achieve this configurtion. Is there any way we can make this adjustment in the html, css or js only? Below are the font-faces i am using @font-face { font-family:'BTFont_Rg'; src: url('../fonts/BTFont_Rg.eot'); src: local('☺'), url('../fonts/BTFont_Rg.woff') format('woff'),url('../fonts/BTFont_Rg.ttf') format('truetype'), url('../fonts/BTFont_Rg.svg') format('svg'); font-weight: normal; font-style: normal; } We are using Xampp. Any suggestions?
has comment: http://stackoverflow.com/comment/43469058
upvote count: 1
has comment: http://stackoverflow.com/comment/43478453
tagged with: webfonts
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43469850
has comment: http://stackoverflow.com/comment/43469918
has comment: http://stackoverflow.com/comment/43470650
downvote count: 0
answer count: 0
score: 1
has comment: http://stackoverflow.com/comment/43469090
favorite count: 0
linked to: http://stackoverflow.com/q/5676768
type: Question

cors
tags question: http://stackoverflow.com/q/27526034
type: Tag
tag name: cors
tags question: http://stackoverflow.com/q/27501045
tags question: http://stackoverflow.com/q/27520743
tags question: http://stackoverflow.com/q/27495087
tags question: http://stackoverflow.com/q/27605732
tags question: http://stackoverflow.com/q/27519546
tags question: http://stackoverflow.com/q/27583161

http://stackoverflow.com/comment/43579551
comment on: http://stackoverflow.com/a/27576811
has text: Doesn't fix the problem. Try your own snippet.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/43662216
type: Comment
type: QuestionComment
has text: No i am not using any jquery datatable.
comment on: http://stackoverflow.com/q/27620684
score: 0

http://stackoverflow.com/comment/43589233
type: Comment
comment on: http://stackoverflow.com/q/27582404
has text: Use Services or Factories. Do not forget your add your services module to the main module if u seperated them. Also inject the service (e.g. UserService) in your controller.
score: 0
type: QuestionComment

http://stackoverflow.com/a/27511500
upvote count: 1
has body: Whenever you manipulate the DOM in any manner you should do so via a Directive and not within a controller or pure Javascript. For this issue in particular (using Angular with FlexSlider) I would suggest looking at the directive someone made to make these work nicely with each other. https://github.com/thenikso/angular-flexslider
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43453648
answers question: http://stackoverflow.com/q/27510751
has comment: http://stackoverflow.com/comment/43483465
type: Answer
has comment: http://stackoverflow.com/comment/43471782

http://stackoverflow.com/a/27489626
score: 0
type: AcceptedAnswer
has body: The reason is that you can have an id (file-uploader-attachment) only once in your html page (they should be unique). If they are not unique the first one is taken (if this is by standard or common sense, I do not know). What you want to achive is something like this: &lt;td class="file-uploader-attachment"&gt;&lt;/td&gt; and var elements = document.getElementsByClassName('file-uploader-attachment'); Array.prototype.filter.call(elements, function(element){ var uploader = new qq.FileUploader({ element: element, ... }); or even simpler with jquery (if already in use): $(".file-uploader-attachment).each(function (element) { var uploader = new qq.FileUploader({ element: element, ... });
type: Answer
accepted answer of: http://stackoverflow.com/q/27489420
answers question: http://stackoverflow.com/q/27489420
has comment: http://stackoverflow.com/comment/43435266

http://stackoverflow.com/comment/43609429
comment on: http://stackoverflow.com/a/27592770
type: Comment
has text: Also, it lies partially with the tpl plugin for loading templates from other files. The <%-value%> syntax does not appear to work. It does work with a regular underscore template though. Annoying problems.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43497862
comment on: http://stackoverflow.com/q/27533608
type: Comment
type: QuestionComment
has text: Also, do you really need your function to work with multiple arguments? Especially that symmetric difference looks a bit ill-defined for that.
score: 0

http://stackoverflow.com/a/27573942
type: Answer
has body: The beforeunload event handler will run just before the page is closed. window.addEventListener('beforeunload', function(e) { //run some code //OPTIONAL: if you use the following, a navigate confirmation box will appear return "Are you sure you want to leave"; }); Alternatively, you could use the pagehide event, which also triggers when the page is unloaded. This is triggered a while after the beforeunload event though, so if you want to perform some more heavy computations, I'd recommend using beforeunload instead. If you want to make the session time out after leaving the page inactive for too long, you could use a setTimeout that's reset everytime the user interacts with the page: window.idleTimer = 0; function resetIdleTimer() { clearTimeout(window.idleTimer); //reset the previous timer window.idleTimer = setTimeout(function() { //set another one right away //kill the connection }, 30*60*1000); //30 minutes = 3600000ms } resetIdletimer(); //initialise the timer window.addEventListener('focus', resetIdleTimer); window.addEventListener('mousemove', resetIdleTimer);
answers question: http://stackoverflow.com/q/27573879
score: 0
has comment: http://stackoverflow.com/comment/43573351
has comment: http://stackoverflow.com/comment/43573437

http://stackoverflow.com/a/27603408
answers question: http://stackoverflow.com/q/27603081
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/27603081
has comment: http://stackoverflow.com/comment/43636709
has comment: http://stackoverflow.com/comment/43652882
has comment: http://stackoverflow.com/comment/43629160
has comment: http://stackoverflow.com/comment/43636912
upvote count: 1
type: AcceptedAnswer
has body: You cannot do this using single window (window.location) - because the browsers limit one page load per window. Download is initiated at page load - when content type is not acceptable or is meant to be downloaded. In my opinion best workaround is using iframes $('a.digital-download').each(function(){ $('&lt;iframe&gt;&lt;/iframe&gt;', {src: $(this).attr('href')}) .css({ width:0, height:0, border:'none' }) .appendTo('body'); }); Download links are collected from anchor elements and added to newly created iframe elements. Iframes are essentially embedded windows. Later when iframes are appended to page - multiple page loads are initiated and multiple downloads are started. EDIT: Recently had to make this solution work with pure JavaScript var body = document.getElementsByTagName('body'), elements = document.getElementsByClassName('digital-download'), element, src; for(var I in elements) { if(elements.hasOwnProperty(I) &amp;&amp; elements[I].attributes.length &gt; 0) { src = null; for(var O in elements[I].attributes) { if(elements[I].attributes.hasOwnProperty(O) &amp;&amp; elements[I].attributes[O].name == 'href') { src = elements[I].attributes[O].value; } } if(typeof src != 'undefined' &amp;&amp; null !== src) { element = document.createElement('iframe'); element.style.width = 0; element.style.height = 0; element.style.borderWidth = 0; body[0].appendChild(element); element.src = src; } } }
type: Answer

http://stackoverflow.com/q/27478864
has body: In my rendered function a change some html on the page like so: $($($('.round'+nextRound).find('li')[nextMatch]).find('.participant')[currentParticipant]).find('a').addClass('tooltip').html(winnerBox); I need to undo that change in one of my event handlers aka: 'click #swear': function(event){ Meteor.call('submitWinner', winnerInfo, thisCampaign._id, Meteor.user().apiKey, function(error, result) { // display the error to the user and abort if (error){ return alert(error.reason); }else{ !RE-RENDER MY TEMPLATE HERE! // Session.set('roundUpdated', true); } }); }, I've tried using session variables ect but am having absolutley no luck! I think the problem is that this one template has 3 nested each blocks: each round ul(class='round#{currentRound} of#{rounds}') each match li each participant The helpers look like this: round: function() { // Session.set('updated', (Session.get('updated')+1)); var tournament = this.tournament.brackets; var rounds = tournament.length; var results = []; tournament.map(function(value, index){ var currentRound = index + 1; results.push({rounds: rounds, currentRound: currentRound, matches: value}); }); // console.log("results:", results); return results; }, match: function(){ // console.log("matches:", this.matches); return this.matches; }, participant: function(){ // do some calculations here return results; }, The code is a little incomplete for brevity, but hopefully you can get the idea! The weirdest part is that if I put a log in the participant helper it logs the correct thing but it never get rendered back into the html... like it still has what I forced in with jquery. If I update the template from another client then it works? like two seperate clients update correctly but one does not. Any ideas of what's going on or what I can do to fix it?
upvote count: 1
tagged with: jquery
tagged with: meteor
favorite count: 0
has comment: http://stackoverflow.com/comment/43410244
has title: How do I re-render a template in meteor, after calling a method, in an event?
tagged with: templates
answer count: 0
downvote count: 0
type: UnansweredQuestion
score: 1
tagged with: render
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/43394081

http://stackoverflow.com/a/27546659
type: Answer
has body: jQuery('#form2').submit(function(){ var valueSelected = jQuery("select[name='type']").val(); //Do what you want }); You can use the valueSelected variable to do what you want.
has comment: http://stackoverflow.com/comment/43519726
answers question: http://stackoverflow.com/q/27546504
score: 0

http://stackoverflow.com/q/27625257
type: Question
score: 0
has body: My app.js file looks like so: angular.module('airline', ['ngRoute', 'airlineServices', 'ngCookies']) .config(airlineRouter); function airlineRouter($routeProvider){ $routeProvider .when('/', { templateUrl: 'partials/destinations.html', controller: 'DestinationsCtrl' }) .when('/airports/:airportCode', { templateUrl: 'partials/airport.html', controller: 'AirportCtrl' }) .when('/airports/:airport1/:airport2', { templateUrl: 'partials/two_airports.html', controller: 'TwoAirportsCtrl' }) .when('/flights', { templateUrl: 'partials/flights.html', controller: 'FlightsCtrl' }) .when('/reservations', { templateUrl: 'partials/reservations.html', controller: 'ReservationsCtrl' }) .otherwise({ redirectTo: '/' }); }; Now I simply wish that if the user is logged in, which I can easily try by sending a token from cookies to the server and getting a response, I wish to load a view and a controller, but if the user is not logged in, I just wish to load the login view and the login controller? How can configure the '/' route so that it loads different views and controllers?
accepted answer: http://stackoverflow.com/a/27625379
answer count: 1
tagged with: javascript
has title: Load different templates and controllers in routes in Angular?
tagged with: angularjs
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27625379

http://stackoverflow.com/a/27550535
has comment: http://stackoverflow.com/comment/43527538
type: Answer
accepted answer of: http://stackoverflow.com/q/27507453
score: 5
has comment: http://stackoverflow.com/comment/63689227
has body: Looks like it might be a digest issue, as if you stick the Draggabilly creation in a $timeout it works as expected if(!isMobile()){ $timeout(function(){ var draggable2 = new Draggabilly(element[0], {handle: '.handle'} ); $rootScope.packery.bindDraggabillyEvents(draggable2); }) } http://plnkr.co/edit/qxv1VWPHZEKX3pVHgBi2?p=preview One thing of note i noticed whilst fiddling around with it, is if you use a different option than handle, for example { axis: 'x'} then it works without the need for the $timeout.
upvote count: 5
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27507453

http://stackoverflow.com/a/27488245
has body: Do you need to get it done through CKeditor's config? Because This can be configurated within the Drupal interface: Configuration > Text formats > Choose the input format ex: Filtered HTML check Limit allowed HTML tags scroll down to the vertical tab Limit allowed HTML tags check Add rel="nofollow" to all links
score: 2
accepted answer of: http://stackoverflow.com/q/27485787
downvote count: 0
answers question: http://stackoverflow.com/q/27485787
has comment: http://stackoverflow.com/comment/43409289
type: AcceptedAnswer
upvote count: 2
type: Answer

http://stackoverflow.com/q/27603878
answer count: 1
has comment: http://stackoverflow.com/comment/43630037
has comment: http://stackoverflow.com/comment/43630346
favorite count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/43630555
accepted answer: http://stackoverflow.com/a/27609432
tagged with: css
type: AnsweredQuestion
has body: I need to convert IE custom scroll bar into chrome. here is css scrollbar-face-color: #EAEAEA; scrollbar-shadow-color: #EAEAEA; scrollbar-highlight-color: #EAEAEA; scrollbar-3dlight-color: silver; scrollbar-darkshadow-color: silver; scrollbar-track-color: #F8F6F7; scrollbar-arrow-color: #6E6D6D; Can anyone convert this to chrome exactly? Thanks
has comment: http://stackoverflow.com/comment/43630051
downvote count: 3
has answer: http://stackoverflow.com/a/27609432
has title: Custom scroll bar for chrome
tagged with: google-chrome
type: Question
tagged with: internet-explorer
has comment: http://stackoverflow.com/comment/43641220
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/43630391
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/27564731
has body: What is the nature of the data structure used to store the name of a function in JavaScript? In other words, where is the string "Foo" (i.e. the name of the function Foo) stored when this code is evaluated? function Foo() {} Also, do anonymous functions have a hidden name?
type: Question
has answer: http://stackoverflow.com/a/27564762
tagged with: function
tagged with: javascript
score: 0
has title: Named and unnamed functions in JavaScript
answer count: 1
type: UnansweredQuestion

http://stackoverflow.com/comment/112619888
comment on: http://stackoverflow.com/q/27516028
score: 0
has text: @JoshuaJennings could you find some way to send data between cordova apps?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27490514
downvote count: 0
has body: I have a collection of Elks: App.Elk = DS.Model.extend( family: DS.belongsTo('family') friends: DS.hasMany('friends') ) In my Elks ArrayController, I want to get a list of all unique families and friends based on my list of Elks. I can do this with family easily, because it is a one-to-one relationship: App.ElksController = Ember.ArrayController.extend( family: Ember.computed.uniq('@each.family') ) I tried Ember.computed.uniq('@each.friends.@each') but @each only works one level deep, and Ember doesn't seem to have a flattenArray function. Is there a clean way to do this with a hasMany?
favorite count: 0
type: UnansweredQuestion
tagged with: ember.js
answer count: 0
score: 1
type: Question
tagged with: javascript
has title: Unique list from hasMany association ManyArray in Ember.js
upvote count: 1

http://stackoverflow.com/q/27528091
answer count: 1
has title: Options binding not populating data in the dropdown list
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/43485242
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27528270
has comment: http://stackoverflow.com/comment/43485481
has comment: http://stackoverflow.com/comment/43484999
type: UnansweredQuestion
tagged with: knockout.js
type: Question
has body: I am working on a html page along with knockout JavaScript and try to populate some data over the drop down list using the following script HTML &lt;td&gt; &lt;select data-bind="options:transactionType,optionsText:'typeOfTransaction', value:selectedType,optionsCaption:'Type'"&gt; &lt;/select&gt; &lt;/td&gt; @section scripts { &lt;script src="~/App/transactionType.js"&gt;&lt;/script&gt; } Knockout Js var Type = function (name) { this.typeOfTransaction = name; }; var viewModel = { transactionType: ko.observableArray([ new Type("Buy"), new Type("Sell"), new Type("None") ]), selectedType: ko.observable() // Nothing selected by default }; ko.applyBindings(viewModel); But when I run the script it threw me an exception uncaught Error: Unable to parse bindings. Message: ReferenceError: transactionType is not defined; Bindings value: options:transactionType,optionsText:'typeOfTransaction', value:selectedType,optionsCaption:'Type' Is there a better way I can fix this?

http://stackoverflow.com/a/27547787
downvote count: 3
has body: You can't with the currency filter. You could write your own, or just use the number filter. {{(produce.price | number:2) + "€"}}
upvote count: 21
answers question: http://stackoverflow.com/q/27547680
has comment: http://stackoverflow.com/comment/57753117
has comment: http://stackoverflow.com/comment/59531507
type: Answer
score: 18

http://stackoverflow.com/q/27589934
favorite count: 0
has comment: http://stackoverflow.com/comment/43603813
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27590112
has answer: http://stackoverflow.com/a/27590193
tagged with: css
answer count: 4
possible better answer: http://stackoverflow.com/a/27589975
has comment: http://stackoverflow.com/comment/43603811
type: AnsweredQuestion
has title: Making a clickable button change text
upvote count: 1
downvote count: 1
has body: Source Code link: http://hexmerchant.github.io/ I'm looking to make this button display different text each time I click it. i'm using html, css, and js. Explore That's the button. Here is the first function. function exploreFunction() { var person = prompt("What is your name", ""); if (person != null) { document.getElementById("story1").innerHTML = "-You wake up lying on the ground. You feel a large deposit of energy inside you."; } } What do I need to do to accomplish this? This could help multiple people out. As I was searching around for an answer here I realized that each answer was so specific that I could not find a match for my topic. I'm very new to all this and trying to teach myself... got this far : )
type: Question
has comment: http://stackoverflow.com/comment/43603789
has answer: http://stackoverflow.com/a/27589975
score: 0
has answer: http://stackoverflow.com/a/27590251
linked to: http://stackoverflow.com/q/14170153
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27590193
has comment: http://stackoverflow.com/comment/43603846

http://stackoverflow.com/comment/43533733
score: 0
type: AnswerComment
has text: Your suggestion worked perfectly. The only issue now is that, because script is inlined, the stacktrace shows @<anonymous> as origin, instead of file name. But it's a separate issue.
type: Comment
comment on: http://stackoverflow.com/a/27516534

http://stackoverflow.com/comment/43396348
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27481754
score: 0
has text: This seems to work for now. I'll keep testing a few more times just to make sure.

http://stackoverflow.com/comment/43566426
comment on: http://stackoverflow.com/q/27570546
type: Comment
type: QuestionComment
has text: You're combining `setTimeout` with `setInterval` for the ultimate punishment? ;-)
score: 0

http://stackoverflow.com/q/27512138
has answer: http://stackoverflow.com/a/27512838
tagged with: titanium
type: Question
tagged with: http://stackoverflow.com/tag/json
score: 0
accepted answer: http://stackoverflow.com/a/27512838
answer count: 1
tagged with: javascript
has body: Hi, I'm new to Titanium and in my project I'm looping over some JSON data that serves my app page titles and content. I have this function: xhr.onload = function() { try { var myPages = JSON.parse(this.responseText); for (var c=0;c&lt;myPages.length;c++){ var title = myPages[c].title; // page title var content = myPages[c].content; // page content I've added my page titles to a TableViewRow as a label: var row = Ti.UI.createTableViewRow({hasChild:true,height:Ti.UI.SIZE,backgroundColor:bgcolor}); // Create a vertical layout view to hold all the titles var post_view = Ti.UI.createView({ height: Ti.UI.SIZE, layout:'vertical', left:5, etc.. }); // Create article titles var label_title = Ti.UI.createLabel({ text:title, left:5, etc... }); // Add the article titles to the view post_view.add(label_title); // Add the vertical layout view to the row row.add(post_view); row.className = 'item'+c; data[c] = row; This all works fine, I get a table with my page titles in each row, but when the user clicks a title I want the app to open a new view/window to display the content of the corresponding page. This is where my trouble starts! I added this function to try and handle that situation: // Add an event listener to the rows row.addEventListener('click', function(){ Titanium.API.info('row has been clicked'); // Create view for article content var articleView = Titanium.UI.createView({ height: Ti.UI.SIZE, layout:'vertical', left:5, etc.. }); var t = Ti.UI.iPhone.AnimationStyle.FLIP_FROM_LEFT; win.animate({view:articleView,transition:t}); var articleViewContent = Ti.UI.createLabel({ text:content, left:5, etc.. }); // Add the content to the view articleView.add(articleViewContent); }); } // Create the tableView and add it to the window. var tableview = Titanium.UI.createTableView({data:data,minRowHeight:58}); win.add(tableview); } catch(E){ alert(E); } }; I can get a response to the title click input to show in the console, but I can't figure out how to call the corresponding conten…
tagged with: titanium-mobile
has title: Titanium - Content Issue with Loops and Views
type: AnsweredQuestion

http://stackoverflow.com/a/27553640
downvote count: 1
accepted answer of: http://stackoverflow.com/q/27495914
upvote count: 0
answers question: http://stackoverflow.com/q/27495914
has body: This is how I could make it work fully. app.js Ext.Loader.setPath({ 'Ext': 'Lib/touch-2.4.1/src', 'HaBoMobile': 'app' }); Ext.application({ name: 'HaBoMobile', controllers: ['AppController'], launch: function () { } }); AppController.js Ext.define('HaBoMobile.controller.AppController', { extend: 'Ext.app.Controller', config: { views: ['NavigationMenu','MainView', 'AboutView'], refs: { nav: { selector: 'navigationMenuType', xtype: 'navigationMenuType', autoCreate: true }, main: { selector: 'mainViewType', xtype: 'mainViewType', autoCreate: true }, about: { selector: 'aboutViewType', xtype: 'aboutViewType', autoCreate: true } }, control: { 'viewport': { beforehidemenu: 'beforeHideNav' }, 'button[action=nav]': { tap: 'showNav' }, 'button[ui=decline]': { tap: 'hideNav' }, 'button[action=nav_option]': { tap: 'handleNavigation' } } }, init: function () { var navMenu = this.getNav(); Ext.Viewport.setMenu(navMenu, { side: 'left', reveal: true }); Ext.Viewport.add(this.getMain()); }, showNav: function () { Ext.Viewport.showMenu('left'); Ext.fly('appLoadingIndicator').destroy(); }, beforeHideNav: function () { console.log('beforehidemenu returning false'); // returning false will prevent the hide return false; }, hideNav: function () { Ext.Viewport.hideMenu('left'); }, handleNavigation: function (btn) { switch (btn.getItemId()) { case 'aboutLink': var aboutView = Ext.Viewport.child('aboutViewType'); if (!aboutView) { aboutView = this.getAbout(); Ext.Viewport.add(aboutView); } Ext.Viewport.setActiveItem(aboutView); break; default: var mainView = Ext.Viewport.child('mainViewType'); if (!mainView) { mainView = this.getMain(); Ext.Viewport.add(mainView); } Ext.Viewport.setActiveItem(mainView); } this.hideNav(); } }); view/NavigationMenu.js Ext.define('HaBoMobile.view.NavigationMenu', { extend:'Ext.Menu', xtype: 'navigationMenuType', config: { scrollable: { direction: 'vertical', directionLock: true }, width: 180, // Need to set a width items: [{ text: 'Close', ui: 'decline' }, { …
type: AcceptedAnswer
score: -1
type: Answer

http://stackoverflow.com/a/27555665
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27555528
answers question: http://stackoverflow.com/q/27555528
type: Answer
has comment: http://stackoverflow.com/comment/43563611
score: 2
upvote count: 2
has body: Its always a good idea to use a base url in your code, so you don't face issues like this: var baseUrl = location.protocol + "//" + location.hostname + (location.port &amp;&amp; ":" + location.port) + "/"; Then include that base url with any url var url2 = baseUrl + "add_youtube_link/"+$(".add_youtube_link").attr('id')+"/"+$(".add_youtube_link").val().replace(/\//g,"_");

http://stackoverflow.com/comment/43645174
type: Comment
comment on: http://stackoverflow.com/a/27609735
score: 0
type: AnswerComment
has text: But I can't use a string if I want to make a timer? :/

http://stackoverflow.com/comment/43526877
comment on: http://stackoverflow.com/q/27550264
score: 0
type: Comment
has text: yes, this "basic js" does do it, as i have tested it.. in both IE and Chrome (FF doesnt close it)
type: QuestionComment

http://stackoverflow.com/comment/43508521
type: Comment
has text: You can have a look into `require.js` which is perfect for your scenario. Although suggestion is load scripts dynamically whereever it is required with `$.getScript()` or just use `.append()` to head.
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/27540425

http://stackoverflow.com/comment/43460775
has text: Um, I just tried this in a browser console, and it also returned a string like in my example. Anyone else test it?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27515090
type: AnswerComment

http://stackoverflow.com/comment/43497847
has text: There are a variety of JS templating engines that do this.
type: Comment
type: QuestionComment
score: 3
comment on: http://stackoverflow.com/q/27534742

http://stackoverflow.com/q/27637240
tagged with: onload
type: AnsweredQuestion
type: Question
has body: I have this simple code for get elements from a external source for(var i=0; i&lt;10; i++) loadPage(link[i]); function loadPage(href) { var ajax = new XMLHttpRequest(); ajax.open('get',href); ajax.responseType = 'document'; ajax.onreadystatechange=function() { console.log(ajax.responseXML.querySelectorAll("a[href^='magnet']")[0].getAttribute("href")); } ajax.send(); } but when i read the console i get only 2 or 3 result instead of 10. i think is because i can't run multiple onload. How i can fix this?
tagged with: onreadystatechange
accepted answer: http://stackoverflow.com/a/27637391
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/27637391
has title: Multiple xhr onload
score: 0
tagged with: xmlhttprequest

http://stackoverflow.com/a/28118017
has body: All you need to do is call a trigger on the body to update the cart. $( 'body' ).trigger( 'update_checkout' ); This will automatically call all the subsequent AJAX calls needed to refresh the cart information, including the order review.
answers question: http://stackoverflow.com/q/27635186
accepted answer of: http://stackoverflow.com/q/27635186
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 34
upvote count: 34

http://stackoverflow.com/comment/43536421
comment on: http://stackoverflow.com/q/27554800
score: 0
has text: @darcher ... check my answer to see if that's what you're looking for. if not tell me what I am missing
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43446611
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27505030
score: 0
has text: Have you tried wrapping the store in a dojo/store/Observable and then updating the record with a "put" call to it? Haven't used GridX, but that is the canonical way to make stores signal when they have been updated.

http://stackoverflow.com/a/27628443
answers question: http://stackoverflow.com/q/27628207
downvote count: 0
score: 1
has body: If you would like to use AngularJS's Filter module then you can do the following: var x = [{letter: 'A', number: 1}, {letter: 'B', number: 2}, {letter: 'C', number: 3}] var f = ['A', 'B'] function filterExp(value,index) { return (f.indexOf(value.letter) &gt; -1) } $scope.filtered = $filter('filter')(x, filterExp, true); I have created a JSFiddle to demonstrate its result.
upvote count: 1
type: Answer

http://stackoverflow.com/comment/43567065
score: 2
type: QuestionComment
comment on: http://stackoverflow.com/q/27570861
type: Comment
has text: Just keep chaining .then. Each call to .details should be changed to the original .then.

http://stackoverflow.com/comment/43988298
comment on: http://stackoverflow.com/q/27525829
has text: Just to be clinical, did you try the following - - Did you try different browsers? - If so, are you doing anything funky while selecting a value from the combo box? i.e. outside this initComponent function - Did you try having the store outside this initComponent function and setting it to **autoLoad**? (Not sure what's within that createRestStore. Even though it doesn't look like a loading issue, I don't know if Ext JS is doing any kind of weird caching with Window / Combo Boxes that would prevent you from choosing values. Really a long shot) - Did you try adding a semi-colon to style?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43543812
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27547231
has text: I know this is off topic, but I feel sorry for you losing time debugging something that wasn't your fault. Making webpage work ie makes me re-evaluate my decisions every time.

page-lifecycle
type: Tag
tags question: http://stackoverflow.com/q/27487611
tag name: page-lifecycle

http://stackoverflow.com/comment/43512692
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27542785
has text: `$("#iframe-wrapper").scroll(fn);` have you tried it?
score: 0

http://stackoverflow.com/comment/43546321
comment on: http://stackoverflow.com/q/27560030
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/43694334
has text: http://jsfiddle.net/vipinwasim/vkgg9rg1/6/
score: 0
comment on: http://stackoverflow.com/q/27636099
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27562226
type: Answer
accepted answer of: http://stackoverflow.com/q/27561809
upvote count: 11
has body: You initialize your dates incorrectly. This is how you should do it: var timeStart = new Date("01/01/2007 " + "05:00 AM"); var timeEnd = new Date("01/01/2007 " + "10:30 PM"); var diff = (timeEnd - timeStart) / 60000; //dividing by seconds and milliseconds var minutes = diff % 60; var hours = (diff - minutes) / 60; Then you can do with hours and minutes whatever you want.
downvote count: 1
score: 10
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27561809

http://stackoverflow.com/comment/43683208
type: Comment
has text: Alright, I am getting confused and more confused. The one and only I put into my server is `http://code.jquery.com/ui/1.11.2/jquery-ui.min.js`. That one is jQueryUI. It should be animated right? But I tried and it's not working thou. It appears but not sliding like JSFIDDLE above. Am I missing again?
comment on: http://stackoverflow.com/a/27631301
score: 0
type: AnswerComment

kendo-maskedtextbox
tag name: kendo-maskedtextbox
type: Tag
tags question: http://stackoverflow.com/q/27574784

http://stackoverflow.com/comment/43522696
has text: @LarsKotthoff surely theres an easy way of applying this : links.classed("hidden", function (o) { return d.index==o.source.index | d.index==o.target.index ? false : true; }); to all the selected nodes rather than the one node ?
comment on: http://stackoverflow.com/q/27546809
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/27621970
has body: In JavaScript, you can add as many parameters as you like to a function call or definition - only the ones that are supplied or match will be used. You can change the function like this: var formBind = function( event, showConfirm ) { event.preventDefault(); var form = $(this); if (showConfirm) { //logic to display confirmation, followed by a call to the original ajax post if required } else { // some ajax post and validation portion here } return false; }; All your existing places that call this function won't supply this parameter, so it will be undefined, and the if will evaluate to false and leave the original functionality intact. In new code, you can supply it as true or false as required: $('form:visible').submit(function(e) { return formBind(e, true); });
answers question: http://stackoverflow.com/q/27621884
has comment: http://stackoverflow.com/comment/43664568
downvote count: 0
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/43664427
score: 2

http://stackoverflow.com/q/27578276
type: Question
has comment: http://stackoverflow.com/comment/43581387
possible better answer: http://stackoverflow.com/a/27578315
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27578494
has comment: http://stackoverflow.com/comment/43581391
answer count: 3
linked to: http://stackoverflow.com/q/13840429
downvote count: 1
linked to: http://stackoverflow.com/q/1917576
has answer: http://stackoverflow.com/a/27578494
favorite count: 0
duplicate of: http://stackoverflow.com/q/13840429
tagged with: php
has title: How to echo js value in php
linked to: http://stackoverflow.com/q/8191124
has body: I have a script showing below for (var i = 0; i < checkboxes.length; i++) { var checkbox = checkboxes[i]; checkbox.onclick = function() { var currentRow = this.parentNode.parentNode; var secondColumn = currentRow.getElementsByTagName("td")[1]; alert("My text is: " + secondColumn.textContent ); }; } SO I have a variable secondcolumn I want value of this variable in php... How can I do this... I have tried this in php: echo $id= secondColumn.value; echo " "; but not work anymore... Please help
has answer: http://stackoverflow.com/a/27578330
type: AnsweredQuestion
upvote count: 0
score: -1
has answer: http://stackoverflow.com/a/27578315

http://stackoverflow.com/comment/43646016
type: QuestionComment
comment on: http://stackoverflow.com/q/27611820
score: 0
has text: What's your use case (what exactly are using it for in your game) ? There is probably a more elegant solution
type: Comment

http://stackoverflow.com/comment/43616836
type: Comment
has text: @Makaze no it does not. Since it is a text node, it will be recognized as plain text with HTML.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27596298

http://stackoverflow.com/a/27598403
answers question: http://stackoverflow.com/q/27597975
type: Answer
score: 2
downvote count: 0
upvote count: 2
has body: If my understanding for your question is correct that every li has the same width. And this is a function function getLastItem(){ $('li').removeClass('hello'); var containerWidth = $('ul').eq(0).width(); var totalItem = $('li').length; var itemWidth = $('li').eq(0).outerWidth(true); // plus margin var itemPerRow = Math.floor(containerWidth/itemWidth); var totalRows = Math.ceil(totalItem/itemPerRow); $('li:nth-child(' + itemPerRow + 'n), li:last-child()').addClass('hello'); } }); Hope my demo can help you http://jsfiddle.net/4n7drqcz/

http://stackoverflow.com/comment/43642606
score: 1
comment on: http://stackoverflow.com/q/27610080
has text: Right, but by using the console.log, you would be able to see the actual structure of `response`, which should be enough to tell you how to use it.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27598083
has body: Check this function (I had the same problem once and made this function, you may edit it as you want): EDIT WORKING ON RESIZE DEMO (resize) var wrapDetector = function(element) { var $elem = $(element); var wrapper = $(element).parent(); var wrapperWidth = wrapper.outerWidth(); var expToggle = $('#main-menu-wrapper.main-menu-expanded #header-toggle-buttons'); wrapper.attr('data-width', wrapperWidth); var elemTotalWidth = 0; $elem.each(function() { elemTotalWidth += $(this).outerWidth(); }); var wrapperWidthNew = wrapper.outerWidth(); var curWidth = 0; $elem.removeClass('lastInRow last-row'); $elem.each(function() { var that = $(this); var elemWidth = that.outerWidth(); curWidth += elemWidth; if (curWidth &gt; wrapperWidthNew) { that.prev().addClass('lastInRow'); curWidth = elemWidth; } that.attr('data-curWidth', curWidth); }); var lastInRow = $(element + '.lastInRow'); if (lastInRow.length &gt; 0) { lastInRow.last().nextAll().addClass('last-row'); } else { $elem.addClass('last-row'); } } wrapDetector('li'); ADD THIS $(window).resize(function() { wrapDetector('li'); });
score: 4
upvote count: 4
has comment: http://stackoverflow.com/comment/43619932
downvote count: 0
has comment: http://stackoverflow.com/comment/43619819
has comment: http://stackoverflow.com/comment/43619832
has comment: http://stackoverflow.com/comment/43619677
type: Answer
has comment: http://stackoverflow.com/comment/43619606
has comment: http://stackoverflow.com/comment/43619776
answers question: http://stackoverflow.com/q/27597975
has comment: http://stackoverflow.com/comment/43619701
has comment: http://stackoverflow.com/comment/43619724
has comment: http://stackoverflow.com/comment/43619771

http://stackoverflow.com/q/27555118
has title: Can a controller function bind data to an element's data property?
upvote count: 1
downvote count: 1
type: Question
has body: In jQuery, I'd do something like: var mySpan = $('&lt;span/&gt;,{ 'data':'somedata'}); In Angular, I want to have a function that binds to that data property while in an ng-repeat runs in the DOM, for example, &lt;div ng-repeat="item in items"&gt; &lt;span ng-click = "someFunc(somedata)"&gt;{{somedata.someprop}}&lt;/span&gt; &lt;/div&gt; So that I can access the object onClick in a ul and li based dropdown menu. I'm assuming I'm doing this the "wrong" (not Angular) way, but I can't see past it. I know that I can use jQuery in the function, or the angular.element.data() method, but I can't seem to send that data to the function! I'd prefer to not have the bound data visible as data-x, data-y tags in the html. That I can do just fine &lt;el data-x="{{somedata}}"&gt;&lt;/el&gt; End result, I'd like to be able to call $(someEl).data() and get the data object that I've bound to it. What am I missing?
has answer: http://stackoverflow.com/a/27555233
has comment: http://stackoverflow.com/comment/43536615
has comment: http://stackoverflow.com/comment/43536731
has comment: http://stackoverflow.com/comment/43536664
has comment: http://stackoverflow.com/comment/43536678
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/43536551
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/27555233
has comment: http://stackoverflow.com/comment/43536599
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43536685
score: 0

http://stackoverflow.com/comment/43643843
has text: Keep in mind, this example isn't very safe. You have an asynchronous constructor, but no callback or loaded method to use which will let you know when the data is ready. You can't just use: var service = new Service(path); service.getData();`.
type: QuestionComment
type: Comment
score: 2
comment on: http://stackoverflow.com/q/27609718

http://stackoverflow.com/q/27635889
has comment: http://stackoverflow.com/comment/43690950
has comment: http://stackoverflow.com/comment/43690937
downvote count: 0
has comment: http://stackoverflow.com/comment/43691066
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27635927
has answer: http://stackoverflow.com/a/27635939
linked to: http://stackoverflow.com/q/8072323
possible better answer: http://stackoverflow.com/a/27635927
has comment: http://stackoverflow.com/comment/43691768
linked to: http://stackoverflow.com/q/18838301
favorite count: 0
has comment: http://stackoverflow.com/comment/43691878
upvote count: 1
accepted answer: http://stackoverflow.com/a/27635939
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43691829
score: 1
type: Question
has body: am passing variable like fun1(this, 1/0) but am getting values like fun1(this, infinity) in jquery.please advise me how to resove this. the code as follows: 1.passing parameter &lt;input type="button" id="cutdel" onclick="javascript:cutdelete(this,2/0)"/&gt; 2.function in use function cutdelete(button, locGauge) { $.blockUI({ message: $('#deletewire'), css: { width: '360px', top: ($(window).height() - 1000) / 2 + 'px', left: ($(window).width() - 360) / 2 + 'px', backgroundColor: 'none', border: '3px solid #aaa', padding: '10px' } }); $('#delete').one('click', function() { loadCart = true; for (var i = 0; i &lt; selectedgaugeArray.length; i++) { if (selectedgaugeArray[i] == locGauge) { selectedgaugeArray.splice(i, 1); $(button).parent().parent().remove(); break; } } alert(selectedgaugeArray); $.unblockUI(); return false; }); $('#save').click(function() { $.unblockUI(); return false; }); } here am passing locGuage as 1/0 , 2/0 ,1:3 but am getting values as infinity. but it working for integer values. hi all... i am rendaring html content in script itself like content = content + "&lt;tr class=\"selitems\"&gt;&lt;td&gt;&lt;input type=\"button\" id=\"cutdel\" style=\"background: #FFFFFF url(images/cutclose.png); width: 14px;height: 14px;border: none;text-align: center;padding: 5px;font-size: 12px;\" onclick=\"javascript:cutdelete(this,"+WireGuage+")\"&gt;"+"&lt;/input&gt;&lt;/td&gt;" here am appending locGuage as onclick=\"javascript:cutdelete(this,"+WireGuage+")\"> in content. so tel me how to convert that as string Answer: i passes variable as string that is: i rendered locguage variable like var WireGuage ='\''+ $("#WireGuage_"+p).val()+'\''; the problem solved. thank u all... thanks for your time.
answer count: 2
has title: Getting variable value as infinity in jquery function

http://stackoverflow.com/comment/43545768
type: Comment
score: 0
comment on: http://stackoverflow.com/q/27559047
has text: No I just trying to display a web page on my local host.
type: QuestionComment

http://stackoverflow.com/comment/43411504
comment on: http://stackoverflow.com/a/27489933
score: 0
type: AnswerComment
type: Comment
has text: `ksort` sorts by keys. Kinda useless when you don't even have an array to sort yet in the OP's code.

http://stackoverflow.com/q/27482245
answer count: 1
downvote count: 1
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27482299
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/43397567
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43397674
has title: JQuery/Javascript code doesn't enter 'each'
has body: I don't really understand why my code doesn't enter the 'each' loop in the 'klikzoekknop' function. I can get the text value of the span, en the li does exist inside .chosen-results, so I don't really get it. The function is entered, I can for example use an alert(selectedText); Changing the submit to a normal button doesn't work. The following is my Javascript/Jquery function: function klikzoekknop(element){ var selectedText = $(".chosen-single span").text(); $(".chosen-results li").each(function(){ alert($(this).text()); }); }; The following is my HTML: Incident Melddatum Gewijzigd op nummer Melder Type Status Korte omschrijving Incident Incident Melddatum Gewijzigd op nummer Melder Type Status Korte omschrijving
has comment: http://stackoverflow.com/comment/43397485
score: 0
upvote count: 1

http://stackoverflow.com/a/27526570
accepted answer of: http://stackoverflow.com/q/27526445
type: Answer
answers question: http://stackoverflow.com/q/27526445
downvote count: 0
score: 1
upvote count: 1
has body: x,y,w,h are parameters to the method, not object properties, so just remove all the this.s: var c = document.getElementById("myCanvas"); var context = c.getContext("2d"); function drawCylinder ( x, y, w, h ) { context.beginPath(); //to draw the top circle for (var i = 0 * Math.PI; i &lt; 2 * Math.PI; i += 0.001) { xPos = (x + w / 2) - (w / 2 * Math.sin(i)) * Math.sin(0 * Math.PI) + (w / 2 * Math.cos(i)) * Math.cos(0 * Math.PI); yPos = (y + h / 8) + (h / 8 * Math.cos(i)) * Math.sin(0 * Math.PI) + (h / 8 * Math.sin(i)) * Math.cos(0 * Math.PI); if (i == 0) { context.moveTo(xPos, yPos); } else { context.lineTo(xPos, yPos); } } context.moveTo(x, y + h / 8); context.lineTo(x, y + h - h / 8); for (var i = 0 * Math.PI; i &lt; Math.PI; i += 0.001) { xPos = (x + w / 2) - (w / 2 * Math.sin(i)) * Math.sin(0 * Math.PI) + (w / 2 * Math.cos(i)) * Math.cos(0 * Math.PI); yPos = (y + h - h / 8) + (h / 8 * Math.cos(i)) * Math.sin(0 * Math.PI) + (h / 8 * Math.sin(i)) * Math.cos(0 * Math.PI); if (i == 0) { context.moveTo(xPos, yPos); } else { context.lineTo(xPos, yPos); } } context.moveTo(x + w, y + h / 8); context.lineTo(x + w, y + h - h / 8); context.stroke(); } drawCylinder(10,10,100,50); Fixed Fiddle
has comment: http://stackoverflow.com/comment/43482763
type: AcceptedAnswer

http://stackoverflow.com/comment/43423800
type: Comment
type: QuestionComment
score: 0
has text: I thought I had give you some references on your previous post? Anyways, you also can refer to this [detect internet speed](http://stackoverflow.com/questions/5529718/how-to-detect-internet-speed-in-javascript)
comment on: http://stackoverflow.com/q/27479824

http://stackoverflow.com/a/27513773
type: Answer
has body: One solution could be: function Color(obj, color){ obj.style.background=color; } hope it's useful!
answers question: http://stackoverflow.com/q/27513674
score: 0

http://stackoverflow.com/q/27609740
answer count: 1
has answer: http://stackoverflow.com/a/27609936
has title: Assigning value to object parameter
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27609936
type: Question
tagged with: javascript
tagged with: sharepoint
score: 0
has body: i have embedded code inside sharepoints. I need to pass a javascript value to a parameter. How can i do this here? Please see 3rd parameters, PUT_FUNCTION_VALUE_HERE for reference purposes. &lt;script type="text/javascript"&gt; function getUrlParameters(parameter, staticURL, decode){ /* Function: getUrlParameters Description: Get the value of URL parameters either from current URL or static URL Author: Tirumal URL: www.code-tricks.com */ var currLocation = (staticURL.length)? staticURL : window.location.search, parArr = currLocation.split("?")[1].split("&amp;"), returnBool = true; for(var i = 0; i &lt; parArr.length; i++){ parr = parArr[i].split("="); if(parr[0] == parameter){ return (decode) ? decodeURIComponent(parr[1]) : parr[1]; returnBool = true; }else{ returnBool = false; } } if(!returnBool) return false; } function getUrlParametersWrite(parameter, staticURL, decode){ var vlaue = getUrlParameters(parameter, staticURL, decode); alert(value); document.write(value); document.close(); } &lt;/script&gt; &lt;script type='text/javascript' src='http://myview.fake.org/javascripts/api/viz_v1.js'&gt;&lt;/script&gt; &lt;div class='tableauPlaceholder' style='width: 984px; height: 634px;'&gt; &lt;object class='tableauViz' width='984' height='634' style='display:none;'&gt; &lt;param name='host_url' value='http://myview.fake.org' /&gt; &lt;param name='site_root' value='' /&gt; &lt;param name='name' value='MemberParticipationReporting&amp;#47;MemberParticipationDashboard&amp;Fice=PUT_FUNCTION_VALUE_HERE' /&gt; &lt;param name='tabs' value='yes' /&gt; &lt;param name='toolbar' value='yes' /&gt; &lt;/object&gt; &lt;/div&gt;

http://stackoverflow.com/a/27571854
upvote count: 1
has comment: http://stackoverflow.com/comment/43573648
downvote count: 0
has comment: http://stackoverflow.com/comment/43572782
type: Answer
has comment: http://stackoverflow.com/comment/43570224
score: 1
answers question: http://stackoverflow.com/q/27571385
has body: You can sort ngRepeat elements by your created_at property by setting up your repeat with an orderBy filter. &lt;li ng-repeat="food in arrFoods | orderBy:created_at"&gt; &lt;span&gt;{{food.name}}&lt;/span&gt; &lt;/li&gt; As for ensuring you have "Coconut, Banana, Cantaloupe, and Cherry showing up first, you will need to create your own method of sorting based on a certain value. For my example, I have added the property fave to the elements you want displayed at the top of the array, prior to being ordered by created_by. { name: 'Coconut', created_at: '3/4/2011', fave: true } Then to apply it to your ngRepeat element... &lt;li data-ng-repeat="food in arrFoods | orderBy:['fave', 'created_by']"&gt; By applying an array of sorting parameters, we give priority to elements that have fave set to true (don't need to bother setting others to false) and then sort by created_by. >>Working Plunkr Example -mbp
has comment: http://stackoverflow.com/comment/43572733

http://stackoverflow.com/comment/43450450
score: 2
comment on: http://stackoverflow.com/q/27509711
has text: piping a stream implies it will emit an end event on completion so you dont need an extra res.end()
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43479292
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27525357
score: 0
has text: insert ` ` using javascript

http://stackoverflow.com/a/27507822
has body: Your arguments are incorrect, error doesn't return an object containing status and message, it passed them as separate parameters in the order described below. Taken from the angular docs: data – {string|Object} – The response body transformed with the transform functions. status – {number} – HTTP status code of the response. headers – {function([headerName])} – Header getter function. config – {Object} – The configuration object that was used to generate the request. statusText – {string} – HTTP status text of the response. So you'd need to change your code to: $http.get(dataUrl) .success(function (data){ $scope.data.products = data; }) .error(function (error, status){ $scope.data.error = { message: error, status: status}; console.log($scope.data.error.status); }); Obviously, you don't have to create an object representing the error, you could just create separate scope properties but the same principle applies.
has comment: http://stackoverflow.com/comment/43445884
answers question: http://stackoverflow.com/q/27507678
upvote count: 49
type: AcceptedAnswer
downvote count: 1
accepted answer of: http://stackoverflow.com/q/27507678
score: 48
has comment: http://stackoverflow.com/comment/51648923
type: Answer
has comment: http://stackoverflow.com/comment/58424008
has comment: http://stackoverflow.com/comment/43446108
has comment: http://stackoverflow.com/comment/59562687

http://stackoverflow.com/comment/43607137
type: Comment
score: 0
comment on: http://stackoverflow.com/q/27591726
has text: Please help me thanks a lot in advance.i am newbiee
type: QuestionComment

http://stackoverflow.com/comment/43530129
score: 0
type: Comment
type: QuestionComment
has text: Can you show us your view and controller code?
comment on: http://stackoverflow.com/q/27551908

http://stackoverflow.com/q/27523137
type: Question
answer count: 1
tagged with: javascript
score: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/27523710
has comment: http://stackoverflow.com/comment/43476203
has body: This is my first time with AngularJS Routing, I have made a master HTML file like this - Shipment Details Angular Routing Example Home About data need to come here And app.js var RateRequestApp = angular.module('RateRequestApp', [ 'RateRequestApp.controllers', 'ngRoute' ]); RateRequestApp.config(function ($routeProvider) { $routeProvider .when('/ShipmentDetails', { templateUrl: 'ShipmentDetails.html', controller: 'ReadOnlyController' }) .when('/rate-request', { templateUrl: 'rate-request.html', controller: 'RateRequestCtrl' }); }); Controllers.js angular.module('RateRequestApp.controllers', []).controller('ReadOnlyController', [ '$scope', function ($scope) { $scope.message = "Success"; } ]); I can't see any error in console. The app is simply not working. And my URL comes like this http://localhost:61919/home.html#ShipmentDetails Everything looks okay to me. Can any one point out What I am doing wrong here? My complete App: http://plnkr.co/edit/0f14nrITRb9ioXunEdot
has comment: http://stackoverflow.com/comment/43476018
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43475939
accepted answer: http://stackoverflow.com/a/27523710
has title: Unable to make AngularJS Routing

http://stackoverflow.com/q/27481669
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27482622
score: 0
answer count: 2
tagged with: radio-button
type: UnansweredQuestion
has body: We want get selected value of radio button after refreshing page. We have two radio button like Online &amp; Offline. If I select Online and then after refreshing page at that time I want selected value of radio button back.
has answer: http://stackoverflow.com/a/27481796
has title: How can persist value of radio button after refreshing page using javascript?
tagged with: selected

http://stackoverflow.com/comment/43660278
type: Comment
comment on: http://stackoverflow.com/a/27602652
has text: But in general this is ok. It is not perfectly reliable, because e.g. table cell selections will leave spans in the wrong positions, so you may need to transform a range a little bit before creating a bookmark. But it should work in most cases.
type: AnswerComment
score: 0

http://stackoverflow.com/q/27515716
has comment: http://stackoverflow.com/comment/43461732
has body: I am still learning JS and HTML, and I want to know if I can use attributes that don't exist by default, can I add new one from html? can I add new one from JS?
type: Question
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/43461993
has title: Can I add custom attributes to html elements?
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has comment: http://stackoverflow.com/comment/43461975
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/1305734
downvote count: 2
has answer: http://stackoverflow.com/a/27515788
duplicate of: http://stackoverflow.com/q/1305734
has answer: http://stackoverflow.com/a/27515771
upvote count: 3
score: 1
has comment: http://stackoverflow.com/comment/43461815

http://stackoverflow.com/comment/43496976
type: AnswerComment
score: 0
type: Comment
has text: Tutorials/documentation don't include returning chains from within functions (like here `return Menus.getAdditives(...`) as well as using `$.when` like that. It makes a lot of sense to me now, just couldn't find an *"advanced"* example like this one anywhere.
comment on: http://stackoverflow.com/a/27534002

http://stackoverflow.com/comment/43540151
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27556562
has text: interesting the page im developing they would be using on ipads so i might just give it a go on that and hope for the best is there any other methods you can think of

source-maps
type: Tag
tag name: source-maps
tags question: http://stackoverflow.com/q/27531726

http://stackoverflow.com/q/27637074
has title: Javascript splice for array of DOM elements
type: Question
possible better answer: http://stackoverflow.com/a/27637154
score: 5
upvote count: 5
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/43693471
has comment: http://stackoverflow.com/comment/43693098
has comment: http://stackoverflow.com/comment/43693156
has answer: http://stackoverflow.com/a/27637600
answer count: 3
has answer: http://stackoverflow.com/a/27637138
accepted answer: http://stackoverflow.com/a/27637138
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/27637154
has comment: http://stackoverflow.com/comment/43705888
type: AnsweredQuestion
has body: var myArray = []; myArray = document.querySelectorAll('.selected'); And when I called myArray.splice - it was undefined. How can I avoid this? I need remove some of DOM elements from that array.

http://stackoverflow.com/a/27588998
has body: Ajax doesn't allow for a request from one domain to another domain unless unless the server provides an Access-Control-Allow-Origin (CORS) header. Linking between domains is allowed. Mozilla has some good information as to what's allowed and what's not. https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy#Cross-origin_network_access Cross-origin writes are typically allowed. Examples are links, redirects and form sumissions. Certain rarely used HTTP requests require preflight. Cross-origin embedding is typically allowed such as images, scripts. Cross-origin reads are typically not allowed such as an ajax call
answers question: http://stackoverflow.com/q/27588823
has comment: http://stackoverflow.com/comment/43607235
type: AcceptedAnswer
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/27588823

http://stackoverflow.com/comment/124827146
has text: OP wanted `DD-Mon-YYYY`, your answer is `DD/MM/YYYY`.
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/70588501

http://stackoverflow.com/q/27596270
has comment: http://stackoverflow.com/comment/43616395
has answer: http://stackoverflow.com/a/27596316
accepted answer: http://stackoverflow.com/a/27596316
has body: Kind of an odd request, I know. But I've been looking for a solution to this for quite a while now. This is the effect I'm looking for: var myString = "Hello I am randomly capitalized" Desired function result: hElLO i aM rAnDOmlY caPiTAlizED I imagine this is best done with javascript arrays in one way or another. Just looking for some creative ideas. Thank you!
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/27596371
tagged with: javascript
has title: Randomize uppercasing / lowercasing on all string characters
favorite count: 0
upvote count: 3
tagged with: random
tagged with: css
tagged with: dom-manipulation
possible better answer: http://stackoverflow.com/a/27596371
type: AnsweredQuestion
score: 3
downvote count: 0

http://stackoverflow.com/comment/43479508
comment on: http://stackoverflow.com/a/27509590
type: Comment
has text: CKEditor has its parser, which most likely in this case can be tuned by modifying `CKEDITOR.dtd`, but it also uses native DOM. And the browsers may not accept your custom tags in a various ways. BTW. consider using `config.protectedSource`.
score: 0
type: AnswerComment

http://stackoverflow.com/a/27611855
has body: Instead of using .on to capture and handle the event, you could use .once. That way the event will be only captured once and the handler will unbind itself after that. map.on('click', function () { console.log('I fire every click'); }); map.once('click', function () { console.log('I fire only once'); }); If you're ever need to unbind a handler yourself you can use .off. Check the reference for event methods: http://leafletjs.com/reference.html#events As to why your code above isn't working, on first click you're trying remove the marker: map.removeLayer(marker), but the variable marker doesn't contain a L.Marker instance so the map is unable to remove it. You should check if it's defined first and only then remove it: var marker; map.on('click', function (e) { if (marker) { // check map.removeLayer(marker); // remove } marker = new L.Marker(e.latlng); // set }); Here's a working example on Plunker: http://plnkr.co/edit/iEcivecU7HGajQqDWzVH?p=preview
answers question: http://stackoverflow.com/q/27609294
type: Answer
downvote count: 0
score: 24
upvote count: 24

http://stackoverflow.com/q/27563111
tagged with: css
type: AnsweredQuestion
tagged with: tablesorter
score: 1
has answer: http://stackoverflow.com/a/27615228
accepted answer: http://stackoverflow.com/a/27615228
type: Question
downvote count: 0
tagged with: javascript
has body: I'm using JQuery Table sorter plugin(http://tablesorter.com/docs/) in my application it works great but I would like to exclude certain rows which has N/A for the clicked column while sorting and keep them always at the end. As far as i have checked if we put elements in tfoot it will always remains at the bottom. But i wanted to display those rows initially only when sorting happens I would like to move them at the end. Below is my HTML Code Name Count Percentage 1011 Cheif Executives 2385 20% 1012 General and Operations Manager 2986 N/A 1013 Advertising Promo Managers 3412 30% 1014 Marketing Managers 2154 5% Javascript In JavaScript we can specify a text extraction method for table sorter. While sorting higher to lower I'm trying to make the N/A as ' ' which has lower ASCII value than other symbols so the row will be in lower end of the table. Similarly lower to higher sorting i need to replace N/A with ~ symbol to give N/A a higher value to make to appear at the end. Below is the code snippet I'm trying $(document).ready(function () { $("#myTable").tablesorter({ textExtraction: function (node) { var s = ''; var hdrs = $("#myTable th"); var direction = ''; hdrs.each(function (index) { if ($(this).hasClass('headerSortDown')) { direction = 'down'; return; } else if ($(this).hasClass('headerSortUp')) { direction = 'up'; return; } }); if (direction === 'down') s = $(node).text().replace('N/A', ' '); else if (direction === 'up') s = $(node).text().replace('N/A', '~'); return s; }, cssAsc: 'headerSortUp', cssDesc: 'headerSortDown' }); }); But it seems like the css classes are not getting added by default so the result is not as expected. My expected Result during both sort is the row while has code 1012 should always appear below the table. Note i cant add any static classes to the table markup for the N/A values since it is from the table is generated dynamically Thanks in advance
favorite count: 0
has title: Keep rows with certain values always at the bottom while sorting in jquery tablesorter plugin
answer count: 1
upvote count: 1

http://stackoverflow.com/q/27632648
has answer: http://stackoverflow.com/a/27633233
tagged with: asp.net
tagged with: twitter-bootstrap
has title: How to assign value in $(document).ready from code behind
has body: i'm developing a .net application using twitter bootstrap. I'm trying to get data from .aspx.cs page to .aspx page. Please find my code below: strOblect.cs public class strObject { public string Name { get; set; } public string Description { get; set; } } .aspx.cs page: public List&lt;strObject&gt; stringList = new List&lt;strObject&gt;(); protected void Page_Load(object sender, EventArgs e) { strObject ObjOne=new strObject(); ObjOne.Name="One"; ObjOne.Description ="One"; stringList.Add(ObjOne); strObject ObjTwo=new strObject(); ObjTwo.Name="Two"; ObjTwo.Description ="Two"; stringList.Add(ObjTwo); strObject ObjThree=new strObject(); ObjThree.Name="Three"; ObjThree.Description ="Three"; stringList.Add(ObjThree); } .aspx: &lt;asp:Panel ID="pnlData" runat="server" style="background-color:White;"&gt; &lt;script type="text/javascript"&gt; $(document).ready(function () { var valueAssigned=stringList; }); &lt;/script&gt; &lt;/asp:Panel&gt; I'm unable to get stringList value in $(document).ready. Please help me out to get the value.
linked to: http://stackoverflow.com/q/18986041
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27632719
type: Question
tagged with: c#
has answer: http://stackoverflow.com/a/27632719
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/27633233

http://stackoverflow.com/a/27595060
accepted answer of: http://stackoverflow.com/q/27540082
answers question: http://stackoverflow.com/q/27540082
upvote count: 2
type: AcceptedAnswer
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/43736605
downvote count: 0
has body: Something like the following might work iff all of the styles are hosted on the same origin. I tested it here and it couldn't get the all.css file; I assume because it is hosted on a different cdn domain. function css(element) { var sheets = document.styleSheets, standard = [], mediaStyles = {}; element.matches = element.matches || element.webkitMatchesSelector || element.mozMatchesSelector || element.msMatchesSelector || element.oMatchesSelector; for (var i in sheets) { var rules = sheets[i].rules || sheets[i].cssRules; for (var r in rules) { if (element.matches(rules[r].selectorText)) { if (rules[r]["type"] === 4) { mediaStyles[rules[r].media] = (mediaStyles[rules[r].media] || []).push(rules[r].cssText); } else { standard.push(rules[r].cssText); } } } } return { 'standard': standard, 'media': mediaStyles }; }

http://stackoverflow.com/a/27480843
answers question: http://stackoverflow.com/q/27480672
score: 0
has body: It snaps open because of all the 'fading' you've been doing, instead use slideDown() to open menu, which gives it a very decent entry.. and slideUp() to close it. Instead of click, use mouseenter() event to open and mouseleave() event to close it. Remove extra margins and paddings from the ul and li. And it's ready to be used as new. The bouncing effect (The menu opens and closes continuously ) of the slide event that you talk about is easily rectified by using stop(). When .stop() is called on an element, the currently-running animation (if any) is immediately stopped. I've kept the code simple for you to understand... there are many more ways to do the same thing. DEMO : http://jsfiddle.net/s94xhnw6/3/ jQuery: $(document).ready(function () { $('.menu').on('mouseenter', function () { $('.submenu').slideDown(); }); $('.menu').on('mouseleave', function () { $('.submenu').stop().slideUp(); }); });
type: Answer

http://stackoverflow.com/a/27596132
upvote count: 1
answers question: http://stackoverflow.com/q/27589851
type: Answer
has body: When you connect in the client, you have to wait for the connect message before you can send data with .emit(). As you have it now, you are trying to send the data before the connection has finished so the data is lost. See the client-side example here: http://socket.io/docs/#sending-and-getting-data-(acknowledgements)
downvote count: 0
score: 1

eclipse
tag name: eclipse
tags question: http://stackoverflow.com/q/27498449
tags question: http://stackoverflow.com/q/27520024
tags question: http://stackoverflow.com/q/27596995
tags question: http://stackoverflow.com/q/27537613
tags question: http://stackoverflow.com/q/27600871
tags question: http://stackoverflow.com/q/27504588
tags question: http://stackoverflow.com/q/27508249
tags question: http://stackoverflow.com/q/27538144
type: Tag

http://stackoverflow.com/comment/68456230
has text: I would like to know the final script. What did you end up with?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27538201

http://stackoverflow.com/q/27485856
score: 6
has comment: http://stackoverflow.com/comment/43403716
has answer: http://stackoverflow.com/a/27485977
type: Question
has comment: http://stackoverflow.com/comment/43403759
accepted answer: http://stackoverflow.com/a/27485977
possible better answer: http://stackoverflow.com/a/27485936
has answer: http://stackoverflow.com/a/27485936
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/43403655
has title: how to use div to layout page
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27485907
upvote count: 6
has body: I am using div to layout a page. The page has two columns. The first column is a map. The second column contains three rows of graphs. I used the code below. The result gives me just one column (instead of two) with four rows. What am I doing wrong? Severity Histogram(Delta Speed) Direction
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43403632
has comment: http://stackoverflow.com/comment/43403748

http://stackoverflow.com/a/27534957
answers question: http://stackoverflow.com/q/27529773
type: Answer
upvote count: 3
has comment: http://stackoverflow.com/comment/43507931
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/43534604
has body: The defaults are set in the model instead of the collection. What you can do in case the fetch fail is to add a new model to the collection with the default values: var Model = Backbone.Model.extend({ defaults :{ subject: 'this is subject', message: 'This is message' } }); var Collection = Backbone.Collection.extend({ model: Model, url: 'FakeUrl/messages' }); var collection = new Collection(); collection.fetch().then(function () { new SomeView({ collection: collection }); }, function (status, error) { //adds new model with default values, same as collection.add(new Model()); collection.add({}); console.log(collection.toJSON()); new SomeView({ collection: collection }); }); Another option is to initially create the collection containing a single model with the default values. Then pass {reset:true} when fetching the data from the server. If fetch succeeds the default model will be removed, but if it fails the collection will still contain it: var collection2 = new Collection(new Model()); collection2.fetch({reset: true}).then(function () { new SomeView({ collection: collection }); }, function (status, error) { console.log(collection2.toJSON()); new SomeView({ collection: collection }); }); You can try both options in this fiddle

http://stackoverflow.com/comment/43572949
has text: I donot think so, that I need a callback in query string
comment on: http://stackoverflow.com/a/27573417
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/43537639
type: QuestionComment
comment on: http://stackoverflow.com/q/27555699
score: 6
has text: `$('#Tab1'.addClass("active");` should be `$('#Tab1').addClass("active");`
type: Comment

http://stackoverflow.com/comment/45452815
has text: @TedHopp can you elaborate on what you mean? In most OO languages, you have to override methods like toString() to get what you want for each instance. I don't see what benefits of object prototypes are lost by doing what Mritunjay suggests in this answer.
type: Comment
comment on: http://stackoverflow.com/a/27613953
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43431786
type: QuestionComment
has text: you answered your own question, change all into input and wrap them in a form tag with an onsubmit calling foo()
score: 0
comment on: http://stackoverflow.com/q/27500654
type: Comment

http://stackoverflow.com/comment/43692809
type: AnswerComment
type: Comment
score: 1
has text: I wont say, speed of the app, little wary of generalization. But for angular, watch count is one of the most important parameter to know the refresh smoothness of your app. just google a bit on this topic and you would get to know what I mean.
comment on: http://stackoverflow.com/a/27635995

http://stackoverflow.com/comment/43561714
has text: I figure I need to get coordinates and transition between them, outside the parents.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27568216
type: Comment

http://stackoverflow.com/comment/43608073
type: QuestionComment
has text: so after you enter some text in the asdf input and then click the button you get empty value?
score: 1
comment on: http://stackoverflow.com/q/27592178
type: Comment

http://stackoverflow.com/comment/43486720
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27527702
type: Comment
has text: @philtune: Just in case you weren't 100% sure: jQuery does not, and never will have a different syntax for arrays, simply because jQuery _is_ JavaScript, hence what is valid in JS, is valid in jQ, too.

http://stackoverflow.com/q/27578223
downvote count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/27578292
has answer: http://stackoverflow.com/a/27578252
type: Question
type: AnsweredQuestion
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27578252
score: -1
answer count: 3
has body: you have removed all items data 1 close data 2 data 3 I Want to show .showmessage when user hide all .col-sm-4 one by one. Also, it should be shown after the sliding animation for the last item completes.
accepted answer: http://stackoverflow.com/a/27578292
has answer: http://stackoverflow.com/a/27578282
tagged with: jquery
favorite count: 0
has title: Show message if all div are slide up on click
has comment: http://stackoverflow.com/comment/43581280

http://stackoverflow.com/comment/43510492
score: 0
has text: possible duplicate of [How to get server timezone in javascript](http://stackoverflow.com/questions/5742505/how-to-get-server-timezone-in-javascript)
type: Comment
comment on: http://stackoverflow.com/q/27541414
type: QuestionComment

http://stackoverflow.com/a/27637227
downvote count: 0
has comment: http://stackoverflow.com/comment/43715430
has comment: http://stackoverflow.com/comment/43787391
has body: At the end you seem to be hiding it again $("[id*=Wait1_WaitBox]").hide();. You need to show what goes in between these two lines. It works with alert because the execution of the script is frozen until you close the alert (and that final line is not executed yet).
has comment: http://stackoverflow.com/comment/43787247
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/27636615
score: 2

http://stackoverflow.com/comment/125154494
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27625416
has text: the last part `context.scale(-scaleFactor);` makes it jittery for me but everything else works fine, even without that line.

http://stackoverflow.com/comment/44105351
comment on: http://stackoverflow.com/a/27584203
type: Comment
type: AnswerComment
has text: Quick question @mare where can i find an iso for the Qt linux you meneionted, i was hoping to inistall that in my virtual box and test out my code. I got a bunch of gnome, i have ubuntu and linux and both use gnome. Can you please recommend other desktop linuxes which dont use gnome.
score: 0

http://stackoverflow.com/comment/43549962
score: 0
type: AnswerComment
has text: Ye i know, but i am not getting the output
type: Comment
comment on: http://stackoverflow.com/a/27561760

http://stackoverflow.com/q/27603719
has comment: http://stackoverflow.com/comment/43629678
tagged with: javascript
has body: I want to dragg a object with the red lines as bounderies. (check image below) I looked for examples but all i can find are square and circualar shapes. i tried a element with css transform rotate attachted to it -> didn't work i tried svg shape -> not supported i tried to make a shape with canvas - didn't work i ran out of idea's so hope one of you have one
tagged with: jquery
has comment: http://stackoverflow.com/comment/43630319
has comment: http://stackoverflow.com/comment/43630173
score: 0
has comment: http://stackoverflow.com/comment/43629828
answer count: 0
type: UnansweredQuestion
tagged with: draggable
has comment: http://stackoverflow.com/comment/43629815
has title: jQuery draggable containment custom shape
tagged with: containment
tagged with: bounds
type: Question

http://stackoverflow.com/comment/43570862
score: 0
has text: Yeah, your code snippet seems to be incomplete.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27564858

http://stackoverflow.com/comment/43621390
score: 0
has text: will `subjects` be always an Array? Will always be defined?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27599063

http://stackoverflow.com/q/27511088
tagged with: javascript
has body: I have a simple AJAX function being called when a user clicks a button that sends the text of a HTML textarea and alerts the response from the backend: send_button.onclick = function () { var ajax = new XMLHttpRequest(); var text = text_input.value; ajax.onreadystatechange = function () { if (ajax.readyState == 4 &amp;&amp; ajax.status == 200) alert(ajax.responseText); }; ajax.open("POST", "write.php", true); ajax.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); ajax.send("text=" + text); }; as well as a PHP script on the backend which is supposed to write the received text to a file and echo the file's content: &lt;?php $filename = "preview/preview.html"; $text = (isset($_POST["text"]) ? $_POST["text"] : ""); try { $fh = fopen($filename, "w+"); if (!$fh) throw new Exception("File open error"); fwrite($fh, $text); $filetext = (filesize($filename) &gt; 0 ? fread($fh, filesize($filename)) : ""); echo $filetext; fclose($fh); } catch (Exception $e) { header("Location: error.php"); } ?&gt; But every time the response is empty. I tried echoing a hardcoded string instead of fread()and it worked, I also tried echoing filesize($filename)which worked perfectly fine as well. The POST data sent by the AJAX function gets through as well, and the fwrite($fh, $text) function does exactly what it is supposed to. What am I doing wrong?
possible better answer: http://stackoverflow.com/a/27511259
accepted answer: http://stackoverflow.com/a/27511180
type: AnsweredQuestion
score: 3
downvote count: 0
favorite count: 0
tagged with: fread
tagged with: ajax
type: Question
has answer: http://stackoverflow.com/a/27511266
tagged with: php
has title: Php fread() function not returning anything
upvote count: 3
has answer: http://stackoverflow.com/a/27511180
answer count: 3
tagged with: file
has answer: http://stackoverflow.com/a/27511259

tcp
type: Tag
tags question: http://stackoverflow.com/q/27516028
tag name: tcp

http://stackoverflow.com/a/27574032
has body: Because when you pass o.trigger as an argument to setTimeout you execute trigger function not as an method for o object but instead you execute it in global scope. That is in this case this inside trigger will point not to o but to global object. So before passing o.trigger as an argument to setTimeout you need to wrap it in anonymous function. Unfortunately I'm not good in Coffee Script but I can show you how your code should look like in pure JavaScript: var B, U, o; B = require('backbone'); U = require('underscore'); o = {}; U.extend(o, B.Events); o.on('e', console.log); setTimeout(function () { o.trigger('e', 'Hi!'); }, 5000); Hope this will help. Good luck.
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/27573470
has comment: http://stackoverflow.com/comment/43584645
answers question: http://stackoverflow.com/q/27573470

http://stackoverflow.com/comment/43535357
score: 0
has text: @Kieran Please note that any of the code in the answers will be less efficient AND harder to read than the code in your question above.
type: QuestionComment
comment on: http://stackoverflow.com/q/27554251
type: Comment

http://stackoverflow.com/q/27541315
type: Question
answer count: 2
tagged with: ios
tagged with: javascript
score: 0
has title: Some Cordova plugin are undefined in iOS emulator
upvote count: 1
tagged with: xcode
downvote count: 1
has comment: http://stackoverflow.com/comment/43511039
favorite count: 0
tagged with: cordova
has comment: http://stackoverflow.com/comment/43511651
has answer: http://stackoverflow.com/a/27559405
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27559405
possible better answer: http://stackoverflow.com/a/27542352
has body: I'm using many cordova plugins, all of them works fine on Android, but not working on iOS. I'm building with cordova-ios 3.7.0, cordova CLI 4.1.2, iOS 7.0, 7.1, 8.0 on simulator. I've tried every tip I could find, like cordova platform update ios, re-add platform ios, re-add plugin, clean and rebuild in xcode. I'm very sure cordova.js and cordova_plugins.js has included(It's visible from safari web inspector, and I can find window.cordova object), and all of my plugins are in the cordova_plugins.js. Any idea? [edit] Some example: (cordova network-state plugin) undefined is not an object (evaluating 'navigator.connection.type') I can find navigator object, but no prop connection in the object. There are no Connection obj too, but I can see network.js and connection.js from safari web inspector resource. The deviceready event not fired and no window.device object. But I can find device.js in resource too. [edit] Xcode build console: 2014-12-18 17:02:38.687 t2[87811:60b] Apache Cordova native platform version 3.7.0 is starting. 2014-12-18 17:02:38.689 t2[87811:60b] Multi-tasking -&gt; Device: YES, App: YES 2014-12-18 17:02:38.906 t2[87811:60b] Unlimited access to network resources 2014-12-18 17:02:39.833 t2[87811:60b] [CDVTimer][keyboard] 0.059009ms 2014-12-18 17:02:40.471 t2[87811:60b] [CDVTimer][socialsharing] 637.811959ms 2014-12-18 17:02:40.579 t2[87811:60b] [CDVTimer][file] 107.617974ms 2014-12-18 17:02:41.567 t2[87811:60b] [CDVTimer][splashscreen] 987.930000ms 2014-12-18 17:02:41.568 t2[87811:60b] [CDVTimer][TotalPluginStartup] 1735.188007ms 2014-12-18 17:02:41.948 t2[87811:60b] Resetting plugins due to page load. 2014-12-18 17:02:43.176 t2[87811:60b] Finished load of: file:///Users/applesw2/Library/Developer/CoreSimulator/Devices/*****/data/Applications/*****/t2.app/www/index.html#/app/file
has answer: http://stackoverflow.com/a/27542352

http://stackoverflow.com/a/27625290
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43678700
accepted answer of: http://stackoverflow.com/q/27624935
type: Answer
upvote count: 6
has comment: http://stackoverflow.com/comment/43678211
score: 6
has comment: http://stackoverflow.com/comment/43676874
has comment: http://stackoverflow.com/comment/43676699
has body: RSA is defined in such a way that the values contained in a public key make up a subset of the values contained in the private key. So your private key is already rsakey. Other public key schemes work differently where public and private key values are completely distinct. Furthermore rsakey.n doesn't fully define the public key. You need at least the public exponent e. It is often simply set to 65537, so this might be hardcoded if you never need to change the key or upgrade the scheme. It's the E in RSAGenerate. It is ignored in this case, because A (seeded) random RSA key is generated with Tom Wu's RSA key generator with 3 as a hard-coded public exponent. You can choose a similar encoding of the private key as the public key, but since it has to hold multiple values, I opted for JSON serialization: (function(c){ var parametersBigint = ["n", "d", "p", "q", "dmp1", "dmq1", "coeff"]; c.privateKeyString = function(rsakey) { var keyObj = {}; parametersBigint.forEach(function(parameter){ keyObj[parameter] = c.b16to64(rsakey[parameter].toString(16)); }); // e is 3 implicitly return JSON.stringify(keyObj); } c.privateKeyFromString = function(string) { var keyObj = JSON.parse(string); var rsa = new RSAKey(); parametersBigint.forEach(function(parameter){ rsa[parameter] = parseBigInt(c.b64to16(keyObj[parameter].split("|")[0]), 16); }); rsa.e = parseInt("03", 16); return rsa } })(cryptico)
has comment: http://stackoverflow.com/comment/43671974
has comment: http://stackoverflow.com/comment/43674238
answers question: http://stackoverflow.com/q/27624935

http://stackoverflow.com/q/27535564
favorite count: 0
has comment: http://stackoverflow.com/comment/43501249
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43501775
tagged with: node.js
has answer: http://stackoverflow.com/a/53256137
upvote count: 1
has title: Why are mocha test not running? - node.js
type: Question
tagged with: testing
has answer: http://stackoverflow.com/a/54319178
tagged with: chai
score: 1
tagged with: javascript
tagged with: mocha.js
has body: I am working through web development with node and express from O'reilly. Testing with Mocha has just been introduced and I am trying to run 2 tests. First is a global test to verify that there is a page title, second is a page specific test to check for a link to the contact page. Mocha loads when I test the page, but neither test runs, as I get "passes:0 fails:0". I have this code in my main app file: app.use(function(req,res,next){ res.locals.showTests = app.get('env') !== 'production' && req.query.test === '1'; next(); }); app.get('/', function(req, res){ res.render('home'); }); app. get('/about', function(req,res){ res.render('about', {fortune: fortune.getFortune(), pageTestScript: '/qa/tests-about.js' }); }); This is my tests-about.js suite('"About" Page Tests', function(){ test('page should contain link to contact page', function(){ assert($('a[href="/contact"]').length); }); }); This is my tests-global.js suite('Global Tests', function(){ test('page has a valid title', function(){ assert(document.title && document.title.match(/\S/) && document.title.toUpperCase() !=== 'TODO'); }); }); This is my main template file (handlebars) Random Pixel Media {{#if showTests}} {{/if}} {{{body}}} {{#if showTests}} {{#if pageTestScript}} {{/if}} {{/if}} According to the book, I should be seeing 2 suites and 1 failure when I visit the about page, but as I stated, I see a blank bullet point, passes:0 and fails:0 Any help to understand what I'm missing would be greatly appreciated.
answer count: 2
downvote count: 0

http://stackoverflow.com/a/27603618
has comment: http://stackoverflow.com/comment/43630368
accepted answer of: http://stackoverflow.com/q/27603579
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 6
has body: self is undefined so inside the init function, this is window, so you are always modifying properties of the same object. You seem to be doing some weird hybrid of the module pattern and standard JavaScript constructor functions. I strongly suggest picking one of the two approaches and sticking to it. function MyObjectConstructor(){ this.myProperty = ''; } MyObjectConstructor.prototype.init = function(str) { this.myProperty = str; }; MyObjectConstructor.prototype.getProperty = function() { return this.myProperty; }; //instantiate our Constructor var constructorOne = new MyObjectConstructor(); //change myProperty of the first instance constructorOne.init('this is property one'); //instantiate a second instance of our Constructor var constructorTwo = new MyObjectConstructor(); constructorTwo.init('this is property two'); //alert current myProperty of constructorOne instance alert(constructorOne.getProperty()); //alert current myProperty of constructorTwo instance alert(constructorTwo.getProperty()); or function myModule (){ var myProperty = ''; return { init: function (str) { myProperty = str; }, getProperty: function () { return myProperty; } }; } //instantiate our Constructor var constructorOne = myModule(); //change myProperty of the first instance constructorOne.init('this is property one'); //instantiate a second instance of our Constructor var constructorTwo = myModule(); constructorTwo.init('this is property two'); //alert current myProperty of constructorOne instance alert(constructorOne.getProperty()); //alert current myProperty of constructorTwo instance alert(constructorTwo.getProperty());
has comment: http://stackoverflow.com/comment/43630401
answers question: http://stackoverflow.com/q/27603579
score: 6

http://stackoverflow.com/q/27573508
tagged with: jquery
has comment: http://stackoverflow.com/comment/43572749
favorite count: 0
has answer: http://stackoverflow.com/a/27573637
accepted answer: http://stackoverflow.com/a/27573637
possible better answer: http://stackoverflow.com/a/56846867
type: AnsweredQuestion
score: 2
downvote count: 0
has body: I am using using fileSaver.js and Blob.js to save a file like this: var blob = new Blob(["Hello, world!"], {type: "text/plain;charset=utf-8"}); saveAs(blob, "hello world.txt"); Is there a trick I can use to specify my own directory?
has title: FileSaver.js and Blob.js - Change directory
has answer: http://stackoverflow.com/a/56846867
type: Question
tagged with: blob
tagged with: javascript
upvote count: 2
answer count: 2

http://stackoverflow.com/a/27635074
score: 2
accepted answer of: http://stackoverflow.com/q/27634703
upvote count: 2
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: The key here is that you need to use cells collection to get number of columns that can change when you add new years to the table. You will also have to dynamically create elements for summary information per year. Here is an example: var ftable = document.getElementById("sdtable"); var i = 0; var sumFirst = 0; var sumSecond = 0; var sumTotal = 0; function Calculate() { var rows = ftable.tBodies[0].rows, header = ftable.tHead.rows[0], cells = ftable.tBodies[0].rows[0].cells, years = []; for (var i = 0; i < rows.length; i++) { for (var j = 1; j < cells.length; j++) { if (!years[j]) years[j] = 0; years[j] += parseInt(rows[i].cells[j].innerHTML); } } sumTotal = years.reduce(function(prev, curr) { return prev + curr; }, 0); var sum = document.getElementById("sum"); sum.innerHTML = ''; for (var j = 1; j < cells.length; j++) { console.log(header.cells[j]) sum.insertAdjacentHTML('afterbegin', ' ' + header.cells[j].innerHTML + ' = ' + years[j] + ' '); } sum.insertAdjacentHTML('beforeend', "Total Student = " + sumTotal); } Demo: http://jsfiddle.net/x2sscpxL/1/
answers question: http://stackoverflow.com/q/27634703

http://stackoverflow.com/comment/43480846
has text: Thanks Prathvi but this is not working in ie-9.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27525325
score: 0

http://stackoverflow.com/comment/43548156
has text: No. The ships are static ath the point of fire. Player A moves, Player B moves. Player A ships fires at Player B ships and vice versa.
score: 0
comment on: http://stackoverflow.com/q/27561041
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/43531825
has text: This does not do what you think it does. You're checking the value of the cookie before the callback is ever called. You have to check the value of the cookie inside the callback.
type: Comment
score: 1
comment on: http://stackoverflow.com/a/27552658
type: AnswerComment

http://stackoverflow.com/comment/43441003
has text: Milliseconds since when? Unix Epoch?
comment on: http://stackoverflow.com/q/27505460
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27625827
has body: context.drawImage has additional arguments that do the resizing for you: var img=new Image(); img.onload=function(){ var scaleFactor=2.00; ctx.drawImage( img, 100,100, img.width*scaleFactor,img.height*scaleFactor ); } img.src='test.png'
answers question: http://stackoverflow.com/q/27625760
type: Answer
accepted answer of: http://stackoverflow.com/q/27625760
score: 1
upvote count: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/43495420
has text: Awesome fix turn around. Thank You.
comment on: http://stackoverflow.com/a/27533144
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/27520368
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27520662
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/28837256
has title: javascript's Data.parse() in Chrome and Firefox
has body: I have a very simple operation by converting a string in standard format 1985-10-11T12:23:00 (without timezone specified). Data.parse() in chrome javascript parses it in Date object as is, but in Firefox a correction for time zone applies. How I can ensure that in both browsers Date.parse produces result without timezone corrections?
tagged with: datetime
has comment: http://stackoverflow.com/comment/43470705
has answer: http://stackoverflow.com/a/28837256
has answer: http://stackoverflow.com/a/27520662
type: AnsweredQuestion
tagged with: google-chrome
type: Question
tagged with: firefox

http://stackoverflow.com/a/27567961
type: Answer
has body: I found a solution using "Tooltipster" $(document).ready(function() { // first on page load, initiate the Tooltipster plugin $('.tooltip').tooltipster({ trigger: custom, }); // reveal when mousedown is called $(window).mousedown(function() { $('#example').tooltipster('show'); }); // hide when mouseup is called $(window).mouseup(function() { $('#example').tooltipster('hide'); }); });
score: 0
answers question: http://stackoverflow.com/q/27567692

http://stackoverflow.com/q/27526911
answer count: 0
has comment: http://stackoverflow.com/comment/43490405
type: Question
has comment: http://stackoverflow.com/comment/43533622
tagged with: javascript
has title: How to manually emulate JS/Canvas globalCompositeOperation 'lighter'?
score: 0
tagged with: canvas
has body: If you blend two colors using a Canvas context object in e.g. Chrome, it will give richer colors (rather than averaging too much, which often becomes muddier). Given two rgba values in JavaScript, how would I be able to achieve this blending mode or something close to it 'manually'? (Without relying on specific browser implementations, and as it will be duplicated on the server-side, without the Canvas object.) E.g. var rgba1 = [255, 128, 0, 1]; var rgba2 = [0, 255, 255, 0.5]; var rgbaMix = this.mixRgbasLighter(rgba1, rgba2); // magic happens here Thanks!
tagged with: colors
type: UnansweredQuestion

http://stackoverflow.com/a/27550628
score: 10
has comment: http://stackoverflow.com/comment/94587180
has body: Just chain another then call, since shortAfterLongFunc returns new promise you can further work with it: longFunc().then(shortAfterLongFunc).then(function(data) { console.log('all is complted', data); }); Demo: http://jsfiddle.net/ebt4pxxa/2/
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/94617011
has comment: http://stackoverflow.com/comment/94610215
upvote count: 10
type: Answer
has comment: http://stackoverflow.com/comment/43527832
accepted answer of: http://stackoverflow.com/q/27550394
downvote count: 0
has comment: http://stackoverflow.com/comment/43528052
answers question: http://stackoverflow.com/q/27550394

http://stackoverflow.com/a/27588325
answers question: http://stackoverflow.com/q/27570065
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/43615618
has body: That code should work for react, however you can ditch jQuery in this example and use refs. More information about refs can be found here: https://facebook.github.io/react/docs/more-about-refs.html In reality though you shouldn't be setting properties and triggering events on your own, use state to set properties, and you can submit a form request via XHR rather than filling out a form and simulating a click. I also had a brief look at your code and noticed you were manipulating props directly, this is an anti-pattern, if you need to keep data in sync between different components consider either passing the components back upstream, creating a global eventemitter, or using a pattern like flux: https://facebook.github.io/react/blog/2014/05/06/flux.html

http://stackoverflow.com/q/27607526
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/12748747
has answer: http://stackoverflow.com/a/58546581
score: 19
has answer: http://stackoverflow.com/a/38860639
tagged with: javascript
has comment: http://stackoverflow.com/comment/65128231
type: Question
answer count: 3
has answer: http://stackoverflow.com/a/73494693
downvote count: 0
has title: Zoom on simple pdf.js viewer
favorite count: 0
tagged with: pdf.js
tagged with: http://stackoverflow.com/tag/pdf
has body: I started to build a pdf viewer with the pdf.js library. I really liked how simple some of the examples were so I used the PREV/NExt example to start off my viewer: https://github.com/mozilla/pdf.js/blob/master/examples/learning/prevnext.html I wanted to add zoom in and out and found this simple viewer which I wanted to model my zoom and scroll off of: https://github.com/zedr/simple-pdf-reader.js/blob/master/viewer.js Here is my html for my index.html: Page: / - + n/a % and this is my javascript for my viewer.js: I attempted to integrate the two and add zoom to my viewer, but am not having any success. My javascript knowledge is pretty limited compared to the complexity of pdf.js, but I was wondering if someone could help me with my problem. any advice, direction, code would be appreciated.
upvote count: 19

http://stackoverflow.com/comment/43554364
has text: Mr. "Not Important", please stop using deprecated `mysql_*` functions. Use PDO / MySQLi instead
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27564262

http://stackoverflow.com/comment/43473905
has text: SOLVED : no issue in code. image was there but canvas width, height was small and was getting a small part of image visible. white image, and white background. couldn't differentiate... thanks for your time Guys
comment on: http://stackoverflow.com/q/27521074
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27609718
has answer: http://stackoverflow.com/a/27609790
has answer: http://stackoverflow.com/a/27609741
answer count: 4
has answer: http://stackoverflow.com/a/27609772
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27609790
tagged with: javascript
has comment: http://stackoverflow.com/comment/43643843
has title: Callbacks and this
has comment: http://stackoverflow.com/comment/43641726
has answer: http://stackoverflow.com/a/27610209
type: Question
accepted answer: http://stackoverflow.com/a/27609772
score: 0
has comment: http://stackoverflow.com/comment/43644146
tagged with: node.js
linked to: http://stackoverflow.com/q/20279484
has body: I have a directory with files that I need to parse and save in an array of JavaScript objects. In the constructor, as soon as I reach point 2 in the code below, this becomes undefined and in point 3 I don't have access to this.data. What's the best way to fix the code and achieve the goal? function Service(path) { this.data = []; console.log(this); // point 1 fs.readdir(path, function (err, files) { console.log(this); // point 2 files.forEach(function (file) { fs.readFile(path + file, function (err, data) { parseString(data, function (err, result) { this.data.push(result); // point 3 }); }); }, this); }); } Service.prototype.getData = function () { // do something with `this.data` and return the result }; I tried saving this as self, but in the end self ends up with proper array, while this does not: function Service(path) { var self = this; this.data = []; fs.readdir(path, function (err, files) { files.forEach(function (file) { fs.readFile(path + file, function (err, data) { parseString(data, function (err, result) { self.data.push(result); }); }); }); }); setTimeout(function () { console.log(this); \\ point x console.log(self); \\ point y }, 3000); } Service.prototype.getData = function () { // do something with `this.data` and return the result };

http://stackoverflow.com/comment/43421834
has text: You can use cookies to pass values between pages.
score: 1
comment on: http://stackoverflow.com/q/27495058
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/43572929
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27573375
has text: @Rob: I saw his reputation and assumed he could be doing it better.
score: 0

http://stackoverflow.com/a/27477521
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27477394
score: 2
upvote count: 2
has body: Solution 1 you have to use localstorage, if your website can be accessed from number of browsers than you can use common jaydata library to work with local storage Solution 2 You have to save your data on any server using server side technology like ASP.NET or PHP or JSP and you can retrieve your information on page load using AJAX. If there is any content stored on server side than you have to load with page, if there is nothing it means that you have to just load only two buttons.
accepted answer of: http://stackoverflow.com/q/27477394

http://stackoverflow.com/comment/43400479
comment on: http://stackoverflow.com/a/27484132
score: 0
type: AnswerComment
type: Comment
has text: @sree you can add jquery ui as well along with jquery.

http://stackoverflow.com/comment/43412724
has text: I don't understand why this was downvoted. While I think this answer can be improved (in the tone and somewhat in the content) I don't see anything here deserving of a downvote and the log trick is clever since it even preserves order - downvoter - care to explain why?
comment on: http://stackoverflow.com/a/27488326
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/43684296
comment on: http://stackoverflow.com/q/27623560
type: Comment
type: QuestionComment
has text: addNestedSegment add the same object but a child of row, where it has been called.
score: 0

http://stackoverflow.com/q/27507437
tagged with: http://stackoverflow.com/tag/html
has title: Loop through and validate multiple radio inputs
has answer: http://stackoverflow.com/a/27507694
type: AnsweredQuestion
has body: JS: function validateForm() { var radios = document.getElementsByName("Dquestion[1]"); var formValid = false; var i = 0; while (!formValid && i < radios.length) { if (radios[i].checked) formValid = true; i++; } if (!formValid) alert("Must check some option!"); return formValid; } PHP: First time visitor?: Yes <?php for($i=1; $i<=10; $i++){?> <input type="radio" name="Dquestion[1]" value="<?=$i?>"> <?=$i?> <?php } ?> No <?php for($i=1; $i<=10; $i++){?> <input type="radio" name="Iquestion[1]" value="<?=$i?>"> <?=$i?> <?php } ?> cool <?php for($i=1; $i<=10; $i++){?> <input type="radio" name="Dquestion[2]" value="<?=$i?>"> <?=$i?> <?php } ?> My intention is to make all inputs checked, and if not, they can't submit the form. I have 10 radio inputs for each question, and the form has 25 questions, so I use Dquestion['number'] for each name. I am using this code to test but the Dquestion[2] can't be checked. Why? How am I going to loop all 25 questions? I tried this code, but it didn't work: var Dnames = ['Dquestion[1]','Dquestion[2]'] function validateForm() { var radios = []; var formValid = false; for (var i = 1; i<= Dnames.length; i++){ var radios = document.getElementsByName(Dnames[i]); var j = 0; while(!formValid && j < radios.length){ if(radios[j].checked) formValid = true; j++ } } if (!formValid) alert("Must check some option!"); return formValid; }
type: Question
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27507694
has answer: http://stackoverflow.com/a/27511401
accepted answer: http://stackoverflow.com/a/27511401
score: 0
answer count: 2
linked to: http://stackoverflow.com/q/13060313

http://stackoverflow.com/comment/43687154
comment on: http://stackoverflow.com/a/27633624
type: AnswerComment
has text: @charlietfl I agree that a slug field or id would be more appropriate, but I've just answered the author's question.
score: 0
type: Comment

http://stackoverflow.com/q/27495325
has answer: http://stackoverflow.com/a/74880614
has comment: http://stackoverflow.com/comment/43422472
tagged with: javascript
tagged with: google-signin
upvote count: 2
score: 0
downvote count: 2
answer count: 3
has comment: http://stackoverflow.com/comment/43423015
has answer: http://stackoverflow.com/a/27495770
accepted answer: http://stackoverflow.com/a/27495833
has title: Getting user name and email from Google Login
favorite count: 0
linked to: http://stackoverflow.com/q/23796014
linked to: http://stackoverflow.com/q/38552003
possible better answer: http://stackoverflow.com/a/74880614
tagged with: google-app-engine
has answer: http://stackoverflow.com/a/27495833
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43422380
type: Question
has body: I am honestly confused. This is for a commercial product and my app permissions list their name and email as part of the google sign in. My users very much want to give me their name and email, I am just adding Google Login to make it easier for them to do so per user request. My code is just from here: https://developers.google.com/+/web/people/. I am trying to let users login to my site with Google and to then read their name and email to store in my account database. Currently the login is working correctly (I can log in and am writing my login token, client_id etc to the console) but when I try and request the email/name I get an error: Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup. I have created an app here https://console.developers.google.com, got my client_id set the allowed origin, etc and I set a logo and such that I see when I click the sign in button so I believe it is correctly identifying my account when the sign in button is clicked. My code to request the user profile data is below function _onGoogleLogin(){ gapi.client.load('plus', 'v1', function(){ gapi.client.plus.people.get({userId: 'me'}).execute(handleGoogleUserDataResponse); }); function handleGoogleUserDataResponse(resp) { console.log("google user data", resp); } } Do I need a paid account on the Google Developer platform to access this information more than once or twice a day? That seems insane. I am using Facebook login already and with FB the process was trivially simple and free. I assume I am doing something stupid wrong. Do I need to separately give my client_id to gapi or something? Currently I just have this for the signin button per their documentation. &lt;meta name="google-signin-clientid" content="CLIENT_ID" /&gt; Any help would be appreciated, thanks!

http://stackoverflow.com/q/27564439
has answer: http://stackoverflow.com/a/32838344
accepted answer: http://stackoverflow.com/a/32838344
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43557305
type: Question
score: 0
answer count: 1
has title: Javascript validation of text editor (ckeditor) is not working
tagged with: javascript
has comment: http://stackoverflow.com/comment/43558834
has body: I have made the coding of javascript validation for editor(i am using ckeditor).It is not working properly.i.e when i am going to submit the form at first the alert box is coming as the editor is empty but when i am adding some content and going to validate it ,still the alert box is coming.After it everything goes fine.But i want that the alert box will come once ,when the editor field is empty.So please suggest me.Below is my coding.Thank you. Partner Description <?php echo $_REQUEST['description']; ?> Submit
tagged with: php

http://stackoverflow.com/comment/43649132
comment on: http://stackoverflow.com/a/27613271
score: 0
type: AnswerComment
has text: why you have multiple modules? measureBmiApp and Conversion
type: Comment

http://stackoverflow.com/a/35315739
downvote count: 1
answers question: http://stackoverflow.com/q/27551399
type: Answer
upvote count: 2
score: 1
has body: this other StackOverflow "How to get full path of selected file on change of &lt;input type=‘file’&gt; using javascript, jquery-ajax?" has already cleared the question : you can't get local fullpath from HTML (5 or previous) interface due to security politic. So it is normal that you need QT (or equivalent) to get what you need. I've been searching a Flash equivalent, but it seems that you may only have it with AIR according to this StackOverflow : "Flex - How to browse and get the full path of a file on local machine&#39;s file system?"

http://stackoverflow.com/comment/43470358
type: Comment
type: QuestionComment
has text: Simplest answer: ga() is Universal analytics (analytics.js), _gaq.push is classic analytics (ga.js).
comment on: http://stackoverflow.com/q/27518524
score: 0

http://stackoverflow.com/a/27585194
type: AcceptedAnswer
upvote count: 1
has body: Here is a simple example on how to use data attributes and an eventListener on click: var a = document.getElementById('docs-file-menu'); a.addEventListener('click', test); function test () { var dis = a.getAttribute('aria-disabled'); var exp = a.getAttribute('aria-expanded'); var has = a.getAttribute('aria-haspopup'); if (dis == 'true') { alert('disabled = true'); } if (exp == 'true') { alert('expanded = true'); } if (has == 'true') { alert('haspopup = true'); } } You also could access the different data attributes on page load and, according to them, you could be running different functions. Here's a simple DEMO with onclick event, simply click on File
has comment: http://stackoverflow.com/comment/43594943
type: Answer
accepted answer of: http://stackoverflow.com/q/27585104
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27585104
has comment: http://stackoverflow.com/comment/43594903

http://stackoverflow.com/comment/43488413
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27529217
score: 0
has text: theirs also -ms- and -o- in there so IE should be fine, i put the wrong fiddle link in originally but i have updated it.

http://stackoverflow.com/q/27592471
accepted answer: http://stackoverflow.com/a/27592555
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 1
favorite count: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27592555
has comment: http://stackoverflow.com/comment/43609454
upvote count: 1
has body: Ok, perfect examples: tryIt Editor (w3schools), jsbin, jsfiddle. I want a user to type css/js/html into different textareas, hit a magic button and poof, the output's displayed in an iframe. Code examples are appreciated but I'm more after answers to how to go about it than exact implementation. For example, I can easily send the js / html / css as strings to the server. Then dynamically create files for them. But then what? I want to have these files exist merely for the POST &amp; GET. I dont want to remake a jsfiddle, I want to quickly show a user what output they have, not save it for later. So I dont want these files saved to memory. I want them sent to the user, and if they refresh the page then it's gone. Is the idea of creating files (and removing the old ones each update) a good idea? Should it all just be done client-side in javascript? If using files is the correct method, how can I serve them up? I'm thinking create a file to a temp folder on the server, then POST the link, then send a DELETE request after 300ms with a unique ID + salt, which deletes the temp file if it still exists. But this is far from ideal I can think of a few issues immediately
type: Question
has comment: http://stackoverflow.com/comment/43620583
linked to: http://stackoverflow.com/q/27604158
has title: How to dynamically create css/js/html files and serve back at runtime with ASP.NET MVC
tagged with: asp.net-mvc

http://stackoverflow.com/q/27555368
favorite count: 0
has answer: http://stackoverflow.com/a/27555443
type: UnansweredQuestion
has title: Javascript: "Uncaught SyntaxError: Unexpected token {"
upvote count: 3
downvote count: 3
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27555395
score: 0
answer count: 2
has body: I'm writing my first javascript code and when I try to run it, I get the following error "Uncaught SyntaxError: Unexpected token {" Why is this happening in this case? var red = [0, 100, 63]; var orange = [40, 100, 60]; var green = [75, 100, 40]; var blue = [196, 77, 55]; var purple = [280, 50, 60]; var myName = "Manuel"; letterColors = [red, orange, green] If (15 &gt; 5 ){ bubbleShape = "circle" } else{ bubbleShape = "square" } drawName(myName, letterColors);

unset
type: Tag
tag name: unset
tags question: http://stackoverflow.com/q/27600489

http://stackoverflow.com/a/27631414
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27631383
has body: Because abc is and you can't nest the You could also do, <?php $abc = "document.write(jvalue)"?> which I think is more in keeping with the original example.
answers question: http://stackoverflow.com/q/27631383
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/a/27625702
accepted answer of: http://stackoverflow.com/q/27625605
answers question: http://stackoverflow.com/q/27625605
has body: Something like this should do it: var myStr ="file://test"; var myStr2 = "asddfh"; function check(s) { var ret = s.match(/file\:\/\/(.*)/); return (ret &amp;&amp; ret[1]) || -1; } alert(check(myStr)); alert(check(myStr2)); Returns everything after file:// or -1 if the file part is not found. Two notes: this only checks the browser URL, not if a file exists or similar URLs for files have three slashes instead of two (file:///filenameHere)
score: 0
has comment: http://stackoverflow.com/comment/43672066
has comment: http://stackoverflow.com/comment/43672023
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/43496871
type: Comment
comment on: http://stackoverflow.com/q/27534168
has text: If only there weren't this bad nerving in people's fingers… everyone just utterly loves to add superfluous parenthesizing all over the place, especially around the operand of prefix unary operators. Please no!
score: 0
type: QuestionComment

http://stackoverflow.com/comment/43538409
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27556008
has text: true, you could change it to `sentence.indexOf(' '+names[i]+' ')`, but it would fail with punctuations
score: 0

http://stackoverflow.com/comment/43602588
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27589186
has text: Is there a htmlentities() or htmlspecialchars() function somewhere in your code?

http://stackoverflow.com/q/27517141
tagged with: android
tagged with: cordova
answer count: 0
type: UnansweredQuestion
upvote count: 1
score: 1
type: Question
has title: How to take a screenshot of user home screen in Cordova/Phonegap?
has comment: http://stackoverflow.com/comment/78024737
downvote count: 0
has comment: http://stackoverflow.com/comment/53549088
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: I'm trying to modify the Screenshoot.java file from this plugin to take a screenshot of user home screen instead of appView screen when the app runs in background mode. When the app goes to background mode using this plugin, the app continues to take a screenshot of appView even in background and not the foreground screen or user home screen. You can see part of original Screenshoot.java file below: @Override public boolean execute(String action, JSONArray args, final CallbackContext callbackContext) throws JSONException { // starting on ICS, some WebView methods // can only be called on UI threads if (action.equals("saveScreenshot")) { final String format = (String) args.get(0); final Integer quality = (Integer) args.get(1); final String fileName = (String)args.get(2); super.cordova.getActivity().runOnUiThread(new Runnable() { @Override public void run() { View view = webView.getRootView(); try { if(format.equals("png") || format.equals("jpg")){ view.setDrawingCacheEnabled(true); Bitmap bitmap = Bitmap.createBitmap(view.getDrawingCache()); view.setDrawingCacheEnabled(false); File folder = new File(Environment.getExternalStorageDirectory(), "Pictures"); if (!folder.exists()) { folder.mkdirs(); } File f = new File(folder, fileName + "."+format); FileOutputStream fos = new FileOutputStream(f); if(format.equals("png")){ bitmap.compress(Bitmap.CompressFormat.PNG, 100, fos); } if(format.equals("jpg")){ bitmap.compress(Bitmap.CompressFormat.JPEG, quality == null?100:quality, fos); } JSONObject jsonRes = new JSONObject(); jsonRes.put("filePath",f.getAbsolutePath()); PluginResult result = new PluginResult(PluginResult.Status.OK, jsonRes); callbackContext.sendPluginResult(result); }else{ callbackContext.error("format "+format+" not found"); } } catch (JSONException e) { callbackContext.error(e.getMessage()); } catch (IOException e) { callbackContext.error(e.getMessage()); } } }); return true; } callbackContext.error("action not found"); return false; }; After some research, …

http://stackoverflow.com/q/27529233
upvote count: 3
has comment: http://stackoverflow.com/comment/43487300
answer count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/27530094
accepted answer: http://stackoverflow.com/a/27530094
favorite count: 0
has title: Why does CVS expand javascript call?
has body: Why is CVS expanding the SetDropdownList call below from SetDropdownList('BillPay', 'BillingState', '$State$'); to SetDropdownList('BillPay', 'BillingState', '$State: Exp $'); in the javascript below? Should I be converting html files to binary? I have tried the following steps to investigate this problem. I copied the html file (in which the javascript function resides) to a safe place; deleted the file; entered the CVS delete command to remove the CVS element; and then recreated the CVS element from the saved copy, using add and commit. Despite this, SetDropdownList was still expanded as shown above. function EnterPage() { var ElemID; // Set the payment type and credit card radio buttons to their correct initial // state (ACH payment, credit card choice 0). SetRadioButton('BillPay', 'PaymentTypeID', 1); SetRadioButton('BillPay', 'CCTypeID', 0); // Make the credit card fields invisible. ACH is the default. if (document.all &amp;&amp; !document.getElementById) ElemID = document.all['CCTable']; else ElemID = document.getElementById('CCTable'); ElemID.style.display = 'none'; // Fill in the various fields of the form that we know about. Note that we use // double quotes, in case there are any apostrophes in the names. document.forms['BillPay'].elements['ACHNameOnAccount'].value = "$FullName$"; document.forms['BillPay'].elements['CCNameOnCard'].value = "$FullName$"; document.forms['BillPay'].elements['BillingAddress1'].value = "$Address1$"; document.forms['BillPay'].elements['BillingAddress2'].value = "$Address2$"; document.forms['BillPay'].elements['BillingCity'].value = "$City$"; SetDropdownList('BillPay', 'BillingState', '$State$'); document.forms['BillPay'].elements['BillingZipcode'].value = "$Zipcode$"; document.forms['BillPay'].elements['Location'].value = "$Location$"; document.forms['BillPay'].elements['AcctType'].value = "$AcctType$"; document.forms['BillPay'].elements['BillYear'].value = "$BillYear$"; document.forms['BillPay'].elements['AcctNum'].value = "$Acc…
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43487157
score: 2
type: AnsweredQuestion
tagged with: cvs
has comment: http://stackoverflow.com/comment/43487208
type: Question
has comment: http://stackoverflow.com/comment/43487614
has comment: http://stackoverflow.com/comment/43487184
has comment: http://stackoverflow.com/comment/43488883
tagged with: javascript

drupal
type: Tag
tags question: http://stackoverflow.com/q/27485787
tag name: drupal
tags question: http://stackoverflow.com/q/27496673
tags question: http://stackoverflow.com/q/27500254

http://stackoverflow.com/q/27511438
accepted answer: http://stackoverflow.com/a/27512653
answer count: 1
tagged with: jquery
tagged with: typeerror
tagged with: slider
has answer: http://stackoverflow.com/a/27512653
has body: I'm a bit clueless regarding my FullWidth Image Slider in combination with the Openstrap Wordpress theme. When the function is loaded, I always get this error: Uncaught TypeError: undefined is not a function And I guess, this has something to do with the jquery functions loaded in the openstrap theme. I already removed the jQuery.noConflict();, but that did not work out. This is the link to my test site where the error occurs: https://dillan.de/bfm/texte/ The slider is loaded with this function: And this is the .js: (function( window, $, undefined ) { /* * smartresize: debounced resize event for jQuery * * latest version and complete README available on Github: * https://github.com/louisremi/jquery.smartresize.js * * Copyright 2011 @louis_remi * Licensed under the MIT license. */ var $event = $.event, resizeTimeout; $event.special.smartresize = { setup: function() { $(this).bind( "resize", $event.special.smartresize.handler ); }, teardown: function() { $(this).unbind( "resize", $event.special.smartresize.handler ); }, handler: function( event, execAsap ) { // Save the context var context = this, args = arguments; // set correct event type event.type = "smartresize"; if ( resizeTimeout ) { clearTimeout( resizeTimeout ); } resizeTimeout = setTimeout(function() { jQuery.event.handle.apply( context, args ); }, execAsap === "execAsap"? 0 : 100 ); } }; $.fn.smartresize = function( fn ) { return fn ? this.bind( "smartresize", fn ) : this.trigger( "smartresize", ["execAsap"] ); }; $.Slideshow = function( options, element ) { this.$el = $( element ); /***** images ****/ // list of image items this.$list = this.$el.find('ul.ei-slider-large'); // image items this.$imgItems = this.$list.children('li'); // total number of items this.itemsCount = this.$imgItems.length; // images this.$images = this.$imgItems.find('img:first'); /***** thumbs ****/ // thumbs wrapper this.$sliderthumbs = this.$el.find('ul.ei-slider-thumbs').hide(); // slider elements this.$sliderElems = this.$slider…
has title: jQuery Slider and Uncaught TypeError in Wordpress
type: AnsweredQuestion
tagged with: javascript
type: Question
score: 0

http://stackoverflow.com/q/27477936
tagged with: ajax
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27478047
tagged with: php
has comment: http://stackoverflow.com/comment/43391134
upvote count: 3
has comment: http://stackoverflow.com/comment/43389591
has body: Good Day to all I just wanna ask something about Leaflet Markers. I have a database and a table with a field that has a name of icon_name and it looks like this. |icon_name| ___________ |FIRE | |HOMICIDE | |RAINSTORM| and I also have a folder Named Legends and it has a file that looks like this. Folder Name: Legends Files Inside: FIRE.jpg HOMICIDE.jpg RAINSTORM.jpg as you can see the names of jpg files is the same in my table (icon_name) My code below is calling a specific image in a folder and uses this as a Leaflet markers image before placing it in the map (Note: The following code is generating the markers info from database into the map) var Icon1 = L.icon({ //&lt;---Assigning a name of an image into a Leaflet Icon. iconUrl: 'legends/FIRE.jpg',//&lt;--- Image Folder Location + the Image Name iconSize: [50, 50], //&lt;--- Size of the image converted as icon iconAnchor: [23, 50], //&lt;--- Icons Anchor popupAnchor: [3, -50] //&lt;--- Leaflet Pop up function getInfo() { $.getJSON("get_info.php", function (data) { for (var i = 0; i &lt; data.length; i++) { var location = new L.LatLng(data[i].lat, data[i].lng); var marker = new L.Marker(location,{icon:Icon1}); marker.bindPopup( data[i].name + "&lt;br&gt;" + data[i].user_date + "&lt;br&gt;" + data[i].user_time + "&lt;br&gt;" + data[i].address + "&lt;br&gt;" ).addTo(map); marker.on('click', function(e) { // HERE YOU GO var ll = marker.getLatLng(); document.querySelector('#userLat1').value = ll.lat; document.querySelector('#userLng1').value = ll.lng; alert('You have selected a Marker that will be deleted'); }); } }); } Now the output of the code above is like this: A lot of markers from different parts of the map (good) All of that markers image is only "FIRE.jpg" even if the other markers has an "icon_name" of HOMICIDE,RAINSTORM and others. Now here is my big question: How can I pass the value of my tables field icon_name into the value of var Icon1 or iconUrl var Icon1 = L.icon({ iconUrl: 'legends/FIRE.jpg', so that …
type: Question
score: 3
tagged with: javascript
answer count: 1
downvote count: 0
has title: How to convert Database/Table Data into a File's Name?
favorite count: 0

http://stackoverflow.com/comment/43660080
type: QuestionComment
comment on: http://stackoverflow.com/q/27619591
score: 2
has text: A quick and dirty solution would be to wrap your DDL in an `UpdatePanel`. A better solution would be to use ajax and a web service.
type: Comment

http://stackoverflow.com/comment/43688697
has text: may i know, where i can view source file? @anpsmn
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27634488

http://stackoverflow.com/q/27554520
has answer: http://stackoverflow.com/a/27568180
tagged with: mysql
tagged with: forms
has title: Form in a PHP inside auto-refresh DIV tag won't work
type: Question
has body: I have the following two pages. The index.php includes purchases_pending.php through PHP. The first time the page loads the form works perfectly but when the DIV(#pp) is refreshed after 10 seconds the FORM does not work. Is there a solution for this? Or if I can do it through AJAX, can somebody help me with the code. As you have seen my codes you'll probably know Im a beginner. Thanks in advance. index.php Pending Purchases <?php include ($purchases_pending); ?> purchases_pending.php <?php $CONFIG = $_SERVER["DOCUMENT_ROOT"]. "/config/"; include($CONFIG. "pages.php"); include($db); $sql = "SELECT * FROM account WHERE status='Pending' AND type='Purchase'"; $query = mysqli_query($conn, $sql); if (mysqli_num_rows($query) > 0) { echo ' '; echo ' Party Box Rate Status '; while ($result = mysqli_fetch_assoc($query)) { $id = $result['id']; $party = $result['party']; $box = $result['box']; $rate = $result['rate']; $amount = $result['amount']; echo ' '; echo ' '; echo ' ' . $party . ' '; echo ' ' . $box . ' '; echo ' ' . $rate . ' '; echo ' '; echo ' '; } echo ' '; echo ' '; echo ' '; } else { echo 'Hooray...No pending purchases'; } if(isset($_POST['submit']) && $_POST['submit']!="") { $status = $_POST['status']; $count = count($_POST['status']); for($i=0;$i<$count;$i++) { $update_purchases = "UPDATE account SET status='Completed', user_confirm='$user_confirm' ,user_confirm_time=current_timestamp WHERE id='$status[$i]'"; $query_purchases = mysqli_query($conn, $update_purchases); } header ('location:/'); } ?>
tagged with: javascript
score: 0
answer count: 2
tagged with: sql-update
has answer: http://stackoverflow.com/a/27554563
type: UnansweredQuestion
tagged with: php

http://stackoverflow.com/comment/43406882
type: QuestionComment
type: Comment
score: 2
comment on: http://stackoverflow.com/q/27487602
has text: Try converting the value you set from PHP to a boolean value as it's probably being read as a string.

http://stackoverflow.com/comment/43645626
comment on: http://stackoverflow.com/a/27611224
score: 0
type: AnswerComment
type: Comment
has text: @MichaelRader this is what this jsfiddle do: http://jsfiddle.net/albciff/6ek0equw/1/ no? First open tab on each section is animated, when all tabs in the section are collapsed the last one is also animated, when you click a tab on another section this new one is animated and the other from the previous section is also... if there is an already open tab on the section there is no animation between them. This is what you want or I understand bad your requirements...

http://stackoverflow.com/comment/43523012
type: QuestionComment
type: Comment
has text: @Piyush: Hi piyush, I want that for the whole ` ` tag, how to use that ?
score: 0
comment on: http://stackoverflow.com/q/27548338

http://stackoverflow.com/q/27514685
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/27515258
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27515258
tagged with: ajax
possible better answer: http://stackoverflow.com/a/27514735
linked to: http://stackoverflow.com/q/4750225
upvote count: 1
has comment: http://stackoverflow.com/comment/43459768
has body: The script below normally returns values formatted in into JSON object as shown below: {"Value":null,"Status":2,"Message":"Greetings."} For the past couple of days, we have been getting: Record has been added successfully.**[obect Object]** Any ideas what could have gone wrong? This is the code below. &lt;script type="text/javascript"&gt; function CallService() { //Creating an object to hold token form field myToken = new Object(); myToken.Token = $("#token").val(); //Creating an object to hold form fields myData = new Object(); // Creating variables to hold data from textboxes. First building associated details myData.Address = $("#Address").val(); myData.CallerAcctNum = $("#CallerAcctNum").val(); myData.CallerAddress = $("#CallerAddress").val(); myData.CallerCellPhone = $("#CallerCellPhone").val(); myData.CallerCity = $("#CallerCity").val(); myData.CallerComments = $("#secondarysitecontact").val(); myData.CallerDistrict = $("#CallerDistrict").val(); myData.CallerEmail = $("#CallerEmail").val(); myData.CallerFax = $("#CallerFax").val(); myData.CallerFirstName = $("#CallerFirstName").val(); myData.CallerHomePhone = $("#CallerHomePhone").val(); myData.CallerLastName = $("#CallerLastName").val(); myData.CallerMiddleInitial = $("#CallerMiddleInitial").val(); myData.CallerState = $("#CallerState").val(); myData.CallerWorkPhone = $("#CallerWorkPhone").val(); myData.CallerZip = $("#CallerZip").val(); myData.City = $("#City").val(); myData.Details = $("#comments").val(); myData.District = $("#District").val(); myData.Location = $("#Location").val(); myData.ProblemSid = $("#RequestID").val(); myData.State = $("#State").val(); myData.StreetName = $("#StreetName").val(); myData.X = $("#X").val(); myData.Y = $("#Y").val(); myData.SiteContactDisplay = $("#sitecontact").val(); myData.Comments = $("#comments").val(); myData.Text1 = $("#deptId").val(); $.ajax({ type: "POST", url: "proxyCreate.php", data: { data: JSON.stringify(myData), token: myToken.Token }, dataType: "json", asy…
favorite count: 0
score: -3
has title: Getting Record has been added successfully.[obect Object] instead of actual values
downvote count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27514735
tagged with: http://stackoverflow.com/tag/json
duplicate of: http://stackoverflow.com/q/4750225
type: Question

http://stackoverflow.com/q/27595100
upvote count: 1
type: Question
type: AnsweredQuestion
has title: D3.js: Pass arguments through method chaining
tagged with: javascript
has comment: http://stackoverflow.com/comment/43613918
accepted answer: http://stackoverflow.com/a/27595173
answer count: 1
downvote count: 0
favorite count: 0
tagged with: d3.js
linked to: http://stackoverflow.com/q/21358027
has body: I don't completely understand how to use method chaining with functions. Below are some cases Expected Case var dataset = [ 5, 10]; function count(d) { return "I can count up to " + d ; } d3.select("body").selectAll("p") .data(dataset) .enter() .append("p") .text(count); Output I can count up to 5 I can count up to 10 What I don't get is this output from a modified count function function count(d, a) { return "I can count up to " + d + a ; } Output I can count up to 50 I can count up to 101 Read this post but I'm still missing something. Should I just reread it? How are input parameters filled in javascript method chains?
score: 1
has answer: http://stackoverflow.com/a/27595173

http://stackoverflow.com/comment/43510098
comment on: http://stackoverflow.com/a/27536686
score: 0
type: AnswerComment
has text: I have just added edit to my answer so you can get your code right.
type: Comment

http://stackoverflow.com/comment/43514926
has text: if you use bootstrap there is `pull-right`
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27540836
score: 0

http://stackoverflow.com/comment/43651102
type: QuestionComment
comment on: http://stackoverflow.com/q/27614638
score: 1
has text: refer this http://stackoverflow.com/questions/11022888/jquery-load-more-content-onclick
type: Comment

http://stackoverflow.com/comment/43580494
comment on: http://stackoverflow.com/a/27577552
has text: thank you sir, its working awesome to remove particular row , but the total value is not calculating based on remaining rows and count value also not decreasing based on removal(if i remove 2nd row sl.no of first row is 1 itself that is ok but 3rd row is 3 no changes, 3rd row sl.no supposed to be changed to 2 ) can you please update the code it may helpfull
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27528372
has comment: http://stackoverflow.com/comment/43485500
upvote count: 1
score: -2
answer count: 1
tagged with: javascript
tagged with: jquery
has body: In my current project, I have this jquery function: $(document).on("click", "button.multiple", function(){ $(this).parent().first().find("input.multiple").after( $(this).parent().first().find("input.multiple").clone() ); }); which should, each time a button is clicked, add a new input element like this to the page: Fotos novo but when I click in the button, multiple copies of this element are produced. Anyone can tell what is wrong here?
favorite count: 0
has comment: http://stackoverflow.com/comment/43485691
downvote count: 3
has title: Cloning element with jquery producing undesirable multiple copies
type: Question
has comment: http://stackoverflow.com/comment/43486292
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43485768
has comment: http://stackoverflow.com/comment/43485718
has answer: http://stackoverflow.com/a/27639216
accepted answer: http://stackoverflow.com/a/27639216
has comment: http://stackoverflow.com/comment/43485487

http://stackoverflow.com/comment/43494113
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27515552
has text: But the error handler must not return a failed promise like with `return WinJS.Promise.wrapError(error)`

http://stackoverflow.com/a/27548850
score: 0
answers question: http://stackoverflow.com/q/27548338
type: Answer
has comment: http://stackoverflow.com/comment/43526005
has body: See: http://jsfiddle.net/snlacks/tekokmke/1/ Without using jQuery, you want to find all of the elements you want to do this to then you want to loop through them You'll apply two listeners to each one, one for entering and one for leaving. js: var mes = document.querySelectorAll(".me"); function changeIn(){ document.body.style.backgroundColor = "lightgray"; } function changeOut(){ document.body.style.backgroundColor = "darkgray"; } for(i = 0; i &lt; mes.length; i++){ mes[i].onmouseenter = changeIn; mes[i].onmouseleave = changeOut; }
has comment: http://stackoverflow.com/comment/43524279

http://stackoverflow.com/q/27510329
type: UnansweredQuestion
tagged with: php
downvote count: 1
has title: Can't delete image of server using Froala editor
score: -1
type: Question
upvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has body: I have followed carefully the installation guide on https://editor.froala.com/docs. Everything works beautifully, except for deleting image of my server. I uploaded an image in the editor -> Image was saved in uploads folder on my local server. But when i chose to delete the that image in the editor -> it is deleted from the editor but it is still in the upload folder, although i tried the guide on this website. I tried with firebug but it did not tell any error. Here is JS code which sends request to remove_image.php file: &lt;script&gt; $(function() { $('#froala') .editable({ // Set the image upload URL. inlineMode: false, imageMove: true, height: 300, imageUploadURL: 'upload.php', imageUploadParam: "file", imageDeleteURL: "remove_image.php" }) .on('editable.afterRemoveImage', function (e, editor, $img) { // Set the image source to the image delete params. editor.options.imageDeleteParams = {src: $img.attr('src')}; // Make the delete request. editor.deleteImage($img); }); }); &lt;/script&gt; Here is the remove_image.php which handle deleted request from JS (copied from their guide). This will actually delete the image from upload folder. But it does not. The image is still there. &lt;?php // Get src. $src = $_POST["src"]; // Check if file exists. if (file_exists(getcwd() . $src)) { // Delete file. unlink(getcwd() . $src); } ?&gt; Ah, I found Post details in firebug as follow: Parameters src uploads/6bb7897cfcf2116c4dd04b97031652376bdaf144.png Source src=uploads%2F6bb7897cfcf2116c4dd04b97031652376bdaf144.png There is extra %2F in front of image file name. This seems to be error but i dont know how to fix this. Please help!
has answer: http://stackoverflow.com/a/27510843

http://stackoverflow.com/comment/43424857
has text: i think he wants the js to write to the form which is then submitted and processed by script.php
score: 0
comment on: http://stackoverflow.com/q/27496648
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43470015
comment on: http://stackoverflow.com/q/27520187
type: QuestionComment
has text: Please, go to the JS Bin, and try to drag an element.
type: Comment
score: 0

http://stackoverflow.com/a/27541208
type: Answer
score: 0
answers question: http://stackoverflow.com/q/27540596
has body: In html do that &lt;td&gt;&lt;a href="#/pages/edit_form/{{member.id}}" target="_blank" class="business_name"&gt;{{member.businessname}}&lt;/a&gt;&lt;/td&gt; ... In app.js or where you define route do that .when('/edit/:memberid', { templateUrl:'partials/edit.html', controller:'editController' }) In controller you have to take this id by doing that app.controller("editController",function($routeParams,$scope){ $scope.memberid= $routeParams.memberid; //Now use this member id to fetch all data });

http://stackoverflow.com/q/27621659
tagged with: captcha
has comment: http://stackoverflow.com/comment/43663886
has body: I'm coding a form which requires SweetCaptcha verification. When developing REST API for the form I've realized that I can use always the same pair sckey / scvalue. In my thinking this means that any spammer could solve the puzzle once and then send me tons of spam requests. Am I right? Thanks on advance.
type: Question
tagged with: javascript
score: 0
has title: SweetCaptcha spam prevention possible
tagged with: rest
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/52087711

http://stackoverflow.com/comment/75266342
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27488067
has text: @user3007486 Have you solve this?
score: 0

http://stackoverflow.com/comment/43583624
type: Comment
type: QuestionComment
score: 0
has text: My site is offline at the moment and only accessible over localhost. I'm using wordpress if that helps, I'm thinking it may be a default WP function for posts. What's the best way to find it?
comment on: http://stackoverflow.com/q/27578925

http://stackoverflow.com/comment/43492275
has text: Good answer. I'm still stuck on how to pass data from one call to the next. I first want to call InitialData, then call Green & Red data with a filter coming from InitialData, then call FinalData with a filter from Green & Red. All one long chain.
type: AnswerComment
comment on: http://stackoverflow.com/a/27530785
type: Comment
score: 1

http://stackoverflow.com/q/27574218
tagged with: javascript
score: 0
answer count: 1
tagged with: angularjs
has answer: http://stackoverflow.com/a/27586572
accepted answer: http://stackoverflow.com/a/27586572
tagged with: http://stackoverflow.com/tag/html
tagged with: angular-directive
has body: I'm working on an angular directive to wrap up ng-table with some filtering/exporting functionality. It is aimed to be reusuable for multiple tables so the elements must be dynamic. I am attempting to handle this by using ng-transclude The problem is that my elements require some directives such as ng-bind,data-title, and sortable. By the time they are attempted to be transcluded by the directive they have already been rendered to empty values. I need a way to prevent the rows from being rendered until they have been inserted into the directive Here is my view markup: {{{true: (row.last_login | selectedTimezone | moment:'MMM D, YYYY h:mma'), false: 'N/A'}[!!row.last_login]}} The directive template: The directive declaration: angular.module('myApp') .directive('myDataTable',function() { return { restrict:'E' , templateUrl:'src/tables/myDataTable.tpl.html' , transclude:true , scope: { searchFilter:'=' , tableValues:'=' } , link:function(scope,el,attr,ctrls) { console.log('hello world'); } } });
type: AnsweredQuestion
has title: Transcluding HTML that contains ng-binds
tagged with: ngtable
type: Question

http://stackoverflow.com/q/27499167
accepted answer: http://stackoverflow.com/a/27500786
upvote count: 0
tagged with: highcharts
tagged with: javascript
favorite count: 0
has body: My current setup is somewhat static with xaxis categories and tickinterval(cant even see the graph without tickinterval). If you change screen resolution it looks somewhat bad and I would like to have the x-axis to be dynamic. What I've gathered you should use data like this http://www.highcharts.com/samples/data/usdeur.js and xAxis like below? xAxis: { type: 'datetime' } But that example only uses YYMMDD, I also use hh:mm:ss. Currently looks like this: i.imgur.com/v649otj.png xAxis: { categories: getjson('Date'), tickInterval: 20 }, series: [ {name:'Cars', data: getjson('Values')}, ] Data: getjson('Date') equals: Array [ "2014-11-09 02:36:00", "2014-11-07 07:35:00", "2014-11-08 20:29:00", "2014-11-08 20:30:00", "2014-11-10 11:06:00", "2014-11-08 08:12:00", "2014-11-08 20:31:00", "2014-11-08 20:23:00", "2014-11-08 20:24:00", "2014-11-08 20:25:00", 190 till… ] getjson('Values') equals: Array [ 13, 209, 209, 19, 0, 209, 15, 13, 13, 19, 190 till… ] So how do I make use of this data and the datetime configuration. Somehow push the 'Date'-data into same array as 'values' and convert it into right date format? Edit: Current work: http://jsfiddle.net/tws8x0pd/4/
has answer: http://stackoverflow.com/a/27502468
type: AnsweredQuestion
has title: Highcharts proper usage of datetime?
has answer: http://stackoverflow.com/a/27500786
possible better answer: http://stackoverflow.com/a/27502468
downvote count: 1
type: Question
score: -1
linked to: http://stackoverflow.com/q/25968970
answer count: 2
has comment: http://stackoverflow.com/comment/89768184

http://stackoverflow.com/comment/43645165
type: QuestionComment
type: Comment
has text: I don't think 20kb would impact load time that much.
comment on: http://stackoverflow.com/q/27611131
score: 1

http://stackoverflow.com/comment/43545580
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27559675
has text: @ChicagoSky - please read my last paragraph. You may want to change how your redirect is done.

http://stackoverflow.com/q/27570593
answer count: 0
type: UnansweredQuestion
has title: Dynamically Link to iTunes
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43566527
has body: I need the ability to link to Artists and their associated Albums in iTunes and was wondering how to do this? Before I built a link, but seems to have broken. Basically process is this, user comes to my website, see's a list of music artists that is dynamically built, and clicks a "Buy" on artist/album they want. I've seen the Link Maker (https://linkmaker.itunes.apple.com/us/), and that doesn't work as you need the artist ID which I don't have. What would you recommend I redirect the user to iTunes Store to directly put them on the correct page?
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43570805
tagged with: itunes

http://stackoverflow.com/q/27583398
tagged with: dom
type: Question
has comment: http://stackoverflow.com/comment/43591339
tagged with: javascript
score: 0
answer count: 2
has body: I want to set one window.onload event. I want to dynamically add iframes to the page. Each time an iframe is loaded, I want the window.onload to fire. How can I do that? Edit: Say I add the 5th iframe. I want to run a function only if iframes 1, 2, 3, 4 and 5 are all loaded. I can't just add handlers to each iframe because what if iframe 5 finishes loading before iframe 2? The following doesn't work: http://codepen.io/anon/pen/emzbZj?editors=101 HTML add JavaScript $(document).ready(function() { $('button').on('click', function() { $(' ').insertAfter('button'); }); $(window).on('load', function() { console.log('loaded'); // doesn't fire when dynamically added iframes load }); });
has title: How can you set a window.onload event that fires when all dynamically added iframes are loaded?
tagged with: jquery
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27583579
has answer: http://stackoverflow.com/a/27583465
tagged with: iframe

http://stackoverflow.com/comment/43433902
comment on: http://stackoverflow.com/a/27501744
has text: There is no differnce in this situation, but `.data('type')` is a little shorter.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/43668307
comment on: http://stackoverflow.com/a/27622432
type: AnswerComment
has text: yea its an ID from the DB
score: 0
type: Comment

http://stackoverflow.com/comment/43835266
has text: Forgot to accept; Done. The second solution worked really, really well. Finally I have found the solution that would work with pure angular.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27573865

http://stackoverflow.com/comment/43707724
has text: This accepted answer unfortunately is off the mark. Setting the variable to be null is absolutely useless (since storing `null` takes up the same amount of space as storing the number of milliseconds in a day), even if you needed to worry about memory management, which of course you don't.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27614250
type: Comment

http://stackoverflow.com/comment/43420420
comment on: http://stackoverflow.com/q/27494247
type: Comment
has text: What do you mean by "skipped"? As you mention asynchrony problems, what do you expect the code to do?
score: 0
type: QuestionComment

http://stackoverflow.com/comment/43498729
score: 0
type: AnswerComment
has text: x and o are in the boxes when the player clicks
type: Comment
comment on: http://stackoverflow.com/a/27534851

http://stackoverflow.com/comment/43668062
type: QuestionComment
comment on: http://stackoverflow.com/q/27623747
has text: you are missing the $ in front of $(".success-message")
score: 0
type: Comment

http://stackoverflow.com/a/27631676
has body: (^|\s)a(?=\s|$) Try this.Replace by $1.See demo. https://regex101.com/r/gQ3kS4/3
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/27628318
downvote count: 0
score: 1

http://stackoverflow.com/comment/43444636
type: Comment
comment on: http://stackoverflow.com/a/27506547
type: AnswerComment
score: 1
has text: Yes, I was "IDing" as value_1, value_2. That was right, but I found what my problem was. I had this ID duplicated in some other place. But this answer was truly helpful and I will select it.

http://stackoverflow.com/comment/43503324
type: Comment
comment on: http://stackoverflow.com/q/27537448
type: QuestionComment
has text: @RobG I have about 5k arrays like that.
score: 0

http://stackoverflow.com/comment/43442170
type: Comment
type: QuestionComment
score: 1
has text: You have not corrected the question, and your markup is invalid. The *actual* markup is relevant, since it affects the suitability of different approaches. And you should not confuse the issue by referring to jQuery when this is apparently a matter of HTML and CSS only (and once solved, trivial to implement in jQuery if needed).
comment on: http://stackoverflow.com/q/27505591

http://stackoverflow.com/comment/57637939
has text: Tip: It would have been nice to link to the mentioned section in the angular doc. ;)
score: 0
type: Comment
comment on: http://stackoverflow.com/a/33254473
type: AnswerComment

http://stackoverflow.com/q/27536473
type: AnsweredQuestion
has body: I have this simple html generated by Adobe Muse (I can't change it directly): 1290 And I have this options from the CountUp script: var counter = new countUp( 'counterID', 0, *Some Value*, 0, 2 ); counter.start(); // run counter The question is: I need to find ALL elements with title="counter", set ID's for each , then get value from 1290 , put it into the script options and run each counters separately. I tries to do this: var counters={}; $("[title='counter']").each(function(){ counters['counter' + this.id]=$(this).children('p').html(); }); $.each( counters, function( id, value ) { var id = new countUp( $('#' + id), 0, value, 0, 2 ); id.start(); }); Where I'm wrong?
accepted answer: http://stackoverflow.com/a/27536686
has title: How to get value from elements and use it inside of javascript options
type: Question
score: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27536686

http://stackoverflow.com/comment/43588029
type: Comment
type: QuestionComment
has text: Because according to my research, it needs to be. fillStyle requires a full string.
comment on: http://stackoverflow.com/q/27581845
score: 0

http://stackoverflow.com/comment/43452389
comment on: http://stackoverflow.com/q/27510299
type: Comment
type: QuestionComment
has text: I didn't tried, but I read somewhere that it's not supported by iOS
score: 0

http://stackoverflow.com/q/27575275
has comment: http://stackoverflow.com/comment/43576130
has answer: http://stackoverflow.com/a/27575393
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/43576050
has comment: http://stackoverflow.com/comment/43576126
tagged with: javascript
has body: I have a web form with several fields. Three of them are ano_evento, mes_evento and dia_evento (year, month and day). I want to get the values from these fields, convert it to a date format and show the formatted date in another field called fecha_evento. The user sets a value for ano_evento (e.g. 2014), a value for mes_evento (e.g. 11) and a value for dia_evento (e.g. 25). The value for fecha_evento should then be 2014-11-25. All three fields have an onchange method in it: For ano_evento: &lt;select name="ano_evento" id ="ano_evento" onchange="cambiar_fecha()"&gt; For mes_evento: &lt;select name="mes_evento" id ="mes_evento" onchange="cambiar_fecha()"&gt; For dia_evento: &lt;select name="dia_evento" id="dia_evento" onchange ="cambiar_fecha()"&gt; The field for fecha_evento: &lt;input type="text" name="fecha_evento" id="fecha_evento" value="0" size="32" /&gt; And this is the script: &lt;script&gt; function cambiar_fecha(){ alert (document.getElementById("fecha_evento").value); var ano = document.getElementById("ano_evento").value; var mes = document.getElementById("mes_evento").value; // var dia = document.getElementById("dia_evento").value; document.getElementById("fecha_evento").value = ano+"-"+mes+"-"+dia; } &lt;/script&gt; When the user changes any of the three fields values, the alert inside the script is shown, but the value from the field fecha_evento doesn't change. Any help is welcome
accepted answer: http://stackoverflow.com/a/27575398
has title: Setting value to a form field with JavaScript
score: 0
has comment: http://stackoverflow.com/comment/43576036
has answer: http://stackoverflow.com/a/27575398
has comment: http://stackoverflow.com/comment/43576330
possible better answer: http://stackoverflow.com/a/27575393
has comment: http://stackoverflow.com/comment/43576184
type: AnsweredQuestion

http://stackoverflow.com/a/27507792
type: Answer
has comment: http://stackoverflow.com/comment/43447064
has body: UPDATED: As of angularjs 1.5, promise methods success and error have been deprecated. (see this answer) from current docs: $http.get('/someUrl', config).then(successCallback, errorCallback); $http.post('/someUrl', data, config).then(successCallback, errorCallback); you can use the function's other arguments like so: error(function(data, status, headers, config) { console.log(data); console.log(status); } see $http docs: // Simple GET request example : $http.get('/someUrl'). success(function(data, status, headers, config) { // this callback will be called asynchronously // when the response is available }). error(function(data, status, headers, config) { // called asynchronously if an error occurs // or server returns response with an error status. });
answers question: http://stackoverflow.com/q/27507678
upvote count: 10
downvote count: 0
score: 10
has comment: http://stackoverflow.com/comment/43445836

http://stackoverflow.com/comment/43563709
type: Comment
type: QuestionComment
has text: My answer still stands, and it doesn't need the cardset array to check if the order is correct. Your question should be "how do I determine the order of my divs as they are on the screen right now". If you know the order, you can store their values in an array, and feed that array to my function. Good luck with your puzzle game! It looks nice already.
score: 0
comment on: http://stackoverflow.com/q/27568586

http://stackoverflow.com/comment/43542482
type: Comment
type: AnswerComment
has text: Adding that directive to the div in my modal unfortunately doesn't call that method.
score: 0
comment on: http://stackoverflow.com/a/27558001

http://stackoverflow.com/comment/43598713
score: 1
has text: That's a bad idea. There are people who depend on that behavior.
comment on: http://stackoverflow.com/q/27587248
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43619384
has text: yes dev its working. But the thing is am using the meta driven field directive and also using placeholder am using. {{ options.placeholder }}
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27596161

http://stackoverflow.com/a/27566560
score: 3
has comment: http://stackoverflow.com/comment/43585903
has comment: http://stackoverflow.com/comment/43560796
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27564810
has comment: http://stackoverflow.com/comment/43560884
has comment: http://stackoverflow.com/comment/43586414
type: Answer
has body: You currently initialize i to 0 when the page loads. You should also get the value from Firebase, which you can do with: myDataRef.child('value').once('value', function(snapshot) { i = snapshot.val(); }); If you combine that with the existing code and clean it up a bit, it becomes: var myDataRef = new Firebase('https://***.firebaseIO.com'); var i = 0; $('.progress-bar').css({ 'width' : i}); myDataRef.child('value').on('value', function(snapshot) { i = snapshot.val(); $('.progress-bar').css({ 'width' : i}); }); $('.btn').click(function() { myDataRef.set({value: i + 150}); }); $(document).ready(main); Note that the initial snippet I gave uses once('value', while here we use on('value'. This means the latest code will actually keep listening for updated values from Firebase, which is normally what you want. So the initial flow here is: You initialize i to 0 and draw the progress bar You start listening for values from Firebase You start listening for click events At some point a new value arrives from Firebase, which Updates i and the progress bar Then when the user clicks the button: You update the value in Firebase, which triggers steps 4 and 5 from above
accepted answer of: http://stackoverflow.com/q/27564810
upvote count: 3

http://stackoverflow.com/comment/43491299
type: Comment
has text: Sessions in Meteor are not really like sessions in, say Java. For one, they are not cookie based, which is noted in their Blog and docs. As a result, I have noticed in my own code that they have not always acted in a way I think a Session variable should act. I am not 100% certain, which is why I am doing this as a comment rather than an answer, but I am not seeing how this would work.
type: QuestionComment
comment on: http://stackoverflow.com/q/27530936
score: 0

http://stackoverflow.com/comment/43700099
type: Comment
comment on: http://stackoverflow.com/q/27630751
type: QuestionComment
has text: @muistooshort my question exactly!
score: 0

http://stackoverflow.com/comment/43538556
has text: It's a standard `$.ajax`. Can you answer my question?
comment on: http://stackoverflow.com/q/27555857
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27630578
type: Question
has body: jQuery localScroll and smoothScroll is not working at all on my site. Getting an error in my console saying that my function is not defined and that it's a type error. Any suggestions on how to fix this and get the plug in working? This is where I am calling localScroll and in return I get an error message in my console. The error seems to be occurring here on this line bellow. $( document ).ready(function() { $.localScroll(); });
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27630633
tagged with: jquery-plugins
score: 0
answer count: 1
type: UnansweredQuestion
tagged with: vertical-scrolling
has title: jQuery localScroll and smoothScroll not working
has comment: http://stackoverflow.com/comment/43681687
tagged with: scroll

http://stackoverflow.com/comment/43620265
type: Comment
type: QuestionComment
has text: @chopperdrawlion4 You already saw here this isn't a widely accepted expression
comment on: http://stackoverflow.com/q/27591905
score: 0

http://stackoverflow.com/q/27627520
tagged with: javascript
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/27627565
tagged with: http://stackoverflow.com/tag/html
has body: &lt;?php $myarray = array(); &lt;script type="text/javascript"&gt; $(function(){ $("#demo").grid({ 'genre' : 'All', 'items' : [ { 'title' : 'A', 'description' : 'qwerty', 'thumbnail' : ['http://mypd.front.net/f4534.jpg'], 'large' : ['http://mypd.front.net/f4534_large.jpg'], 'button_list' : [ { 'title':'Demo', 'url' : 'http://mypd.front.net/', 'new_window' : true } ], 'tags' : ['Movies'] }, { 'title' : 'B', 'description' : 'asdfg', 'thumbnail' : ['http://mypd.front.net/f5534.jpg'], 'large' : ['http://mypd.front.net/f5534_large.jpg'], 'button_list' : [ { 'title':'Demo', 'url' : 'http://mypd.front.net/', 'new_window' : true } ], 'tags' : ['Series'] }, ... ... ... { 'title' : 'Z', 'description' : 'poiyut', 'thumbnail' : ['http://mypd.front.net/f6534.jpg'], 'large' : ['http://mypd.front.net/f6534_large.jpg'], 'button_list' : [ { 'title':'Demo', 'url' : 'http://mypd.front.net/', 'new_window' : true } ], 'tags' : ['Movies', 'Series'] } ] }); }); &lt;/script&gt; This an embedded script in my legacy index.php. Now what I wanted to do is to populate the data inside the array of items(like title, description, etc.) by reading it from an array which I have in the php file. Could you please let me know how I can do this? Something like this is what I am looking for? for ($i = 0; $i &lt; sizeof($vodAssetArray); $i++) { populate each of the items in the java script like { 'title' : $vodAssetArray[i]-&gt;title, 'description' : $vodAssetArray[i]-&gt;description, 'thumbnail' : [$vodAssetArray[i]-&gt;imgSrc], 'large' : [$vodAssetArray[i]-&gt;imgSrc], 'button_list' : [ { 'title':'Demo', 'url' : 'http://mypd.front.net/', 'new_window' : true } ], 'tags' : [$vodAssetArray[i]-&gt;genre] }, } ?&gt;
has comment: http://stackoverflow.com/comment/43675824
accepted answer: http://stackoverflow.com/a/27627893
linked to: http://stackoverflow.com/q/23740548
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43675825
type: Question
has title: Populating an array of items and its values in java script by passing in an array from PHP
has answer: http://stackoverflow.com/a/27627565
has answer: http://stackoverflow.com/a/27627893

http://stackoverflow.com/q/27507651
tagged with: angularjs-directive
has body: So my problem is that Controller constructor executes multiple times. If I have 2 Directives associated with particular Controller then it runs 2 + 1, if 3 Directives, then 3 + 1... and so on. If I have an ajax request in that controller to get data, then it runs that much times which isn't really necesarry... Why is it so? I'm very concerned that it makes all those extra unnecessary ajax requests... HTML: &lt;span ng-controller="MenuController as MenuCtrl"&gt; &lt;main-menu&gt;&lt;/main-menu&gt; &lt;/span&gt; Controller: var howManyTimes = 0; angular.module("shredkit", ["myDirectives"]) .controller("MenuController", function(){ ++howManyTimes; console.log("HOW MANY TIMES? THAT MANY: " + howManyTimes ) }) Directive: angular.module("myDirectives", []) .directive("mainMenu", function(){ return{ restrict:"E", // type of directive - 'E' - element templateUrl:'templates/main-menu.html', controller:"MenuController", controllerAs: "MenuCtrl" }; })
has comment: http://stackoverflow.com/comment/43445910
accepted answer: http://stackoverflow.com/a/27507820
tagged with: javascript
tagged with: angularjs-scope
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/27507820
possible better answer: http://stackoverflow.com/a/27507935
favorite count: 0
tagged with: angularjs
type: AnsweredQuestion
downvote count: 0
has title: Controller constructor function executing multiple times in Angular
score: 1
has answer: http://stackoverflow.com/a/27507935
has comment: http://stackoverflow.com/comment/43479909
type: Question

http://stackoverflow.com/comment/46416777
comment on: http://stackoverflow.com/q/27480513
type: Comment
type: QuestionComment
has text: @SergeySokolov: That helps, please make it as an answer, so I can upvote.
score: 0

http://stackoverflow.com/q/27612524
has comment: http://stackoverflow.com/comment/43647372
type: Question
has body: Is it possible to use two instances of WebGLRenderer, using two Canvass to render the same scene? var renderer = new THREE.WebGLRenderer({ canvas: canvas1 }); renderer.setSize(100,100); var renderer2 = new THREE.WebGLRenderer({ canvas: canvas2 }); renderer2.setSize(100,100); var mesh = new THREE.Mesh( new THREE.BoxGeometry(100,100,100) ); var scene = new THREE.Scene(); var camera = new THREE.PerspectiveCamera(); camera.position.z = 500; scene.add(mesh); function draw(){ //try commenting the first render out //it will allow the other renderer to draw renderer.render(scene,camera); renderer2.render(scene,camera); requestAnimationFrame(draw); } draw(); In this fiddle, when I do as above, I can only render on one canvas at a given time. http://jsfiddle.net/ehsanziya/sbdogbLw/1/
tagged with: javascript
has title: Can multiple WebGLRenderers render the same scene?
answer count: 1
linked to: http://stackoverflow.com/q/54314548
has answer: http://stackoverflow.com/a/75054528
downvote count: 0
favorite count: 0
linked to: http://stackoverflow.com/q/30608723
upvote count: 2
type: UnansweredQuestion
tagged with: three.js
score: 2
has comment: http://stackoverflow.com/comment/43675728

http://stackoverflow.com/comment/43666999
has text: Any errors in the javascript console when you try to load the view?
comment on: http://stackoverflow.com/q/27623213
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27610594
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27610268
has comment: http://stackoverflow.com/comment/43773818
score: 3
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/43647812
upvote count: 3
answers question: http://stackoverflow.com/q/27610268
has body: Do not add fpsweapon to the scene, add it to user user.add (fpsweapon); Then set its position to (0, 15, 0). This will be the weapon position relative to its container (user), and you won't need to change it anymore.

http://stackoverflow.com/q/27486833
tagged with: javascript
has comment: http://stackoverflow.com/comment/43405456
has comment: http://stackoverflow.com/comment/43405740
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27486981
has title: JS getting variable inside the function
type: Question
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/27486981
score: 0
has body: I have a function to do something on onClick event. function onDocumentMouseUp( event ) { createsprite(clickedposition); } createsprite(clickedposition) { var sprite = JSONSPITE // this add correctly sprite to my scene; //// here timer function 1 sec setTimeout(function(){ remove(sprite); }, 1000); } Everything works correctly. But when i click more than once, i have still my variable sprite as a last added one. (yes i know that is correct). And logically remove() have affected only that last one. What is the correct solution to handle work with unknown amount of same variables. Purpose it too remove each sprite after one second after click one by one in the order of creation. How can i reach only one variable in the same function, even when there are more variables with the same name on each function init.
answer count: 1

http://stackoverflow.com/q/27611754
tagged with: javascript
favorite count: 0
tagged with: python
tagged with: selenium-webdriver
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27612362
upvote count: 2
has body: I am scraping a job board (eluta.ca) using Python and Selenium. I'm able to return everything I want except for the link to the extended job description. In the bit of HTML below the job "Claims Adjuster"; links to "http://www.eluta.ca./direct/p?i=f1a7daa360e9468d5837d821c9d328ec" &lt;h2 class="title"&gt; &lt;span class="lk-job-title" title="Claims Adjuster" onclick="enav2('./direct/p?i=f1a7daa360e9468d5837d821c9d328ec')"&gt;&lt;/span&gt; &lt;/h2&gt; I can find the element using the code webdriver.find_element_by_css_selector("#organic-jobs .organic-job:nth-child("+str(Line)+") .title .lk-job-title") retrieve the job via .text, navigate to the extended description via .click() Am I missing sometingh obvious that would return all or part of "enav2('./direct/p?i=f1a7daa360e9468d5837d821c9d328ec')" Thanks in advance
tagged with: selenium
downvote count: 1
type: Question
score: 1
accepted answer: http://stackoverflow.com/a/27612362
has title: How do I get the onclick "action" of a link using Python and Selenium?
answer count: 1

http://stackoverflow.com/a/27575128
type: Answer
has comment: http://stackoverflow.com/comment/43584693
score: -1
downvote count: 1
has comment: http://stackoverflow.com/comment/43606664
answers question: http://stackoverflow.com/q/27574769
has comment: http://stackoverflow.com/comment/43584933
has comment: http://stackoverflow.com/comment/43576375
upvote count: 0
has body: This should work: //create the tab chrome.tabs.query({active: true, currentWindow: true}, function(tabs){ getTabs(tabs, function(full_mail_link){ chrome.tabs.create({ url: full_mail_link }, callBackOnCreate); }); }); function callBackOnCreate(tab) { globalCreatedTab = tab.id; } chrome.tabs.query({'active': true}, function(tabs) { for (var i = 0; i &lt; tabs.length; ++i) { if (tabs[i].id === globalCreatedTab) { chrome.tabs.remove(tabs[i].id, [optional callback]); } } }); Solution: use the query function with the callback and execute the remove function in the callback. It looks like normal window.open and window.close() should also work, The tab-id is an integer or an array containing integers.
has comment: http://stackoverflow.com/comment/43584641

http://stackoverflow.com/q/27508409
type: UnansweredQuestion
tagged with: django
type: Question
tagged with: debugging
has body: I cannot figure out how to debug javascript, using PyCharm, in a Django template. When I attempt to debug a template -- by using the context menu item Debug while in the template -- the debugger launches, chromium launches, and I see the following error message in the PyCharm debugger console: GET http://localhost:8000/login net::ERR_CONNECTION_REFUSED Needless to say nothing shows up in the chromium window. I've seen hints that I'm supposed to "open the generated file" from within the PyCharm debugger scripts tab. But since chromium isn't loading anything there's nothing to open. I have the JetBrains chromium debugger installed and, so far as I can tell, running. What's the procedure for debugging javascript in a Django template from within PyCharm?
upvote count: 5
has title: PyCharm: Debug Javascript in Django Template
has answer: http://stackoverflow.com/a/63080085
answer count: 2
score: 5
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/28856165
has comment: http://stackoverflow.com/comment/43465458
favorite count: 0
has comment: http://stackoverflow.com/comment/43461567
tagged with: pycharm

http://stackoverflow.com/comment/43462229
has text: @Jeffrey: I do not have Photoshop available, and I'm not familiar with it, hence I do not fully understand your explanation about how it works, and therefor I cannot really re-implement it as an ImageMagick commandline... **:-(**
type: Comment
score: 1
comment on: http://stackoverflow.com/a/27515725
type: AnswerComment

http://stackoverflow.com/comment/43561606
score: 0
has text: Yes, it contains the name property - this new object is coming from a 3rd party control, and angular can't register the change automatically. Anyway, my question is still how to use the $apply method without the use of $scope?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27568151

http://stackoverflow.com/comment/43546229
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27559047
has text: Where did you put the web page file on the disk?
score: 0

http://stackoverflow.com/q/27550394
score: 11
answer count: 2
tagged with: jquery
has answer: http://stackoverflow.com/a/27550628
favorite count: 0
tagged with: promise
upvote count: 11
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/58767012
has answer: http://stackoverflow.com/a/58767012
accepted answer: http://stackoverflow.com/a/27550628
type: Question
has body: Please note This is a contrived example. function longFunc(){ var deferred = $.Deferred(); setTimeout(function(){ console.log("long func completed"); deferred.resolve("hello"); }, 3000); return deferred.promise(); } function shortAfterLongFunc(x){ console.log('short func completed with value: ' + x); return { a: x }; } processFurther(longFunc().then(shortAfterLongFunc)); // send the array for further processing Problem I am unable to figure out how to return any kind of object/function for further downstream processing after shortAfterLongFunc completes. I can console.log from shortAfterLongFunc but that's not what i require here. Fiddle Here Thanks for looking! UPDATE: Okay just to make my question slightly better...this is a simple use case I am looking at: $.map(['H','E','L','L', 'O'], somefunc). // for each item in array apply somefunc function function somefunc(x){ // gets called for each value 'H', 'E' etc. in the array by $.map() var longfunc = function(y){ var deferred = $.Deferred(); setTimeout(function(){ console.log("long func completed"); deferred.resolve(y.toLocaleLowerCase()); }, 3000); return deferred.promise(); }; var shortAfterLongFunc = function(x){ console.log('short func completed with value: ' + x); return x; } // What should I do here return longFunc(x).then(shortAfterLongFunc); // must return lower case char to the caller of someFunc } somefunc() lets say processes each element of Array to lower case. However, assume this processing takes a long time and async (think setTimeout).. hence a promise to ensure synchronous operation for each element...but on using promise I find myself not able return the transformed value
tagged with: jquery-deferred
downvote count: 0
tagged with: javascript
has title: How to fetch value from Promise object after promise has been resolved

http://stackoverflow.com/comment/43472779
type: AnswerComment
comment on: http://stackoverflow.com/a/27521734
has text: If stud_address2 is blank then you want to print that in addition to stud_address1 or instead of stud_address1?
type: Comment
score: 0

http://stackoverflow.com/comment/43496286
type: Comment
type: QuestionComment
has text: can you send me the plunker?
comment on: http://stackoverflow.com/q/27532853
score: 0

http://stackoverflow.com/comment/43628060
score: 0
has text: Thanks guys. As per my comment above, there is other code I am loading in as well (not just the script) - so ideally I'm looking for a one-hit solution where I can append a ` ` tag and have it execute. Not sure why my reference `container` isn't being seen.
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27602882

http://stackoverflow.com/q/27560510
has comment: http://stackoverflow.com/comment/43547109
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43547085
has answer: http://stackoverflow.com/a/27560595
possible better answer: http://stackoverflow.com/a/27560582
has title: When a user click a link sent to his email. a record from the database is deleted
type: Question
has answer: http://stackoverflow.com/a/27560582
has body: The scenario : the user enter and order. A confirmation email is sent with a link to cancel the order. I would like to cancel the order by just clicking on the link without the user doing any other operation. is this possible?
accepted answer: http://stackoverflow.com/a/27560595
tagged with: javascript
score: 0
answer count: 2

http://stackoverflow.com/a/27511897
has body: Update: the toMethod method was experimental only and did not make it into the standard. The home object is essentially static now, the only way to manipulate super is to change the prototype: var base = {…}; // as below var obj = Object.setPrototypeOf({ foo() { // needs to use method definition syntax super.foo(); } }, base); obj.foo(); It's very similar to the bind method of function objects. However, instead of creating a new function with a bound this value, it creates a new function with a bound HomeObject, which is the reference that is used for super calls: HomeObject (Object): If the function uses super, this is the object whose GetPrototypeOf provides the object where super property lookups begin. Consider this example (not using any class syntax): var base = { foo: function() { console.log("base foo called on", this); } }; base.foo(); // base foo called on base var obj = Object.create(base); obj.foo(); // base foo called on obj obj.foo = function() { super.foo(); }; obj.foo(); // ReferenceError: this method has no home obj.bar = obj.foo.toMethod(obj); obj.bar(); // base foo called on obj obj.baz = function() { super(); }; obj.baz(); // ReferenceError: this constructor has no parent class Reflect.setPrototypeOf(obj.baz, base.foo); obj.baz(); // base foo called on obj
upvote count: 14
answers question: http://stackoverflow.com/q/27511704
has comment: http://stackoverflow.com/comment/43457249
has comment: http://stackoverflow.com/comment/69710817
score: 14
has comment: http://stackoverflow.com/comment/61891875
has comment: http://stackoverflow.com/comment/43457298
has comment: http://stackoverflow.com/comment/100619417
has comment: http://stackoverflow.com/comment/43457460
has comment: http://stackoverflow.com/comment/43454102
has comment: http://stackoverflow.com/comment/64553417
has comment: http://stackoverflow.com/comment/43455611
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/69711078
downvote count: 0
has comment: http://stackoverflow.com/comment/64569061
type: Answer
has comment: http://stackoverflow.com/comment/43457624
has comment: http://stackoverflow.com/comment/61903229
accepted answer of: http://stackoverflow.com/q/27511704

http://stackoverflow.com/a/27523004
score: 1
has body: Not too clear on the structure of your code but you may need to invoke the javascript again. Place your above JavaScript in a function and then in your C# after postback call it. ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "Init", " MyFunction();", true);'
downvote count: 0
answers question: http://stackoverflow.com/q/27522326
type: Answer
upvote count: 1

http://stackoverflow.com/comment/43572822
type: QuestionComment
has text: Simply, try to change your highlighting mechanism. How?! Simply, instead of `` for highlighting make it `` with any custom highlighting effects that you want, finally, `getElementsByClassName()` or `$(".someClass")` of jquery selector to remove the highlighting or the highlighted text.
comment on: http://stackoverflow.com/q/27573064
score: 0
type: Comment

http://stackoverflow.com/q/27517321
has title: Execute PHP inside SCRIPT TAG
has body: I have a listbox that displays a couple of internships under following format id - name : 1 - Computer Science So far, I have create the function addRow in order to update my fields from form. If I do alert($montext) I can display "1 - Computer Science", but I am looking only for the value "1". I tried : alert(&lt;?php substr($montext,0,2)?&gt;); But seems that php inside "script" isn't being executed. Because following code changes the value in the field: document.getElementById('ti').value=$montext; Because I'd like also to execute php code inside the script TAG. I'm running under Apache. If you could help me out. Thanks Find hereby the used code. &lt;html&gt; &lt;head&gt; &lt;script&gt; function addRow(title,text,description,id) { $montext=$( "#idStage option:selected" ).text(); alert($montext); document.getElementById('ti').value=$montext; /*document.getElementById('te').value=text; document.getElementById('de').value=description; document.getElementById('id').value=id;*/ } function setText(title,text,description,id){ document.getElementById('title').value=title; document.getElementById('text').value=text; document.getElementById('description').value=description; document.getElementById('id').value=id; } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;?php include('../admin/connect_db.php'); ?&gt; &lt;table cellpadding="0" cellspacing="0"&gt; &lt;tr&gt; &lt;td&gt; &lt;label class="notBold"&gt;Choose the internship you want to update: &lt;/label&gt; &lt;select name="idStage" id="idStage" onChange="addRow()"&gt; &lt;?php $stmt = $db-&gt;stmt_init(); if($stmt-&gt;prepare('SELECT id, title,text,description FROM offre ORDER by published_date ASC')) { $stmt-&gt;bind_result($id,$title,$text,$description); $stmt-&gt;execute(); while($stmt-&gt;fetch()){ ?&gt; &lt;option id="nostage" value="&lt;?php echo$id;?&gt;" onclick="setText('&lt;?php echo $title ?&gt;',' &lt;?php echo $text ?&gt; ',' &lt;?php echo $description ?&gt;',' &lt;?php echo $id?&gt;');"&gt;&lt;?php echo $id…
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/27517409
has comment: http://stackoverflow.com/comment/43464640
tagged with: javascript
has answer: http://stackoverflow.com/a/27517371
score: 0
accepted answer: http://stackoverflow.com/a/27517371
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27517409

http://stackoverflow.com/q/27525389
has comment: http://stackoverflow.com/comment/43479333
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27525430
accepted answer: http://stackoverflow.com/a/27525430
has title: Java script jquery ajax request returning _pronto_ data
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has body: I am doing a get request using jquery ajax I am getting data as below How to get only address I dont need the _pronto data $.ajax({ url: url, type: 'GET', contentType: "application/json; charset=utf-8", success:function(data){ var address= getNormalizedAddress(data) ; localCache.set(url,address) ; onSuccess(address); }, error: wrapErrorHandler(onError, " : Url = " + url + " : Stack = " + new Error().stack), dataType: 'json', cache: false, timeout:defaultTimeoutInMS, xhrFields: { withCredentials: true }, headers: {'Authorization': "53635656"} response data: address: Array[151] __proto__: Object
answer count: 1

http://stackoverflow.com/q/27597208
has answer: http://stackoverflow.com/a/27597296
tagged with: laravel
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27597323
has body: So I am trying to make a basic commenting system on a blog with posts and what not but I recently came upon a new issue. I made a button that toggles shows the comments div. But the fist button opens all of the comment divs for all of the posts. I want it to be so that the comment button opens its comment div on each post respectively. This may be hard to follow so I made a jsfiddle for it: http://jsfiddle.net/bu7z3e46/1/ I just need the comment button on one post to open the comment div on the same post. Here is the basic jsfiddle code: Html: Post content here Comments Test Post content here Comments Test1 And here is the js: $(document).ready(function() { var par = $('div.comments'); $(par).hide(); $('#comm').click(function(e) { $(par).slideToggle('slow'); e.preventDefault(); }); }); Thanks for the help
type: Question
tagged with: laravel-4
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27597323
has title: Laravel foreach loop with jquery slidetoggle
score: 0
answer count: 2
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/27597296

http://stackoverflow.com/a/27494137
has body: UPDATED: Datalist is now supported, as Safari 12.1 (2019) Datalist elements are not supported in Safari. http://caniuse.com/#feat=datalist
type: Answer
downvote count: 2
has comment: http://stackoverflow.com/comment/43420441
upvote count: 24
accepted answer of: http://stackoverflow.com/q/27494084
has comment: http://stackoverflow.com/comment/43419970
score: 22
has comment: http://stackoverflow.com/comment/139582529
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43420220
has comment: http://stackoverflow.com/comment/43420149
answers question: http://stackoverflow.com/q/27494084
has comment: http://stackoverflow.com/comment/43420318

http://stackoverflow.com/comment/43540119
type: Comment
has text: @Nathan according to the first link I provided, it is not supported by Safari, but the others it should work.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27556562

http://stackoverflow.com/comment/43732692
has text: If you check the part where they do " bu = function() {" you can see that it indeed does use `XMLHttpRequest`s
comment on: http://stackoverflow.com/q/27630672
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/27601506
answers question: http://stackoverflow.com/q/27601445
has body: There is nothing specific to ready here. This is all about how this works. jQuery(obj.init) passes the value of obj.init, so when the function gets called it doesn't get called in the context of obj so this is different. Use bind if you want to create a wrapper function that provides a specific context. jQuery(obj.init.bind(obj));
type: Answer
upvote count: 3
score: 3
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27601445

http://stackoverflow.com/a/27501171
has comment: http://stackoverflow.com/comment/43433194
has comment: http://stackoverflow.com/comment/43433113
has comment: http://stackoverflow.com/comment/43433324
accepted answer of: http://stackoverflow.com/q/27500761
answers question: http://stackoverflow.com/q/27500761
type: AcceptedAnswer
score: 0
has body: Rather than disabling the items on clicking All you can select all the values .The code is here : $("#e1").select2(); $("#e1").on("change", function(e) { var selected = e.val; if ($.inArray("all", selected) !== -1) { var id = "e1" var element = $("#" + id); var selected = []; element.find("option").each(function(i, e) { if($(e).attr("value")=="all") selected[selected.length] = $(e).attr("value"); }); element.select2("val", selected); } }); and the Jsfiddle link is http://jsfiddle.net/jEADR/734/ . hope it helps ... courtesy: @MarcusAsplund
has comment: http://stackoverflow.com/comment/43435634
has comment: http://stackoverflow.com/comment/43433461
type: Answer

http://stackoverflow.com/comment/43620502
comment on: http://stackoverflow.com/q/27577299
score: 0
type: Comment
type: QuestionComment
has text: @jasper i am not telling to remove it, change `var pg_title` to `pg_title`.

http://stackoverflow.com/comment/43649737
type: Comment
type: QuestionComment
has text: can you make a fiddle?
score: 1
comment on: http://stackoverflow.com/q/27613848

http://stackoverflow.com/comment/43484998
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27527839
score: 0
has text: That's perfect - can't believe I didn't spot that obvious mistake, been working on the code for too long! - Thanks martinczerwi !

http://stackoverflow.com/comment/43513255
type: Comment
has text: Thanks, that helps, but they still seem to go in circles and weird directions sometimes. (i have updated the code on the site)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27533715

http://stackoverflow.com/q/27512629
has answer: http://stackoverflow.com/a/27513693
has title: acrobat form field validation regular expressions
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/43456705
score: 0
has comment: http://stackoverflow.com/comment/43457290
has comment: http://stackoverflow.com/comment/43455718
tagged with: regex
accepted answer: http://stackoverflow.com/a/27513693
tagged with: acrobat
has comment: http://stackoverflow.com/comment/43456040
has body: Working in Acrobat X and trying to validate a field using a Regular Expression. My problem is that when I use the following in my JavaScript code: var myRegExp = /dog/; var myTextInput = event.value; event.rc = true; if (myTextInput != myRegExp) { app.alert("It's a regex why do I need to input '/dog/'! and not just dog"); } entered within the Variable tab of the Text Field Properties dialogue box - it does not see it as a Regular Expression. That is to say; if I type 'dog' (ignore quote marks) into the live pdf field it gives an error, but if I input '/dog/' (ignore quote marks) into the field it works fine. My Question: why is my var not being recognized as a Regular Expression. I had read that the open '/' and close '/' (ignore quote marks) defined a Regular Expression but this does not appear to be case. What am I missing here?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43455914
type: Question

http://stackoverflow.com/comment/43691701
comment on: http://stackoverflow.com/q/27636298
type: Comment
type: QuestionComment
has text: http://stackoverflow.com/tour
score: 3

http://stackoverflow.com/a/27505831
has comment: http://stackoverflow.com/comment/43617832
answers question: http://stackoverflow.com/q/27505256
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27505256
has comment: http://stackoverflow.com/comment/43508189
has comment: http://stackoverflow.com/comment/43441766
has body: I ran your code in my own CloudCode instance, and it executes just fine. Could you post your entire main.js file please? There may be a formatting issue or some such.
type: Answer
has comment: http://stackoverflow.com/comment/43586660
has comment: http://stackoverflow.com/comment/43446202
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43513682

http://stackoverflow.com/a/27587189
has body: Your code $('input[name="radioGrpSbjOption"]') find all radios and returns first one value that is 0. so change you code to this: $('input[name="radioGrpSbjOption"]').bind('change', function (){ alert ($('input[name="radioGrpSbjOption"]:checked').val()); }); it uses :checked selector to find the selected inputs with name="radioGrpSbjOption" jsFiddle Demo
downvote count: 0
answers question: http://stackoverflow.com/q/27587158
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/a/27581288
score: 36
upvote count: 36
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43587463
accepted answer of: http://stackoverflow.com/q/27581260
type: Answer
has comment: http://stackoverflow.com/comment/43586946
has comment: http://stackoverflow.com/comment/43587041
answers question: http://stackoverflow.com/q/27581260
has body: You can use prop() from angular jqlite. to select an element you can use querySelector() that returns first matching element or querySelectorAll() that return all matching element angular.element(document.querySelector('yourelement')).prop('offsetLeft'); or if your "this" is valid dom element angular.element(this).prop('offsetLeft'); Example for div you can reference the DOM object with $event in html and pass it to the function on controller in controller $scope.myfunction = function($event){ console.log(angular.element($event.target).prop('offsetLeft')); } Demo app = angular.module('test',[]); app.controller('testctrl',function($scope){ $scope.myfunction = function($event){ console.log($event); off =angular.element($event.target).prop('offsetLeft'); angular.element($event.target).text(off) } }); .divvy{position:absolute; left:60px; width:100px; background:red; } Click to see position
has comment: http://stackoverflow.com/comment/43587077
has comment: http://stackoverflow.com/comment/43587192
has comment: http://stackoverflow.com/comment/43586961

http://stackoverflow.com/comment/43686120
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27632977
has text: It is triggered by the submit button in the form

http://stackoverflow.com/q/27492186
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27492839
has body: Bit of a weird problem here - so I will try to explain this as clearly as possible. I have a simple ng-repeat that will show content based on what has a key value of .active set to true. I let the user scroll through the content with some arrow buttons bound to some ng-clicks. This works great, however I want to exclude one item from the array if it has the key value of side = 'help' attached to it. So basically I want the arrow clicks to skip over it in a sense. I have no control unfortunately where in the array the help item is. So here are the click functions //flip right $scope.flipRight = function(index, parent){ var idx = index + 1; if (idx &gt;= $scope.contentHere[parent].sides.length) { idx = 0; } $scope.contentHere[parent].sides[index].active = false; $scope.contentHere[parent].sides[idx].active = true; }; //flip left $scope.flipLeft = function(index, parent){ var idx = index - 1; if (idx &lt; 0) { idx = $scope.contentHere[parent].sides.length - 1; } $scope.contentHere[parent].sides[index].active = false; $scope.contentHere[parent].sides[idx].active = true; }; So basically what I am trying to figuire out is how to have this logic skip over the item if it has .side = 'help'. I thought about using lodash to _filter the array by items that do not have the value, but it will offset the index so that will not work. I am not sure how to approach this (maybe I am thinking about this incorrectly?), and could use some direction. Thank you for taking the time to read!
answer count: 1
has answer: http://stackoverflow.com/a/27492839
favorite count: 0
tagged with: angularjs
score: 6
type: AnsweredQuestion
downvote count: 0
type: Question
has title: angular, skipping over a value if it has a certain key/value
upvote count: 6

http://stackoverflow.com/q/27557734
type: Question
tagged with: algorithm
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/43541762
has answer: http://stackoverflow.com/a/27560498
has comment: http://stackoverflow.com/comment/43546393
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43541744
answer count: 1
type: UnansweredQuestion
has title: How to find the amount of each review based on the average and total number of reviews
has comment: http://stackoverflow.com/comment/43541723
has body: So I have this problem that I need to work out for work, but I can't figure out a good algorithm. I am given the average for the reviews and the number of total reviews. From those two pieces of information, I need to randomly generate how many 5 star, 4 star, 3 star, 2 star, and 1 star reviews were made. Here are two formulas that might better explain what exactly the problem is. Given Review Average (x) Given Total Number of Reviews (y) Find: a = # of 5 star reviews b = # of 4 star reviews c = # of 3 star reviews d = # of 2 star reviews e = # of 1 star reviews a + b + c + d + e = total # of reviews (KNOWN: y) (5*a + 4*b + 3*c + 2*d + 1*e) = total number of stars = average(x) * total reviews(y) This is more of a type of math problem than programming, but I need to be able to write some type of algorithm to get a,b,c,d, and e programatically in JavaScript. Does anyone know of any good algorithms for something like this? Thanks!
has comment: http://stackoverflow.com/comment/43541849

http://stackoverflow.com/a/41282124
score: -4
upvote count: 1
downvote count: 5
has body: Instead of sending the data as multipart/form-data: ajax.setRequestHeader("Content-Type", "multipart/form-data"); You should send it as application/json: ajax.setRequestHeader("Content-Type", "application/json");
has comment: http://stackoverflow.com/comment/138472318
type: Answer
has comment: http://stackoverflow.com/comment/75606170
answers question: http://stackoverflow.com/q/27635738

http://stackoverflow.com/q/27606994
has comment: http://stackoverflow.com/comment/43636356
accepted answer: http://stackoverflow.com/a/27613241
tagged with: angularjs
has title: AngularJs Routing not working anymore. Address bar changes but view does not
has comment: http://stackoverflow.com/comment/43637908
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43636420
type: Question
has answer: http://stackoverflow.com/a/27613241
tagged with: javascript
score: 0
answer count: 1
has body: http://plnkr.co/edit/iNG2DY3Wams48GxpI2KK?p=preview I'm having an issue with routing. It was working perfectly fine before. I haven't changed anything in the script.js file. Now it refuses to go a different page. I have the partials(.html files) stored in partials/about.html etc When I click on any links in the nav bar or the footer...the view doesn't change...it's stuck on the main page however the address bar has changed. Thanks. html ng-app="financeApp"> Home About Contact and this script.js file var financeApp = angular.module('financeApp', ['ngRoute']); // configure our routes financeApp.config(function($routeProvider) { $routeProvider // route for the home page .when('/', { templateUrl : 'partials/main.html', controller : 'mainController' }) // route for the about page .when('/about', { templateUrl : 'partials/about.html', controller : 'aboutController' }) // route for the contact page .when('/contact', { templateUrl : 'partials/contact.html', controller : 'contactController' }) .otherwise({ redirectTo: '/' }) });
tagged with: jquery

http://stackoverflow.com/comment/43492395
has text: Right, but regardless of CSS and jQuery -- just looking at the HTML -- the `label` and the `br` have nothing to do with this. They're nearby, but they don't contain anything.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27531695
score: 0

http://stackoverflow.com/comment/43518934
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/27544397
has text: I am not that mathematical expert to know what you mean without seeing an example, but try check this link: search for "VizFrame" https://sapui5.netweaver.ondemand.com/sdk/explored.html - there you get several latest highend examples what is possible with charts.

http://stackoverflow.com/a/27549041
score: 7
has body: see this fiddle, here I have created a custom directive which binds the event to the element, angular.module('HelloApp', []) .directive('customDir', function () { return { restrict: 'A', link: function(scope, element, attrs) { element.bind("click",function() { alert("you clicked me"); }) } } }) In your case you can simply bind your defined event to the element
upvote count: 7
accepted answer of: http://stackoverflow.com/q/27547156
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27547156
has comment: http://stackoverflow.com/comment/43581760
has comment: http://stackoverflow.com/comment/43581245
type: Answer

http://stackoverflow.com/q/27570065
tagged with: performance
has title: fill and submit a reactjs form with a script
score: 1
has comment: http://stackoverflow.com/comment/43567414
has answer: http://stackoverflow.com/a/27588325
type: Question
tagged with: reactjs
answer count: 1
downvote count: 0
tagged with: javascript
has body: I'm tryng to compare some differents frameworks (angularjs, flux+reactjs and emberjs) doing a minimal todo list application. You can find my code here: https://github.com/jurgob/todo_test (in the flux directory you can find the implementation) I would like to programmatically fill and send the form to add an item to my todo list. this code works for angular and emberjs: $('.addItemText').val('test'); $('.addItemText').change(); $('.addItemBtn').click(); but not for reactjs. I've also tried with sendkeys jquery plugin (https://github.com/dwachss/bililiteRange/blob/master/jquery.sendkeys.js) without any success. here is my flux implementation: https://github.com/jurgob/todo_test/blob/master/flux/main.js as additional note: I've build a casperjs script to performe them from an headlerss browser, and using casper.sendKeys function it works for all the framework (you can find the code here https://github.com/jurgob/todo_test/blob/master/tests/maintest.js )
favorite count: 0
type: UnansweredQuestion
upvote count: 1

http://stackoverflow.com/comment/43593286
comment on: http://stackoverflow.com/q/27584358
type: Comment
has text: David Thomas: edited post. Without code tag the replace() params were wrong...
score: 0
type: QuestionComment

http://stackoverflow.com/comment/43408506
type: Comment
has text: @user2573699 Are you sure you're hitting the right URL? Are you sure you're sending the right parameters? Are you sure each element you're getting the `val` from is targeting the right element and giving you a value other than `undefined`?
type: QuestionComment
comment on: http://stackoverflow.com/q/27488181
score: 0

http://stackoverflow.com/q/27531193
type: Question
tagged with: internet-explorer
has body: I have a web app that has a requirement for IE9. What is the equivalent browser versions for other browsers (Firefox, Chrome, Opera, etc) ? I know how to check the user's current browser/version and if it is not supported I need to see if I can proving links for user to download latest browser. the client code is in AngularJS additional info: I have many users still use IE8, some users would like for the website to pop up a message that their browser is unsupported and will not function properly with features of the site. Also they would like to get some kind of notification on what other equivalent browser versions would work for them.
tagged with: javascript
has title: minimum IE9 browser requirement and other equivalent browser versions
has answer: http://stackoverflow.com/a/27531586
score: 0
tagged with: firefox
answer count: 1
has comment: http://stackoverflow.com/comment/43491255
tagged with: angularjs
type: UnansweredQuestion
tagged with: google-chrome

http://stackoverflow.com/a/27552277
downvote count: 1
has comment: http://stackoverflow.com/comment/43639340
has comment: http://stackoverflow.com/comment/43569865
upvote count: 4
score: 3
answers question: http://stackoverflow.com/q/27552242
type: Answer
has comment: http://stackoverflow.com/comment/43630020
has comment: http://stackoverflow.com/comment/43586168
has body: Yes. You can literally do: document.referrer = "http://foobar.com"; If you only want to allow your site to be iframed on trusted sites, you use the X-Frame-Options HTTP response header. MDN Developer article for X-Frame-Options Edit: If you need to make this work on browsers that don't fully support X-Frame-Options then you need something more complicated, whereby the 'outer' site communicates with the server hosting the iframed site to request a single-use token tied to the clients IP address, and use that to approve/deny access.
has comment: http://stackoverflow.com/comment/43568621

http://stackoverflow.com/a/27508623
score: 1
has comment: http://stackoverflow.com/comment/43448969
downvote count: 0
answers question: http://stackoverflow.com/q/27508260
has comment: http://stackoverflow.com/comment/48460963
upvote count: 1
has body: I too have experienced this problem. My solution was to use the angular-ui bootstrap library which contains a native AngularJS date picker. Demo: http://angular-ui.github.io/bootstrap/#/datepicker Alternatively you could use AngularStrap which also has an angular native date/time picker. Demo: http://mgcrea.github.io/angular-strap/##datepickers
type: Answer

http://stackoverflow.com/comment/43437352
type: AnswerComment
score: 0
type: Comment
has text: @Srinivas - Your question is still not clear to me. Please tell me exactly what part you want to show / hide.
comment on: http://stackoverflow.com/a/27498615

http://stackoverflow.com/q/27580017
accepted answer: http://stackoverflow.com/a/27580346
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43584710
has comment: http://stackoverflow.com/comment/43584575
type: Question
has answer: http://stackoverflow.com/a/27580346
has comment: http://stackoverflow.com/comment/43584766
tagged with: javascript
score: 0
answer count: 3
has body: try to show items in ng-repeat, only if value of some key not empty. This is code: &lt;a class="item" href="#" ng-repeat="e in events | orderBy:'match_time'" ng-if="e.match_timer !== NaN &amp;&amp; e.match_status !== 'FT'"&gt; e.match_timer looks like: { match_timer: "" }
possible better answer: http://stackoverflow.com/a/27580095
has answer: http://stackoverflow.com/a/27580119
has answer: http://stackoverflow.com/a/27580095
tagged with: angularjs
has title: ng-if JSON value not empty

sequelize.js
type: Tag
tag name: sequelize.js
tags question: http://stackoverflow.com/q/27600450

http://stackoverflow.com/comment/43558083
has text: Its been a long day :)
type: AnswerComment
comment on: http://stackoverflow.com/a/27566565
type: Comment
score: 1

http://stackoverflow.com/q/27631883
has comment: http://stackoverflow.com/comment/43708354
has comment: http://stackoverflow.com/comment/43707114
has title: Post upload clipboard paste for Markdown syntax, for uploaded files - in Fine Uploader
has body: I just found Fine Uploader today, after having searched for a javascript uploader that will also support posting the file to Amazon S3. I read the documents as much as I could and searched this site, but I don't think there's anything about this specifically. As a user of wikis and Markdown (it's ubiquitous, here, on github, in our internal ERP database and so on), I'd like to be able to easy copy-paste a "syntax complete" string, after a file is uploaded, because that would really make documentation creation easier. The workflow I envision - make screenshots locally drag the screenshots or other files to the Fine Uploader upload area on a page files in the session are uploaded and presented in the result list with a button at its top, allowing the user to copy the markdown syntax for the one or more files, to the clipboard. Then I can paste the result into whatever textarea I want. Something like: ![This is image 1](http://mys3_url.tdl/path/to/this_is_image_1.png) ![This is image 2](http://mys3_url.tdl/path/to/this_is_image_2.png) [Link to a PDF](http://mys3_url.tdl/path/to/this_is_my_pdf_1.pdf)) For bonus points, I'd like to add an icon to represent the non-image file type, to its left. Something like: ![](http://url.tdl/path/to/icon.png)[Link to a PDF](http://mys3_url.tdl/path/to/this_is_my_pdf_1.pdf)) I imagine there's a way to do this, with a cursory look at the Events and API methods. But would you be so kind as to point me at events or API methods of interest? Please advise. If this is the wrong place for this and if it needs to be posted at your github, I will do so. Let me know, please. Thank you for your assistance in advance. Kind regards Rick
tagged with: php
has comment: http://stackoverflow.com/comment/43718350
has comment: http://stackoverflow.com/comment/43708199
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43711948
has comment: http://stackoverflow.com/comment/43708232
type: Question
accepted answer: http://stackoverflow.com/a/27652540
tagged with: amazon-s3
tagged with: fine-uploader
score: 0
has comment: http://stackoverflow.com/comment/43709040
has answer: http://stackoverflow.com/a/27652540
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/43708938

http://stackoverflow.com/comment/43687369
comment on: http://stackoverflow.com/q/27633885
score: 3
type: Comment
type: QuestionComment
has text: this is such a simple web search `javascript page load`. Please show some efort before posting rudimantary questions here

http://stackoverflow.com/comment/43390683
type: Comment
comment on: http://stackoverflow.com/q/27478481
type: QuestionComment
has text: `$('.btnClose').on('click', function(e) { e.preventDefault(); $(this).closest('.popup').hide(); });`
score: 0

http://stackoverflow.com/a/27510726
downvote count: 0
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/43451773
type: AcceptedAnswer
has body: for (var i=0; i&lt;animals.length; i++) { for (var j = 0; j&lt;i; j++) { if (animals[i] !== animals[j]) { // adds connection between animals[i] and animals[j] } } } This way, each element of the array is only compared against those before it in the array. I think this is much closer to what you want.
type: Answer
accepted answer of: http://stackoverflow.com/q/27510029
answers question: http://stackoverflow.com/q/27510029

http://stackoverflow.com/comment/43485262
has text: Alerts are very bad for UI anyway since they are disruptive. Use a modal dialog instead.
score: 1
comment on: http://stackoverflow.com/q/27528216
type: QuestionComment
type: Comment

http://stackoverflow.com/a/27618853
downvote count: 0
has comment: http://stackoverflow.com/comment/43682503
answers question: http://stackoverflow.com/q/27617608
has body: Another approach will be done by this Whenever user enter quantity / unit on change event will calculate and set amount value. Later call fnAlltotal() function which update the result textbox with totalAmount $(".qty").on('input', function () { var self = $(this); var unitVal = self.next().val(); self.next().next().val(unitVal * self.val()); fnAlltotal(); }); $(".unit").on('input', function () { var self = $(this); var qtyVal = self.prev().val(); self.next().val(qtyVal * self.val()); fnAlltotal(); }); function fnAlltotal() { var total = 0 $(".amount").each(function () { total += parseFloat($(this).val() || 0); }); $(".result").val(total); } WORKING DEMO
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/a/27539773
accepted answer of: http://stackoverflow.com/q/27539752
type: Answer
has comment: http://stackoverflow.com/comment/43507203
has comment: http://stackoverflow.com/comment/43507378
has comment: http://stackoverflow.com/comment/43509430
has comment: http://stackoverflow.com/comment/43507227
score: 4
answers question: http://stackoverflow.com/q/27539752
upvote count: 4
has body: $("#id").css("display", "none"); $("#id").css("display", "block"); if Your pfno contains your ID then this should work $(pfno).css("display", "none"); $(pfno).css("display", "block"); You Should Use FireBug For Debugging EDIT: &lt;script type="text/javascript"&gt; function fun(obj) { if ($("#&lt;%= rbtnIsPFEnabled.ClientID %&gt; input:checked").val()=='Yes') { $("#&lt;%= txtPFNo.ClientID %&gt;").css("display", "block"); } else { $("#&lt;%= txtPFNo.ClientID %&gt;").css("display", "none"); } } &lt;/script&gt; &lt;asp:RadioButtonList ID="rbtnIsPFEnabled" runat="server" &gt; &lt;asp:ListItem Text="Yes" Value="Yes" onchange="fun(this);"&gt; &lt;/asp:ListItem&gt; &lt;asp:ListItem Text="No" Value="No" onchange="fun(this);"&gt; &lt;/asp:ListItem&gt; &lt;/asp:RadioButtonList&gt; &lt;asp:TextBox runat="server" ID="txtPFNo"/&gt;
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43507250

http://stackoverflow.com/comment/43471758
type: QuestionComment
has text: I think what you're looking for is a template engine running in JavaScript. E.g. Angular has built in templating. There are several more light weight engines available.
comment on: http://stackoverflow.com/q/27521144
score: 0
type: Comment

http://stackoverflow.com/q/27532853
has title: ng-model is not updating the first time
has body: I have a checkbox which bind with a ng-model: &lt;input type="checkbox" ng-change="toggleAll(globalChecked)" ng-model="globalChecked"&gt; Whereas toggleAll will grab the globalChecked value and process other logic in my controller: $scope.toggleAll = function(val) { if ($scope.objects == undefined) { return } for (var i = 0; i &lt; $scope.objects.length; ++i) { $scope.objects[i].checked = val; } } However, for the firs time, when I click the checkbox, toggleAll get called but the val (or globalChecked value) is still false. Just wonder did I miss anything here?
tagged with: angularjs
type: Question
has comment: http://stackoverflow.com/comment/43494323
answer count: 1
score: 0
has answer: http://stackoverflow.com/a/27534074
has comment: http://stackoverflow.com/comment/43496277
tagged with: javascript
has comment: http://stackoverflow.com/comment/43496286
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43494307

http://stackoverflow.com/a/27580083
upvote count: 1
has comment: http://stackoverflow.com/comment/43585126
answers question: http://stackoverflow.com/q/27579974
has comment: http://stackoverflow.com/comment/43585098
downvote count: 0
has comment: http://stackoverflow.com/comment/43584787
type: Answer
has body: Make it simple - do not return XML in web service, return List of event objects. public class CEvent { public int id {get;set;} public string title {get;set;} public DateTime start {get;set;} } [WebMethod] public List&lt;CEvent&gt; GetData() { return new List&lt;CEvent&gt;{...}; } $(document).ready(function () { var response; $.ajax({ type: 'POST', dataType: 'json', contentType: 'application/json', url: 'ProjectedYieldCalender.aspx/GetData', data: '{}', success: function (data) { var eventList = data; // OR var eventList = data.d initCalendar(eventList); } }); function initCalendar(eventList){ $('#calendar').fullCalendar({ defaultDate: '2014-11-12', editable: true, eventLimit: true, // allow "more" link when too many events events: eventList }); }
score: 1

http://stackoverflow.com/a/27594602
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43613004
upvote count: 3
type: Answer
has comment: http://stackoverflow.com/comment/43613119
has comment: http://stackoverflow.com/comment/43612915
accepted answer of: http://stackoverflow.com/q/27594489
downvote count: 0
answers question: http://stackoverflow.com/q/27594489
has body: You can do this in following way: $(document).ready(function () { $('a.extlink-modal-trigger[href^=http]').click(function (e) { e.preventDefault(); alert('You are leaving this website., Warning'); $("#link").html(this.href); //do whatever you want with link }); }); Click here to leave site. Click here to leave site. Working fiddle with bootstrap modal
score: 3

adobe-brackets
tags question: http://stackoverflow.com/q/27584301
type: Tag
tag name: adobe-brackets

http://stackoverflow.com/q/27563402
has answer: http://stackoverflow.com/a/27605330
accepted answer: http://stackoverflow.com/a/27605330
answer count: 3
upvote count: 7
tagged with: couchdb
favorite count: 0
has answer: http://stackoverflow.com/a/27563534
has title: Work with JSON schema in CouchDB
has answer: http://stackoverflow.com/a/39373358
type: AnsweredQuestion
downvote count: 0
tagged with: schema
score: 7
tagged with: http://stackoverflow.com/tag/json
type: Question
tagged with: javascript
possible better answer: http://stackoverflow.com/a/39373358
has body: I would ask about good practicies about JSON schematics in CouchDB. I use pure CouchDB 1.6.1 at this moment. I handle it without any couchapp framework ( I know this is usefull, but I am concerned about it will be functional in future ). Where put schema in CouchDB ? As regular document? Design document ? Or maybe store them as file ? But if I would validate them, especially server-side in validate_doc_update function, they should be stored in design documents. Is there any library (JavaScript will be best) with works in CouchDB and Client (Web browser) ? Library with I could generate JSONs and validate them automatically ? I think about how to send data to client, store them in input tags, and then collect somehow and send to serwer. Maybe set input id as path to field, in example: { "Adress" :{ "Street" : "xxx", "Nr" : "33" } } In that case input could have id = "Adress."Street", but I do not know is this good solution. I should send schema from server and build JSON object using this schema, but no idea how (in case that all fields in JSON had unique names - including hierarchies).

http://stackoverflow.com/comment/43406934
comment on: http://stackoverflow.com/a/27487061
score: 0
type: AnswerComment
has text: Yes, in fiddle everything is correct. But you don't need to create own lettering function. I took it from lettering.js
type: Comment

http://stackoverflow.com/a/27552706
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/27550319
score: 1
downvote count: 0
has body: xmlhttp.responseXML.documentElement is the problem of your troubles. Just use xmlhttp.responseXML.getElementsByTagName and you should be fine.

http://stackoverflow.com/comment/43602981
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27589450
has text: what happens is that when you are calling send() function, you are basically assigning value of nop to 6 every time.
type: Comment

http://stackoverflow.com/comment/43774114
comment on: http://stackoverflow.com/a/27595810
type: AnswerComment
type: Comment
score: 0
has text: but both frames are apart of my initial GET request?

http://stackoverflow.com/comment/43649947
comment on: http://stackoverflow.com/q/27613240
type: QuestionComment
type: Comment
has text: @roippi, _only_ parsing the binary string using either the PHP `intval($str,2)` or JavaScript `parseInt(str,2)` functions is not sufficient as neither function validates the string to only contain valid characters. The string will still need to be validated as containing only `^[01]+$`. Given this requirement, parsing is probably not the most efficient method of accomplishing this task.
score: 0

http://stackoverflow.com/q/27485269
answer count: 1
downvote count: 0
has title: Changing hardcoded array to a $http callback
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
upvote count: 1
score: 1
has answer: http://stackoverflow.com/a/27485513
tagged with: global-variables
tagged with: ionic-framework
type: Question
tagged with: arrays
tagged with: javascript
has body: i am wanting to change my service from a hardcoded static array to an array returned from a $http call. i have attempted to do this below however it does not work. I can confirm the data returned from http is working and returns the correct data( i have taken the link out for the purpose of the question). i am not getting an error message and therefore cannot give any further information at this point however what i would like to know is if i am doing this in the correct way. banging my head against a wall for such a simple task at the moment.... hardcorded array: .factory('Cards', function($http){ var cardTypes = [ {id: 1, USECASE_NAME: "Frank", USECASE_IMAGE: 'img/Frank.png', USECASE_DESC:"This is frank the bank card, He helps people all over the world make millions of transactions each year!", done: true }, {id: 2, USECASE_NAME: "John Lewis", USECASE_IMAGE: 'img/JohnLewis.png', USECASE_DESC:"John Lewis is one of the biggest retailers in the United Kingdom with a very proud reputation", done: true }, {id: 3, USECASE_NAME: "Generali", USECASE_IMAGE: 'img/Generali.png', USECASE_DESC:"Generali is the largest insurance company in Italy and arguably one of the biggest in Europe", done: true }, ]; return { all: function() { return cardTypes; } } }); $http callback .factory('Cards', function($http) { var cardTypes = {}; $http.post("http://url", { "auth": "cats", "name": "Adam", "uuid": "fasfA" }). success(function(data, status, headers, config) { cardTypes = data; }). error(function(data, status, headers, config) { // called asynchronously if an error occurs // or server returns response with an error status. }); return { all: function() { return cardTypes; } } });

http://stackoverflow.com/comment/43429619
has text: @jai when i use join it put the whole array collection in each textbox
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27499247
score: 0

http://stackoverflow.com/comment/43518371
has text: Ok. This is how it should work.Go to http://jsfiddle.net/marbug/79dz6ajz/ Click at the username input (focus is set). Then click at the browser's URL field (where http://jsfiddle.net/marbug/79dz6ajz/ is present). Focus is at browser's URL field - username field has lost focus now. Press Ctrl. Keydown event should not be fired for username field because focus is not at the username field now.
comment on: http://stackoverflow.com/q/27545235
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27562059
type: Answer
score: 2
has body: Personally I'd do "[dfs[dfs],dfs],[dfs,df,sdfs]]".split("],["); then loop through it to: Append the first string with a "]". Prepend the last string with a "[". Prepend a "[" and append a "]" to all strings in between. However, if you know what kind of strings and characters you will be receiving and you reaaaaally want a one-liner approach, you could try the hack below. Replace all instances of "],[" with "]unlikely_string_or_special_unicode[", then split by "unlikely_string_or_special_unicode" - for example: "[dfs[dfs],dfs],[dfs,df,sdfs]]".replace(/\],\[/g,"]~I_have_a_dream~[").split("~I_have_a_dream~"); Warning: Not 100% full-proof. If your input string has the unlikely string you used as a delimiter, then it implodes and the universe comes to an end.
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27560773
answers question: http://stackoverflow.com/q/27560773
upvote count: 2

http://stackoverflow.com/a/27565047
answers question: http://stackoverflow.com/q/27564453
type: Answer
has body: Thanks for the feedback The issue where the click event. I inserted return false at the bottom of these methods. That's seems to work
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27564453

selectors-api
tag name: selectors-api
type: Tag
tags question: http://stackoverflow.com/q/27476513

http://stackoverflow.com/comment/43524540
type: Comment
has text: what can ia do ?? any one help me
comment on: http://stackoverflow.com/a/27548189
score: 0
type: AnswerComment

http://stackoverflow.com/q/27545169
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
tagged with: google-chrome
has answer: http://stackoverflow.com/a/27545503
type: Question
has comment: http://stackoverflow.com/comment/43516956
answer count: 2
tagged with: firefox
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/43516954
score: 0
has body: I'm facing a little issue with my javascript code. In fact it's working in Firefox but not in Chrome, do you have any idea why I'm facing this issue? Here is my code: $('a').each(function(){ if($(this).css('background-image')=='url("linktothepng.png")'){ $(this).parent().remove(); } }); Thank you for helping me, have a good day ;)
has answer: http://stackoverflow.com/a/27545364
has title: Javascript code working in Mozilla Firefox but not in Google Chrome

http://stackoverflow.com/comment/43389208
has text: are you mixing jQuery with pure js?
type: Comment
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/27477556

http://stackoverflow.com/q/27574242
has answer: http://stackoverflow.com/a/27574317
has title: Change label text on mouse over with ajax
score: -2
accepted answer: http://stackoverflow.com/a/27574293
has body: I want to change the value of a label on mouse over. This is what I have done so far: $(function () { var hoverOff = ""; $("[id*=GV] td").hover(function () { hoverOff = $("label", $(this).closest("td")).text(); $.ajax({ type: "POST", url: "MyMethode.aspx/GetNewValue?text=" + hoverOff, data: "{}", contentType: "application/json; charset=utf-8", dataType: "json", success: function (data) { $("label", $(this).closest("td")).html(data.d); } }); }, function () { $("label", $(this).closest("td")).html(hoverOff); } );}); At the beginning I save the current text in hoverOff and send that value to the method GetNewValue wich returns the new value and inside ajax success I want to apply that value to the label. The problem is that the text for label never changes, although data.d contains the new text. Should I use something else instead of .html()?
downvote count: 2
has comment: http://stackoverflow.com/comment/43574283
answer count: 3
has comment: http://stackoverflow.com/comment/43574465
type: AnsweredQuestion
upvote count: 0
has answer: http://stackoverflow.com/a/27574293
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27574268
favorite count: 0
tagged with: ajax
possible better answer: http://stackoverflow.com/a/27574317
linked to: http://stackoverflow.com/q/10701124
type: Question

http://stackoverflow.com/q/27613722
has title: Convert true|false string to boolean in Javascript
type: Question
has comment: http://stackoverflow.com/comment/43649489
has comment: http://stackoverflow.com/comment/43649738
has comment: http://stackoverflow.com/comment/43649478
has comment: http://stackoverflow.com/comment/43649499
has comment: http://stackoverflow.com/comment/43649695
tagged with: javascript
tagged with: jquery
has body: I'm trying to find the best way|path to achieve this since right now the JSON I'm parsing is small but will grow up fast and will bring a lot of headaches to me. So, I have a JSON like this: { "wzSolicitud":{ "tab1":true, "compTab1":[ "true", "false" ], "tab2":true, "tab3":true }, "wzProducto":{ "tab1":true, "tab2":true, "tab3":true, "tab4":true, "tab5":true, "tab6":true, "tab7":true } } And I'm parsing it as follow: // I use `estadosWz` because this is what the server side returns tabsActive = JSON.parse(data.estadosWz[0]); Then for some reason, unknow to me, the result are strings and not bool values so I need to do this for each one: var varToggleTipoTramiteSolObj = tabsActive.wzSolicitud.compTab1[0] === "true" ? true : false, varToggleOficinaRegionalSolObj = tabsActive.wzSolicitud.compTab1[1] === "true" ? true : false; And then use varToggleTipoTramiteSolObj instead of tabsActive.wzSolicitud.compTab1[0], can any suggest me another solution than this one? How do I parse and convert strings values to boolean ones?
has comment: http://stackoverflow.com/comment/43649558
has comment: http://stackoverflow.com/comment/43649526
score: 0
has comment: http://stackoverflow.com/comment/43649503
has comment: http://stackoverflow.com/comment/43649666
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43649541
answer count: 0
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/43649683
has comment: http://stackoverflow.com/comment/43649544

http://stackoverflow.com/comment/43405357
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27486443
has text: @MidhunMundayadan i tried as you said but my mobile don't have internet but when i print online variable it's showing true Please help me

http://stackoverflow.com/a/27522847
type: Answer
score: 3
upvote count: 3
has body: Both are correct, just a matter of taste. But usually it is preferred to use braces even though you don't pass any parameters, because these two snippets do not have the same evaluation: Incorrect one new Date.valueOf(); // to work it should be (new Date).valueOf() Correct one new Date().valueOf();
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27522776
answers question: http://stackoverflow.com/q/27522776

http://stackoverflow.com/q/27524851
tagged with: highcharts
accepted answer: http://stackoverflow.com/a/27525169
downvote count: 0
has title: How to hide a highcharts pie slice programatically
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27525169
answer count: 1
favorite count: 0
has body: I have a highcharts pie chart which allows you to remove slices by clicking on the legend. http://jsfiddle.net/f3Lx6cxk/ I want to programatically hide slices aftr the chart has been rendered. In my jsfiddle, the button calls chart.series[0].data[i].select(); which has the effect of sliding the slice out. I want a similar call to remove the slice altogether, but leave it greyed out in the legend (so point.remove is no good). The effect should be the same as clicking on the legend item.
type: AnsweredQuestion
score: 7
type: Question
upvote count: 7

http://stackoverflow.com/comment/43623047
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27599941
has text: Sorry, should've clarified.. the "current code" linked to JSFiddle: http://jsfiddle.net/7ykvawyz/

http://stackoverflow.com/comment/43516227
type: Comment
type: QuestionComment
has text: "everything will crash"? What type of error is raised?
comment on: http://stackoverflow.com/q/27544825
score: 0

http://stackoverflow.com/a/27562229
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27562172
answers question: http://stackoverflow.com/q/27562172
type: Answer
has body: You are passing it as a string data ='...'. Remove single quotes ''. data = [{"name":"France","data":[[1960,520325],[1961,548976],[1962,585604],[1963,616918],[1964,657130],[1965,688528],[1966,724428],[1967,758391],[1968,790691],[1969,845964],[1970,894468],[1971,942148],[1972,984897],[1973,1050000],[1974,1099250],[1975,1086890],[1976,1134560],[1977,1175100],[1978,1220870],[1979,1262980],[1980,1283650],[1981,1296210],[1982,1327540],[1983,1343900],[1984,1363980],[1985,1385940],[1986,1417210],[1987,1451060],[1988,1518790],[1989,1582390],[1990,1623850],[1991,1640720],[1992,1664970],[1993,1653860],[1994,1691030],[1995,1725650],[1996,1744070],[1997,1782150],[1998,1842360],[1999,1903010],[2000,1973040],[2001,2009260],[2002,2027920],[2003,2046160],[2004,2098230],[2005,2136560],[2006,2189260],[2007,2239300],[2008,2237490],[2009,2167070],[2010,2204450]]}]; See fiddle
score: 0

http://stackoverflow.com/a/27514826
type: Answer
score: 1
accepted answer of: http://stackoverflow.com/q/27514787
upvote count: 1
answers question: http://stackoverflow.com/q/27514787
has body: You have to set the src in the interval function as well. setInterval(function () { ad++; if (ad == imgs.length) ad = 0; qutAd.src = imgs[ad]; }, 4000);
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/27633398
has comment: http://stackoverflow.com/comment/43686606
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/43686575
accepted answer of: http://stackoverflow.com/q/27633225
has comment: http://stackoverflow.com/comment/43686848
answers question: http://stackoverflow.com/q/27633225
has body: I'm not going to parse through your syntax errors. Use a code linter yourself to do that. They are built into even free IDE's these days and you can even paste your code into online syntax checkers You don't set innerHTML for an input you set it's value Change document.getElementById("WgetID").innerHTML = "Link added to wget" To document.getElementById("WgetID").value = "Link added to wget"
type: AcceptedAnswer

http://stackoverflow.com/q/27637449
has comment: http://stackoverflow.com/comment/49902164
downvote count: 0
tagged with: javascript
tagged with: base64
favorite count: 0
upvote count: 8
has answer: http://stackoverflow.com/a/29748140
has comment: http://stackoverflow.com/comment/43694017
tagged with: facebook-graph-api
answer count: 4
score: 8
tagged with: angularjs
type: UnansweredQuestion
tagged with: facebook
has title: AngularJS - img ng-src to base64 data (not url) not working
has answer: http://stackoverflow.com/a/53310023
has body: I'm using openfb-angular (Facebook API library) to get me/picture. The return data is "url" contains Base64 data here is the facebook documentation. Here is my code: JS OpenFB.get('/me/picture', {format: 'json'}).success(function (imgData) { $scope.main.user.imageData = imgData; }); HTML &lt;img ng-src="data:image/jpg;base64,{{main.user.imageData}}"&gt; It's not working and I get an empty img tag. Where is my mistake?
has answer: http://stackoverflow.com/a/30264303
has comment: http://stackoverflow.com/comment/43874492
type: Question
has answer: http://stackoverflow.com/a/37340225
has comment: http://stackoverflow.com/comment/43695109

http://stackoverflow.com/q/27545895
has answer: http://stackoverflow.com/a/27546602
has title: Filtering JSON Data based on Min and Max Price
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/27545988
tagged with: http://stackoverflow.com/tag/json
score: 0
has body: I'm not sure how to filter my JSON data according to price (specified in my JSON data - price) I have two drop down lists, one for min price and the other for max price. The data from my json needs to be within the range of my two drop down lists and if it does, some data needs to be outputted in my html page from my JSON i.e ID, Price, Type, description, etc. I'm a beginner and learning. This is my JSON data { "Properties": [ { "id": "prop1", "type": "House", "bedrooms": 3, "price": 650000, "tenure": "Freehold", "description": "Attractive three bedroom semi-detached family home situated within 0.5 miles of Petts Wood station with fast trains to London and within easy walking distance of local shops, schools, bus routes and National Trust woodland. The property comprises; two receptions, fitted 18'9 x 10'1 kitchen/breakfast room and conservatory. The property also benefits from having a utility room and cloakroom. To the first floor there are three bedrooms and a family bathroom with separate WC. Additional features include double glazing, gas central heating and a well presented interior...", "location": "Petts Wood Road, Petts Wood, Orpington", "picture": "images/prop1pic1small.jpg", "url": "properties/prop1.html", "added": { "month": "January", "day": 12, "year": 2014 } }, { "id": "prop2", "type": "Flat", "bedrooms": 2, "price": 299995, "tenure": "Freehold", "description": "Presented in excellent decorative order throughout is this two double bedroom, two bathroom, garden flat. The modern fitted kitchen is open plan to the living room which boasts solid wooden floors and includes integrated appliances including a dishwasher & a washing machine. This large open plan benefits from bi folding doors onto a secluded private courtyard garden. Both bedrooms are double sized, and the family bathroom boasts a matching three piece suite a shower attachment over the bath. There is also a separate wet room. There are walnut doors throughout and wiring for Sky TV/aerial point…
answer count: 3
has answer: http://stackoverflow.com/a/27546182
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/43457599
has text: I agree with you there. It's unlikely but I want it to be clean as possible.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27513125
type: AnswerComment

http://stackoverflow.com/comment/43388146
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27477072
has text: Translations? I'm not familiar.

http://stackoverflow.com/comment/43415016
has text: How do you undo the event?
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27491730

http://stackoverflow.com/a/27600749
type: Answer
answers question: http://stackoverflow.com/q/27600507
has body: Try, protected void Button1_Click(object sender, EventArgs e) { string script = "show(showdivslowly);"; ClientScript.RegisterClientScriptBlock(this.GetType(), "Show", script, true); } use RegisterClientScriptBlock instead of RegisterStartupScript method.
score: 0

http://stackoverflow.com/comment/43439261
type: Comment
has text: I think we are having a misunderstanding. Sorry about that. My main objective is get the php value that was passed through the href then to the div. I need the value so that I could get new the values from the database and display it on the div.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27504276

http://stackoverflow.com/a/27521695
answers question: http://stackoverflow.com/q/27521271
has body: You have to distinguish, because if you are just using {{total}} in your directive template it works, because angular automatically will look for total in the parent controller if it is not found in the local one. On the other hand, if you want to use the value of total in an isolated scope, you can bind to your data-to attribute, and this is achieved by following code: app.directive('xeCounter', function(){ return { restrict: 'EA', scope: { to: '@' }, link: function(scope) { console.log(scope.to); } }; }); Btw. I changed the restrict from EAC to EA, because otherwise your directive is going to be applied twice and breaks. And you have to put the asterisks around the attribute value. See the full working example here.
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/43484449
has comment: http://stackoverflow.com/comment/43485183
score: 1
has comment: http://stackoverflow.com/comment/43485288
has comment: http://stackoverflow.com/comment/43477107
upvote count: 1
has comment: http://stackoverflow.com/comment/43487287

http://stackoverflow.com/comment/43649376
score: 8
type: QuestionComment
comment on: http://stackoverflow.com/q/27611042
has text: What was it? It might be worth adding your solution as an answer in case anyone else has this same issue
type: Comment

http://stackoverflow.com/comment/43428111
type: QuestionComment
has text: Before the ajax call add a text `loading...` to the container where you want to display the text and in success remove the text. For appending the items, try to print the `result` in console and then accordingly access the values. Eg. result.id, result.name etc
comment on: http://stackoverflow.com/q/27498495
score: 0
type: Comment

http://stackoverflow.com/a/27560918
upvote count: 3
has comment: http://stackoverflow.com/comment/43548262
has body: I think you're using plugin for select-box like 'chosen' or 'bootstrap select'. Then you've to use appropriate Plugin option to reset the select-box. You're using jquery fs.selector may be you could use $(".target").selecter("update"); http://formstone.it/components/selecter
type: Answer
answers question: http://stackoverflow.com/q/27560869
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/43547824

http://stackoverflow.com/comment/43579052
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27576701
has text: Just let this thread be. There may be other people searching for the same thing you were.
type: Comment

http://stackoverflow.com/comment/43565489
score: 0
comment on: http://stackoverflow.com/q/27570087
type: QuestionComment
type: Comment
has text: They disable JavaScript in their browser? Bot submission?

http://stackoverflow.com/q/27514339
tagged with: javascript
answer count: 3
accepted answer: http://stackoverflow.com/a/27514506
possible better answer: http://stackoverflow.com/a/27514371
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has answer: http://stackoverflow.com/a/27514506
score: -4
has title: obtain the value of the OPTION TAG html
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27514567
has answer: http://stackoverflow.com/a/27514371
has comment: http://stackoverflow.com/comment/43459903
has comment: http://stackoverflow.com/comment/43459075
type: Question
downvote count: 4
upvote count: 0
has body: im want to obtain, the value of this value i want obviusly i had done to get the real value, but i want to show that value. for example red color how ... to get "red color" and put in a variable or anyelse HTML Tag. thanks

http://stackoverflow.com/q/27574620
tagged with: html5-canvas
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43574784
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43575246
has body: I'm pretty new to Javascript, and was copying the code from a tutorial into WebStorm so I could mess around with it, but I ran into a problem with the code below. WebStorm alerted me with a message saying "overrides element in HTMLImageElement" on the 7th line (cat.onload). How can I navigate around this by not overriding the onload element? Any help would be appreciated. &lt;canvas id="e" width="177" height="113"&gt;&lt;/canvas&gt; &lt;script&gt; var canvas = document.getElementById("e"); var context = canvas.getContext("2d"); var cat = new Image(); cat.src = "images/cat.png"; cat.onload = function() { context.drawImage(cat, 0, 0); }; &lt;/script&gt;
has comment: http://stackoverflow.com/comment/43575380
has title: How to prevent method override warning in WebStorm editor
type: Question
has comment: http://stackoverflow.com/comment/43575777
tagged with: javascript
has comment: http://stackoverflow.com/comment/43575527
tagged with: webstorm
score: 0

http://stackoverflow.com/a/27606200
has body: The string value of an "onclick" attribute is taken to be simple JavaScript code. JavaScript includes provisions for labeled statements, so that code is a return statement with the label "jamoscript". In other words, this: jamoscript: return confirm("Do you really want to hurt me?"); is perfectly legal JavaScript. Labels aren't used much, so they're unfamiliar. The only context in which the "javascript:" prefix matters is when a URL is expected, as is the case with the "href" attribute of &lt;a&gt; tags.
has comment: http://stackoverflow.com/comment/43668792
accepted answer of: http://stackoverflow.com/q/27606179
answers question: http://stackoverflow.com/q/27606179
type: Answer
has comment: http://stackoverflow.com/comment/43670636
has comment: http://stackoverflow.com/comment/43706731
has comment: http://stackoverflow.com/comment/43678217
downvote count: 0
upvote count: 143
has comment: http://stackoverflow.com/comment/43634592
has comment: http://stackoverflow.com/comment/43640186
has comment: http://stackoverflow.com/comment/43635742
has comment: http://stackoverflow.com/comment/43668981
has comment: http://stackoverflow.com/comment/43634782
has comment: http://stackoverflow.com/comment/43640136
has comment: http://stackoverflow.com/comment/43634712
has comment: http://stackoverflow.com/comment/43645551
score: 143
has comment: http://stackoverflow.com/comment/43706656
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43640176

http://stackoverflow.com/q/27475465
tagged with: d3.js
has answer: http://stackoverflow.com/a/27475780
accepted answer: http://stackoverflow.com/a/27475780
tagged with: css
type: AnsweredQuestion
downvote count: 0
score: 1
has title: How do I override d3.js chart function behavior?
type: Question
tagged with: javascript
tagged with: jquery
has body: There is a popular library in d3.js that provides a bullet chart implementation. I am in the process of making a small amendment to the default behaviour of this chart. A bullet chart consists of one or more markers, parallel lines to identify targets, and I wish to programatically make one of the markers slightly shorter in length than the other. I'm pretty close to the solution and I have shared my work at Bullet Fiddle. To see my issue you have to hit the Year and Quarter buttons and notice how that the line shrinks and grows and then shrinks again. I want it to remain at the shorter length. It seems that the default behaviour of the bullet is trigged at each update which is causing it to reset the marker to it's original size. I would love some help to understand how I can override this default behaviour and keep the line at a custom size. This is a sample of the code that I use to update the marker: d3.selectAll(".bullet .marker.s1").attr("y1", 10).attr("y2", 35);
upvote count: 1
answer count: 1
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg

http://stackoverflow.com/a/27533685
upvote count: 2
type: Answer
has body: Just add this CSS: .bodycontent { height: 100% }
has comment: http://stackoverflow.com/comment/43495780
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27533621
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27533621

http://stackoverflow.com/comment/43476107
comment on: http://stackoverflow.com/a/27522649
score: 0
has text: What document.form1.email.value gives you? Please alert it
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27579125
downvote count: 0
has comment: http://stackoverflow.com/comment/43620505
type: Answer
answers question: http://stackoverflow.com/q/27578758
upvote count: 4
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43618455
accepted answer of: http://stackoverflow.com/q/27578758
score: 4
has body: Those &lt;80&gt;kb are the internal key code for backspace. Replace each with \&lt;BS&gt; (and write ^M as \&lt;CR&gt;), and put the entire macro string in double quotes, and you should be good to go. Also, to assign to register a, you need to use @a.

http://stackoverflow.com/comment/43461264
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27515089
has text: @Hristo That is an empty object being passed into the anonymous function that is immediately executed

http://stackoverflow.com/q/27634321
answer count: 1
tagged with: url
has comment: http://stackoverflow.com/comment/43688202
has body: I have this URL shown below: http://www.myServer.net/Posters/CU_Pete'sChristmas_PP.png Now this is { 'title' : 'Pete\'s Christmas', 'description' : 'A light-hearted holiday tale that even adults will enjoy. A young boy has the worst Christmas ever and soon realises that he’s doomed to repeat the same day over and over again.', 'thumbnail' : ['http://www.myServer.net/Posters/CU_Pete'sChristmas_PP.png'], 'large' : ['http://www.myServer.net/Posters/CU_Pete'sChristmas_PP.png'], 'button_list' : [ { 'title':'Demo', 'url' : 'index.php', 'new_window' : true } ], 'tags' : ['Movies'] } So the problem is that Url contains special character ('), which apparently is not allowing my java script to be proper. So the script is not executing as intended to do. This is my javaScrit array generator $javascript = array(); $count = sizeof($vodAssetArray); for ($i = 0; $i &lt; $count; $i++) { $pieces = explode("/", $vodAssetArray[$i]-&gt;genre); $javascript[] = " { 'title' : '" . addslashes($vodAssetArray[$i]-&gt;title) . "', 'description' : '" . addslashes($vodAssetArray[$i]-&gt;description) . "', 'thumbnail' : ['" . ($vodAssetArray[$i]-&gt;posterUrl) . "'], 'large' : ['" . ($vodAssetArray[$i]-&gt;posterUrl) . "'], 'button_list' : [ { 'title':'Demo', 'url' : 'index.php', 'new_window' : true } ], 'tags' : ['" . $pieces[0] . "'] }"; } I tried using urlencode, rawurlencode, json_encode, but still the images are not getting downloaded. &lt;script type="text/javascript"&gt; $(function(){ $("#demo").grid({ 'genre' : 'All', 'items' : [ &lt;?php echo implode(',', $javascript); ?&gt; ] }); }); &lt;/script&gt; Please help me on this.
tagged with: php
accepted answer: http://stackoverflow.com/a/27634370
has title: Handling URL with special characters in PHP/JavaScript
type: AnsweredQuestion
score: 0
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27634370

http://stackoverflow.com/q/27477151
has answer: http://stackoverflow.com/a/27497588
has answer: http://stackoverflow.com/a/27477455
type: UnansweredQuestion
has body: We all know that use the val() will not trigger the change event, so we also use .trigger('change') behind the val(). But the problem is that someone write the val() did't with trigger() and it's a external file that I can't edit it. So, how can I detect value change through some code same like below: $('.elem').on('change', function(){ // do something });
has answer: http://stackoverflow.com/a/42820492
downvote count: 1
has answer: http://stackoverflow.com/a/27477238
has comment: http://stackoverflow.com/comment/43392760
linked to: http://stackoverflow.com/q/1029241
score: 7
linked to: http://stackoverflow.com/q/12580761
has comment: http://stackoverflow.com/comment/43388348
type: Question
has comment: http://stackoverflow.com/comment/43388481
tagged with: javascript
has title: jQuery - Detect value change which use .val() function
tagged with: jquery
favorite count: 0
upvote count: 8
has comment: http://stackoverflow.com/comment/43390113
answer count: 5
has answer: http://stackoverflow.com/a/43101316

http://stackoverflow.com/comment/43423487
type: Comment
type: QuestionComment
has text: Basically it's a div inside the body which holds all the content that I would like to control scroll.
score: 0
comment on: http://stackoverflow.com/q/27495242

http://stackoverflow.com/comment/43579761
type: AnswerComment
has text: If a user resizes the textarea to 150px from the default manually, they can resize it back down to the minimum height. If you edit the height programmatically, the textarea's internal minheight gets changed and you can no longer resize it to below 150px. The asker wants it to be resizeable below 150px after animating the transition AFAIK.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27576811

http://stackoverflow.com/q/27576979
downvote count: 1
type: Question
type: AnsweredQuestion
tagged with: traceur
has comment: http://stackoverflow.com/comment/43579788
has body: index.html and my web component: x-item.html test and I get no error nor what I expect to be displayed, any idea if this should actually work? Is this how one would extend an HTMLElement in ECMA6 syntax? E: putting it altogether in one page solves the problem at least now I know its the right way to create a custom component, but the problem is having it in a separate file I think it has to do with how traceur handles I tried adding the type attribute to the import with no luck.
score: 1
has comment: http://stackoverflow.com/comment/43580580
tagged with: ecmascript-6
accepted answer: http://stackoverflow.com/a/27728833
has comment: http://stackoverflow.com/comment/43579848
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: web-component
has comment: http://stackoverflow.com/comment/43579209
has comment: http://stackoverflow.com/comment/43579328
upvote count: 2
has comment: http://stackoverflow.com/comment/43847540
has title: A web component with ECMA6
has answer: http://stackoverflow.com/a/27728833

http://stackoverflow.com/a/27494636
answers question: http://stackoverflow.com/q/27494395
score: 0
type: Answer
has body: Instead of using indexOf, you can search for the entry with a loop function timer(count, element) { var match; for(var i = 0, l = timers.length; i &lt; l;) { var entry = timers[i]; if(entry.element === element) { timers.splice(i, 1); } else { i++; } } var entry = { element: element, timer: setInterval(function() { count--; if (isNaN(count) || count &lt; 0) { var index = timers.indexOf(entry); if(index &gt; -1) timers.splice(index, 1); return clearInterval(entry.timer); } element.text(formatTime(count)); return true; }, 1000) }; timers.push(entry); }

http://stackoverflow.com/comment/43438771
score: 0
type: AnswerComment
has text: Yup, working.. your efforts need answer to be selected my me. thank You.
type: Comment
comment on: http://stackoverflow.com/a/27483261

http://stackoverflow.com/q/27577708
has comment: http://stackoverflow.com/comment/43580960
linked to: http://stackoverflow.com/q/12868386
answer count: 2
tagged with: google-chrome-extension
downvote count: 0
possible better answer: http://stackoverflow.com/a/27581432
has comment: http://stackoverflow.com/comment/43580945
has title: Chrome extension popup showing by condition
favorite count: 0
upvote count: 6
has answer: http://stackoverflow.com/a/27580027
has comment: http://stackoverflow.com/comment/43580531
accepted answer: http://stackoverflow.com/a/27580027
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43581027
tagged with: popup
has body: I want to show popup by click, but only if condition is false. After click to extension icon background js searchig for tab with current name. If tab found background js continues working. If not found - i want to show popup with instructions. Can`t understand how to just show popup in this case. I can set popup by browserAction.setPopup(), but popup will be displayed only after next clicks. I just want to show my popup one time. It is definitely posible, I've seen this behavior on other extension. var pcTabs; // tabs array chrome.browserAction.onClicked.addListener(buttonClick); function buttonClick() { // getting tabs... if(pcTabs.length != 0){ // working with finded tabs } else{ // tabs not found // show popup.html here. this is the question } } upd. This is my background.js. All code also in repository. How to replace alerts to popups?
has answer: http://stackoverflow.com/a/27581432
score: 6
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/43580930

http://stackoverflow.com/q/27624992
answer count: 3
tagged with: loops
has answer: http://stackoverflow.com/a/27625243
tagged with: math
tagged with: javascript
type: UnansweredQuestion
tagged with: arrays
has title: Finding MODE Iterating through FOR Loop for multiple arrays
type: Question
has body: Desired: I have multiple arrays of players, roundWinners, being iterated through in a FOR loop. For each array, I need the MODE of the array (the most frequently occurring value) assigned to a new variable winner. I am lost as to where to start, so I ask what is the most efficient way to go about accomplishing this? Example: for (i = 0; i &lt; numberOf; i++) { var roundWinners[0] = ["Joe", "Joe", "Bob", "Sue"] var winner[0] ="Joe"; var roundWinners[1] = ["Joe", "Sue", "Bob", "Sue"] var winner[1] ="Sue"; var roundWinners[2] = ["Bob", "Bob", "Bob", "Sue"] var winner[2] ="Bob"; }
has answer: http://stackoverflow.com/a/27627794
has answer: http://stackoverflow.com/a/27626713
score: 0

http://stackoverflow.com/q/27518880
tagged with: javascript
has title: Rock, paper, scissors, lizard, spock
linked to: http://stackoverflow.com/q/17760831
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43468236
has comment: http://stackoverflow.com/comment/43467631
has body: I'm new to Java script and coding. I am trying to figure out a syntax error in Rock, paper, scissors, lizard, spock which is messing up my code. When I compile the code it says "SyntaxError: Unexpected token {" and I can't figure out why and where I messed up. Thanks for the help! var userChoice = prompt("Do you choose rock, paper or scissors?"); var computerChoice = Math.random(); if (computerChoice &lt;= 0.20) { computerChoice = "rock"; } else if (computerChoice &lt;= 0.40) { computerChoice = "paper"; } else if (computerChoice &lt;= 0.60) { computerChoice = "scissors"; } else if (computerChoice &lt;= 0.80) { computerChoice = "lizard"; } else { computerChoice = "spock"; } console.log("Computer: " + computerChoice); var compare = function (choice1, choice2) { if (choice1 === choice2) { return "The result is a tie!"; } else if (choice1 === "rock") { if (choice2 === "scissors") { return "rock wins"; } else if (choice2 === "paper") { return "paper wins"; } else if (choice2 === "lizard") { return "rock wins"; } else { return "spock wins"; } } else if (choice1 === "paper") { if (choice2 === "rock") { return "paper wins"; } else if (choice2 === "scissors") { return "scissors win"; } else if (choice2 === "lizard") { return "lizard wins"; } else { return "paper wins"; } } else if (choice1 === "scissors") { if (choice2 === "rock") { return "rock wins"; } else if (choice2 === "paper") { return "scissors win"; } else if (choice2 === "lizard") { return "scissors win"; } else { return "spock wins"; } } else if (choice1 === "lizard") { if (choice2 === "rock") { return "rock wins"; } else if (choice2 === "scissors") { return "scissors win"; } else if (choice2 === "paper") { return "lizard wins"; } else { return "lizard wins"; } } else { if (choice2 === "rock") { return "spock wins"; } else if (choice2 === "paper") { return "paper wins"; } else if (choice2 === "scissors") { return "spock nigga wins"; } else { return "lizard wins"; } } }; compare(userChoice, computerChoice);
type: Question
has answer: http://stackoverflow.com/a/27518940
has comment: http://stackoverflow.com/comment/43467610
has comment: http://stackoverflow.com/comment/43467597
has comment: http://stackoverflow.com/comment/43467810
score: -1
upvote count: 2
downvote count: 3
duplicate of: http://stackoverflow.com/q/17760831
answer count: 1

http://stackoverflow.com/comment/43478197
has text: the easiest way is to use a 3rd party servide that send the notifications, such as pushwoosh, urban airship, parse, etc.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27524792

http://stackoverflow.com/comment/43651952
type: QuestionComment
has text: @torazaburo Thanks for looking. Turned out to be a weird issue see my answer to the question.
score: 0
comment on: http://stackoverflow.com/q/27614882
type: Comment

http://stackoverflow.com/a/27617434
answers question: http://stackoverflow.com/q/27617349
score: 0
has comment: http://stackoverflow.com/comment/43656094
type: Answer
has comment: http://stackoverflow.com/comment/43656048
has body: To achieve this you will have to request the server time from the javascript using AJAX. Once the response is returned you will then be able to pass it into the date object as a string. var date = new Date(dateString); Using AJAX to get the server date: First you have to build a page to display the current time. On the server build a java file to serve this in a file: {"serverTime": "currentTimeString"} Once that is being served from the file you created, use AJAX to request the file asynchronously. jQuery's $.ajax() method is a popular method of completing this; it has a promise method callback once the file has been fetched, placing the response in memory. You can then decode the JSON String in the success callback like so: function(response) { var parsed = JSON.parse(response); var currentTime = parsed.serverTime; }

http://stackoverflow.com/comment/43495252
type: Comment
comment on: http://stackoverflow.com/a/27533377
type: AnswerComment
score: 0
has text: Didn't you forget the `background` part of the attribute?

http://stackoverflow.com/a/27540802
upvote count: 0
has body: Try this way.. this may help you.. $json = "JSONSTRINGRESPONSE"; $json = json_decode($json, true); echo $json['status']; echo $json['count']; echo $json['pages']; echo $json['category']['id']; ... echo $json['category']['post_count']; and so on..
type: Answer
answers question: http://stackoverflow.com/q/27540441
downvote count: 1
score: -1

http://stackoverflow.com/comment/43688495
has text: OK, It works now, Thanks, Actually I made a little change because Laravel escape the character %
type: Comment
comment on: http://stackoverflow.com/a/27634351
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43426188
score: 0
has text: actually I want to show the one that matches the random number. I forgot to mention that the display for all dice, save dice1, are set to "none".
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27497337

http://stackoverflow.com/q/27551607
score: 2
favorite count: 0
upvote count: 2
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27553345
has answer: http://stackoverflow.com/a/27553375
has title: ext js apply listener to componenet conditionally
has answer: http://stackoverflow.com/a/27553345
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27553375
has body: I have been given an EXT JS application which contains a datefield that is inside a function (the function also renders other components). At the moment the function is being called twice to create (from a functional perspective) two idenctical datefield components. What separates the two datefield components is that the ID and name are different because they are named depending on the parameter passed into the function. I want to give the two datefield components slightly differently behaviour without resorting to creating two distinct datefield components. I was wondering whether it is possible to only apply a listener to a component if some condition is satisfied? EG: if(some condition is true){ select: function(datefield, date){ //code } } Or whether I would have to give both components all the listeners but perform the conditional inside, so that if the condition is not satisfied then that event is never fired for that component. EG: select: function(datefield, date){ if(some condition is true){ //code } else{ //Do nothing as this component doesn't need this listener. } } I am fairly sure the second way would work but I'm not sure it's a good idea. The first way seems slightly cleaner; I'm not sure it looks too good to have empty else bodies lying around.
tagged with: extjs

http://stackoverflow.com/comment/43428114
score: 0
type: Comment
type: QuestionComment
has text: I don't see why you're using ajax at all here.
comment on: http://stackoverflow.com/q/27498495

http://stackoverflow.com/a/27516392
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27516307
score: 1
upvote count: 1
has body: What you want can be done in pure CSS using the :hover pseudo .wrapper:hover a.link_border{ border: thick solid #FFFF00; } If for some reason you need jQuery to do more crazy stuff I'm not aware of... your selector a .link_border should be: a.link_border the .mouseover() method, it does not accepts 2 callback functions. use this instead: &lt;script&gt; $(function(){ // DOM is now ready (shorthand) $('a.link_border').hover(function () { $(this).toggleClass("img_wrap"); }); }); &lt;/script&gt; If you really want to control both events mouseenter and mouseleave trough the .hover() Method: $('a.link_border').hover(function() { $(this).addClass("img_wrap"); // other stuff for mouseenter.... }, function(){ $(this).removeClass("img_wrap"); // other stuff for mouseleave.... });

http://stackoverflow.com/comment/43536643
type: Comment
has text: @GarthRamsay Be sure to mark one of the answers that worked for you as accepted, click the tick mark.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27551296

http://stackoverflow.com/a/27583029
answers question: http://stackoverflow.com/q/27583008
has body: I tried to not change the code too much, but I had assumed that you wanted to change the items in reverse. if(layer === 'aboutAuthor') { var items = $('.aboutAuthor .item'); var K = 100; // Коэфициент. var t = K * (items.length + 1); var i = items.length - 1; $(items.get().reverse()).each(function() { var item = $(this); console.log(item); setTimeout(function(){ item.addClass('in'); }, t); t += K; } }); }
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/27583008

http://stackoverflow.com/a/27542241
type: Answer
has comment: http://stackoverflow.com/comment/43512807
has comment: http://stackoverflow.com/comment/43512026
downvote count: 0
has comment: http://stackoverflow.com/comment/43512713
answers question: http://stackoverflow.com/q/27542098
score: 1
has comment: http://stackoverflow.com/comment/43512319
has body: Is that what you looking for? you can make that 2 different ways by css ul.nav-list li:first-child ul {display: block} by js $('ul.nav-list li').first().find('ul').css('display','block'); in js use hover to display block just the menu you want and hide others $('ul.nav-list li').hover(function(){ $('ul.nav-list li ul').css('display','none'); $(this).find('ul').css('display','block'); }); instead of all of that use css ul.nav-list li:first-child ul {display: block} ul.nav-list li:hover ul {display: block} DEMO
upvote count: 1
has comment: http://stackoverflow.com/comment/43513316

http://stackoverflow.com/q/27479824
score: 1
has comment: http://stackoverflow.com/comment/43406552
upvote count: 1
linked to: http://stackoverflow.com/q/5529718
accepted answer: http://stackoverflow.com/a/27480143
type: Question
linked to: http://stackoverflow.com/q/6312993
tagged with: javascript
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/43411159
has title: Make the clock decrement
favorite count: 0
has comment: http://stackoverflow.com/comment/43394154
has body: Hey guys am trying to get an expected download time with an ajax script..It just works fine ..I get the expected time in the format hh:mm:ss.But the clock isnt moving The code i have tried function get_filesize(url, callback) { var xhr = new XMLHttpRequest(); xhr.open("HEAD", url, true); xhr.onreadystatechange = function() { if (this.readyState == this.DONE) { callback(parseInt(xhr.getResponseHeader( "Content-Length"))); } }; xhr.send(); } get_filesize( "http://upload.wikimedia.org/wikipedia/commons/9/96/Google_web_search.png", function(size) { var estimatedtime = (new Date().getTime()) / size; var time = new Date(estimatedtime); var c = setTimeout(function() { time.getHours() + ":" + time.getMinutes() + ":" + time.getSeconds() }, 500); console.log(c); }); When i try this code i get an output like 1. What i need as my output Suppose the output i got is 00:57:12 i need to decrement the time as a timer like 00:57:11 ans so on. I havnt no idea on how to try this ..i have tried setTimeout But it didnt helped me. Any help would be greatly appreciated..Thanx
has answer: http://stackoverflow.com/a/27480143
has comment: http://stackoverflow.com/comment/43392911
has comment: http://stackoverflow.com/comment/43423800
has comment: http://stackoverflow.com/comment/43402172
has comment: http://stackoverflow.com/comment/43394142
has comment: http://stackoverflow.com/comment/43392789
type: AnsweredQuestion

http://stackoverflow.com/comment/43530880
comment on: http://stackoverflow.com/q/27550633
has text: The iframe is already fully loaded, is onload necessary? It says now undefined (IE) or blank (FF). But the function is not launched.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43601105
type: QuestionComment
comment on: http://stackoverflow.com/q/27588121
has text: Are you sure this needs to be done via `onload`? Have you tried just calling `resizeImage` directly?
score: 0
type: Comment

http://stackoverflow.com/q/27579763
favorite count: 0
has title: Angularjs - how to see if a value is in array?
tagged with: angularjs
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/43584156
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27579868
accepted answer: http://stackoverflow.com/a/27579868
tagged with: javascript
type: Question
upvote count: 2
has body: I have a model similar to this one: model = [ { name: 'Chris', age: '29', approvedBy: ['id1', 'id2', 'id3'] }, { // repeat... } ] in my view I have a ng-repeat for the model and there is a button to approve or disapprove the user. Basically other users can approve or disapprove, if previously approved, the user. Quite similar to like or unlike a FB post. Name: {{user.name}} - Age: {{user.age}} Approved by {{user.approvedBy.length}} users. Approve {{user.name}} It works fine, so I can approve and disapprove the user but I can not figure out how can I change the text of Approve. I wish it to be Disapprove if has already been approved by the user in the session. I'm looking for something like indexOf to create an inline if... or a filter... It should look like: (user.approvedBy.indexOf(currentUserId)) ? 'Disapprove' : 'Approve' How can I create something like that in Angularjs?
answer count: 1

http://stackoverflow.com/a/27575465
upvote count: 1
has body: I tried coding what you want using jquery. -->http://jsfiddle.net/oLc2f3kp the element that has class .drag_item can be draged. if you release it anywhere that isn't on the area of element that has class .release_area, it will go back to the position before. I hope it's what you want. if you have any question about this code,ask me then :D UPDATED I tried over many times now I have the solution $('div[class=dragable]').on('dragend',function(e){ $(this).css('top',e.originalEvent.pageY-($(this).height()/2)); $(this).css('left',e.originalEvent.pageX-($(this).width()/2)); }); I can't get the position while I'm draging it (the position I got is the original position of the element before start dragging") so the only way( so far I have tested now) is to get the position of your mouse when you drop it and set left and top are same as the position of your mouse. I have only tested in Chrome. anyways I don't suggest you to do this.
downvote count: 0
has comment: http://stackoverflow.com/comment/43576497
has comment: http://stackoverflow.com/comment/43576450
answers question: http://stackoverflow.com/q/27574256
type: Answer
score: 1

http://stackoverflow.com/q/27566729
has comment: http://stackoverflow.com/comment/43559118
has body: I working in jquery.rulers.js function, and i create rulers for particular div and it shown properly in pixel and it convert into inches it will shown same measurement. For example : i have 100 pixel in my div it will shown 1'0" ,200 pixel in my div it will shown 2'0" and so on.when i converted pixel into inches it shown different.Which one is correct? i much more struggle in pixel to inches conversation. Here my working FIDDLE But it shown only pixel values in inches.but it not properly shown inches values.I need proper guidelines..and i need any formula for this conversation. NOTE: I have used only 150 DPI (Dotted Per Inch) for image conversation. REFER URL
downvote count: 1
type: Question
tagged with: rulers
has comment: http://stackoverflow.com/comment/43559037
tagged with: javascript
tagged with: jquery
has title: How to convert pixel into inches in rulers using javascript
has answer: http://stackoverflow.com/a/27652955
answer count: 1
linked to: http://stackoverflow.com/q/10229109
has comment: http://stackoverflow.com/comment/43558897
has comment: http://stackoverflow.com/comment/43559701
has comment: http://stackoverflow.com/comment/43558448
favorite count: 0
upvote count: 2
accepted answer: http://stackoverflow.com/a/27652955
type: AnsweredQuestion
score: 1

http://stackoverflow.com/a/27579577
has comment: http://stackoverflow.com/comment/43583789
type: Answer
answers question: http://stackoverflow.com/q/27579535
has body: Some combinations of browsers and mail clients support mailto forms. Submitting the form will (hopefully) open a pre-filled mail in the user's mail client, but not send it. Example code from the linked-to page: Name: E-mail address: Comment: The page also has a form to try out.
score: 0
has comment: http://stackoverflow.com/comment/43583778

http://stackoverflow.com/a/27589210
has body: This is because you pass a number and that number is truncated. Pass a string instead: onclick="ResolveName('76561198031633135')"
upvote count: 3
accepted answer of: http://stackoverflow.com/q/27589180
score: 3
answers question: http://stackoverflow.com/q/27589180
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/q/27503555
has answer: http://stackoverflow.com/a/56256312
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/43439389
has comment: http://stackoverflow.com/comment/43437664
tagged with: css
has body: I have a question, is it possible to remove all landmarks from the google map, so I could change the scale of the map without landmarks shown?
has comment: http://stackoverflow.com/comment/43437395
linked to: http://stackoverflow.com/q/1305397
has title: Is it possible to remove landmarks from google map with JS or CSS?
answer count: 3
upvote count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/27504100
accepted answer: http://stackoverflow.com/a/27504100
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/69989714
downvote count: 0
possible better answer: http://stackoverflow.com/a/56256312
score: 1
has comment: http://stackoverflow.com/comment/43438700

http://stackoverflow.com/a/27632684
type: AcceptedAnswer
has body: You could show more info about the application you're trying to do. But I believe it's a matter of stack overflow (maybe you're using a big list). So, to overcome that you should modify the "nextArrayItem": window.setTimeout (nextArrayItem, 0) The freeze incurring mainly from the big data, but now the Event Loop will handle the Recursion process and not your Call Stack.
accepted answer of: http://stackoverflow.com/q/27632611
type: Answer
answers question: http://stackoverflow.com/q/27632611
score: 2
downvote count: 0
upvote count: 2

http://stackoverflow.com/q/27489489
has title: Set timezone using node wekit and angularjs
answer count: 0
tagged with: angularjs
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/43415766
has comment: http://stackoverflow.com/comment/43410601
tagged with: javascript
has body: I'm developing an application using angularJS and node webkit. I'm trying to display a date using this code : &lt;td&gt;&lt;/td&gt; But it displays me in the US format and not the european one. Angular's documentation explains the timezone depends on the user's browser. But I'm using nodewebkit so I guess the default timezone is US. Is there a way to detect automatically the timezone depending from the Os ? If not what is the best way to let the user choose its timezone ? Thank you
score: 0
tagged with: datetime

http://stackoverflow.com/comment/43387896
type: Comment
comment on: http://stackoverflow.com/a/27476538
score: 0
type: AnswerComment
has text: Right, I've added something.

http://stackoverflow.com/a/27503560
type: AcceptedAnswer
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/27502491
answers question: http://stackoverflow.com/q/27502491
has body: UPDATE: Ok, I understand partially. What is the reason why you want to do this? Do you just want a shortcut for creating multiple instances using multiple statements? Should the instance of C returned by A().B().C() be any different than the one created with the standard new C()? If you just want to chain constructors, you can add the context in which they are defined (most likely the global object) to the prototype chain of the created entities. You should be able to do that: var A = function () {}; A.prototype = Object.create(this); What this does not eliminate though is the need for the new keyword for instantiation. You would need to do new (new (new A()).B()).C(). I can't think of a different approach than having a helper function which would create constructors which do not require the new keyword: var define = function (init) { var Constructor = function () { if (!(this instanceof Constructor)) { return new Constructor(); } if (init) { init.apply(this, Array.prototype.slice.call(arguments)); } }; Constructor.prototype = Object.create(this); return Constructor; }; The usage is: var A = define(function (x, y) { this.x = x; this.y = y; }); var a1 = new A(1, 2); // a1 instanceof A === true // a1.x === 1 // a1.y === 2 var a2 = A(1, 2); // a2 instanceof A === true // a2.x === 1 // a2.y === 2 If you have the constructors A, B and C, you can use the following notations interchangeably: var a = new A(); var b = new B(); var c = new C(); var a = A(); var b = B(); var c = C(); var b = A().B(); var c = A().C(); var a = B().C().A(); In case of A().B().C(), you do not have access to the instances of A and B. Can you elaborate a bit more on what is your deal? OLD ANSWER: What you have there is madness as you basically merge three constructors and make it seem that `WorkerBee` and `Employee` are actually instantiated while they are not. I'm not going to question the new A().B().C() notation even though I find it quite messed up. You probably want to make use of the instanceo…
has comment: http://stackoverflow.com/comment/43454767

http://stackoverflow.com/a/27534859
type: Answer
has body: try using defaultAllDayEventDuration
score: 0
answers question: http://stackoverflow.com/q/27516932

http://stackoverflow.com/a/27609477
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27609399
has body: This is easily accomplished in jquery. Assuming you have a list or some other container for your divs Item 1 $("#yourList").prepend(" Item 2 "); RESULT: Item 2 Item 1

http://stackoverflow.com/comment/43444810
type: QuestionComment
type: Comment
score: 0
has text: I don't want to modify it, I want to get the plain HTML for other purposes (alerts, create a report etc)
comment on: http://stackoverflow.com/q/27507298

http://stackoverflow.com/comment/43597740
type: QuestionComment
comment on: http://stackoverflow.com/q/27586697
type: Comment
has text: There is no a general way to "combine" several scripts. You must completely understand how every of them work and then carefully merge logic. And again - there are no generic advices, it's a unique per script action.
score: 0

http://stackoverflow.com/comment/43557744
comment on: http://stackoverflow.com/a/27566321
type: Comment
has text: @abdallah-arfak - your example is good as you solved the double-click issue, but the `Paper` price is not getting updated when the quantity is changed, the price remains for the old quantity => in result I need to press the button again to calculte the right price.
score: 0
type: AnswerComment

http://stackoverflow.com/a/27581537
type: Answer
answers question: http://stackoverflow.com/q/27581407
has body: Something like this should do: var $radio = $("input:radio"); $radio.change(function () { if ($radio.filter(':checked').length &gt; 0) { $("#postGender").removeAttr("disabled"); } else { $("#postGender").attr("disabled", "disabled"); } }); http://jsfiddle.net/n6sta3dp/8/ A few sidenotes: Once a radio button has been checked, it can never be unchecked by the user (unless he starts using the js console). I think it would be safe to remove the 'else' part in your function. Don't forget that a form can also be submitted by using the enter key, so just disabling the button will not be enough. You should probably listen for the submit event of your form as well and check if the user made a choice before letting the submit go trough.
score: 0

http://stackoverflow.com/a/27695239
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/60424521
has comment: http://stackoverflow.com/comment/60045078
answers question: http://stackoverflow.com/q/27574733
has body: Try calling the reload() function within ReCaptcha (version 1): Recaptcha.reload(); How to Reload ReCaptcha using JavaScript?
upvote count: 1
has comment: http://stackoverflow.com/comment/43807145
downvote count: 1
has comment: http://stackoverflow.com/comment/60067627

http://stackoverflow.com/comment/43690937
has text: Use `onclick="javascript:cutdelete(this,'2/0')"`, pass argument as string.
score: 1
comment on: http://stackoverflow.com/q/27635889
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27562786
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43569456
upvote count: 1
tagged with: restify
type: Question
score: 1
tagged with: http://stackoverflow.com/tag/json
has body: I am trying to list all jobs with a certain tag on angel.co using their API with the current call https://api.angel.co/1/tags/10/startups and then trying to parse it and show in the browser using restify var tagUrl = "https://api.angel.co/1/tags/10/startups" request({ url: tagUrl, json: true }, function (error, response, body) { if (!error &amp;&amp; response.statusCode === 200) { console.log(body) // Print the json response } else console.log("error" + error) }) I'm getting the console.log(body)-part to work, but when I am trying to send the response to the browser it doesn't show anything when I am trying to send it with res.send('hello ' + req.params.name + body); Should I parse or stringify it in some way ? edit: This is the final code function respond(req, res, next) { var tag = req.params.tag; var url = "http://api.angel.co/1/tags/"+tag+"/startups/? request({ url: url, json: true }, function (error, response, body) { if (!error &amp;&amp; response.statusCode === 200) { console.log(body) // Print the json response res.send( req.params.name + JSON.stringify(body)); } else console.log("error" + error) })
accepted answer: http://stackoverflow.com/a/27563277
has title: Trying to send JSON response with Restify
answer count: 1
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/27563277
favorite count: 0

http://stackoverflow.com/q/27607892
favorite count: 0
has comment: http://stackoverflow.com/comment/43638535
has comment: http://stackoverflow.com/comment/43638071
tagged with: parsing
has comment: http://stackoverflow.com/comment/43638141
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/43637996
score: 1
has answer: http://stackoverflow.com/a/70692996
has comment: http://stackoverflow.com/comment/43638037
has title: parseFloat() is not parsing all strings in my array. Javascript
type: Question
has answer: http://stackoverflow.com/a/27608724
answer count: 2
has body: I am making arrays out of columns in a table that I use to graph Flot charts. I start by working my way down the column and storing each column as its own array, then I check the column to the right and repeat. Everything has been working great, except for this one tiny issue I am having where I am reading out the string values from the last column and parsing them into floats. All the values in last column parse to floats except for a few. Sometimes it's the 0th and 2nd element in the array, or sometimes the 0th and 1st. Here's what it looks like when I console.log the arrays: The table also known as #maintable: As you can see in the last array the 0th and 2nd values in the array are returned as strings, but the rest are returned as floats. Here is the code: HTML: &lt;div id="chart_container" class="widget-body col-md-12" style="height: 453px;"&gt; &lt;section id="mainchart" class="col-md-12" style="height: 453px;"&gt;&lt;/section&gt; &lt;/div&gt; JS: var slices = []; var sliceNames, sliceNights, sliceNightsAvg, sliceRevs = []; var sliceSet = []; var colorPalette = []; //Get number of columns by counting number of cells in the header row var numOfColumns = $("#maintable tr th").length; function getCellData(array, columnNum) { $("#maintable tr td:nth-child(" + columnNum + ")").each(function (k, v) { if(!array) { array = []; } //Store the slice labels in array array[k] = $(this).text(); //Remove any long whitespace from cell array[k] = array[k].trim(); //Check if the data in the cell is a number or not if (parseFloat(array[k]) % 1 === 0) { //Filter the values array[k] = array[k].replace("$", ""); array[k] = array[k].replace(",", ""); array[k] = array[k].replace("K", "000"); array[k] = array[k].replace("M", "000000"); //If there's a decimal /*if (array[k].indexOf(".") !== -1) { //Then parse as a float array[k] = parseFloat(array[k]); } else { //Otherwise, parse as an integer array[k] = parseInt(array[k]); }*/ array[k] = parseFloat(array[k]); } }); return array; } //Ge…
tagged with: arrays
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/43638179

http://stackoverflow.com/q/27634703
type: Question
has comment: http://stackoverflow.com/comment/43689149
has body: I am trying to sum a table column total. Here is an example of only two column for test purposes. I want to calculate table column's item total using a javascript loop. How to create the loop if we don't know how many rows and columns are inside in table? I hope you understand what I mean and also hope for your kindly suggestion. Student at Stanford University 2013-2014 Faculty (Subject) Student 2013 Student 2014 Business 12922 11420 Earth Sciences 4320 4611 Education 14560 13490 Engineering 8750 9863 Humanities & Sciences 7819 7219 Medicine 5219 4200 Calculate and var ftable = document.getElementById("sdtable"); var i= 0; var sumFirst=0; var sumSecond=0; var sumTotal=0; function Calculate(){ for (i=0;i<ftable.rows.length; i++){ sumFirst=sumFirst+parseInt(ftable.rows[i].cells[1].innerHTML); sumSecond=sumSecond+parseInt(ftable.rows[i].cells[2].innerHTML); } sumTotal=sumFirst+sumSecond; document.getElementById("Studentf").innerHTML +="Student in 2013 = " +sumFirst; document.getElementById("Students").innerHTML +="Student in 2014 = " +sumSecond; document.getElementById("Studentt").innerHTML +="Total Student = " +sumTotal; }
upvote count: 6
has comment: http://stackoverflow.com/comment/43689106
tagged with: javascript
has comment: http://stackoverflow.com/comment/43688937
favorite count: 0
has title: How to create rows cell loop in js
answer count: 3
has answer: http://stackoverflow.com/a/27635135
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43689041
score: 6
has answer: http://stackoverflow.com/a/27635074
accepted answer: http://stackoverflow.com/a/27635074
has comment: http://stackoverflow.com/comment/43689030
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27635084
downvote count: 0
has answer: http://stackoverflow.com/a/27635084
has comment: http://stackoverflow.com/comment/43688895

http://stackoverflow.com/comment/43661996
type: AnswerComment
has text: Thanks I just tried this and it works. But quick question. How can I stop it and is there a way I can list the background tasks running. Thanks
type: Comment
comment on: http://stackoverflow.com/a/27620669
score: 0

http://stackoverflow.com/a/27647682
accepted answer of: http://stackoverflow.com/q/27633641
downvote count: 0
has body: I'd suggest spinning up one or more EC2 instances and running your thumbnail job there. You'll eliminate almost all lot of the bandwidth costs (free from ec2 instances in the right region to s3), and certainly the transfer speed will be faster within the AWS network. For 600K files to process, you may want to consider loading each of those 'jobs' into an SQS queue, and then have multiple EC2 instances polling the queue for 'work to do' - this will allow you to spin up as many ec2 instances as you want to run in parallel and distribute the work. However, the work to setup the queue may or may not be worth it depending on how often you need to do this, and how quickly it needs to finish - i.e. if this is a one time thing, and you can wait a week for it to finish, a single instance plugging away may suffice.
answers question: http://stackoverflow.com/q/27633641
type: AcceptedAnswer
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/comment/43567211
has text: `waveInterval` is defined in your anonymous function. `peopleWave` doesn't have access to it.
comment on: http://stackoverflow.com/q/27570951
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43597109
score: 0
type: Comment
type: QuestionComment
has text: Websockets allows you to open a stream directly from JavaScript to your server. It doesn't use HTTP. It's not RESTful. https://developer.mozilla.org/en/docs/WebSockets
comment on: http://stackoverflow.com/q/27585864

http://stackoverflow.com/q/27610165
score: 0
answer count: 1
has body: I'm building an upload form. Along with uploading, the user needs to enter some data and may or may not to work with a cart. The cart buttons remove a listing from the cart or empty the cart entirely. However, when I attempt to use these buttons, the page performs the submit action I have indicated, return validateForm().... &lt;form enctype="multipart/form-data" runat="server" method="post" action="gpsFieldPics.py" name="uploadForm" id="uploadForm" onSubmit="return validateForm()"&gt; &lt;asp:Button ID="btnRemove" runat="server" Text="Remove Track" OnClick="btnRemove_Click" /&gt;&lt;br /&gt; &lt;asp:Button ID="btnEmpty" runat="server" Text="Empty Cart" OnClick="btnEmpty_Click" /&gt; &lt;asp:ListBox ID="trkCart" runat="server" SelectionMode="Multiple"&gt;&lt;/asp:ListBox&gt; &lt;input id="btnProcess" type="submit" value="Upload and Process" onclick="selectAllTracks()" /&gt;&lt;/form&gt; That is not the complete form by the way. I tried to use this... UseSubmitBehavior="false" , but it doesn't work in the way I thought it might. Here are the code behind functions I'm trying to use.... protected void btnRemove_Click(object sender, EventArgs e) { if (trks.Count &amp;gt; 0) { if (trkCart.SelectedIndex &amp;gt; -1) { trks.RemoveAt(trkCart.SelectedIndex); this.DisplayTrackCart(); } else { lblMessage.Text = "Please select the item you want to remove."; } } } protected void btnEmpty_Click(object sender, EventArgs e) { if (trks.Count &amp;gt; 0) { trks.Clear(); trkCart.Items.Clear(); } } I apparently cannot use PageFunctions or Ajax to call the code-behind functions because they are not static and don't return anything. I also cannot split the form into two forms, because an asp page cannot have two forms with runat=server and because I'm using a python cgi script which seems to only recover the elements of one form not two. Any ideas on what I can do? The only thing I can come up with is that I'll have to have two forms, one basic html form and one asp.net form. For the car…
tagged with: asp.net
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27611633
tagged with: forms
type: Question
has title: Prevent other asp buttons from performing submit action
tagged with: javascript
linked to: http://stackoverflow.com/q/4608921

http://stackoverflow.com/a/27573111
answers question: http://stackoverflow.com/q/27571140
has comment: http://stackoverflow.com/comment/43573922
has comment: http://stackoverflow.com/comment/43634545
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/43633790
has comment: http://stackoverflow.com/comment/43633204
has body: Using setTimeout within a loop makes things complex when passing a correct img to the argument function. Also you probably have omitted quotes around image URLs in the array. Then the setTimeout, it doesn't prevent the loop to be executed, it's just a timer, which launches the argument function after the given delay. In your code (without other errors) all five function calls would be done almost at the same time after one second, since the loop creates a new timer on each round within microseconds. Here's an alternative approach using simple outer scope access. window.onload = function () { var imagesArray = ['image1.jpg','image2.jpg','image3.jpg','image4.jpg','image5.jpg'], // URLs of the images imageDiv = document.getElementById('imagesframe'), // An element wherein to show the images counter = 0, // Image counter img; // A temporary image element // Changes images in an element function changeImg (first) { if (!first) { // Check, if there's an image to remove imageDiv.removeChild(img); // Remove an image } else { // Reset counter, just in case the slideshow will be reused counter = 0; } // Create a new image and append it to an element img = new Image(); img.src = imagesArray[counter]; img.style.width = '500px'; img.style.height = '500px'; imageDiv.appendChild(img); // Show more images or quit counter += 1; if (counter &lt; 5) { // Show the next image setTimeout(changeImg, 1000); } else { // Remove the last image setTimeout(function () {imageDiv.removeChild(img)}, 1000); } } changeImg(true); // Show the first image return; }; The code is placed to the head and wrapped within window.onload. If needed, you can wrap it within an IIFE, and place it on it's original position in your code. A wrapper is needed to avoid declaring global variables. IIFE = Immediately Invoked Function Expression, and it looks somewhat like this: (function () {/* Code to run here */}());
has comment: http://stackoverflow.com/comment/43629820
accepted answer of: http://stackoverflow.com/q/27571140
has comment: http://stackoverflow.com/comment/43602367
score: 0

http://stackoverflow.com/q/27488067
has answer: http://stackoverflow.com/a/27488233
upvote count: 2
type: UnansweredQuestion
has title: How to return JSON data in return view method in MVC using an Ajax call
score: 2
tagged with: http://stackoverflow.com/tag/json
type: Question
has comment: http://stackoverflow.com/comment/75266342
tagged with: asp.net-mvc
tagged with: javascript
has body: I am working with MVC and Ajax and jQuery. I am returning my JSON value from my action method like below. public ActionResult GetMYSDRViews(List&lt;string&gt; AssetNames, List&lt;string&gt; UtilizationHubs, string RedirectView) { try { //ViewBag.InitParams = MvcApplication.objInitParams; string UserType = MvcApplication.objInitParams.UserType; bool Execute; List&lt;MYSDR&gt; MysdrListCollection = new List&lt;MYSDR&gt;(); ServiceClient objService = new ServiceClient(); objService.ClientCredentials.Windows.ClientCredential = new System.Net.NetworkCredential("v-saramb", "sdatnov@2014", "REDMOND"); objService.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation; var result = String.Empty; if (RedirectView == "Agent View") { ViewData["Flag"] = "AgentView"; #region Agent View result = objService.SalesDeskAgent_DynamicAsset("REDMOND\\v-susudh", "", ""); #endregion } else if (RedirectView == "Manager View") { //result = objService.SalesDeskAgent_DynamicAsset("REDMOND\\v-susudh", "", ""); ViewData["Flag"] = "Manager View"; userHUbdata.Clear(); foreach (string Hub in UtilizationHubs) { ServiceReference.MYSDRFields obj2 = new ServiceReference.MYSDRFields(); obj2.Hub = Hub;//cmbHubs.SelectedItem.ToString(); if (obj2.Hub != "All") userHUbdata.Add(obj2); } result = objService.SalesDeskManagerView_ConditionbasedwithFilters("", "", userHUbdata, true); } //else if (RedirectView == "BulkAssignment View") // { // result = objService.SalesDeskManagerView("REDMOND\\v-susudh", ""); // } XDocument xmldoc = null; try { xmldoc = XDocument.Parse(result.ToString()); Execute = true; } catch { Execute = false; } if (Execute) { #region MysdrListCollection.Clear(); var data = (from info in xmldoc.Elements("NewDataSet").Elements("Table1") where Convert.ToString(info.Element("Status").Value) != "" &amp;&amp; Convert.ToString(info.Element("Status").Value) != "New" &amp;&amp; Convert.ToString(info.Element("Status").Value) != "Projected"…
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/43408131
tagged with: jquery
favorite count: 0
tagged with: ajax

mapquest
tags question: http://stackoverflow.com/q/27614237
type: Tag
tag name: mapquest

http://stackoverflow.com/q/27623241
linked to: http://stackoverflow.com/q/3234205
has comment: http://stackoverflow.com/comment/43667122
has comment: http://stackoverflow.com/comment/43667879
accepted answer: http://stackoverflow.com/a/27623406
tagged with: javascript
tagged with: sorting
has title: javascript arrays reading in form data best practice
has body: I'm still quite new to javascript and was wondering if there's a more efficient way to handle this situation, for example by using an array? I have an HTML form with 6 fields that let you enter the last six weeks amount of overtime paid. I'm then using javascript to add the six values up, divide by six and multiply by 52 to obtain an annual overtime amount. My fields are named w_ot_1, w_ot_2 up to w_ot_6 and I'm using the code below. It all works fine but I'm finding it's really repetitive and it's not just overtime I need to run this calculation on. I'm sure there's got to be a more efficient way. Does anyone have any ideas that could help? var weekly_ot_1 = parseFloat(document.getElementById("w_ot_1").value.replace(/[^0-9.]/g, '')); var weekly_ot_2 = parseFloat(document.getElementById("w_ot_2").value.replace(/[^0-9.]/g, '')); var weekly_ot_3 = parseFloat(document.getElementById("w_ot_3").value.replace(/[^0-9.]/g, '')); var weekly_ot_4 = parseFloat(document.getElementById("w_ot_4").value.replace(/[^0-9.]/g, '')); var weekly_ot_5 = parseFloat(document.getElementById("w_ot_5").value.replace(/[^0-9.]/g, '')); var weekly_ot_6 = parseFloat(document.getElementById("w_ot_6").value.replace(/[^0-9.]/g, '')); //weekly annualised overtime values document.getElementById("w_annual_ot").value= addCommas((((weekly_ot_1 + weekly_ot_2 + weekly_ot_3 + weekly_ot_4 + weekly_ot_5 + weekly_ot_6)/6) * 52).toFixed(2));
answer count: 1
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43667059
score: 0
tagged with: forms
has answer: http://stackoverflow.com/a/27623406
type: Question

http://stackoverflow.com/comment/43483236
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27526951
has text: @Rasalom small [fiddle](http://jsfiddle.net/e8fzm3hy/) :-D

http://stackoverflow.com/comment/43692475
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27636677
has text: By any symbol I mean any digit characters and/or any alphanumeric character. I tried your solution (I used 9.+) and it works for str from the question. But for some reasons it doesn't work for this test string: "cn=department9C8,ou=subDepartment22,ou=subDepartment9C8,o=system".

http://stackoverflow.com/comment/43643293
comment on: http://stackoverflow.com/q/27608777
score: 0
has text: I am using chrome.storage.sync right now, thanks all
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27565491
has comment: http://stackoverflow.com/comment/44184836
accepted answer of: http://stackoverflow.com/q/27548590
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44183702
has body: If you want to do this yourself then most likely the best approach is to write a client to read the required tags from the OPC Server. You are essentially writing your own OPC Client here with some extra code to store tags to an SQL database (and maybe a UI) Some source code to look at: http://www.opcconnect.com/source.php#freesource http://support.automation.siemens.com/WW/llisapi.dll?func=cslib.csinfo&amp;lang=en&amp;objid=21447513&amp;caller=view https://fistfulofbytes.com/opc-sample-code http://www.codeproject.com/Articles/490072/DA-OPC-Wrapper-DLL-and-Client-Example If I was doing it I would follow this example - C# is simpler then C/C++ and the source code contains the libraries you need! http://mestaa.blogspot.it/search/label/OPC%20Client You might want to consider OPC-DA, OPC-UA.. http://blog.matrikonopc.com/index.php/is-opc-ua-as-simple-as-opc-da/ https://accelconf.web.cern.ch/accelconf/icalepcs2011/papers/mopms025.pdf
type: Answer
answers question: http://stackoverflow.com/q/27548590
score: 1
upvote count: 1

onclick
tags question: http://stackoverflow.com/q/27511679
tags question: http://stackoverflow.com/q/27504730
tags question: http://stackoverflow.com/q/27571860
tags question: http://stackoverflow.com/q/27503770
tags question: http://stackoverflow.com/q/27636704
tags question: http://stackoverflow.com/q/27585657
tags question: http://stackoverflow.com/q/27536484
type: Tag
tags question: http://stackoverflow.com/q/27527071
tags question: http://stackoverflow.com/q/27538555
tags question: http://stackoverflow.com/q/27573573
tags question: http://stackoverflow.com/q/27561490
tags question: http://stackoverflow.com/q/27556172
tags question: http://stackoverflow.com/q/27554831
tags question: http://stackoverflow.com/q/27609360
tags question: http://stackoverflow.com/q/27506683
tag name: onclick
tags question: http://stackoverflow.com/q/27504500
tags question: http://stackoverflow.com/q/27496899
tags question: http://stackoverflow.com/q/27562969

http://stackoverflow.com/a/27541510
type: Answer
has body: This should work for you ^[^\W0-9_][^\W_]+$ If Spaces are permitted ^[^\W0-9_][a-zA-Z0-9\s]+$ If you're not trying to match the whole string, you can remove ^ and $ which match start and end respectively.
score: 0
answers question: http://stackoverflow.com/q/27541497

http://stackoverflow.com/comment/43453143
score: 0
type: Comment
type: QuestionComment
has text: In current tests I don't need functionality of that cache, I just want to run examplary test, so I need only to properly configure it because right now there is in output: Error: [$injector:modulerr]...
comment on: http://stackoverflow.com/q/27511118

http://stackoverflow.com/comment/43397938
has text: @plbsam the second solution will work with AJAX with a minor tweak, using `insertBefore` instead of `appendChild`: http://jsfiddle.net/0LsLq9x7/3/ (using `setTimeout` for async execution, but the same applies to ajax callback).
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27481303

http://stackoverflow.com/q/27631055
tagged with: javascript
has body: I am trying to use jquery to check all checkboxes using below code which working fine on toggling select all on check and un check the slectAll Now I want to uncheck the slectAll in case of a situation if a user un-check one of the ieldset checkboxes. I tried this code $.each($("input[name='numbers']:not(:checked)"), function () { $('input:checkbox[name=slectAll]').prop("checked", false); }); but it didn't do the job! Select All and the jquery file is $(function () { $('input:checkbox[name=slectAll]').change(function () { if ($(this).is(':checked')) { $('#group_1').find(':checkbox').prop("checked", true); } else { $('#group_1').find(':checkbox').prop("checked", false); } }); $.each($("input[name='numbers']:not(:checked)"), function () { $('input:checkbox[name=slectAll]').prop("checked", false); }); }); can you please let me know how to fix this? thanks
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/27631089
tagged with: jquery
has title: Issue on Deselecting All Checkbox on Un checking one of Child
tagged with: checkbox
possible better answer: http://stackoverflow.com/a/27631145
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27631145
has answer: http://stackoverflow.com/a/27631089
type: Question

http://stackoverflow.com/comment/43615224
score: 0
type: Comment
has text: I know I can use "mypage.com/images/background.png" on whole web, but if i will move domain i will have to change it in whole websites.
comment on: http://stackoverflow.com/a/27595609
type: AnswerComment

http://stackoverflow.com/comment/101868259
has text: Hello @Nick, and thanks for a great answer. Since it would seem that [document.createEvent() is deprecated](https://developer.mozilla.org/en-US/docs/Web/API/Document/createEvent), would you have the time to update this answer with the suggested event constructors? Otherwise, would you mind if I do? Thanks!
comment on: http://stackoverflow.com/a/27557936
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27594077
has body: I would not recommend submitting div content to your database. A malicious user could put whatever they want in the div and submit it. It also makes your user interface very tightly coupled with your page logic and may involve a lot of string parsing that could otherwise be avoided. I saw in your comment that the div will have a list of names, I would look into alternate ways of getting this list that don't involve placing it in your HTML. If this is really what you want to do. Assuming the div is a child of your #SignupForm element, I would put the div content retrieval method in your submit event handler like so: $("#SignupForm").on('submit',(function(e) { e.preventDefault(); // //Get the div content //Replace #idofdiv with the selector for your div var divContent = $('#idofdiv',this).text() // //Put it in the form data //Change listOfNames to the name that you want the data to be posted as var formData = new FormData(this) formData.append("listOfNames", divContent) // $.ajax({ url: "insert.php", type: "POST", data: formData, //Change so it gets the right form data contentType: false, cache: false, processData:false, success: function(data) { $("#targetLayer").html(data); $('#loader').hide(); $('#alerts').delay(2000).fadeOut('slow'); }, error: function() { } }); })); });
answers question: http://stackoverflow.com/q/27592923
type: Answer
has comment: http://stackoverflow.com/comment/43617722
has comment: http://stackoverflow.com/comment/43618531
score: 0

http://stackoverflow.com/a/27589918
answers question: http://stackoverflow.com/q/27589179
score: 2
upvote count: 2
has body: Is your audioURL correct? audio files/song.mp3 Why is there an empty space? ============Edit============ &lt;script&gt; //creating an audio context var context; var audioBuffer; window.addEventListener('load', init); function init() { try { window.AudioContext = window.AudioContext || window.webkitAudioContext; context=new AudioContext(); } catch(e) { alert("Your browser doesn't support Web Audio API"); } loadSound(); // playSound(); // comment here } //loading sound into the created audio context function loadSound() { // set the audio file's URL var audioURL='AllofMe.mp3'; //creating a new request var request = new XMLHttpRequest(); request.open("GET",audioURL,true); request.responseType= 'arraybuffer'; request.onload = function(){ //take the audio from http request and decode it in an audio buffer context.decodeAudioData(request.response, function(buffer){ audioBuffer = buffer; console.log(audioBuffer); if(audioBuffer){ // check here playSound(); } }); }; request.send(); } //playing the audio file function playSound() { //creating source node var source = context.createBufferSource(); //passing in file source.buffer = audioBuffer; //start playing source.connect(context.destination); // added source.start(0); console.log('playing'); } &lt;/script&gt;
has comment: http://stackoverflow.com/comment/43623423
downvote count: 0
has comment: http://stackoverflow.com/comment/43607214
type: Answer

http://stackoverflow.com/a/27491581
has body: Quick solution: check that variable in the if itself if(this.props &amp;&amp; typeof this.props.set === "undefined") This way it'll check if there is a variable called this.props before trying to access it
type: Answer
answers question: http://stackoverflow.com/q/27491372
score: 0

http://stackoverflow.com/q/27488714
has answer: http://stackoverflow.com/a/27489120
tagged with: http://stackoverflow.com/tag/html
answer count: 1
linked to: http://stackoverflow.com/q/13390588
type: UnansweredQuestion
has body: I am adding an html file to my GWT page like so: HTML htmlPanel = new HTML(); String html = MyHtml.INSTANCE.getHtml().getText(); htmlPanel.setHTML(html); RootPanel.get().add(htmlPanel); and that works ... but the embedded script files don't run. I see the line in Chrome's Elements tab where the script should be loaded, but apparently it is not (doesn't show up in the Scripts tab, and debugger lines are not hit). As a test, I loaded the html file straight into my browser (not via GWT), and the script does show up in the Scripts tab and it does run the code (so it's not an issue with the script tag itself). So ... why/how do the scripts not run when embedded by GWT? (I wouldn't know how to keep an embedded script from running if I tried!) ;o) Do I have to use the ScriptInjector to make this work (I'm having my own problems with getting that working, which is a subject for another thread)? If so ... why? Thanks for your help!
tagged with: gwt
type: Question
tagged with: javascript
score: 0
has title: GWT: Can I include js in html page or do I need `ScriptInjector`?

http://stackoverflow.com/q/27556273
tagged with: google-analytics-api
tagged with: google-analytics
has title: Google Analytic Embed API chart: Responsive
has answer: http://stackoverflow.com/a/27912026
type: Question
has answer: http://stackoverflow.com/a/62621275
tagged with: google-visualization
has body: How would I make this Google Analytic Embed API chart responsive? I noticed that the demo on this page is reponsive: https://ga-dev-tools.appspot.com/embed-api/basic-dashboard/ I have also seen various ways of doing this with Google Charts here https://code.google.com/p/google-visualization-api-issues/issues/detail?id=1056 Google Charts
downvote count: 0
tagged with: javascript
answer count: 3
tagged with: http://stackoverflow.com/tag/html
score: 1
favorite count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/26393036
upvote count: 1
has answer: http://stackoverflow.com/a/32144255

http://stackoverflow.com/comment/44959578
score: 0
type: Comment
type: QuestionComment
has text: you can use $setPristine() on the check box, but that will not reset the form to pristine if all the other control on the form are pristine. I found a hack to get around it: when you click the check box I set it back to pristine, then when I cancel out of my form I check to see if there are any other controls on that form that are not pristine. I was hoping once I set the check box back to pristine there was some method I could call to make the form check if its controls are pristine or not. I basically wrote that method myself and it manually set the form back to pristine. Dont like doing it
comment on: http://stackoverflow.com/q/27622492

.obj
tags question: http://stackoverflow.com/q/27583497
tag name: .obj
type: Tag

http://stackoverflow.com/q/27614184
has answer: http://stackoverflow.com/a/27615196
accepted answer: http://stackoverflow.com/a/27615196
has comment: http://stackoverflow.com/comment/43652005
has body: I have a Birthday field in edit user profile page as shown, I want it to be displayed in this manner, horizontally So far, I am using the following code, In visitors/edit.html.erb, &lt;%= simple_form_for([@user],:url =&gt; visitor_path(@user), method: :put, :class =&gt; 'form form-horizontal') do |f| %&gt; &lt;%= f.label :birthday %&gt; &lt;div class="form-group"&gt; &lt;div class="col-sm-2"&gt; &lt;%= birthday_field_for(f, end_year: Date.today.year) %&gt; &lt;/div&gt; &lt;/div&gt; &lt;% end %&gt; In application_helper.rb, def birthday_field_for(form,options={}) date_field_for(form,:birthday,options.reverse_merge!(start_year: Date.today.year - 90, end_year: Date.today.year - 13)) end def date_field_for(form,field,options={}) form.date_select(field, options.reverse_merge!(order: [:day, :month, :year], include_blank: true)) end Kindly help me out with css.
answer count: 1
tagged with: javascript
score: 0
tagged with: ruby-on-rails-4
tagged with: datepicker
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43650450
tagged with: css
has comment: http://stackoverflow.com/comment/43650874
has comment: http://stackoverflow.com/comment/43650384
type: AnsweredQuestion
has title: Need to inline the date, month and year select tags
type: Question

http://stackoverflow.com/comment/43687868
type: Comment
score: 2
comment on: http://stackoverflow.com/a/27633624
type: AnswerComment
has text: Nice try. That will work except when the title ends with `/chapter` and while I know that is exceedingly unlikely, it is still not 100%. I found another approach to use base64 encoding to avoid the problem altogether, and to be able to carry 100% of the values thrown at it. Maybe I am too picky, but I like to write code that can be proved to be 100% correct.

http://stackoverflow.com/q/27532099
has comment: http://stackoverflow.com/comment/43492746
tagged with: javascript
has comment: http://stackoverflow.com/comment/43492719
has answer: http://stackoverflow.com/a/55037434
has title: Moving chess pieces in native javascript
has comment: http://stackoverflow.com/comment/43492704
favorite count: 0
tagged with: chess
score: -3
has answer: http://stackoverflow.com/a/27532458
has body: I'm having some problems with my assignment, which was to make chess pieces move freely across the board without the use of ids in native javascript. I have managed to set them on board and have also tried with getting coordinates from clicking on a piece, then getting coordinates from clicking somewhere on board and assigning the chosen piece those newly acquired coordinates, but nothing seems to work correctly. I'd really appreciate some help :) Edit: I've now posted the version with my attempts at making pieces move and with numbers and letters around.
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43492836
downvote count: 3
answer count: 2
accepted answer: http://stackoverflow.com/a/27532458
upvote count: 0
possible better answer: http://stackoverflow.com/a/55037434

http://stackoverflow.com/a/27497117
answers question: http://stackoverflow.com/q/27497023
has comment: http://stackoverflow.com/comment/43425879
score: 1
has comment: http://stackoverflow.com/comment/43425773
upvote count: 1
has body: Build an array of selectors then iterate through it adding the event listeners. Also put your alert or whatever action you want into a function. DEMO var selectors = new Array("test1", "test2"); for(var i=0; i &lt; selectors.length; i++) { var temp = document.getElementById(selectors[i]); temp.addEventListener('click', function() { clickaction(this.innerHTML); }); } function clickaction(content) { alert(content); }
has comment: http://stackoverflow.com/comment/43425800
has comment: http://stackoverflow.com/comment/43425820
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/43425962

http://stackoverflow.com/comment/43487992
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27513468
has text: Six upvotes? Really?

http://stackoverflow.com/comment/43507212
has text: i removed submit button and then named anchor tag submit and when i click on anchor ,i jump on login_process.php but it's balnk
comment on: http://stackoverflow.com/a/27526165
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/48425595
has body: Based on Angel Fraga Parodi's answer I added some more keyCodes that should always be allowed like delete, arrow keys or ctrl+x/ctrl+c. Also the code for pasting wasn't working (anymore). Here's an updated version: &lt;div class="summernote" &gt;&lt;/div&gt; &lt;h5 id="maxContentPost" style="text-align:right"&gt;&lt;/h5&gt; &lt;script&gt; $(document).ready(function () { $('.summernote').summernote({ toolbar: [ ['style', ['bold', 'italic', 'underline', 'clear']] ], placeholder: 'Leave a comment ...', callbacks: { onKeydown: function (e) { var t = e.currentTarget.innerText; if (t.trim().length &gt;= 400) { //delete keys, arrow keys, copy, cut, select all if (e.keyCode != 8 &amp;&amp; !(e.keyCode &gt;=37 &amp;&amp; e.keyCode &lt;=40) &amp;&amp; e.keyCode != 46 &amp;&amp; !(e.keyCode == 88 &amp;&amp; e.ctrlKey) &amp;&amp; !(e.keyCode == 67 &amp;&amp; e.ctrlKey) &amp;&amp; !(e.keyCode == 65 &amp;&amp; e.ctrlKey)) e.preventDefault(); } }, onKeyup: function (e) { var t = e.currentTarget.innerText; $('#maxContentPost').text(400 - t.trim().length); }, onPaste: function (e) { var t = e.currentTarget.innerText; var bufferText = ((e.originalEvent || e).clipboardData || window.clipboardData).getData('Text'); e.preventDefault(); var maxPaste = bufferText.length; if(t.length + bufferText.length &gt; 400){ maxPaste = 400 - t.length; } if(maxPaste &gt; 0){ document.execCommand('insertText', false, bufferText.substring(0, maxPaste)); } $('#maxContentPost').text(400 - t.length); } } }); }); &lt;/script&gt;
answers question: http://stackoverflow.com/q/27527989
downvote count: 0
score: 8
upvote count: 8
type: Answer
has comment: http://stackoverflow.com/comment/104606614

http://stackoverflow.com/q/27590643
has answer: http://stackoverflow.com/a/27590676
accepted answer: http://stackoverflow.com/a/27590676
type: Question
tagged with: function
tagged with: arrays
tagged with: javascript
score: 0
answer count: 1
duplicate of: http://stackoverflow.com/q/750486
has title: Creating Array of functions
has body: I am trying to create an array containing functions. The tricky part (at least for me) is to create those functions out of an array. Explanation of a problem var foo = ["1", 2, 3, 4, "5"]; And now, i need to create a function which will create functions returning those values: bar[0](); //1 bar[3](); //4 My code so far function create_functions_array(array) { var functions_array = new Array; for(var i=0; i&lt;array.length; i++) functions_array[i] = function() {console.log(array[i])}; return functions_array; } The thing is, if I put any value inside console.log (inside my function) like: functions_array[i] = function() {console.log('aaa')}; it will log "aaa" in the console. But when i try to use array variable passed to function, it logs "undefined". The way I am trying to call this function is var bar = create_functions_array(foo); Could you please explain me what am I doing wrong?
linked to: http://stackoverflow.com/q/750486
type: AnsweredQuestion

http://stackoverflow.com/q/27610738
has title: Email plugin not available
has comment: http://stackoverflow.com/comment/43645430
score: 0
has comment: http://stackoverflow.com/comment/43644277
has comment: http://stackoverflow.com/comment/43665469
has comment: http://stackoverflow.com/comment/43665529
has comment: http://stackoverflow.com/comment/43665556
has comment: http://stackoverflow.com/comment/43643891
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43644042
has comment: http://stackoverflow.com/comment/43653121
has comment: http://stackoverflow.com/comment/43643961
has comment: http://stackoverflow.com/comment/43667942
tagged with: cordova
has answer: http://stackoverflow.com/a/27623772
type: Question
has comment: http://stackoverflow.com/comment/43665437
tagged with: android
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43665313
answer count: 1
has body: I am working on cordova email composer to send emails. But I am getting the error "email plugin not available" when I tried to execute the app. When I add < gap:plugin name="de.appplant.cordova.plugin.email-composer" version="0.8.2" /> to the config file I am getting errors. Here is my code. Contact Example Config file: <gap:plugin name="de.appplant.cordova.plugin.email-composer" version="0.8.0" /> </widget>

http://stackoverflow.com/q/27634863
has comment: http://stackoverflow.com/comment/43689469
tagged with: data-binding
has answer: http://stackoverflow.com/a/27635112
type: UnansweredQuestion
has body: I'm trying to grammatically follow a path inside a JSON object, and replace the object with a blank one. I'm using this method to reach the object desired, and I can verfiy that the object is reached. $scope.path = "countries.canada.territories.yukon"; $scope.remove = function () { var pathInArrayForm = $scope.path.split('.'); currentObject = $scope.countries; for (var i = 0; i &lt; pathInArrayForm.length; i++){ currentObject = currentObject[pathInArrayForm[i]]; } currentObject.capital = "Montreal"; } However, when I try to replace the object with a blank one, via currentObject = {}; Nothing happens. It doesn't change anything! When I use: currentObject.capital = "Montreal" it works, but if I just use the object plain, nothing happens. Please see my JSFiddle: http://jsfiddle.net/ay1wpr5L/2/ My question is, how can I replace an object nested inside other JSON objects, with a blank {}?
linked to: http://stackoverflow.com/q/9437981
type: Question
has title: Javascript navigation to nested JSON object not working when modifying whole object
score: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/43689144
has comment: http://stackoverflow.com/comment/43689178
tagged with: angularjs

http://stackoverflow.com/a/27639866
has comment: http://stackoverflow.com/comment/43698798
type: AcceptedAnswer
downvote count: 0
score: 6
has comment: http://stackoverflow.com/comment/43699241
accepted answer of: http://stackoverflow.com/q/27639780
has comment: http://stackoverflow.com/comment/43698548
has comment: http://stackoverflow.com/comment/43698550
answers question: http://stackoverflow.com/q/27639780
type: Answer
has comment: http://stackoverflow.com/comment/43698993
upvote count: 6
has body: Its better to make directives for these kind of things: Make a directive for toggleDisplay as following app.directive('toggleDisplay', function() { return function(scope, element) { element.bind('click', function() { element.toggleClass('unneeded-class'); // or something else }); }; }); and then you can apply this directive to any element in the html: &lt;div toggle-display&gt;&lt;/div&gt; You can make a drop down logic or kindof accordion etc following this pattern How do i listen to a click anywhere in the app, that when i click it and "that" element is not the select box, close all the select boxes? let suppose you have that opend/dispalyed div that you want to hide when you click outside of it . give it a class "divvy" and attach the following directive to its wrapping container: app.directive('toggleFocus', function() { return function(scope, element) { element.bind('click', function() { if(!element.hasClass('divvy')) angular.element(document.querySelector('.divvy')).css({display:'none'}) }); }; }); html: &lt;div toggle-focus&gt; &lt;div class="divvy"&gt;&lt;/div&gt; &lt;/div&gt;
has comment: http://stackoverflow.com/comment/43698496

http://stackoverflow.com/comment/43645816
score: 0
comment on: http://stackoverflow.com/q/27606954
has text: i found $$hashkey in one of the objects that was appeneded to datasources. it looks like Angular appends this to check if something is updated. maybe its appending this to the end of the json array?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27612079
has answer: http://stackoverflow.com/a/27612176
score: 1
tagged with: livereload
upvote count: 1
tagged with: grunt-contrib-watch
type: Question
has body: here's my gruntfile: module.exports = function(grunt) { // Project configuration. grunt.initConfig({ hologram: { generate: { options: { config: 'config.yml' } } }, libsass: { files: { src: 'src/scss/style.scss', dest: 'templates/static/css/style.css' } }, connect: { server: { options: { port: 8000, hostname: 'localhost', base: 'docs/', livereload: 35729 } } }, watch: { scss: { files: ['src/scss/**/*.scss', 'templates/static/css/*.css'], tasks: ['libsass','hologram'], options: { livereload: true } } } }); // Load plugins. grunt.loadNpmTasks('grunt-libsass'); grunt.loadNpmTasks('grunt-hologram'); grunt.loadNpmTasks('grunt-contrib-connect'); grunt.loadNpmTasks('grunt-contrib-watch'); // Default task(s). grunt.registerTask('default', ['connect','libsass','hologram','watch']); }; And here's my package file: { "name": "...", "version": "1.0.0", "description": "...", "dependencies": { "grunt": "^0.4.5" }, "devDependencies": { "connect-livereload": "^0.5.2", "grunt": "^0.4.5", "grunt-contrib-connect": "^0.9.0", "grunt-contrib-watch": "^0.6.1", "grunt-hologram": "0.0.4", "grunt-libsass": "^0.2.0" }, "repository": { "type": "git", "url": "..." }, "author": "Yann Bettremieux", "homepage": "..." } Everything seems to be working fine. When I go to http://localhost:8000/ I see my site and when I save my watched files the page reloads etc. But it doesn't actually reloads the previous changes. Meaning, the first time I edit a SCSS file to say color: blue, I see in the inspector that some CSS livereload files are loaded but there is no change on the page. If I change the CSS to color: red the page reload but show everything in blue… If I change it to green, it reloads and shows me the everything in red, etc. etc. I tried tu use the chrome livereload extension insrtead but it didn't change anything. I tried grunt-sass instead of libsass. Same behavior. Not sure what else to try to resolve this issue. Any pointer in thr right direction much appreciated!
tagged with: javascript
tagged with: gruntjs
has title: Grunt watch: livereload reloads 1 step behind…
answer count: 1
downvote count: 0
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/27611461
has comment: http://stackoverflow.com/comment/43670016
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/43672517
has comment: http://stackoverflow.com/comment/43670932
type: Answer
upvote count: 6
has comment: http://stackoverflow.com/comment/43668230
has comment: http://stackoverflow.com/comment/43679838
score: 6
has body: You can always explicitly state the dataType in any query like this: var p = new breeze.Predicate('UnitPrice', "&gt;=", { value: 10.53, dataType: breeze.DataType.Decimal }); However, this shouldn't be necessary if you have the metadata for the EntityType available on the client. In that case, the EntityQuery will, by default, assume that the dataType is what is specified in the metadata for each property. The only reason that it should assume Double vs Decimal is if no EntityType metadata is available for the specified property.
accepted answer of: http://stackoverflow.com/q/27609998
has comment: http://stackoverflow.com/comment/43672091
answers question: http://stackoverflow.com/q/27609998
has comment: http://stackoverflow.com/comment/43671117

http://stackoverflow.com/comment/43410039
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27489233
score: 0
has text: did you try anything may be a piece of code...

http://stackoverflow.com/a/27585881
score: 1
has body: This code will capture all &lt;script&gt; tags so that you can iterate (loop) over them. I configured this one to remove them all, but you could easily wrap this in an if-condition. Following the example ... var all = document.getElementsByTagName("script"); for (var i=0; i &lt; all.length; i++) { var all_id = all[i].id; if (all_id!=="xyz") { all[i].parentNode.removeChild(all[i]); } } ... slightly more readable ... var all = document.getElementsByTagName("script"); for (var i=0; i &lt; all.length; i++) { var all_id = all[i].id; if (all_id==="xyz") { // DO NOTHING IF ID==="xyz" } else { all[i].parentNode.removeChild(all[i]); } }
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27585806
upvote count: 1

http://stackoverflow.com/a/27536193
has body: For anyone else who needs this. In jquery.responsivetable.js, around line 118, look for this code block: table.before(tableStatic); table.wrap(_divClass + _overflowContainer + '" style="float:left;' + _overflow + ':scroll;' + _overflow + '-y:hidden;"/&gt;'); tableStatic.wrap(_divClass + _staticContainer + '" style="float:left;"/&gt;'); if (options.scrollHintEnabled) { setupScrollHint(table, tos); } //This line added courtesy Marty. The class "table" is from bootstrap. When present on the table contained in the overflow div, it causes column headers to shift to the left instead of aligning with their respective column data. jc 12/17/14 ***table.removeClass("table");*** } That last line "table.removeClass("table");" is what ended up doing the trick.
answers question: http://stackoverflow.com/q/27529040
downvote count: 0
type: Answer
score: 1
upvote count: 1

navigation
tags question: http://stackoverflow.com/q/27537917
tags question: http://stackoverflow.com/q/27545301
tags question: http://stackoverflow.com/q/27513116
tags question: http://stackoverflow.com/q/27603112
type: Tag
tags question: http://stackoverflow.com/q/27594333
tag name: navigation
tags question: http://stackoverflow.com/q/27592402

http://stackoverflow.com/a/27631665
has body: Here is a visual representation of how it is working, abc(9, 10) + 10 abc(8, 10) + 10 + 10 abc(7, 10) + 10 + 10 abc(6, 10) + 10 + 10 + 10 abc(5, 10) + 10 + 10 + 10 + 10 abc(4, 10) + 10 + 10 + 10 + 10 + 10 abc(3, 10) + 10 + 10 + 10 + 10 + 10 + 10 abc(2, 10) + 10 + 10 + 10 + 10 + 10 + 10 + 10 abc(1, 10) + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 abc(0, 10) + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 0 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 Its basically performing multiplication of two numbers.
answers question: http://stackoverflow.com/q/27631576
type: Answer
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27631576

http://stackoverflow.com/comment/43693321
type: Comment
has text: He's trying to call `splice` to remove elements, not `slice` to select them.
comment on: http://stackoverflow.com/a/27637138
score: 0
type: AnswerComment

http://stackoverflow.com/q/27596691
downvote count: 1
type: Question
has body: There are different ways for you to create navigational tabs. Horizontal tabs are easy, but vertical tabs are a different monster. If you've ever tried to create a vertical navigation tab, you may have come across a situation during coding where a break is inserted between the UL and DIV tags. I am trying to remove that break so that the UL and DIV tags are in the same line, and I know that there's a CSS code that can do this, but I don't know which. I tried using white-space: nowrap. It only works on texts, not elements. I tried the float: left and right with forced margin and width as suggested in a question here on SO. That failed, too. My only other options are to force the fixes by: 1) Using position: fixed with manual top and left numbers 2) Putting the UL and DIV tags inside a TABLE 3) Use jQuery I want to avoid using all those three for the time being. You can view my demo by clicking here: http://www.wammyradio.com/personal/stackexchange/testing.html In this demonstration, the line break is being represented by the HR tag. What is the proper code for me to use so that the UL and DIV elements are on the same line (ie, next to each other, above the HR line), and there is no break between them?
has title: Vertical Tabs: Removing UL & DIV Break Without jQuery Or Fixed Position Property
has comment: http://stackoverflow.com/comment/43617229
answer count: 2
upvote count: 0
has answer: http://stackoverflow.com/a/27596783
tagged with: javascript
favorite count: 0
tagged with: html-lists
possible better answer: http://stackoverflow.com/a/27596767
has answer: http://stackoverflow.com/a/27596767
tagged with: css
score: -1
type: AnsweredQuestion
tagged with: tabs
accepted answer: http://stackoverflow.com/a/27596783

http://stackoverflow.com/q/27536206
tagged with: reference
has title: Javascript property as reference to other object's property
score: 0
has comment: http://stackoverflow.com/comment/43500849
tagged with: object
has comment: http://stackoverflow.com/comment/43500815
has comment: http://stackoverflow.com/comment/43501125
tagged with: javascript
has comment: http://stackoverflow.com/comment/43500887
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43501396
has answer: http://stackoverflow.com/a/27536700
has comment: http://stackoverflow.com/comment/43501269
type: Question
has body: Is there a way to assign properties of one object as references to the properties of another, and do so dynamically? Note that in the for loop, I've skipped any property that has the same name as the second object. I'm working on a framework that will cache JSON as objects with behaviors and allow ORM kind of behavior, where I can grab cached objects and collections as properties of other cached objects. I need to skip certain properties to avoid circular reference. var obj1 = { prop1: "hey", obj2:"you", prop2: "come over here" } var obj2 = {} for(var prop in obj1){ if(prop != 'obj2'){ obj2[prop] = obj1[prop]; } } console.log(obj1); console.log(obj2); obj1.prop2 = "come on, man"; console.log(obj1); console.log(obj2); //obj1 is unchanged in output. I would like to be able to update it by mutating obj2's properties fiddle: http://jsfiddle.net/6ncasLb0/1/ If this is not possible, is it possible to remove or mutate a property of a reference without mutating the original object? I know, probably not. Just a shot in the dark.
answer count: 1

http://stackoverflow.com/comment/43475191
type: QuestionComment
has text: Does `file_get_contents` return your html successfully? If not then dom is not loaded in `$html` so tyring to get property `nodeValue` of non-object.
comment on: http://stackoverflow.com/q/27523099
score: 0
type: Comment

http://stackoverflow.com/q/27480301
accepted answer: http://stackoverflow.com/a/27480370
type: AnsweredQuestion
has title: jQuery `prop` not working in FireFox on the `open` property of details
has comment: http://stackoverflow.com/comment/43393684
type: Question
has body: I want to fix the detail-html-element behaviour in Firefox. So I toggle the open attribute myself like: $('summary').on('click', function () { var details = $(this).parent(); $('details').prop('open', !details.attr('open')); }); DEMO I use prop because open is a property and not an attribute, right ?! Anyway, this doesn't work in Firefox, but if I change prop to attr it works $('details').attr('open', !details.attr('open')); Can someone explain to me where I go wrong ? Thnx!
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27480370
linked to: http://stackoverflow.com/q/5874652
tagged with: http://stackoverflow.com/tag/html
upvote count: 6
linked to: http://stackoverflow.com/q/5995628
score: 6

http://stackoverflow.com/comment/43445726
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27506564
score: 0
has text: are you talking about when you submit it, if yes add an event listener for the submit and use event.preventDefault(); to prevent refreshing of page when form is submitted

http://stackoverflow.com/a/27721901
upvote count: 6
answers question: http://stackoverflow.com/q/27597575
has body: Don't use globals. Use var async = reuqire('async') where needed. Use module.exports in your specific modules you require. Use something like browserify to generate a single js. Uglify (or use a browserify transform named uglifyify) For example, the simplest form (without using uglifyify) $ browserify run.js | uglifyjs -c &gt; run.min.js Note that if you use your own code, like common.js, you should require it using a relative path, var common = require("./common"). I suggest you use the exports syntax: // common.js code exports.isAuthenticated = function() { //... return false; }; And of course use it just as you would with async.js: //run.js var common = require("./common"); var async = require("async") async.series([function () { common.isAuthenicated(); }], function () { console.log("done"); }); assuming both common.js &amp; run.js reside in the same directory. related question: How to get minified output with browserify? A Side Note The way you used async.series in your question has no real advantage. You could have just: //run.js var common = require("./common"); common.isAuthenicated(); console.log("done"); in Async series you usually call async functions: async.series([ function(callback){ // do some stuff ... callback(null, 'one'); }, function(callback){ // do some more stuff ... callback(null, 'two'); } ], // optional callback function(err, results){ // results is now equal to ['one', 'two'] }); so, I would expect to see something like: // common.js code exports.isAuthenticated = function(callback) { //... callback(null, false); }; and then //run.js var common = require("./common"); var async = require("async") async.series([common.isAuthenicated], function (err, results) { console.log("done with", results[0]); }); I usually prefer a different "syntax" // an example using an object instead of an array async.series({ one: function(callback){ setTimeout(function(){ callback(null, 1); }, 200); }, two: function(callback){ setTimeout(function(){ callback(null, …
type: Answer
downvote count: 0
score: 6

http://stackoverflow.com/q/27512225
score: 0
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27513062
has title: Overlapping child element with parent for menu
has body: I'm trying to make a window blind effect menu for a mobile project. The effect is simple and goes as follow : Click on the menu icon and the bar goes to the top with the menu dropping down When selecting an item, the menu "rolls" up in a window blind fashion and the content appears in the same fashion Here are the bits of CSS that I think is the culprit : #menu_wrapper ul { display: none; top: 100px; right: 0; bottom: auto; left: auto; position: absolute; height: auto; width: 100vw; margin: 0; padding: 1em; color: #f5f5f5; font-size: 2.5rem; background-color: rgba(0, 0, 0, 0.8); } #menu_wrapper ul a { color: #f5f5f5; } #menu_wrapper ul a:hover { color: #00a8b0; text-decoration: none; } #menu_wrapper address { margin-top: 1.5rem; font-size: 1.5rem; } #menu_wrapper .item-content { display: none; top: 50%; right: 0; bottom: auto; left: auto; position: absolute; height: auto; width: 100vw; margin: 0; padding: 1em; z-index: 3; } The problem is that the "item-content" stay inside the parent "menu_wrapper". It might have something to do with the fact that "menu_wrapper" is absolutely positioned but I'm still having trouble with those peculiar cases. It might also be my jQuery code but I doubt it (suggestions are still welcomed)! I've included a link to a jsFiddle for you to look at : http://jsfiddle.net/smpte11/5s6qxntt/ Thanks. EDIT : I want to precise the effect that I'm trying to achieve. When clicking on the menu, it drops down and when I close the menu, it goes up until it disappears in a window blind fashion. Now, when I click on one item of the menu, the menu rolls up until it disappears (like when you close it) and then the content goes down, revealing it instead of the menu. Naturally, when you go to the previous level, the same effects happens.
tagged with: http://stackoverflow.com/tag/html
answer count: 1
type: UnansweredQuestion
tagged with: css

http://stackoverflow.com/q/27475258
accepted answer: http://stackoverflow.com/a/27476506
tagged with: coordinates
type: Question
has comment: http://stackoverflow.com/comment/43385110
has answer: http://stackoverflow.com/a/27476506
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: resize
has comment: http://stackoverflow.com/comment/43385437
favorite count: 0
has body: I'm new to SVG and I'm having trouble solving this problem : I'm trying to create a system of points, rotating around a single axis, like a solar system. The center point is a round div, placed to the center of the viewport with the help of the CSS calc function : left: calc(50% - myDivWidth/2); top: calc(50% - myDivHeight/2); I placed SVG circles around this central point with the "cx" and "cy" attributes and everything works fine. Here's the problem : when I resize the window, the div is automatically moved to stay at the center of the screen. But my SVG circles are not moving because the coordinate system doesn't stretch to the new size of the viewport. Now if I reload the page after resizing, everything is placed correctly again. I thought I could recalculate the coordinates of my circles when a resize occurs but isn't it a bit heavy ? All my circles are placed in a svg tag with a 100% height and width. I hope you can help me with this ! Thanks !
score: 2
tagged with: http://stackoverflow.com/tag/svg
upvote count: 2
has title: Refresh svg coordinates on window resize
type: AnsweredQuestion

http://stackoverflow.com/a/27564859
score: 0
answers question: http://stackoverflow.com/q/27564700
type: Answer
has body: function changeExt(s){ if(s.substring(s.length - 3,s.length) == "doc"){ var s = s.substring(0,s.length - 3); s += "txt"; return s; } else{ return 'bad ext'; } }

http://stackoverflow.com/comment/43457338
score: 0
type: AnswerComment
type: Comment
has text: Okay so you're loading the file on the click of a button, but how?
comment on: http://stackoverflow.com/a/27513353

http://stackoverflow.com/a/33422697
upvote count: 117
accepted answer of: http://stackoverflow.com/q/27626764
answers question: http://stackoverflow.com/q/27626764
has body: You can use source maps to preserve the mapping between your source code and the bundled/minified one. Webpack provides the devtool option to enhance debugging in the developer tool just creating a source map of the bundled file for you. This option can be used from the command line or used in your webpack.config.js configuration file. Below you can find a contrived example using the command line to generate the bundled file (bundle.js) along with the generated source map file (bundle.js.map). $ webpack --devtool source-map ./entry.js bundle.js Hash: b13b8d9e3292806f8563 Version: webpack 1.12.2 Time: 90ms Asset Size Chunks Chunk Names bundle.js 1.74 kB 0 [emitted] main bundle.js.map 1.89 kB 0 [emitted] main [0] ./entry.js 85 bytes {0} [built] [1] ./hello.js 59 bytes {0} [built] index.html &lt;html&gt; &lt;head&gt; &lt;meta charset="utf-8"&gt; &lt;/head&gt; &lt;body&gt; &lt;script src="bundle.js"&gt;&lt;/script&gt; &lt;/body&gt; &lt;/html&gt; entry.js var hello = require('./hello.js'); document.body.innerHTML += 'It works ' + hello(); hello.js module.exports = function () { return 'Hello world!'; }; If you open index.html in your browser (I use Chrome but I think it is also supported in other browsers), you will see in the tab Sources that you have the bundled file under the file:// scheme and the source files under the special webpack:// scheme. And yes, you can start debugging as if you had the original source code! Try to put a breakpoint in one line and refresh the page.
type: AcceptedAnswer
score: 117
type: Answer
has comment: http://stackoverflow.com/comment/71455464
downvote count: 0

http://stackoverflow.com/a/27637176
has body: Month starts with 0 so if you wants to set date as 1st Jan 2007 the you have to use new Date(2007, 0, 1) Which is equivalent to new Date(2007, 1 - 1, 1) Read Docs month: Integer value representing the month, beginning with 0 for January to 11 for December.
answers question: http://stackoverflow.com/q/27637157
downvote count: 0
has comment: http://stackoverflow.com/comment/43693280
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/a/27558023
downvote count: 1
answers question: http://stackoverflow.com/q/27557972
score: 1
type: Answer
upvote count: 2
has body: The main issue is that &lt;script href="description.js"&gt;&lt;/script&gt; should be &lt;script src="description.js"&gt;&lt;/script&gt; - src not href. Also your .descriptions are not inside your .titles, so it won't find the related description and they will all stay hidden. So you need to get the next element instead: /*global $, jQuery, alert*/ var main = function () { 'use strict'; $('.title').click(function () { $('.description').hide(); $(this).next().show(); }); }; $(document).ready(main);

http://stackoverflow.com/q/27636527
has comment: http://stackoverflow.com/comment/43692093
accepted answer: http://stackoverflow.com/a/27636799
upvote count: 10
type: Question
score: 9
has comment: http://stackoverflow.com/comment/43692037
tagged with: javascript
has comment: http://stackoverflow.com/comment/43692035
has answer: http://stackoverflow.com/a/27636760
linked to: http://stackoverflow.com/q/9083089
tagged with: http://stackoverflow.com/tag/html
answer count: 7
tagged with: css
favorite count: 0
has body: For example, I have this CSS script: &lt;style&gt; .header{ background:none: color:#fff; } &lt;/style&gt; Then, I would like to change the header value to: &lt;style&gt; .header{ background-color:#fff: color:#000; } &lt;/style&gt; The values are stored in database. What makes me confused is which should be the best to do that: Using PHP script or CSS or even javascript. I want it changed based on the CSS value from my database which I can change again when I need it (by using PHP script). Perhaps this question is too general but, please give me some scripts which I can perform it well. Thanks for any help.
has answer: http://stackoverflow.com/a/27636581
has answer: http://stackoverflow.com/a/27636799
has answer: http://stackoverflow.com/a/27636619
has answer: http://stackoverflow.com/a/27636702
has answer: http://stackoverflow.com/a/27636610
has answer: http://stackoverflow.com/a/77700648
has title: Change CSS value by using PHP
tagged with: php
downvote count: 1
has comment: http://stackoverflow.com/comment/43692079
has comment: http://stackoverflow.com/comment/43692054
possible better answer: http://stackoverflow.com/a/27636702
type: AnsweredQuestion

http://stackoverflow.com/comment/43404293
score: 5
comment on: http://stackoverflow.com/q/27486211
has text: Have you tried it? Anyway `var hash = self.getHashFromMasterRecords(d[0]) || false;` is probably what you are looking for
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/44266817
score: 1
type: Comment
comment on: http://stackoverflow.com/a/27512153
type: AnswerComment
has text: @Bergi: I know this is old and you probably know the answer by know, but just for reference: AFAIK `super()` *used* to be valid in every method and it would just call the parent method. But the spec changed recently and `super()` is now only allowed in the constructor `super.method()` is indeed the way to call parent methods in overridden methods.

http://stackoverflow.com/comment/43508303
score: 0
comment on: http://stackoverflow.com/q/27540315
type: Comment
has text: Do you something in jQuery?
type: QuestionComment

http://stackoverflow.com/comment/43393779
has text: This is not an answer. Please post a valid applicable answer
comment on: http://stackoverflow.com/a/27480397
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/comment/43667864
type: Comment
comment on: http://stackoverflow.com/a/27623419
type: AnswerComment
score: 0
has text: Well, I don't understand your answer. Your solution displays the current play time. It doesn't indicate whether the user is moving the seekbar around.

http://stackoverflow.com/a/27548817
type: Answer
score: 1
upvote count: 2
type: AcceptedAnswer
has body: The $http.get method performs an AJAX request, so it will get the js file as a string for your JavaScript to consume. Probably what you're looking for is JSONP, which will execute as JavaScript any file you download. Try using $http.jsonp instead. Angular docs on $http.jsonp
downvote count: 1
accepted answer of: http://stackoverflow.com/q/27548709
answers question: http://stackoverflow.com/q/27548709

http://stackoverflow.com/q/27533232
has answer: http://stackoverflow.com/a/27533289
has body: I am following a tutorial for a basic parallax scrolling effect: http://callmenick.com/2014/09/08/advanced-parallax-scrolling-effect/ It is a good tute and pretty easy to understand and implement but I came across some code I just can't quite get my head around. (function(){ var parallax = document.querySelectorAll(".parallax"), speed = 0.5; window.onscroll = function(){ [].slice.call(parallax).forEach(function(el,i){ var windowYOffset = window.pageYOffset, elBackgrounPos = "50% " + (windowYOffset * speed) + "px"; el.style.backgroundPosition = elBackgrounPos; }); }; })(); I get that it loops through all elements with the class parallax, gets the Yoffset and sets the background position. But can anyone breakdown this line with an explanation? [].slice.call(parallax).forEach(function(el,i) UPDATE Some great explanations below but is this a better solution than using jQuery like so: $('.parallax').each(function(){ $this= $(this); var window_y = (window.pageYOffset+1000); var elBackgrounPos = "0 " + (window_y * speed) + "px"; $this.css('background-position', elBackgrounPos); }); To me this is much more readable, but does the javascript version perform better or is more efficient in some ways?
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27533463
has answer: http://stackoverflow.com/a/27533463
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/27533289
score: 1
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: parallax
favorite count: 0
has title: jQuery / Javascript Parallax Code - explanation

http://stackoverflow.com/comment/43443407
comment on: http://stackoverflow.com/a/27491255
type: Comment
score: 0
type: AnswerComment
has text: When you said `acts as a keyboard input` I assumed that it typed the whole thing in one go, if it's typing letter by letter, perhaps `change` is the event you want to listen for. @nicolefdesigns hows this new version?

functional-programming
tags question: http://stackoverflow.com/q/27496419
tag name: functional-programming
type: Tag
tags question: http://stackoverflow.com/q/27496534
tags question: http://stackoverflow.com/q/27535428
tags question: http://stackoverflow.com/q/27580021
tags question: http://stackoverflow.com/q/27594934
tags question: http://stackoverflow.com/q/27572276

http://stackoverflow.com/comment/43441822
score: 0
comment on: http://stackoverflow.com/q/27505591
type: QuestionComment
type: Comment
has text: @SW4 Duplicate questions should be closed as *duplicate*.

http://stackoverflow.com/a/27477239
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/43388499
answers question: http://stackoverflow.com/q/27477187
has body: Have you tried writing success inside the $.ajax function? Something like this: var request = $.ajax({ url: link, type: 'GET', dataType: 'html', success: function(data) { alert('AJAX request successfully completed'); } }); You can also try using request.done which you have used in the second ajax call.

http://stackoverflow.com/comment/95840637
type: AnswerComment
has text: Alright, then I misunderstood the point. So you wanted to prevent filename duplicates. I thought you were asking, how it is possible to keep duplicates.
type: Comment
comment on: http://stackoverflow.com/a/53905362
score: 0

http://stackoverflow.com/a/75856653
has body: I'm not sure what you want to archive, I imagin you want to control a video by scrolling up or down. I found a video on Youtube, on how to build a video control by scrolling. You may be interested: https://www.youtube.com/watch?v=HiegEfkenXA Here is a simple code-snippet I've done: Test
downvote count: 0
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/27610597

http://stackoverflow.com/comment/43613007
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27594656
has text: I am just opening the file in the browser because I thought it's only javascript, it must work also local on my pc.
score: 0

http://stackoverflow.com/q/27551659
tagged with: 2d
has comment: http://stackoverflow.com/comment/43532027
upvote count: 1
tagged with: radians
answer count: 1
tagged with: canvas
has title: Canvas Game: Maximum steering angle in n seconds
tagged with: javascript
type: UnansweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/27551920
has body: So I have no idea if the heading brings my problem to a point and my english might not be that good to explain it entirely. Luckily the code can :D So, I'm working on a that little multiplayer game where you can steer a line with the keyboard (speed is e.g. 300 pixel per second and you adjust it's moving angle with the keys). Each player draws an infinite line and when your 'snake' .. idk how you would call it .. hits something else than black (background color) you are dead. The player who lives longest wins. You can collect items and one of this items is a 'Hadouken' from Streetfighter which targets the nearest player and tries to hit him (Same here: speed and angle given). The 'Hadouken'-angle is calculated every frame. aimTo is the player: if (hadouken.aimTo) { var dx = hadouken.aimTo.x - hadouken.x; var dy = hadouken.aimTo.y - hadouken.y; var dist = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2)); hadouken.rad = Math.atan2(dy, dx); if (dist &lt; hadouken.aimTo.radius) { ... } } var plusX = hadouken.speed * _.timeFactor * Math.cos(hadouken.rad); var plusY = hadouken.speed * _.timeFactor * Math.sin(hadouken.rad); hadouken.x += plusX; hadouken.y += plusY; _.rotateDraw(hadouken, hadouken.x - hadoukenWidth / 2, hadouken.y - hadoukenHeight / 2, hadoukenWidth, hadoukenHeight, {rad: hadouken.rad}, function(x, y) { _.drawImage(hadoukenImage, x, y, hadoukenWidth, hadoukenHeight); }); But this thing always has the right angle and will reach it's target (speed = targetSpeed * 1.5 ;)) if it soesn't vanish after the hardcoded 5 seconds. You have no chance do dodge it with your line. I'ts curves are just too sharp. My question is: Can you, somehow, limit the increase of the angle to .. idk .. 30 degrees per second ? I'm sure I could do that on my own but that would be fancy and probably unnecessarily dificult. I hope that was clear enough, sorry again for my english and I hope to get some answers :)
favorite count: 0
type: Question
tagged with: angle

http://stackoverflow.com/a/27578222
has comment: http://stackoverflow.com/comment/43581273
has comment: http://stackoverflow.com/comment/43581284
answers question: http://stackoverflow.com/q/27578199
has comment: http://stackoverflow.com/comment/43581483
has body: Please use the following code. It works the same as the onload() function of Vanilla Javascript.
has comment: http://stackoverflow.com/comment/43581342
type: Answer
has comment: http://stackoverflow.com/comment/43581596
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/43581314
has comment: http://stackoverflow.com/comment/43581260
downvote count: 0

http://stackoverflow.com/q/27639723
has comment: http://stackoverflow.com/comment/43698300
type: Question
has body: I want the "edit" button below to be in the "clicked" stated before the page loads. How can I achieve this? edit del
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27640821
answer count: 1
has comment: http://stackoverflow.com/comment/43700248
has title: How to apply ng-click before page load
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27640821

http://stackoverflow.com/a/27534241
has body: You can read the MDN The typeof operator returns a string indicating the type of the unevaluated operand. The typeof operator is followed by its operand: typeof operand // Strings typeof "" === 'string'; typeof "bla" === 'string'; typeof (typeof 1) === 'string'; // typeof always return a string typeof String("abc") === 'string'; // but never use this form!
type: Answer
score: 0
answers question: http://stackoverflow.com/q/27534168

http://stackoverflow.com/q/27504205
has answer: http://stackoverflow.com/a/27504236
tagged with: templates
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27504236
has body: I've got a simple angular template which does a simple ng-repeat containing some divs. I now want to give a containing div a class if the $routeParams.userId equals the id of the object in the loop. See the second line of the code below to see what I mean. <!-- <== SOMETHING LIKE THIS --> {{ contact.user_name }} {{ contact.last_pm_text }} Does anybody know how I can give the div the class active when the contact.id equals the $routeParams.userId? All tips are welcome!
upvote count: 1
possible better answer: http://stackoverflow.com/a/27504242
type: Question
has answer: http://stackoverflow.com/a/27504242
tagged with: javascript
answer count: 2
downvote count: 0
score: 1
has title: How to give div a class based on the route with Angular?
favorite count: 0
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/43390113
comment on: http://stackoverflow.com/q/27477151
has text: @naota I make a demo after learn `watch`: http://jsfiddle.net/yujiangshui/yfo7rrn8/. It works, but the watcher code must above the `val()` code and I set a `setInterval` to monitor the value change.It's a way, but I think it's not a elegant way. Or I'm using in a wrong way?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43566772
comment on: http://stackoverflow.com/a/27566763
has text: Sorry, now I can see that the NetworkRequest doesn't have an Id. Which makes the push extremely hard. But I don't understad why NetworkRequest is an array. You don't have anything that indetifies it.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/43505510
type: QuestionComment
has text: @zerkms Every key, Sorry I am JS illiterate so I may be doing this wrong. Object.key(charAT) displays all of them how do I narrow it to one.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27538667

http://stackoverflow.com/q/27578748
upvote count: 1
tagged with: jquery
linked to: http://stackoverflow.com/q/7232250
favorite count: 0
has answer: http://stackoverflow.com/a/27578772
tagged with: datepicker
has answer: http://stackoverflow.com/a/27578797
downvote count: 0
type: UnansweredQuestion
score: 1
duplicate of: http://stackoverflow.com/q/7232250
has comment: http://stackoverflow.com/comment/43582221
type: Question
has title: Opening a date picker automatically when a page loads
has comment: http://stackoverflow.com/comment/43582274
has body: I'm writing a mobile app based on html, css and javascript. I need to open a date picker automatically when a page loads in mobile. How can I do it?
tagged with: javascript
tagged with: jquery-ui-datepicker
answer count: 2

http://stackoverflow.com/a/27554718
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/27553034
type: AcceptedAnswer
downvote count: 0
has body: Here's what's going on. You successfully generated your xAxis with the correct x scale in the first go around, however You didn't update your xAxis with the new domain of data You were right in that you had to re-update your scales whenever you click on your labels. I've done a couple of things: Add a sourceData variable after you've coerced your numbers, for all your functions to reference Add a updateXScale(data) function that will simply update your x scale's domain Have it called every time you click a label. Not only will this fix your x scale, it will also enable the correct scaling of your x-coordinates for your .dot's. Here's what it looks like all together. I've created a fiddle that has a working version of your example. And here's your updateChart function for reference: function updateChart() { updateXScale(sourceData); svg.selectAll('.dot') .transition() .duration(1000) .attr('cx', function(d) { return x(d.data[parameter]); }); svg.select(".x.axis") .call(xAxis); }
type: Answer
accepted answer of: http://stackoverflow.com/q/27553034

http://stackoverflow.com/q/27491222
answer count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/43414430
type: UnansweredQuestion
has title: Safari not computing calc() values
has comment: http://stackoverflow.com/comment/43414170
tagged with: safari
score: 2
has comment: http://stackoverflow.com/comment/43414206
has body: I wonder if this is a bug or if there's a good workaround: Only on Safari (using iOS Safari 8.1 and Safari 7.0.5 for the Dev Tools), the browser doesn't seem to have a calculated value for an an element with the style: .node { top: calc(39px - 100%); } it displays properly in the browser, but window.getComputedStyle($('.node')).top returns null and in fact the Computed Properties in Safari's dev tools also show top: null. If I change the style to a pixel value, the Computed Property shows correctly (i.e., top: 400px). This is a problem for me because I'd like to use the computed style value in JavaScript calculations.
type: Question
downvote count: 0
tagged with: javascript
favorite count: 0
linked to: http://stackoverflow.com/q/20443343
tagged with: computed-style
tagged with: css

http://stackoverflow.com/comment/43607664
type: QuestionComment
comment on: http://stackoverflow.com/q/27591901
has text: @BenjaminGruenbaum yes I know, but I am just wondering if there is something similar to javascript question mark operator, like `condition ? value-if-true : value-if-false`
score: 0
type: Comment

http://stackoverflow.com/comment/43657299
score: 0
type: Comment
has text: my mistake earlier on. sorry. `.parent :first` - correct.
comment on: http://stackoverflow.com/a/27618016
type: AnswerComment

http://stackoverflow.com/comment/43479181
has text: what is parent html you mean? show us the code
score: 1
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27525325

http://stackoverflow.com/comment/43450654
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27510009
score: 0
has text: @frank: It seems that `taffydb` [doesn't support indices](https://github.com/louischatriot/taffydb-benchmark), so it's likely just as fast (and simpler) to simply scan over the records manually (using `indexOf` instead of a regex should generally be faster too).

http://stackoverflow.com/comment/43510716
score: 0
type: AnswerComment
type: Comment
has text: Yes by the method yugi said in his comment or the [duplicate link](http://stackoverflow.com/a/5742576/2731055) from @webino has a good explanation
comment on: http://stackoverflow.com/a/27541547

http://stackoverflow.com/q/27477676
score: 0
has answer: http://stackoverflow.com/a/27477770
favorite count: 0
has title: How do I add my own JS to a Razor view?
has answer: http://stackoverflow.com/a/27477718
tagged with: razor
answer count: 4
accepted answer: http://stackoverflow.com/a/27477718
has body: I want to include lines 4-6 in the Scripts section of the page. The code below is in my view. Instead of being written to it prints to the page. I can't figure out what I'm doing wrong. Somehow it seems this is a very uncommon thing to do as I am not finding examples of how to do it correctly. 1 @section Scripts { 2 @Scripts.Render("~/bundles/jqueryval") 3 @Scripts.Render("~/bundles/datetimepicker") 4 $(function() { 5 $(".datetimepicker").datetimepicker(); 6 }); 7 }
upvote count: 1
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27477774
possible better answer: http://stackoverflow.com/a/27477720
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27477720
tagged with: asp.net-mvc
tagged with: javascript

http://stackoverflow.com/q/27506970
has title: Issue with asynchronous function and scope of javascript variable
has answer: http://stackoverflow.com/a/27507080
linked to: http://stackoverflow.com/q/13088153
score: 1
has body: I have the following code that calls an REST webservice. The web service returns a boolean. checkCurrentPassword: function (passwordInfo) { var valid = false; $http.post('/api/preference/password/check', passwordInfo) .success(function (data) { valid = data; }); return valid; } The trouble is that by the time the checkCurrentPassword returns valid is still false because the ajax call has not completed due to its asynchronous nature. I am not sure how to make sure the valid variable is properly assigned the value returned from the server. Can anyone please help? edit 1: Using a callback, It seems I am only deporting the problem to the controller layer... See below: from angular service: checkCurrentPassword: function (passwordInfo, callback) { return $http.post('/api/preference/password/check', passwordInfo) .success(function (data) { callback(data); }); } from angular controller: $scope.updatePassword = function () { if ($scope.updatePasswordForm.$valid) { var valid = false; passwordService.checkCurrentPassword({plainPassword: $scope.passwordInfo.currentPassword}, function(data, status){ valid = data; }); console.log(valid);//always false passwordService.updatePassword($scope.passwordInfo, function (data, status) { console.log('Updated password successfully'); $state.go('dashboard'); }); } }; edit 2: here is how I rewrote the controller: $scope.updatePassword = function () { if ($scope.updatePasswordForm.$valid) { passwordService.checkCurrentPassword({plainPassword: $scope.passwordInfo.currentPassword}).success(function (data) { if (data) { passwordService.updatePassword($scope.passwordInfo, function (data, status) { console.log('Updated password successfully'); $state.go('dashboard'); }); } }); } };
has comment: http://stackoverflow.com/comment/43444212
has answer: http://stackoverflow.com/a/27507228
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27507054
answer count: 3
upvote count: 1
downvote count: 0
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43444924
tagged with: angular-promise
has comment: http://stackoverflow.com/comment/43444547

http://stackoverflow.com/comment/43657543
type: Comment
type: QuestionComment
has text: So does the onload handler fired? I guess no... You have to learn how to debug javascript before going further
score: 0
comment on: http://stackoverflow.com/q/27618267

http://stackoverflow.com/comment/43610857
type: QuestionComment
has text: You probably can't do much more with the Visual Studio 2013 and you probably can't expect that someone will improve it as the Visual Studio 2015 (currently in preview version) addresses those issues, see http://blogs.msdn.com/b/typescript/archive/2014/11/12/announcing-typescript-1-3.aspx
score: 0
comment on: http://stackoverflow.com/q/27591627
type: Comment

http://stackoverflow.com/q/27622845
has answer: http://stackoverflow.com/a/28157668
accepted answer: http://stackoverflow.com/a/28157668
type: Question
tagged with: javascript
has title: Passport js + Express 4. Trouble ending login session
tagged with: express
has body: This is the code of my node js app: "use strict"; var express = require('express'); var app = express(); var port = process.env.PORT || 8080; var passport = require('passport'); var LocalStrategy = require('passport-local').Strategy; var morgan = require('morgan'); var cookieParser = require('cookie-parser'); var bodyParser = require('body-parser'); var session = require('express-session'); var flash = require('connect-flash'); var favicon = require('serve-favicon'); app.use(morgan('dev')); app.use(cookieParser()); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: true })); app.use(session({secret: 'kushagrasingh', resave: false, saveUninitialized: false })); app.use(flash()); app.use(express.static(__dirname)); app.use(favicon(__dirname + '/favicon.ico')); app.use(passport.initialize()); app.use(passport.session()); app.get('/welcome', function (req, res) { res.sendFile(__dirname + '/login.html'); }); app.get('/logout', function (req, res) { req.logOut(); req.session.destroy(function (err) { if (err) { console.log(err); } res.redirect('/welcome'); }); }); function isLoggedIn(req, res, next) { if (req.isAuthenticated()) { return next(); } res.redirect('/welcome'); } app.get('/', isLoggedIn, function (req, res) { res.sendFile(__dirname + '/index.html'); }); var users = [ { id: '1', username: 'kush', password: 'abc'}, { id: '2', username: 'kushagra', password: 'abcd'} ]; function findByUserName(username, fn) { var check = 0; users.every(function(user){ console.log(user.username+'************'+username); if(user.username === username) { console.log('true'); check = 1; return fn(null, user); //return false; } }); if (check === 0) { return fn('Wrong username', null); } //return fn(null, null); } function findById(id, fn) { var check = 0; users.every(function(user) { if(user.id === id) { check = 1; return fn(null, user); } }); if(check === 0) { console.log('false'); return fn(new Error("No user with id: "+id)); } } passport.serializeUser(function(user,…
upvote count: 1
answer count: 1
tagged with: passport.js
favorite count: 0
tagged with: node.js
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: authentication

http://stackoverflow.com/q/27504393
type: UnansweredQuestion
has title: AJAX acting in a multi threaded manner
has comment: http://stackoverflow.com/comment/43439310
has comment: http://stackoverflow.com/comment/43441634
has body: I understand that JavaScript is single threaded (as explained in this question: If Javascript is not multithreaded, is there any reason to implement asynchronous Ajax Queuing?), however I am trying to understand how this applies to the application I have developed. Please see the code below: function GetSQLTable() { var str = $("#&lt;%=fieldDatabaseReferences.ClientID%&gt;")[0].value var res = str.split(","); $("#LoadingImage").show(); $("#LoadingImage2").show(); for (var i = 0; i &lt; res.length; i++) { (function (i, res) { setTimeout(function () { GetSQLTable2(i, res.length, res) }, 0); })(i, res); } } function GetSQLTable2(i,reslength,res) { //if (i == 0) //{ // var start = new Date().getTime(); //} var div = document.createElement('div'); div.id = "div" + i document.getElementById('info_div').appendChild(div); var PossiblesPage = false; $.ajax({ type: "POST", url: "PrimaryNominalAjax.aspx/GetSQLTable", data: '{username: "' + $("#&lt;%=fieldUserName.ClientID%&gt;")[0].value + '", terminalname: "' + $("#&lt;%=fieldTerminalName.ClientID%&gt;")[0].value + '", terminalip: "' + $("#&lt;%=fieldTerminalIP.ClientID%&gt;")[0].value + '", mappingid: "' + res[i] + '", usergroup: "' + $("#&lt;%=fieldUserGroup.ClientID%&gt;")[0].value + '", usn: "' + $("#&lt;%=fieldUSN.ClientID%&gt;")[0].value + '", requester: "' + $("#&lt;%=fieldRequester.ClientID%&gt;")[0].value + '", reason: "' + $("#&lt;%=fieldReason.ClientID%&gt;")[0].value + '", rrd: "' + $("#&lt;%=fieldRRD.ClientID%&gt;")[0].value + '", review: "' + $("#&lt;%=fieldReview.ClientID%&gt;")[0].value + '", possibles: "' + PossiblesPage + '",linkno: "", urn1: "", urn2: ""}', contentType: "application/json; charset=utf-8", timeout: 80000000, dataType: "json", success: OnSuccess(i, reslength), error: OnError, failure: function (response) { alert('there was an error loading the webpage') } }); } fieldDatabaseReferences is populated on the server side. The AJAX connects to multiple local databases (up to 30) and puts the informa…
has comment: http://stackoverflow.com/comment/43438834
has comment: http://stackoverflow.com/comment/43439252
linked to: http://stackoverflow.com/q/14841718
has comment: http://stackoverflow.com/comment/43439367
type: Question
score: 0
has answer: http://stackoverflow.com/a/27504876
answer count: 1
tagged with: javascript
tagged with: ajax
has comment: http://stackoverflow.com/comment/43439243
has comment: http://stackoverflow.com/comment/43438831

http://stackoverflow.com/comment/43411892
comment on: http://stackoverflow.com/a/27489992
type: Comment
has text: That worked. Cant believe I didn't think of doing something like that.
score: 0
type: AnswerComment

http://stackoverflow.com/a/27571767
downvote count: 0
answers question: http://stackoverflow.com/q/27571714
type: Answer
score: 1
has body: You are mistaken about what is happening. This code block runs when the document is loaded, not after button1 is clicked. You want to put it inside the click function $('#button1').click(function () { Check(); highestLevel = 2; if (highestLevel == 2) { $('#button2').show(); } }) You will also want to prevent the default action of the button, which is to post the page causing it to reload, by adding an event object $('#button1').click(function (e) { e.preventDefault(); Check(); highestLevel = 2; if (highestLevel == 2) { $('#button2').show(); } }) });
upvote count: 1

http://stackoverflow.com/comment/138472318
type: Comment
has text: They aren't sending JSON.
comment on: http://stackoverflow.com/a/41282124
score: 0
type: AnswerComment

http://stackoverflow.com/a/27529658
upvote count: 2
has body: It appears that the API you are using presents you with news object with a published_first property in a transport format that you want to present differently, but that data doesn't change at runtime after it is received. Doing the conversion in markup as a filter or function within any kind of watch means you are constantly converting the date with every event that triggers a digest. It would be preferable to run the convertDate() function from the controller or service that receives the news items and do the conversion against each item as it is received from the API. Under this scenario the conversion from String to Date is done only once for each news item and your markup then becomes: published: Additionally, if you can be assured that the format coming from the API will always be consistent (which it should), you can one line to the conversion to a timestamp with: $scope.convertDate = function(published_first) { return parseInt(published_first.substr(6), 10); } The line removes the initial non-numeric characters for /Date( and parses up to the first non-numeric which will either be + or ) depending on precision.
answers question: http://stackoverflow.com/q/27516308
score: 2
downvote count: 0
type: Answer

http://stackoverflow.com/comment/44070594
type: Comment
comment on: http://stackoverflow.com/a/27489986
has text: To clarify, Browserify bundles JavaScript code (and JSON which is valid JavaScript anyway). By nature this is volitile. If you want a JSON-like object to be non-volitile (save as persistent storage) then your don't want Browserfy but instead a server or localStorage as usual. I find including JSON in a Browserify bundle best for things like configs/db connection settings where the data editing is usually the developer running Browserify. If it is for application state the a regular Object will do and the JSON bundled is for setting the initial default values.
type: AnswerComment
score: 0

http://stackoverflow.com/a/27506824
has comment: http://stackoverflow.com/comment/43443824
has comment: http://stackoverflow.com/comment/43444804
score: 0
has body: I would normalize this a little bit first: var resultData = { EmployeeData: $('#testForm').serializeArray(), CustomerData: objCustomer }; options.data = JSON.stringify(resultData); Then, if you look at what sort of EmployeeData is being POSTed in the console, you'll see that it's not a list of Employees - it's a list of objects with random name/value pairs: EmployeeData: [ 0: {name: "EmployeeId", value: "1"} 1: {name: "FirstName", value: "10"} 2: {name: "EmployeeId", value: "2"} 3: {name: "FirstName", value: "100"}] MVC isn't going to know what this is, because it's an array of objects with the properties name and value, but not a list of Employees. It posts this data fine, but MVC won't work with it unless the names of the object's properties are identical to the model's. So the issue, I think, is with the naming conventions used in the context of your form. EDIT: I think the issue is that you need to understand that a form is posting lots of name/value pairs. Take, for instance, the following form: Customer 1 Test 100 Test 200 Test 300 Test 400 Test 500 Test 600 Customer 2 Test 100 Test 200 Test 300 Test 400 Test 500 Test 600 It's going to post four things to the controller: EmployeeID, FirstName, EmployeeId, and FirstName. That's because the entire form has four name/value pairs. These objects don't correspond to the MVC model. Like @haim770 says - in your example, the problem is that every time you click a checkbox, a name/value pair is posted to the MVC controller, but it doesn't have anything to do with List<Employee>.
type: Answer
has comment: http://stackoverflow.com/comment/43443973
has comment: http://stackoverflow.com/comment/43444872
answers question: http://stackoverflow.com/q/27506278

http://stackoverflow.com/comment/43401332
has text: from your error, you are using angular 1.2.27. May be error is coming because you are using different version of angular.route. Can you confirm? btw [here](http://plnkr.co/edit/sGYLfNS5H1H3yFBRUcYB?p=preview) is working example of your code.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27483014

recaptcha
tag name: recaptcha
tags question: http://stackoverflow.com/q/27613461
tags question: http://stackoverflow.com/q/27574733
type: Tag

http://stackoverflow.com/a/27632694
downvote count: 0
has comment: http://stackoverflow.com/comment/43718296
score: 1
has body: You can access class methods for testing like this: var location = this.subject.constructor.findByPlaceId('whatever'); Why class methods, though? Shouldn’t the service be instantiated?
has comment: http://stackoverflow.com/comment/43717683
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27629728
answers question: http://stackoverflow.com/q/27629728
upvote count: 1
type: Answer

http://stackoverflow.com/q/27582064
accepted answer: http://stackoverflow.com/a/27582299
has comment: http://stackoverflow.com/comment/43588455
type: AnsweredQuestion
score: 1
has title: Cant a function be implemented into while loop?
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/43588610
has comment: http://stackoverflow.com/comment/43589268
has body: function start() { var work = document.getElementById("work").value; var rest = document.getElementById("rest").value; var rounds = document.getElementById("rounds"); var timer = document.getElementById("timer"); function countdown() { var roundsValue = rounds.value; while (roundsValue &gt; 0) { var worktime = setInterval(function () { timer.value = work + "sec"; work = work - 1; if (work === 0) { clearInterval(worktime); } }, 1000); var resttime = setInterval(function(){ timer.value = rest + "sec"; rest = rest-1; if(rest === 0){ clearInterval(resttime); } }, 1000); roundsValue = roundsValue-1; } } } I am working on my javascript progress right now and I came here with this problem. I want to repeat the same amount of work time and rest time as rounds are but it doesnt work like this and I cant help myself. For example: 8 rounds of 10 seconds of work and then 5seconds of rest. It maybe doesnt work because function cant be implemented into a WHILE loop. fiddle: http://jsfiddle.net/shhyq02e/4/
has comment: http://stackoverflow.com/comment/43589037
tagged with: javascript
answer count: 1
has answer: http://stackoverflow.com/a/27582299
favorite count: 0
upvote count: 2

http://stackoverflow.com/comment/43449082
type: Comment
type: QuestionComment
has text: @user1072453 I tried using your code in FF, and it worked for me (used a different address to open). I removed the `page.close()`, and I opened the page. After adding it back in, no page opened in my browser.
comment on: http://stackoverflow.com/q/27508751
score: 0

http://stackoverflow.com/a/30443550
score: 2
upvote count: 2
has body: https://github.com/angular-ui/bootstrap/blob/master/src/alert/alert.js#L22-L31 ...
answers question: http://stackoverflow.com/q/27535260
downvote count: 0
type: Answer

http://stackoverflow.com/comment/43571810
type: QuestionComment
type: Comment
has text: Unless your client is going to be looking at the browser in a movie theater screen I doubt he will be able to see all rows at a time. I wasn't thinking about the standard pagination with a "Prev" & "Next" buttons, but more of an "infinite scroll" where you keep the table with 50 rows and as the user scroll you remove from one end and add on the other end the next rows.
score: 0
comment on: http://stackoverflow.com/q/27572916

http://stackoverflow.com/q/27588579
score: -2
accepted answer: http://stackoverflow.com/a/27588608
tagged with: javascript
downvote count: 2
has answer: http://stackoverflow.com/a/27588608
answer count: 1
favorite count: 0
has body: I am trying to match function declarations in a string using code below // Functions with function fnName(){} var functions = fn.match(/function+[\s\S][.a-zA-Z0-9]+[\s\S]/g); console.log(functions); // Functions with var fnName = function(){} var functions = fn.match(/var+[\s\Sa-zA-Z0-9_$=]+function/g); console.log(functions); But this is unable to catch signature properly. Any suggestions?
tagged with: regex
type: AnsweredQuestion
upvote count: 0
has title: Trying to match function declarations in code using Regex
type: Question

http://stackoverflow.com/a/27594079
upvote count: 2
has body: You can do it this way: result = [string.match(/\d+/g).join(' '), string.match(/[a-zA-Z%]+/g).pop()]
score: 2
answers question: http://stackoverflow.com/q/27593185
downvote count: 0
type: Answer

http://stackoverflow.com/q/27591332
has title: Javascript pass value of time difference in hours * minutes * seconds * 1000
has answer: http://stackoverflow.com/a/27592577
favorite count: 0
has body: I have this JS script: if ($('.count-down').length !== 0){ $('.count-down').countdown({ timestamp : (new Date()).getTime() + 24*60*60*1000 }); } It provides +24 hours as 24*60*60*1000 so script starts count down from 24:00:00 I need to give this script my event date as valuable format Y.m.d H:i I.E. 2014.12.31 12:00, that it would calculate the time difference between now and add it to the code. var difference = getTimeDifferenceFromNow('2014.12.31 12:00') timestamp : (new Date()).getTime() + difference
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43606714
downvote count: 0
score: 1
type: Question
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/27591419
upvote count: 1

required
tag name: required
tags question: http://stackoverflow.com/q/27624201
type: Tag

http://stackoverflow.com/comment/43489276
comment on: http://stackoverflow.com/q/27530329
type: Comment
type: QuestionComment
has text: how are you putting source3 into your dom?
score: 0

http://stackoverflow.com/comment/43700349
type: AnswerComment
comment on: http://stackoverflow.com/a/27632998
type: Comment
has text: React does not know if the object you send as props is immutable (it can be a complex object and you can mutate it in place in the parent component) therefore it can not a make a reference comparison for you. Rather it allows you to decide to render or not through `shouldComponentUpdate` function. In this function you can use reference based comparison if you have immutable objects. Or come up with other logic for mutable objects.
score: 0

http://stackoverflow.com/q/27552270
has comment: http://stackoverflow.com/comment/43542286
has comment: http://stackoverflow.com/comment/43535324
accepted answer: http://stackoverflow.com/a/27553824
tagged with: firefox-addon
answer count: 1
has body: When I trying to send a function through port.emit it ends up null on the other side. If I change it to a simple string it works fine. Can you not send functions through emit? self.port.emit("requestBackground", someFunction);
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/43532570
tagged with: firefox-addon-sdk
type: AnsweredQuestion
upvote count: 2
has answer: http://stackoverflow.com/a/27553824
downvote count: 1
type: Question
tagged with: firefox
tagged with: javascript
has title: Is it possible to send functions through the Firefox SDK's port.emit()?

http://stackoverflow.com/comment/43519684
type: Comment
type: QuestionComment
has text: Which library should I reference to in goal to use SHDocVw and MSHTML objects ?
comment on: http://stackoverflow.com/q/27506705
score: 0

http://stackoverflow.com/q/27530346
tagged with: asp.net
favorite count: 0
has title: How to display success and error messages after postback?
type: Question
accepted answer: http://stackoverflow.com/a/27530717
has comment: http://stackoverflow.com/comment/43489766
has comment: http://stackoverflow.com/comment/43490647
has comment: http://stackoverflow.com/comment/43489430
has comment: http://stackoverflow.com/comment/43489651
upvote count: 3
score: 0
downvote count: 3
answer count: 1
has comment: http://stackoverflow.com/comment/43489679
tagged with: c#
has body: I am using ASP.NET and C#. I have a form in which the user can upload a file to the server. It does a client-side validation check with Javascript to make sure it is the correct file type, etc. If it passes that, control is handed off to the aspx.cs codebehind file. After the upload happens, I want to display a success notification on the same page or an error notification if any error is thrown. How do I create a variable that can be passed back to the aspx file and displayed? upload.aspx <%@ Page Language="C#" CodeFile="upload.aspx.cs" Inherits="Upload" %> ... //I want to put something here like: //<% if success is given, display "Successful Upload" in green %> //<% if failure is given, display "Error Uploading" in red %> <asp:FileUpload ID="uploadfile1" runat="server" /> <asp:FileUpload ID="uploadfile2" runat="server" /> <asp:FileUpload ID="uploadfile3" runat="server" /> <asp:Button ID="btnUpload" runat="server" Text="Upload" onClientClick="return validate()" onClick="btnUpload_Click" /> upload.aspx.cs using System; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class Upload_File : System.Web.UI.Page { protected void btnUpload_Click(object sender, EventArgs e) { FileUpload[] files = new FileUpload[3]; files[0] = uploadfile1; files[1] = uploadfile2; files[2] = uploadfile3; string rootpath = "C:\\path\\to\\directory\\"; for(int i = 0; i < 3; i++) { if(files[i].HasFile) { files[i].SaveAs(rootpath + files[i].FileName); //I want to put something here like: //var uploadTime = getTimeStamp(); //var VariableToPass = "Files uploaded at " + uploadTime; //also, a way to catch error thrown and set success/error boolean } } } }
tagged with: javascript
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27530717

http://stackoverflow.com/a/27555925
type: Answer
score: 3
upvote count: 3
has body: There is no need of having the Copy constructor. Just use var c = Object.assign(Object.create(b), a);
accepted answer of: http://stackoverflow.com/q/27555744
downvote count: 0
answers question: http://stackoverflow.com/q/27555744
type: AcceptedAnswer

http://stackoverflow.com/comment/43687575
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27633929
score: 1
has text: Ready is not a method of document - it is as you pointed out - a function of the jQuery library which accepts the document as an parameter. $(function() { // Handler for .ready() called. }); does exactly the same.

http://stackoverflow.com/comment/43403446
score: 0
type: AnswerComment
has text: preloading and cors wouldn't be a issue, i'm building a phonegap app with camera function, one image from camera and watermark from inside app dir, i'll look around to fix toDataUrl thing, any directions ?
comment on: http://stackoverflow.com/a/27485072
type: Comment

http://stackoverflow.com/q/27557048
tagged with: angularjs
type: UnansweredQuestion
has title: Select menu using two arrays
has comment: http://stackoverflow.com/comment/43540408
has comment: http://stackoverflow.com/comment/43540644
type: Question
has comment: http://stackoverflow.com/comment/43540748
has answer: http://stackoverflow.com/a/27557151
tagged with: javascript
has body: How can I create a dropdown using two arrays, one for values and one for text? var values = [10, 25, 50, 100]; var text = ['ten', 'twenty-five', 'fifty', 'hundred']; So that I would then get the following select: ten twenty-five fifty hundred
score: 0
tagged with: ng-options
has comment: http://stackoverflow.com/comment/43540436
answer count: 1

http://stackoverflow.com/a/27663392
has body: I compromised and ended up using socket.emit() The only downside in comparison is requiring a ref to the socket you're emitting to.
accepted answer of: http://stackoverflow.com/q/27588262
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27588262
type: Answer

http://stackoverflow.com/q/27595015
has answer: http://stackoverflow.com/a/27595022
upvote count: 2
downvote count: 1
type: Question
has title: Why does this function example from Eloquent JavaScript return the value 24?
possible better answer: http://stackoverflow.com/a/27595210
tagged with: function
has answer: http://stackoverflow.com/a/27595210
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27595022
answer count: 2
score: 1
has body: I am new to JavaScript and am trying to understand an example from the book. When I step through this example, I expect the value of fac(4) to be 12. That would be the result of (4 - 1) * 4. However, when I run the code from the online book (near bottom of page) at http://eloquentjavascript.net/00_intro.html, I get the value 24. What am I missing here? function fac(n) { if (n == 0) return 1; else return fac(n - 1) * n; } console.log(fac(4)); I have tried to find an answer through Twitter and through online research but have been unsuccessful. I know I am overlooking something, but can't seem to see it.
favorite count: 0
has comment: http://stackoverflow.com/comment/43614438
has comment: http://stackoverflow.com/comment/43613750
has comment: http://stackoverflow.com/comment/43614584
type: AnsweredQuestion
tagged with: recursion

http://stackoverflow.com/a/27501844
downvote count: 0
has comment: http://stackoverflow.com/comment/43475421
type: Answer
answers question: http://stackoverflow.com/q/27500617
accepted answer of: http://stackoverflow.com/q/27500617
upvote count: 15
score: 15
has body: The problem is that you're selecting plain g elements to bind the data to (.selectAll('g').data(...)). This works fine when there's only one level of those elements, but as .selectAll() works recursively, it will select many more elements than you would think when you have the nested structure. That is, the selection contains many more elements, which "consume" the bound data. So the data doesn't end up being matched to the correct elements. To fix, simply make the selector more specific: group = d3.select('.svg-content') .selectAll('g.group-content') .data(...); Complete demo here.
has comment: http://stackoverflow.com/comment/86628431
type: AcceptedAnswer

http://stackoverflow.com/q/27491070
has body: I have an existing HTML based web UI for an administration panel. I am trying to take all of the HTML components, and turn them into re-usable AngularJS directives so I can embed them in a page with minimal effort. Here is one I'm stuck on: {{test}} 8068 Based on new sales This snippet, used inside of my .html GUI will create a small box shaped title with some data inside. Could someone give me an example of how to turn this into a reusable component? So far I'm here: admin.directive('whiteBox', function () { return { restrict: 'EA', //restrict the directive to ONLY an attribute or element replace: true, transclude: true, template: ' ' + ' ' + '{{test}}' + ' ' + ' ' + '' + '8068' + '' + ' ' + ' ' + ' ' + ' ' + ' ' + ' ' + 'Based on new sales' + ' ' + ' ', link: function (scope, element, attrs) { // add events } }; But this breaks the application for some reason.
has comment: http://stackoverflow.com/comment/43414525
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/27491346
has comment: http://stackoverflow.com/comment/43414250
favorite count: 0
has comment: http://stackoverflow.com/comment/43414263
tagged with: angularjs
has title: Turn an HTML/CSS element into a re-usable AngularJS directive?
upvote count: 1
has comment: http://stackoverflow.com/comment/43414035
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43414229
score: 1
has comment: http://stackoverflow.com/comment/43413896
has comment: http://stackoverflow.com/comment/43414216
has answer: http://stackoverflow.com/a/27491346
type: Question
answer count: 1
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/43689430
score: 0
type: Comment
type: QuestionComment
has text: it's fairly easy using absolute position, give ul a higher z-index than the image and set parent to positin relative
comment on: http://stackoverflow.com/q/27635002

http://stackoverflow.com/comment/43384232
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27474930
has text: I'm running a default Chrome installation with no extensions.

createjs
tags question: http://stackoverflow.com/q/27585620
tags question: http://stackoverflow.com/q/27604446
type: Tag
tag name: createjs
tags question: http://stackoverflow.com/q/27593208
tags question: http://stackoverflow.com/q/27640152
tags question: http://stackoverflow.com/q/27571930

http://stackoverflow.com/a/27593731
score: 1
has comment: http://stackoverflow.com/comment/43611030
upvote count: 1
has comment: http://stackoverflow.com/comment/43611195
answers question: http://stackoverflow.com/q/27593505
has body: To answer your updated question: Javascript ignores the line breaks and the spacing. It simply reads it as .module().value().factory.config(), but it is formatted in a human readable manner.
type: Answer
downvote count: 0

http://stackoverflow.com/comment/43549150
type: AnswerComment
has text: Then you need change you sql: rs=st.executeQuery("select id, cname from CustomerMaster")
comment on: http://stackoverflow.com/a/27561643
type: Comment
score: 0

http://stackoverflow.com/comment/43393180
score: 0
comment on: http://stackoverflow.com/q/27480014
type: QuestionComment
has text: try this `onclick="return submit();"`. and then return true or false from your function whether you want to submit form or not.
type: Comment

http://stackoverflow.com/comment/43655781
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27617019
has text: it's too late in the page cycle to even consider calling the server, do it long before user hits their back button or closes tab or shuts down browser or even computer
score: 0

http://stackoverflow.com/q/27630657
has comment: http://stackoverflow.com/comment/43682117
has comment: http://stackoverflow.com/comment/43682039
accepted answer: http://stackoverflow.com/a/27631182
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43681978
type: Question
has title: how to set values dynamically to javascript var
tagged with: javascript
has comment: http://stackoverflow.com/comment/43681897
has body: i've a requirement to set the values dynamically into js var, which i will use it to set to sapui5 model . but i'm unable to do that. http://jsbin.com/fubobuvoqi/1/edit?html,console here, i'm unable to set next value into the array: data.a.b.c[1].c1 = "234"; console.log(data.a.b.c[1].c1); is it possible do that way, or its completely wrong way of doing it.. what is best way of doing this? i want to grow my c array dynamically.
has comment: http://stackoverflow.com/comment/43682012
has comment: http://stackoverflow.com/comment/43681990
score: 0
has answer: http://stackoverflow.com/a/27631182
answer count: 1

http://stackoverflow.com/a/27486920
accepted answer of: http://stackoverflow.com/q/27486887
has body: But yearobj is not coming up null, so the error persists. Maybe you've found a yearobj but yearobj.singleNodeValue isn't what you expect Simplify it down to a check for truthiness of both yearobj and singleNodeValue var year = ''; if (yearobj &amp;&amp; yearobj.singleNodeValue) { year = yearobj.singleNodeValue.innerText; }
type: Answer
score: 1
answers question: http://stackoverflow.com/q/27486887
upvote count: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/27540471
possible better answer: http://stackoverflow.com/a/27540510
linked to: http://stackoverflow.com/q/5978519
tagged with: setinterval
has title: How to create a function setInterval with clearInterval inside it?
tagged with: javascript
tagged with: clearinterval
linked to: http://stackoverflow.com/q/9253938
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27540553
has answer: http://stackoverflow.com/a/27540571
type: Question
has body: I have a app that must send the user to homepage after some events. For this I use this bit of code that works good: var waitime = 1000; var handle=setInterval(function () { $('.wrapper').html(divResp); $('body').append(js); clearInterval(handle); }, waitime); But I was trying to create a function to be called instead copy the code every time. So, after some reseach setInterval and how to use clearInterval and clearInterval outside of method containing setInterval I have create this one: function refreshToHomePage3(handle,waitime){ return setInterval(function () { $('.wrapper').html(divResp); $('body').append(js); clearInterval(handle); }, waitime); } The problem is when a call the function, like this: var refreshIntervalId=refreshToHomePage3(refreshIntervalId,waitime); I have a infinite loop. I already solved the problem using setTimeout instead of setInterval and the function became like this one: function refreshToHomePage2(waitime){ setTimeout(function () { $('.wrapper').html(divResposta); $('body').append(js); }, waitime); } But I was wondering how to solve the problem using setInterval and clearInterval. Any thougths?
has answer: http://stackoverflow.com/a/27540510
accepted answer: http://stackoverflow.com/a/27540553
score: 0
answer count: 3

http://stackoverflow.com/comment/43435408
has text: in my sql Server tbl i have productID and ProductName ie 1 Soap , 2 oats .if i select soap i want to get id 1
comment on: http://stackoverflow.com/a/27502444
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/27503138
has body: Try this, You should set the "repeat" value. AnimateRotate(degree, repeatcount). In your case set the repeatcount as "infinite". function AnimateRotate(angle,repeat) { var duration= 1000; setTimeout(function() { if(repeat &amp;&amp; repeat == "infinite") { AnimateRotate(angle,repeat); } else if ( repeat &amp;&amp; repeat &gt; 1) { AnimateRotate(angle, repeat-1); } },duration) var $elem = $('.icon-repeat'); $({deg: 0}).animate({deg: angle}, { duration: duration, step: function(now) { $elem.css({ 'transform': 'rotate('+ now +'deg)' }); } }); } AnimateRotate(45,"infinite"); Here the demo
answers question: http://stackoverflow.com/q/27502594
upvote count: 3
type: Answer
downvote count: 0
score: 3

http://stackoverflow.com/comment/43509253
type: AnswerComment
has text: @Siphorus glad i could help , if you find my answer correct , then please choose it as correct one :)
comment on: http://stackoverflow.com/a/27538780
type: Comment
score: 0

http://stackoverflow.com/comment/43476974
type: Comment
comment on: http://stackoverflow.com/q/27524084
has text: are you using _Multi-Page Model_ (all pages in one file) or _Single Page Model_ (each page in a separate file)?
score: 1
type: QuestionComment

http://stackoverflow.com/a/27629901
has body: The problem is that you are trying to access a property with the dot notation and the variable. myApp.aName.value; this sometimes creates new property or returns undefined You should use this notation instead myApp[aName];
accepted answer of: http://stackoverflow.com/q/27629799
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43680803
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/27629799

http://stackoverflow.com/comment/43594724
has text: Might be because `confirm` is a reserverd word in JavaScript and is used to display a confirmation box.
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27585117

http://stackoverflow.com/q/27609399
type: Question
has answer: http://stackoverflow.com/a/27609759
answer count: 2
possible better answer: http://stackoverflow.com/a/27609477
tagged with: javascript
linked to: http://stackoverflow.com/q/10954911
has comment: http://stackoverflow.com/comment/43641138
accepted answer: http://stackoverflow.com/a/27609759
has answer: http://stackoverflow.com/a/27609477
score: 0
has comment: http://stackoverflow.com/comment/43641150
favorite count: 0
has title: PHP / CSS or Javascript - Automatically create new Divs
upvote count: 1
tagged with: php
has comment: http://stackoverflow.com/comment/43641042
tagged with: css
has comment: http://stackoverflow.com/comment/43641093
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43641412
has body: I have searched on google for this and cannot seem to find what i am looking for, so please forgive me if this is duplicated or answered before... And im a beginner in web design and programming... I am trying to create new divs above an existing Div and to push the older div down the page,How would i do this effectively, should i use PHP, Javascript or CSS. It is for a comments section, I know i need a database to save comments but all i am trying to do at the moment is to create repeating Divs that flow down the page upon submit. HTML & PHP: PHP Test Interactive Let us and others know your thoughts on this subject... Thoughts: In this section, will be where your thoughts are displayed for others to see... <?php $comments = $_REQUEST ['Comments']; echo " ".$comments." "; ?> CSS: body { } #wrapper { margin: 0 auto; width: 500px; border: 1px solid black; } #comment { border: 1px solid black; padding: 5px; margin: 5px; text-align: center; } This is where i am at currently.
downvote count: 1

http://stackoverflow.com/q/27571716
score: 0
tagged with: android
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/29051635
type: UnansweredQuestion
has title: Showing Android soft keyboard for an HTML field even when an input device is attached
has body: There is an Android tablet with a barcode scanner connected via USB. This tablet shows an intranet web site. Because the Android OS detects an input device, it stops displaying the soft keyboard when focus goes into a field on the screen. Most of the time this is fine, but there is a couple of fields for which the keyboard must be displayed. Is there a way to trigger the soft keyboard with JavaScript or in some declarative way from an HTML page? It is currently not an option to create a wrapper Android app that would display the web site in a WebView and trigger the keyboard via the javascript interface. This is because the WebView uses the stock Android browser, which does not support all features the web site has (the Android version is not too recent). So the tablet runs a separately installed Firefox (or Chrome, no preference).
type: Question
tagged with: input-field
tagged with: javascript
tagged with: android-softkeyboard

http://stackoverflow.com/comment/43647590
type: Comment
has text: I am using c9.io (which I prefer over nitrous.io) [here](https://ide.c9.io/b2550/website-meteor)
type: AnswerComment
comment on: http://stackoverflow.com/a/27612653
score: 0

http://stackoverflow.com/q/27556778
has answer: http://stackoverflow.com/a/27558476
upvote count: 2
type: Question
has title: CSS3 changing animation duration (speed) mid-animation
has body: I'm not sure if this is a duplicate or not, so forgive me. Question Is it possible to change the animation-duration without resetting the animation? If not, is it possible to wait until the final keyframe is completed before removing the animation and re-adding it to start the animation at the slower speed (or even wait until any keyframe is complete)? Background I'm making an app that allows people to create groups. I work at a church, and different groups are for different demographics (e.g. children, men, women, all adults, etc). Groups may be for a single demographic or many. Groups may also specify whether childcare is handled by the group or if the parent must take care of it. We've found that when creating a group intended for adults but that provides childcare at the house the group meets at, people select "Children" which indicates to us that the group is for children, which it is not. I only have 570px by 456px to work with (against my objections, the group submission page is loaded in a popup iframe), so I had to get creative with layout. Previously (ie, before bootstrap), I had an ugly layout with smaller inputs, and an ugly message explaining that, in the case described above, they should not select children, and it worked to a degree. Now, I have a blue info button that uses a bootstrap popover to display the message. This works to a lesser degree, as I suspect people are not clicking the button, as "Who's invited?" seems fairly self explanatory. My solution is to make the info-sign bounce if they select more than one demographic, and bounce twice as fast if one of the selected checkboxes is "Children". Code I've created the classes and added the (simplified) JavaScript to do this. var iGlyph = $("#glyphInfo"); var btnBounce = $("#btnToggleBounce"); var btnFast = $("#btnToggleFast"); var spanDur = $("#spanDuration"); var spanClass = $("#spanClass"); function updateText() { spanDur.text(iGlyph.css("animation-duration")); spanClass.text(iGlyph.prop("clas…
linked to: http://stackoverflow.com/q/20340112
has comment: http://stackoverflow.com/comment/100719115
accepted answer: http://stackoverflow.com/a/27558476
score: 2
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: animation
tagged with: css
type: AnsweredQuestion

http://stackoverflow.com/comment/43479961
type: QuestionComment
has text: Can you show us the code where you tried using the `arguments` variable? I'm pretty sure that should have worked.
score: 0
comment on: http://stackoverflow.com/q/27521473
type: Comment

http://stackoverflow.com/a/67121883
has body: You can check this also with startsWith(): Object.keys(obj).some(i =&gt; { return i.startsWith('addr') })
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/27507110
downvote count: 0
type: Answer

http://stackoverflow.com/comment/43658005
comment on: http://stackoverflow.com/a/27609735
type: AnswerComment
score: 0
has text: @Kach I think you want to split each part of time and you can do it now and with `parseInt()` function you can change string to integer
type: Comment

http://stackoverflow.com/comment/43587463
comment on: http://stackoverflow.com/a/27581288
type: AnswerComment
score: 0
type: Comment
has text: @user1995781 see output

http://stackoverflow.com/comment/43663976
comment on: http://stackoverflow.com/q/27621705
score: 0
type: Comment
type: QuestionComment
has text: did you try using local storage

http://stackoverflow.com/a/27486732
score: 5
accepted answer of: http://stackoverflow.com/q/27485735
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27485735
has body: By default cURL uses Content-Type: application/x-www-form-urlencoded for form submissions that do not contain files. For urlencoded forms your data needs to be in the right format: curl -X POST -d 'foo=bar&amp;baz=bla' http://127.0.0.1:3000/module or curl -X POST -d 'foo=bar' -d 'baz=bla' http://127.0.0.1:3000/module. For JSON, you'd have to explicitly set the right Content-Type: curl -H "Content-Type: application/json" -d '{"foo":"bar","baz":"bla"}' http://127.0.0.1:3000/module. Also as @Brett noted, you need to app.use() your middleware before that POST route somewhere (outside of a route handler).
upvote count: 5
type: Answer
downvote count: 0

http://stackoverflow.com/a/61092351
downvote count: 0
answers question: http://stackoverflow.com/q/27489881
type: Answer
has body: Solution in 2020 You have to do 2 things: include offerToReceiveAudio and offerToReceiveVideo when create RTCPeerConnection add addTrack Sample code: const peerConnection= new RTCPeerConnection({ configuration: { offerToReceiveAudio: true, offerToReceiveVideo: true }, iceServers: [{ urls: 'stun:stun.l.google.com:19302' }] }) localStream.getTracks().forEach(track =&gt; { peerConnection.addTrack(track, localStream) }) const offer = await peerConnection.createOffer() await peerConnection.setLocalDescription(offer) peerConnection.onicecandidate = event =&gt; { if (event.candidate) { console.log('Ice candidate: ', event.candidate) } } ... other codes
has comment: http://stackoverflow.com/comment/124250413
upvote count: 5
score: 5

http://stackoverflow.com/a/27599087
score: 3
upvote count: 3
has body: newObj.subjects is Array, so you need check it like this if(Array.isArray(newObj.subjects) &amp;&amp; !newObj.subjects.length) { alert("Empty subjects"); }
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27599063
answers question: http://stackoverflow.com/q/27599063
type: Answer

http://stackoverflow.com/a/27594420
has comment: http://stackoverflow.com/comment/43612544
has comment: http://stackoverflow.com/comment/43613060
has comment: http://stackoverflow.com/comment/43612822
has body: It seems to me that when you save, your myFavouriteProp variable is an array that will contain one element, the propId. Basically in JSON, it will look like this [2]. In if (data.Properties.id == myFavouriteProp) you are comparing data.Properties.id, which I assume is an integer, to myFavouriteProp, which is an array (You are making the comparison 2 == [2]). This will never be true. I would change the comparison to if (data.Properties.id == myFavouriteProp[0]) and see if that works better for you. This will be comparing integer value to integer value and should work the way you would expect it to.
answers question: http://stackoverflow.com/q/27594308
score: 0
has comment: http://stackoverflow.com/comment/43613321
has comment: http://stackoverflow.com/comment/43612597
has comment: http://stackoverflow.com/comment/43612705
type: Answer

http://stackoverflow.com/comment/43626322
type: QuestionComment
comment on: http://stackoverflow.com/q/27544922
has text: I added more information on what my html form looks like. I hope it helps.
score: 0
type: Comment

http://stackoverflow.com/comment/43598650
has text: @Sri, is the `num` value passed into the funciton? I'd suggest you to rewrite this function simplifying it.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27551937

http://stackoverflow.com/comment/43499291
type: QuestionComment
has text: Maybe try moving your animation class `#prism {}` to before your transform classes? Right now it's at the end, so it would be firing after all the transforms have happened.
comment on: http://stackoverflow.com/q/27535078
score: 0
type: Comment

http://stackoverflow.com/a/27521528
answers question: http://stackoverflow.com/q/27521471
type: AcceptedAnswer
upvote count: 23
has body: Add else statement to your code, because if you get error, your callback executes twice if (err || account.length === 0) { callback(err); } else { callback(null, account[0]); }
type: Answer
downvote count: 0
score: 23
accepted answer of: http://stackoverflow.com/q/27521471

http://stackoverflow.com/q/27483985
accepted answer: http://stackoverflow.com/a/27486529
upvote count: 1
type: Question
score: 1
downvote count: 0
tagged with: jquery-mobile
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27486529
has body: I am implementing zooming feature in my application. When i double click on image, the image going to zoom. For single click working fine. but double click not working in mobile but it working in browser. I used doubletap, ondblclick and dblclick. these are not working in mobile, but working perfectly in browser. I'm using phonegap, and tested in android mobile.
type: AnsweredQuestion
tagged with: cordova
has title: double click implementaion in phonegap

http://stackoverflow.com/comment/43657756
score: 0
comment on: http://stackoverflow.com/q/27617523
has text: Yes thank you something similar I have under update: related question. I think the JsHint warning can be solved but not the intellisense.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27603668
answers question: http://stackoverflow.com/q/27603579
type: Answer
score: 1
upvote count: 1
downvote count: 0
has body: A better way of doing this would be using proper prototypes: function MyObjectConstructor() { this.property = ''; } MyObjectConstructor.prototype.init = function(newProperty) { this.property = newProperty; }; MyObjectConstructor.prototype.getProperty = function() { return this.property; };

http://stackoverflow.com/comment/43900298
has text: @markpsmith but i want to use the strongly types version of the datatables, so that i can benefit from the model binder ,, can you adivce on this please? second question, from where i can find tutorials on this (strongly typed datatables ?)..
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27624046

http://stackoverflow.com/comment/43455819
score: 0
type: AnswerComment
type: Comment
has text: Then do `$("#leftmenu li").css(/*your styles*/);` instead.
comment on: http://stackoverflow.com/a/27511965

http://stackoverflow.com/q/27593344
has answer: http://stackoverflow.com/a/27607310
tagged with: http://stackoverflow.com/tag/json
has title: Parsing JS array with JS and then passing it to PHP
accepted answer: http://stackoverflow.com/a/27625574
type: Question
tagged with: arrays
tagged with: javascript
answer count: 3
possible better answer: http://stackoverflow.com/a/27593657
has answer: http://stackoverflow.com/a/27593657
downvote count: 0
has answer: http://stackoverflow.com/a/27625574
favorite count: 0
score: 6
tagged with: javascript-objects
tagged with: php
upvote count: 6
has body: I'm making a system for calculating road taxes in the netherlands, there for i got a few JS arrays (where the data is in) which i'm parsing with JS (all at the same time, because it's the same format of data), then passing it to PHP as JSON format using the XMLHttpRequest object. For this i first made this data mapper: var roadTaxData = { provinceWeightFuelPricesData: { personen_auto: { noord_holland: dataNoordHolland, zeeland: dataZeeland //TODO: Add all the provinces with it's data to the personen_auto object }, kampeer_auto: { noord_holland: dataNoordHolland2, zeeland: dataZeeland2 } } } The format of this is: Vehicle type Which province The data belonged to that province. I've then made this small parser to parse it to an array: /* Loop through all the specific vehicle types inside the provinceWeightFuelPricesData object */ for (var vehicleType in roadTaxData.provinceWeightFuelPricesData) { /* Where the data is getting stored for each vehicle type */ var data = {}, /* Every province with its data contained in the vehicle type */ provinces = roadTaxData.provinceWeightFuelPricesData[vehicleType]; /* Loop through all province's with its data in the specific vehicle type */ for (var province in provinces) { /* Define each province data */ var provinceData = provinces[province]; /* Add the province to the object as an key */ data[province] = []; /* Loop through the data which belongs to every province */ for (var provinceDataIndex = 0; provinceDataIndex &lt; provinceData.length; provinceDataIndex++) { /* Add the province data to the array */ data[province].push(provinceData[provinceDataIndex]); } console.log('Parsed a the province: ' + province + " from the vehicle type " + vehicleType); console.log(''); } console.log('Parsed the vehicle type: ' + vehicleType); console.log(''); console.log(data); passToPHP(vehicleType, JSON.stringify(data)); } This is all going great, and gives me back the correct array with data when i do this: console.log(data); But when i've passe…
type: AnsweredQuestion

http://stackoverflow.com/q/27588551
has answer: http://stackoverflow.com/a/27588584
type: AnsweredQuestion
score: 0
type: Question
duplicate of: http://stackoverflow.com/q/14791158
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27588584
has title: Javascript simple count up with delay
answer count: 1
linked to: http://stackoverflow.com/q/14791158
has body: I've got a JS script that should change a html element - visibly count 1 to 100. When I add a timeout, the for loop doesn't loop anymore - jumps right to 100. It works with alert but not with the div change. var theLabel = document.getElementById("counter"); function doSetTimeout(i) { setTimeout(function() { /*alert(i); */ theLabel.innerHTML = i; }, 1000); } for (var i = 1; i &lt;= 100; i++) doSetTimeout(i);

http://stackoverflow.com/a/27541571
answers question: http://stackoverflow.com/q/27541311
score: 0
type: Answer
has body: Well, the consensus answer is that the fastest way to iterate through an array is with the very same for loop that you used, so nice work. But, I made a jsPerf for this specific case, and... It turns out the while loop is quicker! In fact, it seems to be a whole 90% quicker. Not sure why that's the case, but the proof is all there (at least in my browser). Granted, I assumed that if you had multiple instances of the value in the array, you would want to know all the indices that matched it, not just the first occurrence, so the return value is an array as well. Anyway, here is the winning code block: //Note that I have 2 instances of tomato! var words = ['apple', 'orange', 'tomato', 'ananas', 'banana', 'mango', 'lemon', 'tomato']; //Gave the function two arguments to make it more generic function search (arr, term) { var i, indices = []; while (i &lt; arr.length) { if (arr[i] === term) { indices.push(i); } i++; } return indices; } search(words, 'tomato');

http://stackoverflow.com/q/27581731
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27581902
tagged with: css
has answer: http://stackoverflow.com/a/27581905
has comment: http://stackoverflow.com/comment/43588015
type: UnansweredQuestion
type: Question
linked to: http://stackoverflow.com/q/8027423
has body: I am trying to learn cookies in JavaScript. I have already made it possible to save a text as a cookie and view the what is inside the cookie on another page. What I would like to do now is to make another box like the one I have before but in this box I want to enter rgb color code which will give the cookie page 2 the color which has been saved in the cookie by the user. Hope you understood my question and can help me as much as possible. Here is my code: Cookie Page 1: Cookies side 1 Cookies 1 Cookies 2 Save/Delete a cookie Write a text Cookie Page 2: Cookie 2s Cookies 1 Cookies 2
tagged with: cookies
has title: Suggestions with JavaScript Cookies
answer count: 2
has comment: http://stackoverflow.com/comment/43587777
tagged with: function

http://stackoverflow.com/q/27491514
score: 1
accepted answer: http://stackoverflow.com/a/27491836
tagged with: mysql
type: Question
possible better answer: http://stackoverflow.com/a/27491719
has answer: http://stackoverflow.com/a/27491836
has comment: http://stackoverflow.com/comment/43414678
tagged with: javascript
tagged with: date
has comment: http://stackoverflow.com/comment/43414605
answer count: 2
has comment: http://stackoverflow.com/comment/43414953
upvote count: 1
has comment: http://stackoverflow.com/comment/43414607
has comment: http://stackoverflow.com/comment/43414603
downvote count: 0
favorite count: 0
has title: Sending JS date object to PHP
has answer: http://stackoverflow.com/a/27491719
has body: I'm sending JS date object to PHP in ajax. Then I write it to mySql. Should I convert date object to string in javascript before sending? Or can I convert it in PHP - I prefer this solution. Which way is correct one? PS. I'm using PDO to write it in DB.
tagged with: php
linked to: http://stackoverflow.com/q/3002727
type: AnsweredQuestion

http://stackoverflow.com/comment/43599734
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27584042
has text: Why aren't you using real ` ` elements? Without `tabindex`, `role`, etc these "buttons" won't be accessible.
score: 0

http://stackoverflow.com/a/27568533
upvote count: 2
has comment: http://stackoverflow.com/comment/43562306
answers question: http://stackoverflow.com/q/27568318
type: Answer
has comment: http://stackoverflow.com/comment/43563262
has comment: http://stackoverflow.com/comment/43562972
score: 2
has comment: http://stackoverflow.com/comment/43562861
has comment: http://stackoverflow.com/comment/43562451
downvote count: 0
has body: In other words, you're using AJAX to bring in the HTML of the partial view. For security reasons, browsers do not allow scripts tags from dynamically-inserted HTML to be run. You'll either have to include the script in your main view, or load the script dynamically via JavaScript in your AJAX callback. You can do this with something like Require.js or Modernizr.load.
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43563693
accepted answer of: http://stackoverflow.com/q/27568318
has comment: http://stackoverflow.com/comment/43562599

http://stackoverflow.com/comment/43606098
comment on: http://stackoverflow.com/a/27590640
score: 0
type: AnswerComment
type: Comment
has text: I believe abhitalks solution is combines everything you will need.

http://stackoverflow.com/comment/43664489
score: 0
has text: If it bothers you that much, you can always do a custom build - https://github.com/jquery/jquery#how-to-build-your-own-jquery - of jQuery to just include the DOM API and remove everything else.
comment on: http://stackoverflow.com/q/27621699
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43632895
type: QuestionComment
comment on: http://stackoverflow.com/q/27605367
has text: Yes this works. If you want structure you should look at jquery Plugins: http://learn.jquery.com/plugins/basic-plugin-creation/ and create your own plugin (seperate structure from implementation)
score: 0
type: Comment

http://stackoverflow.com/a/27629371
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/43760545
has comment: http://stackoverflow.com/comment/44280738
has comment: http://stackoverflow.com/comment/43760425
has comment: http://stackoverflow.com/comment/43680100
has comment: http://stackoverflow.com/comment/44291426
has comment: http://stackoverflow.com/comment/43680829
upvote count: 1
has body: To call the destroy method, the Marionette controller has a "close" method defined on its prototype: controller.close(); The method that is called is onClose. For info, you can check this in the console:
has comment: http://stackoverflow.com/comment/43759679
score: 1
answers question: http://stackoverflow.com/q/27628998
has comment: http://stackoverflow.com/comment/43760497

http://stackoverflow.com/comment/43480311
has text: Please, add some explanation to your answer.
comment on: http://stackoverflow.com/a/27525540
type: AnswerComment
type: Comment
score: 2

http://stackoverflow.com/q/27482473
answer count: 1
tagged with: javascript
score: 0
has title: Javascript split blob as strings
has answer: http://stackoverflow.com/a/50580603
has comment: http://stackoverflow.com/comment/43397523
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43399727
tagged with: filereader
has body: Say you parse a text file with fileReader: function show() { var file = document.getElementById('myFile'); var data = file.files[0]; var fileRead = new FileReader(); fileRead.onload = function() { document.getElementById('out').appendChild(document.createTextNode(' ' + fileRead.result)) } fileRead.readAsText(data); } How do you split a blob object (raw data) with the split function which works only on strings? If I convert the blob to string and then call readAsText it reasonably complains that the data variable (containing text) is not a blob object. So, basically I want to use the split function on the blob text object.
has comment: http://stackoverflow.com/comment/43402323
has comment: http://stackoverflow.com/comment/43397990
type: Question

http://stackoverflow.com/a/27515120
downvote count: 0
answers question: http://stackoverflow.com/q/27515031
score: 3
type: Answer
upvote count: 3
has body: Something like that is coming in ECMAScript 6: With ECMAScript 6, there is a shorter notation available to achieve the same: var a = "foo", b = 42, c = {}; // Shorthand property names (ES6) var o = { a, b, c }; So you could create your object with the following code var foo = 'bar'; var obj = {foo};

http://stackoverflow.com/q/27504878
upvote count: 1
tagged with: ruby-on-rails
has body: So what I want is to re-render a table after updating an event. I do it like this: ## My Controller: respond_to do |format| if schedule_child.save sql = "schedules.doctor_id = ? AND schedules.location_id = ? AND schedule_children.start_time &gt;= ? AND schedule_children.start_time &lt;= ?" @schedules = ScheduleChild.joins(:schedule).where(sql, current_doctor.id, session[:location_id], Time.now, Time.now + 7.days).order(start_time: :asc).page(params[:page]).per(7) format.js {render :layout =&gt; false} end end My js.erb: $('#schedules').html( "&lt;%= escape_javascript( render "schedules" ) %&gt;" ); My view: %a.status_link.btn.btn-success.btn-sm{"data-href" =&gt; set_schedule_status_path(location_id: session[:location_id] ,id: schedule.id), :style =&gt; "#{schedule.is_away ? 'display: none' : '' }", :id =&gt; "#{schedule.id}", :remote =&gt; "true"} %i.fa.fa-check-square-o %span Available The table was successfully rendered but I cannot click the link in my view. What did I do wrong? Thanks for your help :)
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27506768
score: 1
tagged with: ruby-on-rails-4
answer count: 1
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27506768
has title: Link not working after render partial js
favorite count: 0

http://stackoverflow.com/comment/43473706
comment on: http://stackoverflow.com/a/27521981
score: 0
type: AnswerComment
type: Comment
has text: Yes. Sure. This is a sample code. Pretty much self explanatory http://jsfiddle.net/e81uezsk/

http://stackoverflow.com/comment/43499537
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27535244
has text: Not without separating them, no. The Web Audio API has no real way of taking in a youtube video and extracting sound from it to parse. The other alternative is to find some way to get the video to play in an HTML5 `video` tag, but I don't think that is supported under the current API.

http://stackoverflow.com/comment/43535270
score: 0
comment on: http://stackoverflow.com/a/27547205
type: AnswerComment
has text: Does Alasql do incremental/coordinated updates of queries? If not, it seems a bit odd to compare its performance to Crossfilter. If someone doesn't need coordinated updates then I don't see Crossfilter as a great option in general.
type: Comment

http://stackoverflow.com/q/27536213
score: 1
has title: MeteorJs and Masonry
has body: I am using MeteorJS (So great :) ), to develop simple app. I want to use masonry, so I am using sjors:meteor-masonry package. When I use this code everything works fine: var itemsData = [ { title: 'First item', description: 'Lorem 1', price: 20 }, { title: 'Secounde item', description: 'Lorem 2', price: 40 }, { title: 'Third item', description: 'Lorem 3', price: 10 }, { title: 'Fourth item', description: 'Lorem 4', price: 10 }, { title: 'Five item', description: 'sit 4', price: 10 } ]; Template.itemsList.helpers({ items: itemsData }); Template.itemsList.rendered = function() { var container = document.querySelector('#main'); var msnry = new Masonry( container, { // options columnWidth: 200, itemSelector: '.item' }); }; But when I change part (code) for Template.itemsList.rendered to masonry don't work: Template.itemsList.helpers({ items: function() { return Items.find(); } }); Any ideas ? EDIT myapp/lib/collections/items.js Items = new Mongo.Collection('items'); And it is populated whit data from mongoshell. Data is ok, but masonry dont work. EDIT 2 Masonry stops animating on screen resize and grid is not working as it should. No errors. myapp/client/templates {{title}} {{description}} 172 34 210 {{#each items}} {{> itemSingle}} {{/each}}
has comment: http://stackoverflow.com/comment/43500846
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: meteor
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43501169
upvote count: 1
has answer: http://stackoverflow.com/a/27551636
type: Question
tagged with: masonry

http://stackoverflow.com/comment/43536557
comment on: http://stackoverflow.com/q/27553594
has text: As I said, get rid of the commas after the last elements in an array (in data.addRows(), for example), and also if it is the last attribute in an object block. For example, look at where you set vAxis. After 'Performance' you have a comma, but then close the block. You should only use a comma to separate attributes. If you aren't planning to put another one after it, you shouldn't have a comma. Same goes for the last element in "trendlines" within the "0" block. `showR2:true` should not have a comma after it because you don't add any attributes after that one
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/27532286
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/43493215
score: 2
answers question: http://stackoverflow.com/q/27532221
downvote count: 0
has body: You could just concatenate it in the expression itself. However i would do this on the controller to create that specific view model that needs to be bound, rather than doing it on the view. angular.module('app', []).controller('ctrl', function($scope){ $scope.game ={player1: 1}; $scope.division = [ { name: "Tom", number: 1 }, { name: "Greg", number: 2 } ]; }) Player 1 {{game.player1}}

http://stackoverflow.com/comment/43693849
type: Comment
has text: Where are more_service, service_container, item_template and service_wrapper on your html?
comment on: http://stackoverflow.com/q/27637316
score: 0
type: QuestionComment

http://stackoverflow.com/comment/43414611
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27491142
has text: allright. I've made some progress in those 20 mins. I think I am onto something. If you're interested check back in like an hour I'll do my best to update this by then. Thank you.

http://stackoverflow.com/a/27579936
has body: Use this condition to Determine if an element has been totally scrolled: element.scrollHeight - element.scrollTop === element.clientHeight Working Fiddle
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/27579634
answers question: http://stackoverflow.com/q/27579634

http://stackoverflow.com/comment/101748372
has text: Putting everything inside `document.addEventListener("DOMContentLoaded", function () {` unfortunately didn't help.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/56607403
type: AnswerComment

http://stackoverflow.com/comment/43617060
type: AnswerComment
score: 0
type: Comment
has text: @Craig Also, don't forget to remove "track by loc.LOCid" from your ng-options expression as it's not supposed to be used with this alternative form of ng-options.
comment on: http://stackoverflow.com/a/27596495

http://stackoverflow.com/comment/43518947
type: QuestionComment
has text: "eval is evil", what exactly are you trying to achieve?
comment on: http://stackoverflow.com/q/27546215
score: 0
type: Comment